:root {
  color-scheme: light;
  --ink: #1c1917;
  --muted: #706a62;
  --line: #e5ded4;
  --paper: #fffdf8;
  --soft: #f3efe7;
  --forest: #20483f;
  --forest-2: #2f6b5d;
  --copper: #b66a3c;
  --gold: #d8a24a;
  --berry: #8f3155;
  --mint: #d9efe5;
  --peach: #fde0c7;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(28, 25, 23, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(253, 224, 199, .46) 0, rgba(255, 253, 248, 0) 360px),
    var(--paper);
}

body.drawer-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
select, textarea { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(229, 222, 212, .78);
  background: rgba(255, 253, 248, .9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--forest);
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: 12px; margin-top: 1px; }

.main-nav {
  display: flex;
  justify-self: center;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 8px;
  color: #4f4942;
  font-weight: 700;
  font-size: 14px;
}

.main-nav a {
  white-space: nowrap;
  padding: 10px 12px;
  border-radius: 8px;
}

.main-nav a:hover {
  color: var(--forest);
  background: #f4faf7;
}

.club-qr-link {
  color: var(--forest);
  background: #f4faf7;
}

.club-qr-link[hidden] {
  display: none;
}

.nav-toggle { justify-self: end; }
.mobile-nav {
  display: none;
  grid-column: 1 / -1;
  gap: 8px;
  padding-top: 8px;
}

.mobile-nav a {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: #4f4942;
  font-weight: 800;
}

.mobile-nav a:hover {
  border-color: var(--forest);
  color: var(--forest);
  background: #f4faf7;
}

.icon-button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}

.icon-button:hover { border-color: var(--forest); }
.icon-button.nav-toggle { display: none; }
.cart-trigger { justify-self: end; }
.icon-button svg { width: 20px; height: 20px; }

#cartCount {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--copper);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: min(760px, 88vh);
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-img, .hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-img { object-fit: cover; }
.hero-overlay {
  background: linear-gradient(90deg, rgba(255, 253, 248, .98) 0%, rgba(255, 253, 248, .86) 34%, rgba(255, 253, 248, .28) 64%, rgba(32, 72, 63, .18) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(650px, calc(100% - 36px));
  margin-left: clamp(18px, 6vw, 88px);
  padding: 88px 0 128px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--copper);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 18px;
  font-size: clamp(50px, 8vw, 118px);
  line-height: .9;
  letter-spacing: 0;
}

.hero-content p:not(.eyebrow) {
  max-width: 560px;
  color: #504941;
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--forest); color: var(--white); }
.button.primary:hover { background: var(--forest-2); }
.button.ghost { background: rgba(255, 255, 255, .7); color: var(--ink); border-color: var(--line); }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, #fff7ed, #f1fbf6 52%, #fff3f4);
}

.trust-strip div {
  padding: 22px clamp(16px, 3vw, 42px);
  border-right: 1px solid var(--line);
}

.trust-strip div:last-child { border-right: 0; }
.trust-strip strong, .trust-strip span { display: block; }
.trust-strip strong { font-size: 22px; }
.trust-strip span { color: var(--muted); margin-top: 3px; }

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 72px 0 24px;
}

.intro-band, .toolbar, .subscription {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1;
  letter-spacing: 0;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(5, 92px);
  gap: 10px;
}

.collection-tile {
  height: 82px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  display: grid;
  place-items: center;
  gap: 6px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.collection-tile svg { width: 22px; height: 22px; }
.collection-tile.active, .collection-tile:hover {
  color: var(--forest);
  border-color: var(--forest);
  background: linear-gradient(135deg, #f4faf7, #fff7e8);
}

.search-box {
  width: min(360px, 100%);
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  padding: 0 14px;
}

.search-box svg { width: 19px; height: 19px; color: var(--muted); }
.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.product-grid {
  width: min(1180px, calc(100% - 36px));
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 780px;
  height: 100%;
  box-shadow: 0 12px 34px rgba(32, 72, 63, .08);
}

.product-media {
  min-height: 230px;
  height: 260px;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 80% 18%, rgba(143, 49, 85, .16), transparent 26%),
    radial-gradient(circle at 22% 18%, rgba(216, 162, 74, .24), transparent 28%),
    linear-gradient(135deg, #fff1df, #dff2eb 58%, #f8e7ef);
  position: relative;
  overflow: hidden;
}

.product-visual {
  width: min(70%, 230px);
  height: min(70%, 220px);
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--forest);
}

.product-visual svg { width: 100%; height: 100%; stroke-width: 1.4; }
.product-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  color: var(--berry);
  font-size: 12px;
  font-weight: 800;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.product-info h3 {
  min-height: 48px;
  margin-bottom: 8px;
  font-size: 21px;
  line-height: 1.15;
}

.product-info p {
  min-height: 72px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  min-height: 62px;
  margin: 14px 0;
}

.meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  color: #5d564d;
  font-size: 12px;
  font-weight: 700;
}

.grind-field {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  min-height: 62px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.grind-field select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--white);
  color: var(--ink);
}

.stock-note {
  min-height: 20px !important;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stock-note.low {
  color: #a33a2c;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  margin-top: auto;
  padding-top: 18px;
}

.price-row strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 23px;
  line-height: 1.1;
  white-space: nowrap;
}

.price-row .button {
  flex: 0 0 auto;
  min-width: 130px;
}

.subscription {
  margin-top: 58px;
  padding: 42px clamp(18px, 4vw, 48px);
  width: min(1180px, calc(100% - 36px));
  border-block: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(32, 72, 63, .08), rgba(216, 162, 74, .2)),
    var(--soft);
}

.subscription p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.55;
  margin: 16px 0 0;
}

