/* ───────── Eden Shop ─────────
   Layers on ../styles.css (tokens, nav, buttons, footer).
   Product tiles sit on a cream ground so real product photos
   (usually shot on white) read cleanly against the dark site.
*/

/* Elements toggled with the hidden attribute must stay hidden even when
   they have their own display rule (drawer, empty state, notices). */
.shop-page [hidden] { display: none !important; }

/* styles.css sets overflow-x: hidden on html AND body, which turns body into
   its own scroll container and stops position: sticky from working.
   "clip" still prevents sideways scroll without that side effect. */
body.shop-page { overflow-x: clip; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:root {
  --shop-tile: #E9E2D1;
  --shop-tile-ink: #1F2A24;
  --shop-radius: 6px;
}

.nav-link.is-active { color: var(--eden-amber); }

/* Cart button in nav */
.shop-cart-btn {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--eden-hairline-strong);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--eden-bone);
  transition: border-color .2s, background .2s;
}
.shop-cart-btn:hover { border-color: var(--eden-bone); background: rgba(232,226,213,.04); }
.shop-cart-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--eden-amber); color: var(--eden-void);
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center;
}
.shop-cart-count[data-empty="true"] { display: none; }

/* ───────── Hero ───────── */
.shop-hero {
  padding: 168px 0 56px;
  border-bottom: 1px solid var(--eden-hairline);
  position: relative; z-index: 2;
}
.shop-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: end;
}
.shop-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 88px);
  line-height: .98;
  letter-spacing: -0.02em;
  margin: 20px 0 22px;
  text-wrap: balance;
}
.shop-hero h1 em { font-style: italic; color: var(--eden-amber); }
.shop-lede {
  font-size: 17px; line-height: 1.6;
  color: var(--eden-bone-dim);
  max-width: 560px;
  font-weight: 300;
}
.shop-hero-points {
  list-style: none;
  display: grid; gap: 14px;
  padding-bottom: 6px;
}
.shop-hero-points li {
  display: flex; gap: 14px;
  font-size: 14px; line-height: 1.55;
  color: var(--eden-bone-dim);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--eden-hairline);
}
.shop-hero-points li:last-child { border-bottom: 0; }
.shop-hero-points strong { color: var(--eden-bone); font-weight: 500; }
.shop-pt-num {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--eden-amber); letter-spacing: .1em;
  padding-top: 4px; flex-shrink: 0;
}

/* ───────── Toolbar ───────── */
.shop-main { padding: 40px 0 96px; position: relative; z-index: 2; scroll-margin-top: var(--nav-h, 92px); }

.shop-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
  padding: 8px 0 28px;
  position: sticky; top: var(--nav-h, 92px); z-index: 20;
}
.shop-toolbar::before {
  content: ''; position: absolute; inset: -8px -32px 0;
  background: rgba(31, 42, 36, .88);
  backdrop-filter: blur(10px);
  z-index: -1;
  border-bottom: 1px solid var(--eden-hairline);
}

.shop-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-tab {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--eden-hairline-strong);
  font-size: 13px;
  color: var(--eden-bone-dim);
  transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.shop-tab:hover { border-color: var(--eden-bone); color: var(--eden-bone); }
.shop-tab[aria-selected="true"] {
  background: var(--eden-bone); color: var(--eden-bg); border-color: var(--eden-bone);
}
.shop-tab-n {
  font-family: var(--font-mono); font-size: 10px; opacity: .6;
}

.shop-controls { display: flex; gap: 10px; align-items: center; }
.shop-search {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px; height: 42px;
  border: 1px solid var(--eden-hairline-strong);
  border-radius: 999px;
  color: var(--eden-muted);
  background: rgba(24, 33, 28, .5);
}
.shop-search:focus-within { border-color: var(--eden-amber); color: var(--eden-bone); }
.shop-search input {
  background: none; border: 0; outline: none;
  color: var(--eden-bone); font: inherit; font-size: 13px;
  width: 180px;
}
.shop-search input::placeholder { color: var(--eden-muted); }
.shop-sort select {
  appearance: none; -webkit-appearance: none;
  height: 42px; padding: 0 36px 0 16px;
  border-radius: 999px;
  border: 1px solid var(--eden-hairline-strong);
  background: rgba(24, 33, 28, .5) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23CFC6B0' stroke-width='1.3' fill='none'/></svg>") no-repeat right 14px center;
  color: var(--eden-bone); font: inherit; font-size: 13px;
  cursor: pointer;
}
.shop-sort select:focus { outline: none; border-color: var(--eden-amber); }
.shop-sort option { background: var(--eden-void); }

