/* ==========================================================================
   The Foley Fig Company — foleyfigco.com
   Palette and type are drawn from the brand's own packaging.
   ========================================================================== */

:root {
  /* palette */
  --cream:        #F5EFE3;
  --cream-deep:   #EDE4D3;
  --plum:         #402C3B;
  --plum-deep:    #33222F;
  --aubergine:    #59374C;
  --olive:        #4A5227;
  --olive-ink:    #333A1B;
  --gold:         #B08D46;
  --gold-soft:    #C8A96A;
  --amber:        #9A5B22;
  --ink:          #2E2620;

  /* type */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body:    "Lora", "Georgia", serif;
  --font-utility: "Jost", "Helvetica Neue", sans-serif;

  --wrap: 1200px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; color: var(--olive-ink); }

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.05; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.12; }

h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--aubergine); }

a { color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

[hidden] { display: none !important; }

/* ---------- shared bits ---------- */

.eyebrow {
  font-family: var(--font-utility);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow-light { color: var(--gold-soft); }

.ornament {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--olive); margin: 1.4rem 0;
}
.ornament-rule { flex: 0 0 72px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament-rule:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.ornament-fleur { width: 20px; height: 20px; color: var(--gold); }
.section-head .ornament { justify-content: center; }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-utility);
  font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  padding: 0.95rem 1.7rem;
  border: none; cursor: pointer; text-decoration: none;
  transition: background-color 0.25s var(--ease-out), transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(64, 44, 59, 0.25); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--plum); color: var(--cream); }
.btn-primary:hover { background: var(--aubergine); }
.btn-dark { background: var(--plum); color: var(--cream); padding: 0.75rem 1.3rem; }
.btn-dark:hover { background: var(--aubergine); }
.btn-gold { background: var(--gold); color: var(--plum-deep); }
.btn-gold:hover { background: var(--gold-soft); }

.btn-heart { width: 14px; height: 14px; color: var(--gold-soft); }
.btn-gold .btn-heart { color: var(--plum); }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 239, 227, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(74, 82, 39, 0.14);
  transition: box-shadow 0.3s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(46, 38, 32, 0.08); }

.header-inner {
  max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 0.7rem 1.5rem;
}

.brand img { width: 64px; height: 64px; transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out); }
.site-header.is-scrolled .brand img { width: 52px; height: 52px; }

.site-nav { display: flex; gap: clamp(1rem, 2.5vw, 2.2rem); }

.nav-link {
  font-family: var(--font-utility);
  font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none; color: var(--olive-ink);
  padding: 0.4rem 0; position: relative;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--gold);
  transition: right 0.3s var(--ease-out);
}
.nav-link:hover::after, .nav-link.is-active::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; color: var(--olive-ink);
}
.icon-btn svg { width: 21px; height: 21px; }

.nav-toggle { display: none; }

/* ---------- hero ---------- */

.hero { overflow: hidden; }

.hero-inner {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3rem, 7vw, 6rem) 1.5rem;
}

.hero-copy .lede { max-width: 42ch; margin-bottom: 2.2rem; font-size: 1.1rem; }

.hero-media { position: relative; }

.hero-arch {
  border-radius: 999px 999px 18px 18px;
  overflow: hidden;
  border: 1px solid rgba(176, 141, 70, 0.5);
  box-shadow: 0 30px 60px rgba(64, 44, 59, 0.18);
  outline: 6px solid var(--cream);
  outline-offset: -14px;
}
.hero-arch img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