.subscription-panel {
  width: 250px;
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.subscription-panel span { color: var(--muted); font-weight: 700; }
.subscription-panel strong { font-size: 36px; line-height: 1; }

.guide { padding-bottom: 78px; }
.guide-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.guide-grid article {
  border-left: 3px solid var(--gold);
  padding: 18px 18px 18px 20px;
  background: linear-gradient(180deg, var(--white), #fff9ef);
}

.guide-grid svg { color: var(--forest); width: 26px; height: 26px; margin-bottom: 12px; }
.guide-grid h3 { margin-bottom: 6px; }
.guide-grid p { color: var(--muted); line-height: 1.5; margin-bottom: 0; }

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: rgba(28, 25, 23, 0);
  transition: background .2s ease;
}

.cart-drawer.open {
  pointer-events: auto;
  background: rgba(28, 25, 23, .32);
}

.cart-panel {
  margin-left: auto;
  width: min(440px, 100%);
  height: 100%;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform .24s ease;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.cart-drawer.open .cart-panel { transform: translateX(0); }

.cart-panel header, .cart-panel footer {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.cart-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-panel h2 { font-size: 30px; }
.cart-items { padding: 8px 20px; overflow: auto; }

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line h3 { font-size: 16px; margin-bottom: 5px; }
.cart-line p { color: var(--muted); margin-bottom: 8px; }
.qty-controls {
  display: inline-grid;
  grid-template-columns: 34px 36px 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.qty-controls button {
  height: 34px;
  border: 0;
  background: var(--white);
  cursor: pointer;
}

.qty-controls span { text-align: center; font-weight: 800; }
.line-price { font-weight: 800; white-space: nowrap; }
.empty { color: var(--muted); padding: 24px 0; line-height: 1.5; }

.customer-checkout {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.customer-checkout strong {
  color: var(--forest);
}

.customer-checkout button {
  justify-self: start;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--forest);
  font-weight: 800;
  cursor: pointer;
}

.account-drawer {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  background: rgba(28, 25, 23, 0);
  transition: background .2s ease;
}

.account-drawer.open {
  pointer-events: auto;
  background: rgba(28, 25, 23, .32);
}

.account-panel {
  margin-left: auto;
  width: min(440px, 100%);
  height: 100%;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform .24s ease;
  display: grid;
  grid-template-rows: auto 1fr;
}

.account-drawer.open .account-panel { transform: translateX(0); }

.account-panel header {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.account-panel h2 { font-size: 30px; }
.account-body {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px;
  overflow: auto;
}

.account-status {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  line-height: 1.45;
}

.account-status strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.club-card {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4faf7;
  text-align: center;
}

.club-card span {
  display: block;
  color: var(--copper);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.club-card strong {
  margin: 2px 0 0;
  color: var(--forest);
}

.club-card img {
  width: min(220px, 100%);
  height: auto;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.club-card small {
  color: var(--muted);
  line-height: 1.35;
}

.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.account-tabs button {
  min-height: 42px;
  border: 0;
  background: var(--white);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.account-tabs button.active {
  background: var(--forest);
  color: var(--white);
}

.account-form,
.account-address-form {
  display: none;
  gap: 12px;
}

.account-form.active {
  display: grid;
}

.account-address-form:not([hidden]) {
  display: grid;
}

.account-address-form h3 {
  margin: 0;
  font-size: 18px;
}

.account-form label,
.account-address-form label,
.checkout-email {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.account-form input,
.account-address-form input,
.checkout-email input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: var(--white);
  color: var(--ink);
}

.cart-panel footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 18px;
}

.checkout-button { width: 100%; }
.checkout-note { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 12px 0 0; text-align: center; }
.delivery-box {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.delivery-box > span {
  color: var(--ink);
  font-weight: 800;
}

.delivery-box label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.delivery-box input {
  width: 16px;
  height: 16px;
}

.delivery-box small {
  line-height: 1.35;
}
.checkout-email {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.checkout-email input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--white);
}
.status-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--soft);
}
.status-page section {
  width: min(680px, 100%);
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.status-page h1 {
  font-size: clamp(42px, 7vw, 76px);
}
.status-id {
  word-break: break-word;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 50;
  transform: translate(-50%, 20px);
  opacity: 0;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 800;
  box-shadow: var(--shadow);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 920px) {
  .site-header { grid-template-columns: 1fr auto auto; gap: 10px; }
  .main-nav { display: none; }
  .icon-button.nav-toggle { display: inline-grid; }
  .mobile-nav.open { display: grid; }
  .hero {
    min-height: 720px;
    align-items: end;
  }
  .hero-img { object-position: 62% center; }
  .hero-overlay { background: linear-gradient(180deg, rgba(255, 253, 248, .18), rgba(255, 253, 248, .98) 72%); }
  .hero-content {
    margin: 0 auto;
    padding: 330px 0 50px;
  }
  .trust-strip, .product-grid, .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .intro-band, .toolbar, .subscription { grid-template-columns: 1fr; align-items: start; }
  .collection-grid { grid-template-columns: repeat(4, minmax(72px, 1fr)); width: 100%; }
  .subscription-panel { width: 100%; }
}

@media (max-width: 620px) {
  .site-header { padding-inline: 14px; }
  .brand small { display: none; }
  .hero-actions .button { width: 100%; }
  .trust-strip, .product-grid, .guide-grid { grid-template-columns: 1fr; }
  .trust-strip div { border-right: 0; border-bottom: 1px solid var(--line); }
  .trust-strip div:last-child { border-bottom: 0; }
  .section { padding-top: 50px; }
  .collection-grid { grid-template-columns: repeat(2, 1fr); }
  .collection-tile { height: 70px; }
  .product-media { min-height: 210px; height: 230px; }
}