.shop-notice {
  margin: 4px 0 20px;
  padding: 14px 18px;
  border: 1px solid var(--eden-hairline-strong);
  border-left: 2px solid var(--eden-amber);
  border-radius: 4px;
  background: var(--eden-surface);
  font-size: 13px; line-height: 1.55;
  color: var(--eden-bone-dim);
}
.shop-notice strong { color: var(--eden-bone); font-weight: 500; }
.shop-count { color: var(--eden-muted); margin-bottom: 18px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

/* ───────── Grid & cards ───────── */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 36px 24px;
}
.card {
  display: flex; flex-direction: column;
  cursor: pointer;
  color: inherit;
  text-align: left;
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--shop-radius);
  background: var(--shop-tile);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.card-media .art { width: 62%; height: auto; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.card:hover .card-media img, .card:hover .card-media .art { transform: scale(1.04); }
.card-tag {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--shop-tile-ink);
  background: rgba(255, 252, 244, .78);
  padding: 5px 9px; border-radius: 999px;
}
.card-soldout {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--eden-bone); background: rgba(24,33,28,.85);
  padding: 5px 9px; border-radius: 999px;
}
.card-quick {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--eden-bg); color: var(--eden-bone);
  font-size: 13px; font-weight: 500;
  opacity: 0; transform: translateY(8px);
  transition: all .25s cubic-bezier(.2,.8,.2,1);
}
.card-quick:hover { background: var(--eden-amber); color: var(--eden-void); }
.card:hover .card-quick, .card:focus-within .card-quick { opacity: 1; transform: none; }
@media (hover: none) { .card-quick { opacity: 1; transform: none; } }

.card-body { padding: 16px 2px 0; display: flex; flex-direction: column; gap: 6px; }
.card-title {
  font-family: var(--font-display);
  font-size: 23px; line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--eden-bone);
}
.card-sub { font-size: 13px; line-height: 1.5; color: var(--eden-bone-dim);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { font-family: var(--font-mono); font-size: 13px; color: var(--eden-amber); margin-top: 4px; letter-spacing: .04em; }

.card-open { all: unset; cursor: pointer; display: block; }
.card-open:focus-visible { outline: 2px solid var(--eden-amber); outline-offset: 4px; border-radius: var(--shop-radius); }

/* Loading skeleton */
.skel .card-media { background: var(--eden-surface); animation: skel 1.4s ease-in-out infinite; }
.skel .bar { height: 14px; border-radius: 3px; background: var(--eden-surface); margin-top: 14px; animation: skel 1.4s ease-in-out infinite; }
.skel .bar.short { width: 40%; margin-top: 10px; }
@keyframes skel { 0%,100% { opacity: .55 } 50% { opacity: 1 } }

.shop-empty { text-align: center; padding: 64px 0; color: var(--eden-bone-dim); display: grid; gap: 18px; justify-items: center; }

/* ───────── Consult band & disclaimer ───────── */
.shop-consult { padding: 0 0 72px; position: relative; z-index: 2; }
.shop-consult-card {
  display: flex; justify-content: space-between; align-items: center; gap: 40px;
  padding: 48px 52px;
  border: 1px solid var(--eden-hairline);
  border-radius: 6px;
  background:
    radial-gradient(ellipse 70% 90% at 100% 0%, rgba(201,168,117,.14), transparent 70%),
    var(--eden-surface);
}
.shop-consult h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(30px, 3.4vw, 46px); line-height: 1.04; letter-spacing: -0.01em;
  margin: 14px 0 12px;
}
.shop-consult h2 em { font-style: italic; color: var(--eden-amber); }
.shop-consult p { color: var(--eden-bone-dim); font-size: 15px; line-height: 1.6; max-width: 520px; }

.shop-disclaimer { padding: 0 0 64px; position: relative; z-index: 2; }
.shop-disclaimer p {
  font-size: 12px; line-height: 1.7; color: var(--eden-muted);
  max-width: 900px;
  padding-top: 24px; border-top: 1px solid var(--eden-hairline);
}
.shop-disclaimer strong { color: var(--eden-bone-dim); font-weight: 500; }

/* ───────── Overlays, dialog, drawer ───────── */
.shop-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 12, 10, .62);
  backdrop-filter: blur(3px);
  animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.shop-close {
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--eden-hairline-strong);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--eden-bone);
  transition: border-color .2s, background .2s;
}
.shop-close:hover { border-color: var(--eden-bone); background: rgba(232,226,213,.05); }

.shop-dialog {
  position: fixed; z-index: 210;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(1040px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--eden-void);
  border: 1px solid var(--eden-hairline-strong);
  border-radius: 8px;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.6);
  animation: pop .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) } to { opacity: 1; transform: translate(-50%, -50%) } }