.hero-stamp {
  position: absolute; left: -44px; bottom: 36px;
  width: 128px; height: 128px;
  color: var(--olive);
  background: var(--cream);
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(46, 38, 32, 0.18);
  animation: spin 26s linear infinite;
}
.hero-stamp svg { width: 100%; height: 100%; }
.hero-stamp text, .about-stamp text {
  font-family: var(--font-utility); font-size: 9.5px;
  letter-spacing: 0.24em; fill: currentColor;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- values band ---------- */

.values { background: var(--plum); color: var(--cream); }

.values-grid {
  max-width: var(--wrap); margin: 0 auto;
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: clamp(2.5rem, 5vw, 4rem) 1.5rem;
}

.value { text-align: center; padding: 0 1.6rem; }
.value + .value { border-left: 1px solid rgba(200, 169, 106, 0.25); }

.value-icon { width: 34px; height: 34px; color: var(--gold-soft); margin: 0 auto 1rem; }

.value h3 {
  font-family: var(--font-utility); color: var(--cream);
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.value p { font-size: 0.95rem; color: rgba(245, 239, 227, 0.78); }

/* ---------- scroll scene ---------- */

.scene { background: var(--plum-deep); }

.scene-track { height: 320vh; position: relative; }

.scene-stage {
  position: sticky; top: 0; height: 100vh;
  overflow: hidden;
  display: grid; align-items: center;
}

.scene-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 72% 55%, rgba(154, 91, 34, 0.32), transparent 60%),
    linear-gradient(160deg, var(--plum-deep), var(--plum) 55%, var(--aubergine));
}

.scene-pattern {
  position: absolute; inset: -12%;
  background: url("../assets/img/pattern.png") repeat;
  background-size: 560px;
  opacity: 0.07;
  filter: saturate(0.4) brightness(1.4);
  will-change: transform;
}

.scene-stage > * { position: relative; }

.scene-copy {
  max-width: var(--wrap);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.scene-steps { position: relative; margin-top: 1.2rem; min-height: 14rem; max-width: 30rem; }

.scene-step {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  pointer-events: none;
}
.scene-step.is-active { opacity: 1; transform: none; }

.scene-step h2 { color: var(--cream); max-width: 12ch; }
.scene-step p { color: rgba(245, 239, 227, 0.75); max-width: 36ch; margin-top: 1rem; font-size: 1.05rem; }

.scene-dots { display: flex; gap: 0.55rem; margin-top: 1.6rem; }
.scene-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(200, 169, 106, 0.3);
  transition: background 0.3s, transform 0.3s;
}
.scene-dots span.is-active { background: var(--gold-soft); transform: scale(1.3); }

.scene-media {
  position: absolute; right: 4%; top: 50%;
  width: min(44vw, 620px); height: 70vh;
  transform: translateY(-50%);
  pointer-events: none;
}

.scene-halo {
  position: absolute; left: 50%; top: 50%;
  width: 100%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(200, 169, 106, 0.35);
  background: radial-gradient(circle, rgba(200, 169, 106, 0.12), transparent 65%);
}
.scene-halo::after {
  content: ""; position: absolute; inset: 26px;
  border-radius: 50%;
  border: 1px dashed rgba(200, 169, 106, 0.25);
}

.scene-jar, .scene-box {
  position: absolute; left: 50%; top: 50%;
  width: 38%; max-width: none;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
  filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.45));
}

.scene-box { opacity: 0; width: 68%; }

/* ---------- shop ---------- */

.shop { padding: clamp(4rem, 8vw, 7rem) 1.5rem; }

.section-head { text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .eyebrow { display: block; margin-bottom: 0.6rem; }

.product-grid {
  max-width: var(--wrap); margin: 0 auto;
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
}

.product-card { text-align: center; display: flex; flex-direction: column; align-items: center; }

.product-media {
  width: 100%; aspect-ratio: 1;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 88%, rgba(64, 44, 59, 0.10), transparent 42%),
    var(--cream-deep);
  border: 1px solid rgba(176, 141, 70, 0.3);
  border-radius: 6px;
  margin-bottom: 1.3rem;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.product-media img {
  width: 86%; height: 86%; object-fit: contain;
  transition: transform 0.45s var(--ease-out);
}
.product-card:hover .product-media { transform: translateY(-6px); box-shadow: 0 22px 40px rgba(64, 44, 59, 0.16); }
.product-card:hover .product-media img { transform: scale(1.05); }

.product-name {
  font-family: var(--font-utility);
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--olive-ink);
}
.product-price { font-family: var(--font-display); font-size: 1.15rem; color: var(--aubergine); margin: 0.35rem 0 1rem; }

/* ---------- about ---------- */

.about { background: var(--cream-deep); overflow: hidden; }

