:root {
  color-scheme: light;
  --wine: #481a22;
  --ink: #2d2425;
  --muted: #625a5a;
  --paper: #fcfcfc;
  --rule: #e7e1e1;
  --edge: clamp(16px, 3.35vw, 64px);
  font-family: "Times New Roman", Times, serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; color: inherit; }
button { border: 0; padding: 0; background: transparent; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--wine); outline-offset: 4px; }
.symbols, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 10px 14px; background: white; transform: translateY(-200%); }
.skip:focus { transform: none; }

.masthead {
  height: 147px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--edge);
  background: #f5f1f0 var(--marble-header, url("assets/marble-header.webp")) no-repeat center 43% / cover;
  color: var(--wine);
}
.brand { margin: 10px 0 0; font-weight: 400; font-size: 46px; line-height: 1; }
.brand a { display: block; padding: 12px 24px; background: radial-gradient(ellipse, rgb(252 252 252 / 97%) 43%, rgb(252 252 252 / 60%) 65%, transparent 78%); }
.main-links, .shopping { display: flex; align-items: center; min-height: 50px; width: max-content; background: rgb(252 252 252 / 89%); }
.main-links { padding: 0 17px; gap: 30px; }
.main-links > *, .dialog-menu > * { font-size: 14px; letter-spacing: .2em; text-transform: uppercase; }
.main-links > * { display: inline-flex; align-items: center; min-height: 44px; }
.main-links > *:hover, .dialog-menu > *:hover { text-decoration: underline; text-underline-offset: 5px; }
.shopping { justify-self: end; gap: 6px; padding: 0 4px; }
.icon { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; color: var(--wine); }
.icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.icon:hover svg { stroke-width: 1.5; }
.mobile-menu { display: none; }
.badge { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 3px; display: grid; place-items: center; border-radius: 99px; font: 10px Arial, sans-serif; background: var(--wine); color: white; }

