/* =========================================================================
   MARKETPLACE STYLES — single shared stylesheet for the whole site.
   Change a value here and it applies everywhere. Design tokens are at the
   top as CSS custom properties — start there for any palette/type change.
   ========================================================================= */

:root {
  /* ---- COLOR TOKENS ---- */
  --ink: #2B1B12;            /* near-black brown, primary text */
  --ink-soft: #5A4433;       /* softened body text */
  --amber: #B8791C;          /* primary brand gold */
  --amber-deep: #8F5C12;     /* hover/darker gold */
  --wax: #E3A857;            /* light gold accent */
  --forest: #3F5540;         /* secondary accent, "natural/organic" cues */
  --parchment: #F7F0E1;      /* page background */
  --parchment-deep: #EFE4CC; /* card/section background */
  --cream: #FFFBF3;          /* lightest surface, cards on parchment-deep */
  --line: #D9C9A8;           /* hairline borders/dividers */
  --error: #A23B2E;

  /* ---- TYPE TOKENS ---- */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Karla', -apple-system, sans-serif;

  /* ---- LAYOUT ---- */
  --max-width: 1180px;
  --radius: 2px; /* mostly square — hexagon motif carries the "shape" personality instead */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--parchment);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
h3 { font-size: 1.3rem; }

.italic-accent {
  font-style: italic;
  color: var(--amber-deep);
}

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--amber-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Visible keyboard focus everywhere — accessibility floor */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--forest);
  font-weight: 700;
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

/* =========================================================================
   HEADER / NAV — shared across all pages
   ========================================================================= */
.site-header {
  background: var(--ink);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--cream);
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; color: var(--wax); }
.brand em { color: var(--wax); font-style: italic; }

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--cream);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  opacity: 0.85;
}
.nav-links a:hover { opacity: 1; color: var(--wax); text-decoration: none; }

/* Producer Login lives inside the mobile menu only — on desktop it's tucked
   into the discreet "For Producers" dropdown instead (see below). */
.nav-producer-login { display: none; }

.nav-cart {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ---- Language switcher (flag icons) ---- */
.lang-switch {
  display: flex;
  gap: 4px;
}
.lang-flag {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 5px 6px;
  border-radius: 4px;
  opacity: 0.45;
  filter: grayscale(60%);
  transition: opacity 0.15s ease, filter 0.15s ease;
}
.lang-flag:hover { opacity: 0.8; filter: grayscale(20%); }
.lang-flag.active { opacity: 1; filter: grayscale(0%); background: rgba(255,255,255,0.08); }

.cart-pill {
  border: 1px solid var(--wax);
  color: var(--wax);
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 999px;
}
.cart-pill:hover { background: var(--wax); color: var(--ink); text-decoration: none; }

/* ---- Discreet "For Producers" dropdown (desktop) ----
   Deliberately understated — low-opacity text link, not part of the main
   nav — so it doesn't compete with the customer-facing pages. ---- */
.for-producers { position: relative; }
.for-producers-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cream);
  opacity: 0.55;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
}
.for-producers-toggle:hover { opacity: 0.9; }
.for-producers-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--cream);
  border: 1px solid var(--line);
  min-width: 180px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
  z-index: 60;
  display: none;
}
.for-producers-menu.open { display: block; }
.for-producers-menu a {
  display: block;
  padding: 12px 16px;
  color: var(--ink);
  font-size: 0.88rem;
  opacity: 1;
}
.for-producers-menu a:hover { background: var(--parchment-deep); text-decoration: none; }

/* ---- Hamburger toggle (mobile) ---- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--cream);
}
.nav-toggle svg { width: 22px; height: 22px; display: block; }

@media (max-width: 400px) {
  .nav-cart { gap: 8px; }
  .cart-pill { padding: 6px 10px; font-size: 0.8rem; }
  .lang-flag { padding: 4px; font-size: 1rem; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .for-producers { display: none; } /* folded into the mobile menu instead */

  .nav-links {
    position: fixed;
    top: 61px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ink);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    padding: 0 24px;
  }
  .nav-links.open { max-height: 420px; padding: 8px 24px 20px; }
  .nav-links a {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    opacity: 1;
    display: block;
  }
  .nav-producer-login {
    display: block;
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.18);
  }
  .nav-producer-login a { opacity: 0.75; border-bottom: none; }
}

/* =========================================================================
   HEXAGON MOTIF — signature structural device (honeycomb)
   ========================================================================= */
.hex-frame {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  overflow: hidden;
  background: var(--parchment-deep);
  position: relative;
  border: 3px solid var(--ink);
}
.hex-frame img { width: 100%; height: 100%; object-fit: cover; }