.about-inner {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.1fr;
  align-items: center; gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3.5rem, 7vw, 6.5rem) 1.5rem;
  position: relative;
}

.about-arch {
  border-radius: 999px 999px 18px 18px;
  overflow: hidden;
  border: 1px solid rgba(176, 141, 70, 0.5);
  outline: 6px solid var(--cream-deep);
  outline-offset: -14px;
  box-shadow: 0 30px 60px rgba(64, 44, 59, 0.18);
}
.about-arch img { aspect-ratio: 4 / 4.6; object-fit: cover; width: 100%; }

.about-copy h2 { margin: 0.8rem 0 1.2rem; }
.about-copy p { max-width: 48ch; margin-bottom: 2rem; }

.about-stamp {
  position: absolute; right: 3%; top: 12%;
  width: 150px; height: 150px;
  color: var(--olive);
  opacity: 0.85;
  animation: spin 30s linear infinite;
}
.about-stamp svg { width: 100%; height: 100%; }

/* ---------- recipes ---------- */

.recipes { padding: clamp(4rem, 8vw, 7rem) 1.5rem; }

.recipe-grid {
  max-width: var(--wrap); margin: 0 auto;
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.recipe-card img {
  aspect-ratio: 4 / 3; object-fit: cover; width: 100%;
  border-radius: 6px;
  border: 1px solid rgba(176, 141, 70, 0.3);
  margin-bottom: 1.1rem;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.recipe-card:hover img { transform: translateY(-5px); box-shadow: 0 18px 36px rgba(64, 44, 59, 0.16); }

.recipe-card h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.recipe-card p { font-size: 0.98rem; color: rgba(46, 38, 32, 0.75); }

/* ---------- wholesale ---------- */

.wholesale {
  background:
    linear-gradient(rgba(51, 34, 47, 0.88), rgba(51, 34, 47, 0.88)),
    url("../assets/img/pattern.png") repeat;
  background-size: auto, 480px;
  padding: clamp(4rem, 8vw, 6.5rem) 1.5rem;
  text-align: center;
}

.wholesale-inner { max-width: 640px; margin: 0 auto; }
.wholesale h2 { color: var(--cream); margin: 0.8rem 0 1.2rem; }
.wholesale p { color: rgba(245, 239, 227, 0.8); margin-bottom: 2.2rem; }

/* ---------- footer ---------- */

.site-footer { background: var(--plum); color: var(--cream); }

.footer-inner {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 0.8fr 0.9fr 1.2fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding: clamp(3rem, 6vw, 4.5rem) 1.5rem 2.5rem;
}

.footer-brand img { width: 120px; height: 120px; }

.footer-social { display: flex; gap: 0.9rem; margin-top: 1.4rem; }
.footer-social a { color: var(--gold-soft); transition: color 0.25s; }
.footer-social a:hover { color: var(--cream); }
.footer-social svg { width: 20px; height: 20px; }

.footer-col h3 {
  font-family: var(--font-utility); color: var(--gold-soft);
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.footer-col a {
  display: block;
  font-family: var(--font-utility);
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(245, 239, 227, 0.82);
  text-decoration: none;
  padding: 0.32rem 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--cream); }

.footer-newsletter p { font-size: 0.95rem; color: rgba(245, 239, 227, 0.78); margin-bottom: 1.2rem; }

.newsletter-form { display: flex; }
.newsletter-form input[type="email"] {
  flex: 1; min-width: 0;
  font-family: var(--font-body); font-size: 0.95rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(200, 169, 106, 0.4);
  background: rgba(245, 239, 227, 0.06);
  color: var(--cream);
}
.newsletter-form input::placeholder { color: rgba(245, 239, 227, 0.5); }
.newsletter-form button {
  display: grid; place-items: center;
  width: 52px; border: none; cursor: pointer;
  background: var(--gold); color: var(--plum-deep);
  transition: background 0.25s;
}
.newsletter-form button:hover { background: var(--gold-soft); }
.newsletter-form button svg { width: 18px; height: 18px; }

.footer-legal {
  text-align: center;
  font-family: var(--font-utility);
  font-size: 0.78rem; letter-spacing: 0.16em;
  color: rgba(245, 239, 227, 0.55);
  padding: 1.4rem 1.5rem 2rem;
  border-top: 1px solid rgba(200, 169, 106, 0.18);
}

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90;
  transform: translate(-50%, 20px);
  background: var(--olive-ink); color: var(--cream);
  font-family: var(--font-utility); font-size: 0.85rem; letter-spacing: 0.08em;
  padding: 0.85rem 1.4rem; border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* stagger siblings */
.values-grid .reveal:nth-child(2), .product-grid .reveal:nth-child(2), .recipe-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.values-grid .reveal:nth-child(3), .product-grid .reveal:nth-child(3), .recipe-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.values-grid .reveal:nth-child(4), .product-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { max-width: 480px; }
  .hero-stamp { left: auto; right: 10px; width: 104px; height: 104px; }

  .values-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 0; }
  .value:nth-child(3) { border-left: none; }

  .product-grid { grid-template-columns: repeat(2, 1fr); }

  .about-inner { grid-template-columns: 1fr; }
  .about-media { max-width: 480px; }
  .about-stamp { top: auto; bottom: 4%; right: 5%; }

  .recipe-grid { grid-template-columns: 1fr; max-width: 560px; }

  .footer-inner { grid-template-columns: 1fr 1fr; }

  /* scene: stack copy over jar */
  .scene-media {
    right: 50%; transform: translate(50%, -50%);
    width: min(80vw, 480px); height: 52vh;
    opacity: 0.4;
  }
  .scene-copy { z-index: 2; }
}