.shop-dialog > .shop-close { position: absolute; top: 16px; right: 16px; z-index: 2; background: var(--eden-void); }

.pd-grid { display: grid; grid-template-columns: 1.05fr 1fr; }
.pd-media { padding: 24px; display: grid; gap: 12px; align-content: start; }
.pd-main {
  aspect-ratio: 1 / 1; border-radius: var(--shop-radius);
  background: var(--shop-tile);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pd-main img { width: 100%; height: 100%; object-fit: contain; }
.pd-main .art { width: 56%; }
.pd-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.pd-thumbs button {
  width: 64px; height: 64px; border-radius: 4px; overflow: hidden;
  background: var(--shop-tile); border: 1px solid transparent;
}
.pd-thumbs button[aria-current="true"] { border-color: var(--eden-amber); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pd-info { padding: 48px 44px 40px 20px; display: flex; flex-direction: column; gap: 16px; }
.pd-info h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(32px, 3.4vw, 48px); line-height: 1.02; letter-spacing: -0.015em;
  padding-right: 40px;
}
.pd-price { font-family: var(--font-mono); font-size: 16px; color: var(--eden-amber); letter-spacing: .04em; }
.pd-desc { color: var(--eden-bone-dim); font-size: 15px; line-height: 1.65; display: grid; gap: 10px; }
.pd-desc > * { margin: 0; }
.pd-desc strong, .pd-desc b { color: var(--eden-bone); font-weight: 600; }
.pd-desc h2, .pd-desc h3, .pd-desc h4, .pd-desc h5, .pd-desc h6 {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--eden-bone); margin-top: 8px;
}
.pd-desc ul, .pd-desc ol { padding-left: 20px; display: grid; gap: 6px; }
.pd-desc ul { list-style: disc; } .pd-desc ol { list-style: decimal; }
.pd-desc li::marker { color: var(--eden-amber); }
.pd-desc a { color: var(--eden-amber); text-decoration: underline; text-underline-offset: 3px; }
.pd-desc hr { border: 0; border-top: 1px solid var(--eden-hairline); }
/* Images from Shopify descriptions (e.g. dietary badges) are usually dark artwork on white
   or transparent, so they sit on a light tile to stay legible on the dark dialog. */
.pd-desc img { display: block; max-width: 100%; height: auto; background: #FBF8F1; border-radius: var(--shop-radius); padding: 12px; box-sizing: border-box; }
.pd-badges {
  display: flex; flex-wrap: wrap; gap: 6px 4px;
  background: #FBF8F1; border-radius: var(--shop-radius); padding: 10px 12px;
}
.pd-desc .pd-badges img { width: 76px; max-width: 76px; padding: 0; background: none; border-radius: 0; }
.pd-desc table { border-collapse: collapse; width: 100%; font-size: 14px; }
.pd-desc th, .pd-desc td { border-bottom: 1px solid var(--eden-hairline); padding: 6px 8px 6px 0; text-align: left; vertical-align: top; }
.pd-options { display: grid; gap: 14px; }
.pd-opt-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--eden-muted); margin-bottom: 8px;
}
.pd-opt-values { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-opt-values button {
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--eden-hairline-strong);
  font-size: 13px; color: var(--eden-bone-dim);
}
.pd-opt-values button[aria-pressed="true"] { background: var(--eden-bone); color: var(--eden-bg); border-color: var(--eden-bone); }
.pd-opt-values button:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }

