:root {
  --paper: #fff9f1;
  --ink: #392323;
  --muted: #6f504b;
  --berry: #991c38;
  --berry-dark: #75142b;
  --peach: #fce0d1;
  --line: #ebd9cb;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font: 500 1rem/1.5 "DM Sans", "Avenir Next", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, p, dl, dd { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { color: inherit; font: inherit; }
button:enabled { cursor: pointer; }
button:disabled { opacity: .52; cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #246048; outline-offset: 4px; }
:is(#main, #shop, #bundles, #delivery) { scroll-margin-top: 6rem; }

.shell { width: min(calc(100% - 5rem), 80rem); margin-inline: auto; }
.section-space { margin-top: clamp(3.45rem, 6vw, 6.4rem); }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip-link:focus { position: fixed; top: .5rem; left: .5rem; z-index: 5; padding: .65rem 1rem; background: var(--paper); }

.offer-bar { background: var(--berry); color: #fff9f1; text-align: center; font-size: .875rem; }
.offer-bar a { display: inline-block; padding: .5rem .8rem; text-decoration: none; }
.offer-bar a:hover { text-decoration: underline; }
.offer-bar a:focus-visible { outline-color: #fff; outline-offset: -3px; }
.site-header { position: sticky; top: 0; z-index: 3; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner {
  min-height: 5.15rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}
.brand { display: inline-block; width: 10.7rem; }
.brand img { width: 100%; height: auto; }
.main-nav { display: flex; gap: clamp(1.25rem, 3.4vw, 3.2rem); }
.main-nav a { padding-block: .8rem; font-size: .95rem; text-decoration: none; }
.main-nav a:hover { text-decoration: underline; text-underline-offset: .25rem; }
.bag-button {
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-self: end;
  padding: .5rem .75rem .5rem .95rem;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: transparent;
  font-size: .9rem;
  font-weight: 700;
}
.bag-button:hover { background: #fae8e2; }
#bag-count {
  display: grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding-inline: .25rem;
  border-radius: 1rem;
  background: var(--berry);
  color: #fff;
  font-size: .8125rem;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  margin-top: 1.2rem;
  min-height: 22rem;
  aspect-ratio: 1.96;
  border-radius: 1.55rem;
  background: var(--peach);
}
.hero-photo { position: absolute; inset: 0; z-index: -1; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-copy { position: relative; width: 43%; padding: 1.8rem 0 1.8rem 5%; }
.eyebrow { color: var(--berry-dark); font-size: .8125rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--display); }
h1 { margin: .8rem 0 1rem; font-size: clamp(2.4rem, 5.05vw, 5.4rem); font-weight: 800; line-height: .98; letter-spacing: -.05em; }
h2 { font-size: clamp(2.2rem, 4.3vw, 3.65rem); font-weight: 800; line-height: 1; letter-spacing: -.045em; }
.hero-copy > p:not(.eyebrow) { max-width: 29ch; color: #583936; }
.hero-copy .button { margin-top: 1.4rem; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.75rem;
  padding: .58rem 1.12rem;
  border: 1px solid transparent;
  border-radius: 2rem;
  text-align: center;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
}
.button.primary { background: var(--berry); color: #fff; }
.button.primary:hover:enabled, a.button.primary:hover { background: var(--berry-dark); }
.button.secondary { border-color: #d9b6af; background: transparent; color: var(--berry-dark); }
.button.secondary:hover { background: #fae8e2; }
.text-link { color: var(--berry-dark); font-size: .9rem; font-weight: 700; text-underline-offset: .25rem; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: .75rem 1.5rem; margin-bottom: 1.4rem; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.6rem, 3vw, 2.5rem) clamp(.8rem, 2vw, 1.7rem); }
.product-card { min-width: 0; }
.product-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.18;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 1rem;
}
.product-image img, .bag-thumb img { position: absolute; top: 0; right: 0; width: 177%; height: auto; max-width: none; }
.product-image img { transition: transform .22s ease; transform-origin: 62% 35%; }
.product-image:hover img { transform: scale(1.035); }
.product-copy { display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding-top: .7rem; }
.product-copy h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.14; letter-spacing: -.035em; }
.product-title { display: block; padding: 0; border: 0; background: transparent; text-align: left; font: inherit; }
.product-title:hover { text-decoration: underline; text-underline-offset: .2rem; }
.product-price { margin-top: .15rem; color: var(--muted); font-size: .9rem; }
.add-button { flex: none; }

.bundle-feature { display: grid; grid-template-columns: 45% 1fr; overflow: hidden; border-radius: 1.55rem; background: #f8e6ed; }
.bundle-feature > img { width: 100%; height: 100%; min-height: 23rem; max-height: 33rem; object-fit: cover; object-position: 50% 44%; }
.bundle-copy { align-self: center; padding: clamp(1.6rem, 5vw, 4.2rem); }
.bundle-copy > p { max-width: 34ch; margin-top: .75rem; color: #624642; }
.bundle-prices { max-width: 24rem; margin-top: 1.25rem; border-top: 1px solid #d9bdc8; }
.bundle-prices > div { display: flex; justify-content: space-between; padding: .52rem 0; border-bottom: 1px solid #d9bdc8; gap: .8rem; }
.bundle-prices dd { font-weight: 800; }
.bundle-copy .shipping-note { font-size: .875rem; }
.bundle-copy .button { margin-top: 1.15rem; }

.delivery { padding-block: 2.6rem; }
.delivery h2 { font-size: 1.5rem; }
.delivery p { margin-top: .35rem; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; }
.footer-inner .brand { width: 8rem; }
.order-notice { margin-top: 1.2rem; padding: .75rem 1rem; border: 1px solid #d9bdc8; border-radius: .7rem; background: #f8e6ed; }

dialog { border: 0; padding: 0; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: rgb(42 20 22 / .48); }
.icon-button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-size: 1.65rem;
  line-height: 1;
}
.icon-button:hover { background: #fae8e2; }
.product-dialog { position: fixed; width: min(47rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); border-radius: 1.2rem; box-shadow: 0 1rem 4rem rgb(44 16 20 / .16); }
.product-close { position: absolute; top: .75rem; right: .75rem; z-index: 1; }
.detail-photo { width: 100%; height: auto; }
.detail-copy { padding: 1.25rem clamp(1rem, 4vw, 2rem) 1.55rem; }
.detail-copy h2 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
.detail-copy p { margin-top: .45rem; }
.detail-price { font-weight: 800; }
.detail-copy .button { margin-top: .75rem; }
.detail-status { color: var(--berry-dark); font-size: .875rem; }
.detail-status:empty, .checkout-message:empty { display: none; }

.bag-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 28rem);
  height: 100dvh;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  box-shadow: -1rem 0 3rem rgb(44 16 20 / .15);
}
.bag-content { display: flex; flex-direction: column; height: 100%; }
.bag-header, .bag-body, .bag-bottom { padding: 1.15rem clamp(1rem, 4vw, 1.5rem); }
.bag-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.bag-header h2 { font-size: 2.35rem; }
.bag-body { flex: 1; min-height: 0; overflow-y: auto; }
#continue-shopping { margin-top: .8rem; }
.bundle-hint { padding: .6rem .75rem; border-radius: .55rem; background: #fbe6df; color: var(--berry-dark); font-size: .9rem; }
.bag-items { margin: .5rem 0 0; padding: 0; list-style: none; }
.bag-item {
  display: grid;
  grid-template-columns: 4.15rem minmax(0, 1fr) auto;
  align-items: start;
  gap: .7rem;
  padding-block: .8rem;
  border-bottom: 1px solid var(--line);
}
.bag-thumb { position: relative; width: 4.15rem; height: 4.15rem; border-radius: .5rem; overflow: hidden; background: #f7ebdc; }
.bag-item h3 { font-size: 1.05rem; line-height: 1.15; }
.bag-item-price { color: var(--muted); font-size: .875rem; }
.quantity { display: flex; align-items: center; gap: .18rem; margin-top: .35rem; }
.quantity button { width: 2.1rem; height: 2.1rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; }
.quantity button:hover:enabled { background: #fae8e2; }
.quantity span { min-width: 1.3rem; text-align: center; font-size: .875rem; }
.remove-button { padding: .15rem 0; border: 0; background: transparent; color: var(--berry-dark); text-decoration: underline; text-underline-offset: .2rem; font-size: .8125rem; }
.bag-bottom { border-top: 1px solid var(--line); }
.bag-totals > div { display: flex; justify-content: space-between; gap: .8rem; }
.bag-totals > div + div { margin-top: .23rem; }
.bag-totals .total-row { margin-top: .55rem; padding-top: .48rem; border-top: 1px solid var(--line); font-weight: 800; }
.checkout-button { width: 100%; margin-top: .8rem; }
.checkout-message { margin-top: .5rem; color: var(--berry-dark); font-size: .875rem; }
.toast {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 5;
  max-width: calc(100% - 2rem);
  padding: .62rem 1rem;
  border-radius: .75rem;
  background: var(--berry-dark);
  color: #fff;
  font-size: .9rem;
}

@media (max-width: 900px) {
  .shell { width: calc(100% - 3rem); }
  .brand { width: 9.4rem; }
  .product-copy { align-items: start; }
  .add-button { padding-inline: .7rem; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { min-height: 4rem; grid-template-columns: 1fr auto; }
  .brand { width: 8.6rem; }
  .main-nav { display: none; }
  .hero { display: flex; flex-direction: column-reverse; align-items: stretch; min-height: 0; aspect-ratio: auto; border-radius: 1.05rem; margin-top: .75rem; }
  .hero-copy { width: 100%; padding: 1.4rem 1.15rem .7rem; }
  h1 { font-size: clamp(2.6rem, 10.8vw, 4.3rem); margin: .6rem 0 .8rem; }
  .hero-copy .button { margin-top: .95rem; }
  .hero-photo { position: static; aspect-ratio: 1.36; }
  .hero-photo img { object-position: right center; mask-image: linear-gradient(transparent, #000 11%); }
  .section-heading { align-items: start; flex-direction: column; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-copy { display: grid; }
  .product-copy h3 { font-size: 1.18rem; }
  .add-button { width: 100%; }
  .bundle-feature { grid-template-columns: 1fr; border-radius: 1.05rem; }
  .bundle-feature > img { height: auto; min-height: 0; aspect-ratio: 1.35; }
  .delivery { padding-block: 2rem; }
}
@media (pointer: coarse) {
  .quantity button { width: 2.75rem; height: 2.75rem; }
  .remove-button { min-height: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .product-image img { transition: none; }
}