@media (max-width: 640px) {
  .site-nav {
    /* absolute (not fixed): the header's backdrop-filter would otherwise
       become the containing block and collapse a fixed panel */
    position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100vh - 100%);
    background: var(--cream);
    flex-direction: column; align-items: center;
    padding-top: 3rem; gap: 1.6rem;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    z-index: 40;
    overflow-y: auto;
  }
  .site-nav.is-open { transform: none; }

  .nav-toggle {
    display: grid; gap: 5px;
    background: none; border: none; cursor: pointer;
    width: 40px; height: 40px; place-content: center;
  }
  .nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--olive-ink);
    transition: transform 0.3s var(--ease-out), opacity 0.3s;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .product-grid { grid-template-columns: 1fr; max-width: 340px; }
  .values-grid { grid-template-columns: 1fr; }
  .value + .value { border-left: none; border-top: 1px solid rgba(200, 169, 106, 0.25); padding-top: 2rem; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-stamp, .about-stamp { animation: none; }
  .scene-track { height: auto; }
  .scene-stage { position: static; height: auto; padding: 4rem 0; }
  .scene-step { position: static; opacity: 1; transform: none; margin-bottom: 2.5rem; }
  .scene-steps { min-height: 0; }
  .scene-media { position: static; transform: none; width: 100%; height: auto; margin-top: 2rem; }
  .scene-jar { position: static; transform: none; width: 70%; margin: 0 auto; }
  .scene-box, .scene-dots, .scene-halo { display: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Storefront pages (shop, product, cart, checkout, account, content pages)
   ========================================================================== */

/* ---------- page hero band ---------- */

.page-hero {
  background:
    linear-gradient(rgba(51, 34, 47, 0.9), rgba(51, 34, 47, 0.9)),
    url("../assets/img/pattern.png") repeat;
  background-size: auto, 480px;
  text-align: center;
  padding: clamp(3rem, 6vw, 4.5rem) 1.5rem;
}
.page-hero h1 { color: var(--cream); font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.page-hero .eyebrow { display: block; margin-bottom: 0.5rem; }
.page-hero p.page-hero-sub {
  color: rgba(245, 239, 227, 0.8);
  max-width: 52ch; margin: 1rem auto 0;
}

.page-main { max-width: var(--wrap); margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) 1.5rem; }
.page-main-narrow { max-width: 760px; }

.cart-link { position: relative; }
.cart-count {
  position: absolute; top: 0; right: -2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--gold); color: var(--plum-deep);
  font-family: var(--font-utility); font-size: 0.65rem; font-weight: 600;
  border-radius: 999px;
}
.cart-count.is-empty { display: none; }

/* ---------- breadcrumb ---------- */

.crumbs {
  font-family: var(--font-utility);
  font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(46, 38, 32, 0.6);
  margin-bottom: 2rem;
}
.crumbs a { color: var(--olive); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- product detail ---------- */

.product-detail {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.pd-gallery { position: sticky; top: 110px; }
.pd-main-img {
  background:
    radial-gradient(circle at 50% 88%, rgba(64, 44, 59, 0.10), transparent 42%),
    var(--cream-deep);
  border: 1px solid rgba(176, 141, 70, 0.3);
  border-radius: 6px;
  display: grid; place-items: center;
  aspect-ratio: 1; padding: 9%;
}
.pd-main-img img { max-height: 100%; object-fit: contain; }
.pd-lifestyle {
  margin-top: 1rem; border-radius: 6px;
  border: 1px solid rgba(176, 141, 70, 0.3);
  aspect-ratio: 16 / 7; object-fit: cover; width: 100%;
}

.pd-info h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.pd-size {
  font-family: var(--font-utility); font-size: 0.8rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(46, 38, 32, 0.6); margin-top: 0.4rem;
}
.pd-price { font-family: var(--font-display); font-size: 1.7rem; color: var(--aubergine); margin: 1rem 0; }
.pd-tagline { font-style: italic; color: var(--olive); font-size: 1.15rem; margin-bottom: 1rem; }

.pd-buy { display: flex; gap: 0.9rem; align-items: stretch; margin: 1.6rem 0 2rem; }
.qty-field {
  display: inline-flex; align-items: center;
  border: 1px solid rgba(64, 44, 59, 0.35);
}
.qty-field button {
  width: 42px; height: 100%; border: none; background: none; cursor: pointer;
  font-size: 1.1rem; color: var(--plum);
}
.qty-field input {
  width: 44px; text-align: center; border: none;
  font-family: var(--font-utility); font-size: 1rem; background: transparent;
}
.qty-field input::-webkit-outer-spin-button, .qty-field input::-webkit-inner-spin-button { -webkit-appearance: none; }

.pd-block { border-top: 1px solid rgba(176, 141, 70, 0.35); padding: 1.2rem 0; }
.pd-block h2 {
  font-family: var(--font-utility); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--olive-ink);
  margin-bottom: 0.5rem;
}
.pd-block p { font-size: 1rem; }

.related { margin-top: clamp(3rem, 6vw, 5rem); }
.related h2 { text-align: center; margin-bottom: 2rem; }

/* ---------- cart page ---------- */

.cart-list { list-style: none; border-top: 1px solid rgba(176, 141, 70, 0.35); }
.cart-row {
  display: grid; grid-template-columns: 96px 1fr auto auto auto;
  gap: 1.2rem; align-items: center;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(176, 141, 70, 0.35);
}
.cart-thumb {
  background: var(--cream-deep);
  border: 1px solid rgba(176, 141, 70, 0.3);
  border-radius: 6px; display: grid; place-items: center;
  width: 96px; height: 96px; padding: 10px;
}
.cart-thumb img { max-height: 100%; object-fit: contain; }
.cart-row-name { font-family: var(--font-display); font-size: 1.2rem; color: var(--olive-ink); text-decoration: none; }
.cart-row-name:hover { color: var(--aubergine); }
.cart-row-size { font-size: 0.85rem; color: rgba(46, 38, 32, 0.6); }
.cart-row-price { font-family: var(--font-display); font-size: 1.1rem; color: var(--aubergine); }
.cart-remove {
  border: none; background: none; cursor: pointer;
  font-family: var(--font-utility); font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(46, 38, 32, 0.55); text-decoration: underline;
}
.cart-remove:hover { color: var(--plum); }

.cart-summary {
  margin-top: 2rem; margin-left: auto; max-width: 380px;
  background: var(--cream-deep);
  border: 1px solid rgba(176, 141, 70, 0.35);
  border-radius: 6px; padding: 1.6rem;
}
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: 0.6rem; }
.cart-summary-row strong { font-family: var(--font-display); font-size: 1.25rem; }
.cart-summary-note { font-size: 0.85rem; color: rgba(46, 38, 32, 0.65); margin: 0.6rem 0 1.2rem; }
.cart-summary .btn { width: 100%; justify-content: center; }

.cart-empty { text-align: center; padding: 3rem 0; }
.cart-empty p { margin-bottom: 1.6rem; }

/* ---------- forms ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-grid .form-field-full { grid-column: 1 / -1; }

.form-field label {
  display: block;
  font-family: var(--font-utility); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--olive-ink); margin-bottom: 0.4rem;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  font-family: var(--font-body); font-size: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(64, 44, 59, 0.3);
  background: #fffdf8; color: var(--ink);
  border-radius: 3px;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--gold); outline-offset: 0;
  border-color: var(--gold);
}
.form-actions { margin-top: 1.6rem; }

.form-panel {
  background: #FBF7EE;
  border: 1px solid rgba(176, 141, 70, 0.35);
  border-radius: 6px;
  padding: clamp(1.5rem, 3vw, 2.4rem);
}

/* ---------- checkout ---------- */

.checkout-grid {
  display: grid; grid-template-columns: 1.2fr 0.9fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.checkout-step h2 { font-size: 1.5rem; margin: 1.8rem 0 1rem; }
.checkout-step h2:first-child { margin-top: 0; }

.payment-placeholder {
  border: 1.5px dashed rgba(176, 141, 70, 0.7);
  border-radius: 6px;
  background: rgba(176, 141, 70, 0.06);
  padding: 1.5rem;
  text-align: center;
}
.payment-placeholder strong { font-family: var(--font-display); font-size: 1.1rem; color: var(--olive-ink); display: block; margin-bottom: 0.4rem; }
.payment-placeholder p { font-size: 0.92rem; color: rgba(46, 38, 32, 0.7); }
.payment-logos { display: flex; justify-content: center; gap: 0.8rem; margin-top: 1rem; }
.payment-logos span {
  font-family: var(--font-utility); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid rgba(64, 44, 59, 0.3); border-radius: 3px;
  padding: 0.35rem 0.7rem; color: rgba(46, 38, 32, 0.65);
}

.order-summary { position: sticky; top: 110px; }
.order-summary ul { list-style: none; margin-bottom: 1rem; }
.order-summary li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; font-size: 0.98rem; }
.order-summary li span:first-child { color: rgba(46, 38, 32, 0.8); }

/* ---------- account ---------- */

.auth-tabs { display: flex; gap: 0; margin-bottom: 1.8rem; border-bottom: 1px solid rgba(176, 141, 70, 0.4); }
.auth-tab {
  flex: 1; padding: 0.9rem; border: none; background: none; cursor: pointer;
  font-family: var(--font-utility); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(46, 38, 32, 0.5);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.auth-tab.is-active { color: var(--olive-ink); border-bottom-color: var(--gold); }

.account-dash h2 { font-size: 1.4rem; margin-bottom: 0.8rem; }
.account-card {
  background: #FBF7EE;
  border: 1px solid rgba(176, 141, 70, 0.35);
  border-radius: 6px; padding: 1.4rem 1.6rem; margin-bottom: 1.2rem;
}
.account-card p { font-size: 0.98rem; color: rgba(46, 38, 32, 0.75); }

/* ---------- content pages (about, recipes, legal) ---------- */

.prose h2 { margin: 2.2rem 0 0.8rem; font-size: 1.7rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem 1.4rem; }
.prose li { margin-bottom: 0.4rem; }

.recipe-full { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(1.5rem, 4vw, 3rem); margin-bottom: clamp(3rem, 6vw, 4.5rem); align-items: center; }
.recipe-full:nth-child(even) .recipe-full-media { order: 2; }
.recipe-full-media img {
  border-radius: 6px; border: 1px solid rgba(176, 141, 70, 0.3);
  aspect-ratio: 4 / 3; object-fit: cover; width: 100%;
}
.recipe-full h2 { margin-bottom: 0.6rem; }
.recipe-full .eyebrow { display: block; margin-bottom: 0.4rem; }
.recipe-meta { font-family: var(--font-utility); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(46, 38, 32, 0.55); margin-bottom: 0.9rem; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.contact-info h2 { font-size: 1.4rem; margin-bottom: 0.7rem; }
.contact-info p { margin-bottom: 1.4rem; }
.contact-info a { color: var(--aubergine); }

/* ---------- chat widget ---------- */

.chat-widget { position: fixed; right: 22px; bottom: 22px; z-index: 80; }

.chat-toggle {
  width: 58px; height: 58px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--plum); color: var(--gold-soft);
  display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(46, 38, 32, 0.35);
  transition: transform 0.25s var(--ease-out), background 0.25s;
}
.chat-toggle:hover { transform: translateY(-3px); background: var(--aubergine); }
.chat-toggle svg { width: 26px; height: 26px; }

.chat-panel {
  position: absolute; right: 0; bottom: 74px;
  width: min(340px, calc(100vw - 44px));
  background: var(--cream);
  border: 1px solid rgba(176, 141, 70, 0.4);
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(46, 38, 32, 0.3);
  overflow: hidden;
  opacity: 0; transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.chat-widget.is-open .chat-panel { opacity: 1; transform: none; pointer-events: auto; }

.chat-head { background: var(--plum); color: var(--cream); padding: 1rem 1.2rem; }
.chat-head strong { font-family: var(--font-display); font-size: 1.05rem; display: block; }
.chat-head span { font-size: 0.82rem; color: rgba(245, 239, 227, 0.75); font-family: var(--font-utility); letter-spacing: 0.03em; }

.chat-log { height: 220px; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }

.chat-msg {
  max-width: 85%; padding: 0.6rem 0.85rem; border-radius: 10px;
  font-size: 0.9rem; line-height: 1.45;
}
.chat-msg-bot { background: var(--cream-deep); border: 1px solid rgba(176, 141, 70, 0.3); align-self: flex-start; border-bottom-left-radius: 3px; }
.chat-msg-user { background: var(--plum); color: var(--cream); align-self: flex-end; border-bottom-right-radius: 3px; }

.chat-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0 1rem 0.8rem; }
.chat-chip {
  border: 1px solid rgba(74, 82, 39, 0.4); background: none; cursor: pointer;
  border-radius: 999px; padding: 0.32rem 0.75rem;
  font-family: var(--font-utility); font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--olive-ink);
  transition: background 0.2s, color 0.2s;
}
.chat-chip:hover { background: var(--olive); color: var(--cream); }

.chat-input { display: flex; border-top: 1px solid rgba(176, 141, 70, 0.35); }
.chat-input input {
  flex: 1; min-width: 0; border: none; background: none;
  font-family: var(--font-body); font-size: 0.92rem;
  padding: 0.85rem 1rem;
}
.chat-input input:focus { outline: none; }
.chat-input button {
  width: 50px; border: none; cursor: pointer;
  background: none; color: var(--plum);
  display: grid; place-items: center;
}
.chat-input button svg { width: 18px; height: 18px; }
.chat-input button:hover { color: var(--gold); }

/* ---------- storefront responsive ---------- */

@media (max-width: 900px) {
  .product-detail, .checkout-grid, .contact-grid { grid-template-columns: 1fr; }
  .pd-gallery, .order-summary { position: static; }
  .recipe-full { grid-template-columns: 1fr; }
  .recipe-full:nth-child(even) .recipe-full-media { order: 0; }
  .cart-row { grid-template-columns: 72px 1fr; grid-auto-rows: auto; }
  .cart-thumb { width: 72px; height: 72px; grid-row: span 2; }
  .cart-row > .qty-field, .cart-row > .cart-row-price, .cart-row > .cart-remove { grid-column: 2; justify-self: start; }
  .form-grid { grid-template-columns: 1fr; }
  .cart-summary { max-width: none; }
}

/* ---------- footer tagline (Foley, AL · veteran owned) ---------- */

.footer-tag {
  margin-top: 1rem;
  font-family: var(--font-utility);
  font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase;
  line-height: 1.9;
  color: var(--gold-soft);
}

.hero-flag {
  display: inline-block;
  margin-top: 1.1rem;
  font-family: var(--font-utility);
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(46, 38, 32, 0.6);
}
.hero-flag .star { color: var(--gold); }

/* ---------- site keeper (admin) ---------- */

.keeper { text-decoration: none; color: inherit; }
.keeper:hover { color: var(--gold-soft); }

.admin-body { background: var(--cream); }
.admin-title {
  font-family: var(--font-display); font-size: 1.3rem; color: var(--olive-ink);
}

.admin-banner {
  background: rgba(176, 141, 70, 0.14);
  border: 1px solid rgba(176, 141, 70, 0.5);
  border-radius: 6px;
  padding: 1rem 1.3rem;
  font-size: 0.95rem;
  margin-bottom: 1.6rem;
}

.admin-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 2rem 0 1rem;
}
.admin-toolbar h2 { font-size: 1.5rem; }