.pd-buy { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.pd-add { flex: 1; justify-content: center; }
.pd-add:disabled { opacity: .45; cursor: not-allowed; transform: none; background: var(--eden-bone); }
.pd-note { font-size: 11px; line-height: 1.6; color: var(--eden-muted); margin-top: 4px; }

.qty {
  display: inline-flex; align-items: center;
  height: 48px; border-radius: 999px;
  border: 1px solid var(--eden-hairline-strong);
}
.qty button { width: 40px; height: 100%; font-size: 18px; color: var(--eden-bone-dim); }
.qty button:hover { color: var(--eden-amber); }
.qty span { min-width: 22px; text-align: center; font-family: var(--font-mono); font-size: 13px; }
.qty.sm { height: 34px; }
.qty.sm button { width: 30px; font-size: 15px; }

.cart-drawer {
  position: fixed; z-index: 210; top: 0; right: 0; bottom: 0;
  width: min(440px, 100vw);
  background: var(--eden-void);
  border-left: 1px solid var(--eden-hairline-strong);
  display: flex; flex-direction: column;
  animation: slide .32s cubic-bezier(.2,.8,.2,1);
}
@keyframes slide { from { transform: translateX(100%) } to { transform: none } }
.cart-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 24px; border-bottom: 1px solid var(--eden-hairline);
}
.cart-head h2 { font-family: var(--font-display); font-weight: 400; font-size: 30px; letter-spacing: -0.01em; }
.cart-lines { flex: 1; overflow-y: auto; padding: 8px 24px; }
.cart-empty { padding: 48px 0; text-align: center; color: var(--eden-bone-dim); display: grid; gap: 16px; justify-items: center; }
.cart-line {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--eden-hairline);
  align-items: start;
}
.cart-line-img {
  width: 72px; height: 88px; border-radius: 4px; overflow: hidden;
  background: var(--shop-tile); display: flex; align-items: center; justify-content: center;
}
.cart-line-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-img .art { width: 70%; }
.cart-line-title { font-family: var(--font-display); font-size: 19px; line-height: 1.15; }
.cart-line-variant { font-size: 12px; color: var(--eden-muted); margin: 2px 0 10px; }
.cart-line-price { font-family: var(--font-mono); font-size: 13px; color: var(--eden-bone); text-align: right; }
.cart-line-remove { font-size: 11px; color: var(--eden-muted); margin-top: 10px; text-decoration: underline; text-underline-offset: 3px; }
.cart-line-remove:hover { color: var(--eden-amber); }

.cart-foot { padding: 20px 24px 28px; border-top: 1px solid var(--eden-hairline); display: grid; gap: 10px; }
.cart-subtotal { display: flex; justify-content: space-between; font-size: 15px; }
.cart-subtotal span:last-child { font-family: var(--font-mono); color: var(--eden-amber); }
.cart-fine { font-size: 12px; color: var(--eden-muted); }
.cart-checkout { justify-content: center; margin-top: 4px; }
.cart-checkout:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.shop-toast {
  position: fixed; z-index: 300; left: 50%; bottom: 28px; transform: translateX(-50%);
  padding: 12px 20px; border-radius: 999px;
  background: var(--eden-bone); color: var(--eden-bg);
  font-size: 13px; font-weight: 500;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  animation: toast .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px) } to { opacity: 1; transform: translate(-50%, 0) } }

body.shop-locked { overflow: hidden; }

/* ───────── Responsive ───────── */
@media (max-width: 900px) {
  .shop-hero { padding: 132px 0 40px; }
  .shop-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  /* On tablets and phones the filter bar scrolls with the page instead of pinning,
     so it never competes with the menu bar for space. */
  .shop-toolbar { position: static; }
  .shop-toolbar::before { display: none; }
  .shop-controls { width: 100%; }
  .shop-search { flex: 1; }
  .shop-search input { width: 100%; }
  .shop-consult-card { flex-direction: column; align-items: flex-start; padding: 36px 28px; }
  .pd-grid { grid-template-columns: 1fr; }
  .pd-info { padding: 8px 24px 32px; }
}
@media (max-width: 640px) {
  .shop-hero { padding: 116px 0 32px; }
  .shop-toolbar { padding-bottom: 18px; }
  .shop-tabs { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 40px); scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
  .shop-tabs::-webkit-scrollbar { display: none; }
  .shop-tab { flex-shrink: 0; padding: 9px 15px; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .card-title { font-size: 19px; }
  .card-sub { display: none; }
  .card-quick { padding: 10px 12px; font-size: 12px; left: 8px; right: 8px; bottom: 8px; }
  .card-tag { font-size: 8.5px; top: 8px; left: 8px; }
  .shop-dialog {
    top: auto; bottom: 0; left: 0; transform: none;
    width: 100vw; max-height: 92vh;
    border-radius: 14px 14px 0 0;
    animation: sheet .32s cubic-bezier(.2,.8,.2,1);
  }
  @keyframes sheet { from { transform: translateY(40px); opacity: 0 } to { transform: none; opacity: 1 } }
  .pd-media { padding: 16px; }
  .pd-main { aspect-ratio: 4 / 3; }
  .pd-main .art { width: 34%; }
  .pd-info { padding: 4px 18px 28px; }
  .pd-info h2 { font-size: 32px; }
  .pd-desc .pd-badges img { width: 58px; max-width: 58px; }
}
@media (max-width: 420px) {
  .shop-tabs { width: calc(100% + 32px); margin: 0 -16px; padding: 0 16px; }
  .nav .btn-ghost.nav-cta-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .shop-dialog, .cart-drawer, .shop-overlay, .shop-toast { animation: none; }
  .card-media img, .card-media .art { transition: none; }
}