.hex-divider {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 2.5rem 0;
}
.hex-divider span {
  width: 8px; height: 8px;
  background: var(--amber);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* =========================================================================
   IMAGE PLACEHOLDER FALLBACK
   Any <img> that fails to load (i.e. no real photo dropped in yet) gets
   this class added via JS (see common.js) and shows a tasteful honeycomb
   placeholder instead of a broken image icon.
   ========================================================================= */
.img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(120deg, var(--parchment-deep), var(--parchment-deep) 10px, var(--line) 10px, var(--line) 11px);
  color: var(--amber-deep);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  text-align: center;
  padding: 8px;
  min-height: 140px;
  width: 100%;
  height: 100%;
}

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  padding: 12px 26px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}
.btn-primary {
  background: var(--amber);
  color: var(--cream);
}
.btn-primary:hover { background: var(--amber-deep); text-decoration: none; }
.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--cream); text-decoration: none; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* =========================================================================
   HERO — homepage
   ========================================================================= */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(43,27,18,0.35) 0%, rgba(43,27,18,0.92) 100%);
}
.hero .container { position: relative; z-index: 2; max-width: 760px; }
.hero h1 { color: var(--cream); }
.hero p.lede { color: #E9DCC5; font-size: 1.15rem; max-width: 540px; }
.hero-actions { display: flex; gap: 16px; margin-top: 1.8rem; flex-wrap: wrap; }
@media (max-width: 480px) {
  .hero { min-height: 88vh; }
  .hero-actions .btn { width: 100%; }
}

/* =========================================================================
   SECTIONS
   ========================================================================= */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--parchment-deep); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* =========================================================================
   GRIDS / CARDS
   =========================================================================
   Dense browsing layout: more items visible on desktop and phone screens.
   ========================================================================= */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
}
.grid-producers {
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
}

/* Media cards stay a little wider on larger screens because their
   thumbnails/video previews benefit from extra room. */
.grid-media {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .grid-producers { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .grid-media { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

@media (max-width: 600px) {
  .grid, .grid-producers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .grid-media { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 9px 9px 11px; gap: 3px; }
  .card h3 { font-size: 0.88rem; line-height: 1.15; }
  .card-price { font-size: 0.95rem; }
  .card-eyebrow { font-size: 0.62rem; }
  .card-producer-link { font-size: 0.74rem; }
  .card-desc { font-size: 0.78rem; }
  .card-footer { margin-top: 6px; }
  .quick-add-btn { top: 6px; right: 6px; width: 29px; height: 29px; font-size: 1rem; }
}

@media (max-width: 380px) {
  .grid, .grid-producers { gap: 7px; }
  .grid-media { gap: 8px; }
  .card-body { padding: 8px 7px 9px; }
  .card h3 { font-size: 0.82rem; }
  .card-price { font-size: 0.9rem; }
}

.card {
  background: var(--cream);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: relative;
}
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex-grow: 1; }

/* ---- Quick-add button — only shown on products with no size/flavor to
   pick, so a single tap can add them without visiting the product page. ---- */
.quick-add-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--cream);
  border: 2px solid var(--cream);
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(43,27,18,0.3);
  padding: 0;
  transition: background 0.15s ease, transform 0.1s ease;
}
.quick-add-btn:hover { background: var(--amber-deep); transform: scale(1.06); }
.quick-add-btn.added { background: var(--forest); }
.card-eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--forest); font-weight: 700; }
.card h3 { font-size: 1.15rem; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--amber-deep); text-decoration: none; }
.card-producer-link { font-size: 0.85rem; color: var(--ink-soft); }
.card-price { font-family: var(--font-display); font-size: 1.2rem; color: var(--amber-deep); margin-top: auto; padding-top: 8px; }
.card-desc { font-size: 0.9rem; flex-grow: 1; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }

.producer-card { text-align: center; }
.producer-card .card-body { align-items: center; text-align: center; }
.producer-card h3 { font-size: 1.05rem; }


/* Responsive card polish — keep phone cards compact without changing the
   underlying markup or functionality. */