.admin-table-wrap { overflow-x: auto; margin-bottom: 1.6rem; }
.admin-table {
  width: 100%; border-collapse: collapse;
  background: #FBF7EE;
  border: 1px solid rgba(176, 141, 70, 0.35);
  font-size: 0.95rem;
}
.admin-table th {
  font-family: var(--font-utility); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  text-align: left; color: var(--olive-ink);
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(176, 141, 70, 0.4);
}
.admin-table td { padding: 0.7rem 0.9rem; border-bottom: 1px solid rgba(176, 141, 70, 0.2); vertical-align: middle; }
.admin-thumb { width: 46px; height: 46px; object-fit: contain; background: var(--cream-deep); border-radius: 4px; }
.admin-row-actions button {
  border: none; background: none; cursor: pointer;
  font-family: var(--font-utility); font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--aubergine); text-decoration: underline;
  padding: 0.2rem 0.3rem;
}
.admin-hint { font-size: 0.82rem; color: rgba(46, 38, 32, 0.6); }
.admin-table select { font-family: var(--font-utility); padding: 0.3rem; }
#product-form { margin-top: 1rem; }

/* ---------- product gallery slider (photo first, packshot second) ---------- */

.pd-slider {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(176, 141, 70, 0.3);
  border-radius: 6px;
  aspect-ratio: 1;
  touch-action: pan-y;
}
.pd-track { display: flex; height: 100%; transition: transform 0.45s var(--ease-out); }
.pd-slide { flex: 0 0 100%; height: 100%; display: grid; place-items: center; }
.pd-slide-photo img { width: 100%; height: 100%; object-fit: cover; }
.pd-slide-pack {
  background:
    radial-gradient(circle at 50% 88%, rgba(64, 44, 59, 0.10), transparent 42%),
    var(--cream-deep);
  padding: 9%;
}
.pd-slide-pack img { max-width: 100%; max-height: 100%; object-fit: contain; }

.pd-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(176, 141, 70, 0.5);
  background: rgba(245, 239, 227, 0.9);
  color: var(--plum);
  font-size: 1.3rem; line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.2s, transform 0.2s;
}
.pd-arrow:hover { background: var(--cream); transform: translateY(-50%) scale(1.06); }
.pd-prev { left: 12px; }
.pd-next { right: 12px; }

.pd-dots {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: flex; gap: 0.5rem;
}
.pd-dots button {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent; cursor: pointer; padding: 0;
}
.pd-dots button.is-active { background: var(--gold); }

/* ---------- homepage family banner ---------- */

.family { padding: clamp(3rem, 6vw, 5rem) 1.5rem 0; }
.family-inner { max-width: var(--wrap); margin: 0 auto; text-align: center; }
.family-inner .eyebrow { display: block; margin-bottom: 1.2rem; }
.family-inner img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  object-position: 50% 62%;
  border-radius: 6px;
  border: 1px solid rgba(176, 141, 70, 0.4);
  box-shadow: 0 30px 60px rgba(64, 44, 59, 0.16);
}

@media (max-width: 700px) {
  .family-inner img { aspect-ratio: 4 / 3; }
}
