:root {
  --ink: #2c1f18;
  --ink-soft: #5d473a;
  --brown: #4a2f21;
  --brown-2: #76523d;
  --camel: #b28a69;
  --sand: #e8d9c4;
  --cream: #f7f0e5;
  --paper: #fffdf9;
  --line: rgba(75, 48, 33, .16);
  --shadow: 0 24px 80px rgba(48, 30, 20, .16);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -10%, rgba(204, 174, 141, .42), transparent 32rem),
    linear-gradient(180deg, #f5ecdf 0, #fbf7f0 42rem, #f2e6d6 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
}

button, input, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }

.ambient {
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
}
.ambient-one { left: -15rem; top: 38rem; background: rgba(111, 75, 52, .16); }
.ambient-two { right: -16rem; top: 4rem; background: rgba(224, 195, 153, .38); }

.app-shell { width: min(1180px, 100%); margin: 0 auto; padding: 0 24px; }
.topbar {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 18px; }
.brand img { width: clamp(150px, 20vw, 214px); height: auto; display: block; mix-blend-mode: multiply; }
.brand span {
  color: var(--brown-2);
  text-transform: uppercase;
  letter-spacing: .19em;
  font-size: 10px;
  font-weight: 750;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.cart-button {
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, .68);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  min-height: 46px;
  padding: 0 8px 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-weight: 700;
}
.cart-button:hover { background: var(--paper); transform: translateY(-1px); }
.cart-icon { transform: rotate(180deg); font-size: 20px; }
.cart-button b {
  min-width: 31px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brown);
  font-size: 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  margin: 28px 0 70px;
  min-height: 408px;
  border-radius: 34px;
  padding: clamp(42px, 8vw, 88px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff9f0;
  background:
    linear-gradient(115deg, rgba(43, 27, 18, .98), rgba(74, 47, 33, .93)),
    repeating-linear-gradient(90deg, transparent 0 70px, rgba(255,255,255,.03) 71px 72px);
  box-shadow: var(--shadow);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 50%, rgba(224, 194, 151, .21), transparent 23rem),
    linear-gradient(105deg, transparent 0 65%, rgba(255,255,255,.035) 65% 66%, transparent 66%);
}
.hero-copy { position: relative; z-index: 1; max-width: 660px; }
.eyebrow {
  margin: 0 0 13px;
  color: var(--camel);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 10px;
  font-weight: 800;
}
.hero h1 {
  margin: 0;
  font: 500 clamp(44px, 7vw, 78px)/.96 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
}
.hero h1 em { color: #d8b893; font-weight: 400; }
.hero-copy > p:last-child { max-width: 570px; margin: 28px 0 0; color: #d9cbbd; line-height: 1.7; font-size: 15px; }
.hero-seal {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 158px;
  height: 158px;
  border: 1px solid rgba(255,255,255,.32);
  outline: 1px solid rgba(255,255,255,.12);
  outline-offset: 9px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: rotate(-7deg);
}
.hero-seal span { font: 700 55px/1 Georgia, serif; letter-spacing: -.08em; }
.hero-seal small { position: absolute; bottom: 29px; letter-spacing: .22em; font-size: 8px; color: #d8b893; }

.catalog { padding-bottom: 88px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.section-heading h2, .sheet-header h2 {
  margin: 0;
  font: 500 clamp(31px, 4vw, 48px)/1.05 Georgia, serif;
  letter-spacing: -.03em;
}
.search-box {
  width: min(360px, 42vw);
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  background: rgba(255,255,255,.65);
}
.search-box span { color: var(--brown-2); font-size: 24px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-box:focus-within { border-color: var(--camel); box-shadow: 0 0 0 4px rgba(178,138,105,.12); }

.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 32px -4px 20px;
  padding: 4px;
}
.category-strip::-webkit-scrollbar { display: none; }
.category-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.55);
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}
.category-chip:hover, .category-chip.active { color: #fff; border-color: var(--brown); background: var(--brown); }
.category-chip i { font-style: normal; color: #cba98c; margin-left: 6px; font-size: 9px; text-transform: uppercase; }

.catalog-meta {
  display: flex;
  justify-content: space-between;
  padding: 0 2px 14px;
  border-bottom: 1px solid var(--line);
  color: #826958;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .13em;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 249, .82);
  box-shadow: 0 10px 35px rgba(66, 40, 25, .055);
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(66, 40, 25, .12); }
.product-image {
  position: relative;
  aspect-ratio: 1 / .93;
  display: grid;
  place-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.product-image img { width: 100%; height: 100%; object-fit: contain; }
.product-badge {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 1;
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  background: var(--brown);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.product-badge.soon { color: var(--brown); background: #ead8c1; }
.product-content { padding: 19px; }
.product-category { min-height: 14px; margin: 0 0 8px; color: #9b7c67; font-size: 9px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.product-card h3 { min-height: 48px; margin: 0; font: 600 20px/1.2 Georgia, serif; }
.product-description { min-height: 38px; margin: 9px 0 15px; color: #806958; font-size: 12px; line-height: 1.55; }
.price-block { display: grid; gap: 5px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.price-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.price-line span { color: #8b7060; font-size: 11px; }
.price-line b { font-size: 16px; }
.price-line.rrp b { color: #947a69; font-size: 12px; text-decoration: line-through; font-weight: 600; }
.purchase-row { display: grid; grid-template-columns: 108px 1fr; gap: 9px; margin-top: 15px; }
.qty-control {
  height: 44px;
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.qty-control button { border: 0; background: transparent; cursor: pointer; color: var(--brown-2); font-size: 18px; }
.qty-control input { min-width: 0; width: 100%; border: 0; outline: 0; text-align: center; font-weight: 800; color: var(--ink); -moz-appearance: textfield; }
.qty-control input::-webkit-outer-spin-button, .qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-button, .primary-button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--brown);
  font-weight: 780;
  cursor: pointer;
  box-shadow: 0 9px 20px rgba(73, 46, 31, .18);
}
.add-button:hover, .primary-button:hover { background: #382319; transform: translateY(-1px); }
.add-button:disabled { color: #816b5d; background: #e5d7c5; box-shadow: none; cursor: default; transform: none; }
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state h3 { margin: 15px 0 5px; font: 600 25px Georgia, serif; }
.empty-state p { color: #8b7160; }
.bottle-mini { width: 34px; height: 74px; margin: auto; border: 2px solid var(--brown); border-radius: 8px 8px 12px 12px; position: relative; }
.bottle-mini::before { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--brown); border-bottom: 0; left: 7px; top: -18px; }

.footer {
  border-top: 1px solid var(--line);
  padding: 38px 0 calc(38px + var(--safe-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: #826b5b;
  font-size: 12px;
}
.footer img { width: 146px; mix-blend-mode: multiply; }
.footer button, .back-link { padding: 0; border: 0; border-bottom: 1px solid currentColor; background: none; cursor: pointer; color: var(--brown-2); }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(35, 23, 16, .45);
  backdrop-filter: blur(5px);
}
.cart-sheet {
  position: fixed;
  z-index: 41;
  top: 0;
  right: 0;
  width: min(520px, 100%);
  height: 100vh;
  height: 100dvh;
  padding: 34px 30px calc(24px + var(--safe-bottom));
  overflow-y: auto;
  background: var(--cream);
  box-shadow: -25px 0 80px rgba(35, 23, 16, .24);
  transform: translateX(105%);
  transition: transform .28s ease;
}
.cart-sheet.open { transform: translateX(0); }
.sheet-handle { display: none; }
.sheet-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; font-size: 26px; line-height: 1; }
.payment-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 15px; background: #e7d9c8; }
.payment-switch button { border: 0; border-radius: 11px; padding: 10px; background: transparent; cursor: pointer; text-align: left; }
.payment-switch button.active { background: #fff; box-shadow: 0 4px 13px rgba(76,48,32,.11); }
.payment-switch span, .payment-switch small { display: block; }
.payment-switch span { font-weight: 800; font-size: 12px; }
.payment-switch small { margin-top: 2px; color: #8e7361; font-size: 9px; }
.cart-items { display: grid; gap: 10px; margin: 20px 0; }
.cart-item { display: grid; grid-template-columns: 68px 1fr auto; gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.7); }
.cart-item > img { width: 68px; height: 75px; object-fit: contain; border-radius: 10px; background: #fff; }
.cart-item h4 { margin: 0 0 4px; font: 600 14px/1.25 Georgia, serif; }
.cart-item p { margin: 0 0 8px; color: #816b5d; font-size: 10px; }
.cart-item .qty-control { width: 105px; height: 34px; grid-template-columns: 28px 1fr 28px; }
.cart-item-total { align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.cart-item-total strong { white-space: nowrap; font-size: 13px; }
.remove-button { border: 0; background: none; color: #a37f68; cursor: pointer; font-size: 18px; }
.cart-empty { text-align: center; padding: 48px 30px; color: #806959; }
.cart-empty img { width: 120px; height: 140px; object-fit: contain; mix-blend-mode: multiply; }
.cart-empty h3 { margin: 5px 0; font: 600 23px Georgia, serif; color: var(--ink); }
.cart-empty p { line-height: 1.55; font-size: 12px; }
.cart-summary { margin-top: 18px; padding-top: 20px; border-top: 1px solid var(--line); }
.cart-summary > div { display: flex; justify-content: space-between; margin-bottom: 8px; }
.cart-summary span { color: #806959; font-size: 12px; }
.cart-summary .total-row { align-items: baseline; margin-top: 15px; }
.total-row strong { font: 600 31px Georgia, serif; }
.cart-summary > p { color: #927865; font-size: 10px; line-height: 1.5; }
.primary-button { width: 100%; min-height: 52px; margin-top: 11px; }
.checkout-form { padding-bottom: 20px; }
.checkout-form h3 { margin: 24px 0 5px; font: 600 28px Georgia, serif; }
.checkout-form > p { margin: 0 0 20px; color: #806959; font-size: 12px; }
.checkout-form label { display: grid; gap: 7px; margin-bottom: 13px; color: #755d4d; font-size: 11px; font-weight: 700; }
.checkout-form input, .checkout-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  resize: vertical;
}
.checkout-form input:focus, .checkout-form textarea:focus { border-color: var(--camel); box-shadow: 0 0 0 4px rgba(178,138,105,.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.consent-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(37, 24, 17, .88);
  backdrop-filter: blur(14px);
  overflow-y: auto;
}
.consent-card {
  width: min(590px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 40px);
  background: var(--cream);
  box-shadow: 0 35px 100px rgba(0,0,0,.36);
}
.consent-brand { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.consent-brand img { width: 178px; mix-blend-mode: multiply; }
.consent-brand span { width: 47px; height: 47px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--brown); font: 700 15px Georgia, serif; }
.consent-card h2 { margin: 0; font: 600 clamp(28px, 5vw, 39px)/1.05 Georgia, serif; }
.agreement-text {
  max-height: 245px;
  overflow-y: auto;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  white-space: pre-wrap;
  color: #634e40;
  background: rgba(255,255,255,.63);
  font-size: 11px;
  line-height: 1.65;
}
.check-row { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin: 12px 0; cursor: pointer; font-size: 12px; line-height: 1.45; }
.check-row input { width: 19px; height: 19px; accent-color: var(--brown); }
.consent-card .primary-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.consent-card > small { display: block; margin-top: 12px; text-align: center; color: #917665; font-size: 9px; }

.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  max-width: min(420px, calc(100% - 32px));
  padding: 13px 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--brown);
  box-shadow: 0 15px 45px rgba(33,20,13,.28);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: .22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #8d342c; }
.loader { position: fixed; inset: 0; z-index: 110; display: grid; place-content: center; justify-items: center; gap: 13px; color: #dfcfbd; background: var(--ink); }
.loader div { width: 43px; height: 43px; border: 2px solid rgba(255,255,255,.2); border-top-color: #d2b18f; border-radius: 50%; animation: spin .8s linear infinite; }
.loader span { text-transform: uppercase; letter-spacing: .18em; font-size: 9px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-seal { width: 120px; height: 120px; }
  .hero-seal span { font-size: 42px; }
}

@media (max-width: 640px) {
  .app-shell { padding: 0 14px; }
  .topbar { min-height: 76px; }
  .brand span { display: none; }
  .brand img { width: 154px; }
  .cart-button { min-height: 42px; padding-left: 12px; }
  .cart-button > span:not(.cart-icon) { display: none; }
  .hero { min-height: 360px; margin: 14px 0 52px; padding: 35px 27px; border-radius: 24px; align-items: flex-end; }
  .hero h1 { font-size: clamp(42px, 13vw, 59px); }
  .hero-copy > p:last-child { margin-top: 21px; font-size: 13px; }
  .hero-seal { position: absolute; right: -24px; top: 27px; width: 112px; height: 112px; opacity: .45; }
  .section-heading { display: grid; }
  .search-box { width: 100%; }
  .category-strip { margin-top: 24px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-card { border-radius: 18px; }
  .product-content { padding: 13px; }
  .product-card h3 { min-height: 43px; font-size: 16px; }
  .product-description { min-height: 45px; font-size: 10px; }
  .product-category { font-size: 8px; }
  .price-line span { font-size: 9px; }
  .price-line b { font-size: 14px; }
  .purchase-row { grid-template-columns: 1fr; }
  .qty-control { height: 40px; }
  .add-button { min-height: 40px; font-size: 11px; }
  .product-badge { left: 10px; top: 10px; font-size: 8px; }
  .footer { display: grid; justify-items: start; }
  .cart-sheet { top: auto; bottom: 0; width: 100%; height: min(90vh, 780px); height: min(90dvh, 780px); padding: 12px 16px calc(18px + var(--safe-bottom)); border-radius: 25px 25px 0 0; transform: translateY(105%); }
  .cart-sheet.open { transform: translateY(0); }
  .sheet-handle { display: block; width: 42px; height: 4px; border-radius: 99px; background: #c4ad98; margin: 0 auto 16px; }
  .sheet-header { margin-bottom: 18px; }
  .cart-item { grid-template-columns: 58px 1fr auto; padding: 8px; }
  .cart-item > img { width: 58px; height: 68px; }
  .cart-item .qty-control { width: 96px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .consent-layer { padding: 10px; align-items: end; }
  .consent-card { width: 100%; max-height: calc(100dvh - 20px); border-radius: 25px; padding: 24px 20px; }
  .agreement-text { max-height: 205px; }
}

@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-card h3, .product-description { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