@media (max-width: 600px) {
  /* On phones, normal browse cards go sideways so the image no longer
     creates a tall, skinny tile. Media cards remain 2-column previews. */
  .grid:not(.grid-media) {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .grid:not(.grid-media) .card {
    display: grid;
    grid-template-columns: 34% minmax(0, 1fr);
    min-height: 118px;
  }
  .grid:not(.grid-media) .card > img {
    width: 100%;
    height: 100%;
    min-height: 118px;
    object-fit: cover;
  }
  .grid:not(.grid-media) .card-body {
    padding: 10px 11px;
    gap: 3px;
  }
  .grid:not(.grid-media) .card h3 {
    font-size: 0.92rem;
    line-height: 1.18;
  }
  .grid:not(.grid-media) .card-price { font-size: 0.98rem; }
  .grid:not(.grid-media) .card-desc { font-size: 0.78rem; }

  /* Producer cards are better kept compact while still using the sideways
     treatment; their centered text remains intact. */
  .grid-producers {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .grid-producers .card {
    display: grid;
    grid-template-columns: 30% minmax(0, 1fr);
    min-height: 105px;
  }
  .grid-producers .card > img {
    width: 100%;
    height: 100%;
    min-height: 105px;
    object-fit: cover;
  }
  .grid-producers .card-body {
    padding: 9px 10px;
    justify-content: center;
  }
  .grid-producers .card h3 {
    font-size: 0.9rem;
    line-height: 1.15;
  }
}

@media (max-width: 380px) {
  .grid:not(.grid-media) .card {
    grid-template-columns: 32% minmax(0, 1fr);
    min-height: 105px;
  }
  .grid:not(.grid-media) .card > img { min-height: 105px; }
  .grid:not(.grid-media) .card-body { padding: 8px 9px; }
  .grid:not(.grid-media) .card h3 { font-size: 0.86rem; }
  .grid-producers .card { min-height: 98px; }
  .grid-producers .card > img { min-height: 98px; }
}


/* =========================================================================
   JAR RATING — signature rating system (replaces star ratings)
   Refined hexagon-jar glyphs; filled gold up to the rating, outlined after.
   Usage: see js/common.js renderJarRating()
   ========================================================================= */
.jar-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.jar-rating .jar-icon {
  width: 18px;
  height: 18px;
}
.jar-rating .jar-icon .jar-fill { fill: var(--amber); }
.jar-rating .jar-icon.empty .jar-fill { fill: none; }
.jar-rating .jar-icon path.jar-outline { stroke: var(--amber-deep); stroke-width: 6; fill: none; }
.jar-rating-count {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-left: 4px;
}
.jar-rating.jar-rating-lg .jar-icon { width: 26px; height: 26px; }

/* =========================================================================
   FILTERS (Shop page)
   ========================================================================= */
.shop-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 40px;
  align-items: start;
}
.filters {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 22px;
  position: sticky;
  top: 90px;
}
.filter-group { margin-bottom: 22px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--forest);
  margin-bottom: 10px;
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
  cursor: pointer;
}
.filter-option input { accent-color: var(--amber); }
.filter-clear {
  font-size: 0.8rem;
  color: var(--amber-deep);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
}
.results-count { font-size: 0.9rem; color: var(--ink-soft); }

/* ---- Mobile filter toggle (Shop page) ---- */
.filters-toggle-btn {
  display: none;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  display: none;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 820px) {
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filters-toggle-btn { display: flex; }
  .filters {
    max-height: 0;
    overflow: hidden;
    padding: 0 22px;
    border: none;
    margin-bottom: 0;
    transition: max-height 0.25s ease, padding 0.25s ease;
  }
  .filters.open {
    max-height: 900px;
    padding: 22px;
    border: 1px solid var(--line);
    margin-bottom: 20px;
  }
}

/* =========================================================================
   PRODUCER PROFILE / PRODUCT DETAIL
   ========================================================================= */
.profile-hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 48px;
  align-items: start;
}
.profile-hero .hex-frame { max-width: 340px; }
@media (max-width: 760px) {
  .profile-hero { grid-template-columns: 1fr; }
  .profile-hero .hex-frame { max-width: 260px; margin: 0 auto; }
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 760px) {
  .detail-layout { grid-template-columns: 1fr; }
}
.detail-price { font-family: var(--font-display); font-size: 2rem; color: var(--amber-deep); margin: 0.4em 0; }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 1.2rem 0; }
.qty-row input {
  width: 64px; padding: 8px; border: 1px solid var(--line);
  font-family: var(--font-body); text-align: center; background: var(--cream);
}

.review {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.review:first-child { border-top: none; padding-top: 0; }
.review-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 6px; }

/* =========================================================================
   FORMS (cart / dashboard login)
   ========================================================================= */
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--forest);
  font-weight: 700;
  margin-bottom: 6px;
}
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; }

/* =========================================================================
   CART TABLE
   ========================================================================= */
/* Wrap any wide table (cart, dashboard) in <div class="table-scroll"> so it
   scrolls sideways on narrow screens instead of squashing or overflowing. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll table { min-width: 560px; }

.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.cart-table th {
  text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--forest); border-bottom: 1px solid var(--line); padding-bottom: 10px;
}
.cart-table td { padding: 14px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-item-name { display: flex; align-items: center; gap: 14px; }
.cart-item-name .hex-frame { width: 56px; height: 56px; flex-shrink: 0; }
.cart-remove { background: none; border: none; color: var(--error); cursor: pointer; font-size: 0.85rem; text-decoration: underline; }
.cart-total-row td { font-family: var(--font-display); font-size: 1.3rem; padding-top: 20px; border-bottom: none; }

/* =========================================================================
   DASHBOARD
   ========================================================================= */