.collection, .footer { margin-inline: var(--edge); }
.filters { display: flex; justify-content: center; gap: 22px; padding-right: 24px; min-height: 59px; border-bottom: 1px solid var(--rule); }
.filters button { flex: 0 0 auto; border-bottom: 1px solid transparent; margin-bottom: -1px; padding: 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .11em; font-size: 12px; white-space: nowrap; }
.filters button:hover, .filters button[aria-pressed="true"] { color: var(--wine); }
.filters button[aria-pressed="true"] { border-color: var(--wine); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(12px, 1.45vw, 24px); row-gap: 15px; padding-top: 24px; }
.product-card { min-width: 0; position: relative; }
.product-badge {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  background: var(--wine);
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  pointer-events: none;
}
.photo-button { display: block; width: 100%; }
.product-photo {
  display: block;
  width: 100%;
  aspect-ratio: var(--ratio);
  background: #f5f5f5 var(--collection-image, url("assets/collection-reference.png")) no-repeat var(--x) var(--y) / var(--w) var(--h);
}
.product-photo-image { background: white; object-fit: contain; }
.caption { padding: 12px 38px 2px 2px; position: relative; }
.caption h3, .caption p { margin: 0; }
.caption h3 { color: var(--wine); font-size: 14px; font-weight: 400; letter-spacing: .17em; text-transform: uppercase; line-height: 1.3; }
.caption h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.caption .variant { color: var(--muted); font-size: 13px; letter-spacing: .045em; line-height: 1.4; }
.caption .price { margin-top: 6px; font-size: 14px; letter-spacing: .115em; line-height: 1.25; }
.stock-status { color: var(--wine); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.caption .stock-status { margin-top: 5px; }
.favorite { position: absolute; top: 4px; right: 0; width: 42px; height: 36px; }
.favorite svg { width: 17px; height: 17px; stroke-width: 1.35; }
.favorite[aria-pressed="true"] svg { fill: var(--wine); }
.empty { padding: 46px 12px; text-align: center; color: var(--muted); }
.empty p { margin: 0 0 16px; }
.footer { margin-top: 52px; padding: 20px 0 24px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; color: var(--wine); }
.footer p { margin: 0; color: var(--muted); }
.footer-brand { font-size: 25px; }
.currency-control { display: flex; align-items: center; gap: 8px; }
.currency-control select { min-height: 36px; padding: 4px 8px; border: 1px solid var(--rule); background: var(--paper); font: inherit; color: inherit; }
.text-button { display: inline-block; color: var(--wine); text-decoration: underline; text-underline-offset: 4px; padding-block: 6px; }
.launch-note { margin-top: 40px; max-width: 36rem; }
.launch-note h2, .waitlist h3 { font-weight: 400; color: var(--wine); margin-bottom: 8px; }
.launch-note p { line-height: 1.55; margin-block: 0 8px; }

dialog { position: fixed; width: min(540px, calc(100% - 28px)); max-height: min(83vh, 750px); padding: 32px; border: 1px solid var(--rule); color: var(--ink); background: var(--paper); overflow: auto; }
dialog::backdrop { background: rgb(35 18 22 / 36%); }
body:has(dialog[open]) { overflow: hidden; }
.bag-drawer {
  inset: 0 0 0 auto;
  width: min(480px, 100%);
  height: 100dvh;
  max-width: 100%;
  max-height: none;
  margin: 0;
  border-width: 0 0 0 1px;
  overscroll-behavior: contain;
}
.bag-feedback { margin: 0 0 10px; color: var(--wine); }
.bag-feedback:empty { display: none; }
dialog h2 { margin: 0 40px 18px 0; color: var(--wine); font-size: clamp(26px, 5vw, 36px); line-height: 1.1; font-weight: 400; }
dialog p { line-height: 1.55; }
.eyebrow { text-transform: uppercase; font-size: 11px; letter-spacing: .19em; color: var(--wine); }
.close { position: absolute; z-index: 1; top: 10px; right: 10px; background: var(--paper); }
.dialog-menu { display: grid; justify-items: start; }
.dialog-menu > * { padding: 12px 0; }
input[type="search"] { width: 100%; margin-bottom: 12px; padding: 11px 12px; border: 1px solid #b9aaaa; background: #fff; font-size: 16px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.item-product { display: flex; flex: 1; min-width: 0; align-items: center; gap: 12px; text-align: left; }
.item-product .product-photo { flex: 0 0 76px; width: 76px; }
.item-copy { display: grid; gap: 3px; }
.item-copy strong { color: var(--wine); font-weight: 400; }
.item-copy small { color: var(--muted); font-size: 13px; }
.item-product:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.item .favorite { position: static; flex: 0 0 36px; }
.quantity { display: flex; align-items: center; gap: 3px; }
.quantity button { border: 1px solid var(--rule); width: 30px; height: 32px; }
.quantity span { min-width: 1.2em; text-align: center; }
.subtotal { display: flex; justify-content: space-between; }
.preview-note { font-size: 14px; color: var(--muted); }
.waitlist { border-top: 1px solid var(--rule); padding-top: 12px; }
.waitlist h3 { font-size: 24px; margin-top: 0; }
.signup-form > label { display: grid; gap: 4px; margin-block: 12px; }
.signup-form input:is([type="email"], [type="text"], [type="tel"]), .signup-form select {
  min-height: 44px;
  width: 100%;
  border: 1px solid #b9aaaa;
  padding: 8px 12px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.waitlist > .waitlist-consent { display: flex; align-items: start; gap: 8px; line-height: 1.4; }
.waitlist-consent input { accent-color: var(--wine); }
.waitlist .add-status:empty { display: none; }
#restock-note { margin: 0 0 20px; color: var(--muted); }
.restock-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.restock-form > label { margin: 0; gap: 6px; font-size: 15px; }
.restock-form small { color: var(--muted); font-size: 12px; }
.restock-form :is(input, select):focus-visible { outline-offset: 1px; }
.restock-form p { margin: 0; }
.restock-wide { grid-column: 1 / -1; }
.product-page { width: min(100%, 1360px); margin: 0 auto; padding: 24px var(--edge) 0; }
.product-back { margin-bottom: 22px; font-size: 14px; }
.product-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(30px, 5vw, 76px); align-items: start; }
.product-gallery {
  width: 100%;
  max-width: calc(max(160px, 100svh - 96px) * (var(--gallery-ratio)));
  justify-self: center;
}
.gallery-stage { position: relative; }
.gallery-track {
  display: flex;
  aspect-ratio: var(--gallery-ratio);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery-slide {
  display: grid;
  flex: 0 0 100%;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  scroll-snap-align: start;
  background: #f5f5f5;
}
.gallery-slide img, .gallery-thumbnail img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.gallery-crop { width: 100%; overflow: hidden; }
.gallery-crop .product-photo { transform: scale(1.75); transform-origin: 50% 76%; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgb(252 252 252 / 92%); font-size: 28px; line-height: 1; }
#gallery-prev { left: 10px; }
#gallery-next { right: 10px; }
.gallery-thumbnails { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gallery-thumbnail { display: grid; place-items: center; width: 72px; aspect-ratio: 4 / 3; overflow: hidden; padding: 3px; border: 1px solid var(--rule); background: #f5f5f5; }
.gallery-thumbnail[aria-pressed="true"] { border-color: var(--wine); }
.gallery-position { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.product-info > .eyebrow { margin-top: 2px; }
.product-info h1 { color: var(--wine); font-size: clamp(38px, 5vw, 62px); font-weight: 400; line-height: 1; margin: 12px 0; }
.detail-variant { color: var(--muted); margin: 0; font-size: 17px; }
.product-price { margin: 24px 0 18px; font-size: 23px; }
.product-info > .stock-status { margin: -10px 0 16px; }
.product-actions { display: flex; align-items: center; gap: 10px; }
.product-actions .favorite { position: static; flex: 0 0 44px; height: 52px; }
.product-buy { flex: 1; min-height: 54px; font-size: 19px; }
.product-sections { margin-top: 26px; }
.product-sections section { border-top: 1px solid var(--rule); padding: 16px 0; }
.product-sections h2 { color: var(--wine); margin: 0 0 7px; font-weight: 400; font-size: 19px; }
.product-sections p { margin: 0; line-height: 1.55; }
.product-dimensions { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 0; }
.product-dimensions dt { color: var(--muted); font-size: 13px; }
.product-dimensions dd { margin: 3px 0 0; }
.primary { padding: 11px 18px; background: var(--wine); color: #fff; }
.primary:hover { background: #642834; }
.primary:disabled { color: var(--muted); background: var(--rule); cursor: default; }
.add-status { min-height: 1.55em; margin: 6px 0 0; color: var(--wine); }

@media (max-width: 800px) {
  .masthead { height: 110px; }
  .brand { font-size: 39px; }
  .main-links { gap: 15px; padding-inline: 10px; }
  .main-links > * { font-size: 12px; letter-spacing: .15em; }
  .shopping { gap: 0; padding: 0; }
  .filters { gap: 12px; padding-right: 0; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; padding-top: 18px; }
  .product-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 560px) {
  .masthead { height: 94px; padding-inline: 10px; background-size: max(100%, 540px) auto; }
  .brand { margin: 0; font-size: 35px; }
  .brand a { padding-inline: 14px; }
  .main-links { display: none; }
  .mobile-menu { display: inline-grid; background: rgb(252 252 252 / 89%); }
  .shopping { min-height: 42px; }
  .shopping .icon { width: 35px; height: 42px; }
  .shopping .icon svg { width: 20px; height: 20px; }
  .filters { min-height: 52px; justify-content: start; gap: 7px; overflow-x: auto; scrollbar-width: thin; }
  .filters button { font-size: 10px; letter-spacing: .09em; padding-inline: 7px; margin-bottom: 0; }
  .caption { padding-right: 30px; }
  .caption h3, .caption .price { font-size: 13px; }
  .caption .variant { font-size: 12px; }
  .favorite { width: 33px; height: 38px; }
  dialog { padding: 22px; }
  .restock-form { grid-template-columns: 1fr; gap: 12px; }
}