.dash-table { width: 100%; border-collapse: collapse; background: var(--cream); border: 1px solid var(--line); }
.dash-table th {
  text-align: left; padding: 12px 16px; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--forest); background: var(--parchment-deep); border-bottom: 1px solid var(--line);
}
.dash-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.status-pill { padding: 4px 10px; font-size: 0.75rem; border-radius: 999px; font-weight: 700; }
.status-pending { background: #F0DCC0; color: var(--amber-deep); }
.status-delivered { background: #DCE6DC; color: var(--forest); }
.dash-login { max-width: 380px; margin: 6rem auto; text-align: center; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  background: var(--ink);
  color: #C9BBA4;
  padding: 3rem 0 2rem;
  font-size: 0.85rem;
  margin-top: 4rem;
}
.site-footer .container {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px;
}
@media (max-width: 600px) {
  .site-footer .container { flex-direction: column; }
  .footer-links { flex-wrap: wrap; gap: 14px 20px; }
}
.site-footer a { color: #C9BBA4; }
.site-footer a:hover { color: var(--wax); }
.footer-links { display: flex; gap: 24px; list-style: none; padding: 0; margin: 0; }

/* =========================================================================
   VIDEO EMBED — responsive 16:9 wrapper for tour/producer videos
   ========================================================================= */
.video-embed-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--ink);
  overflow: hidden;
}
.video-embed-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.video-link-card {
  display: block;
  padding: 14px 18px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  margin-top: 10px;
}

/* =========================================================================
   GALLERY
   ========================================================================= */
.gallery-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
}

.gallery-item { position: relative; }
.gallery-caption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* =========================================================================
   BREADCRUMBS
   ========================================================================= */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 18px 0 0;
}
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--amber-deep); }
.breadcrumbs .breadcrumb-sep { color: var(--line); margin: 0 2px; }
.breadcrumbs span:last-child:not(.breadcrumb-sep) { color: var(--ink); }

/* =========================================================================
   VIDEO MODAL (lightbox)
   ========================================================================= */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.video-modal.open { display: flex; }
.video-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 12, 7, 0.82);
}
.video-modal-content {
  position: relative;
  width: min(880px, 92vw);
  z-index: 1;
}
.video-modal-close {
  position: absolute;
  top: -42px; right: 0;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 6px 10px;
}
.video-thumb {
  position: relative;
  cursor: pointer;
}
.video-thumb::after {
  content: '▶';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  background: rgba(43, 27, 18, 0.75);
  color: var(--wax);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  pointer-events: none;
}

/* =========================================================================
   VARIANT / SIZE SELECTOR (product detail page)
   ========================================================================= */
.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px;
}
.variant-btn {
  padding: 8px 16px;
  border: 1px solid var(--line);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--ink);
}
.variant-btn:hover { border-color: var(--amber); }
.variant-btn.selected {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--cream);
}

/* =========================================================================
   PRODUCT IMAGE THUMBNAILS (product detail page)
   ========================================================================= */
.product-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.product-thumb {
  width: 64px; height: 64px;
  cursor: pointer;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  overflow: hidden;
  opacity: 0.6;
  border: 3px solid var(--ink);
  padding: 0;
  background: var(--parchment-deep);
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb:hover, .product-thumb.selected { opacity: 1; }

/* =========================================================================
   BUNDLE (care bundle product) — reuses card/detail styles, just a couple
   of extras for showing which producers are included.
   ========================================================================= */
.bundle-producers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.bundle-producer-chip {
  padding: 6px 12px;
  background: var(--parchment-deep);
  border: 1px solid var(--line);
  font-size: 0.85rem;
}

/* =========================================================================
   RESERVATION FORM — mostly reuses .form-field styles from cart.
   ========================================================================= */
.reservation-context {
  padding: 14px 18px;
  background: var(--parchment-deep);
  border-left: 3px solid var(--amber);
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}

/* =========================================================================
   CART — producer grouping & delivery info
   ========================================================================= */
.cart-group-header td {
  padding-top: 22px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
}
.cart-group-header:first-child td { padding-top: 6px; }
.cart-delivery-row td {
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.cart-delivery-row .delivery-fee { color: var(--amber-deep); font-weight: 700; }
.cart-delivery-row .delivery-free { color: var(--forest); font-weight: 700; }
.cart-group-subtotal { font-weight: 700; color: var(--ink); }

/* =========================================================================
   WHOLESALE
   ========================================================================= */
.wholesale-badge {
  display: inline-block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--forest);
  border: 1px solid var(--forest);
  padding: 2px 7px;
  margin-left: 6px;
  vertical-align: middle;
}
.variant-btn.wholesale {
  border-style: dashed;
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
