@font-face {
  font-family: 'Bodoni Moda';
  src: url('/assets/bodoni-moda.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Bodoni Moda';
  src: url('/assets/bodoni-moda-italic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/assets/dm-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #fbf6ef;
  --white: #fffcf8;
  --ink: #2e241f;
  --coffee: #432a2a;
  --muted: #6b554f;
  --rose: #f0c3bc;
  --berry: #873f50;
  --line: #e6d6cd;
  --display: 'Bodoni Moda', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; }
button, input { font: inherit; }
button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font: 500 1em/.97 var(--display); font-optical-sizing: none; font-variation-settings: 'opsz' 30; letter-spacing: -.047em; }
em { color: var(--berry); }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 4px; }
.shell { width: min(calc(100% - 5rem), 79rem); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; inset: .7rem auto auto .7rem; z-index: 10; padding: .5rem 1rem; transform: translateY(-200%); background: var(--white); }
.skip-link:focus { transform: none; }
a, button { -webkit-tap-highlight-color: transparent; }

.site-header { position: sticky; top: 0; z-index: 2; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: grid; min-height: 4.95rem; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; }
.brand { display: inline-flex; width: fit-content; align-items: center; gap: .65rem; color: var(--coffee); text-decoration: none; }
.brand img { width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; }
.brand span { display: grid; font: 500 1.55rem/.9 var(--display); letter-spacing: .075em; }
.brand small { margin-top: .37rem; font: 700 .65rem/1.1 var(--sans); letter-spacing: .145em; text-transform: uppercase; }
.site-nav { display: flex; gap: clamp(1rem, 3vw, 3rem); align-items: center; }
.site-nav a, .footer-links a, .return-link { font-weight: 650; text-decoration: none; font-size: .9rem; }
.site-nav a:hover, .footer-links a:hover, .return-link:hover { color: var(--berry); text-decoration: underline; text-underline-offset: .25em; }
.cart-trigger { display: inline-flex; min-height: 2.75rem; justify-self: end; align-items: center; gap: .62rem; padding: .37rem .65rem .37rem .85rem; border: 1px solid var(--line); border-radius: 3rem; background: transparent; color: var(--coffee); font-size: .9rem; font-weight: 700; }
.cart-trigger:hover { border-color: var(--berry); }
.cart-count { display: grid; width: 1.45rem; height: 1.45rem; place-items: center; border-radius: 50%; background: var(--coffee); color: var(--white); font-size: .74rem; }
.bag-icon { position: relative; display: inline-block; width: .94rem; height: .79rem; margin-top: .22rem; border: 1.4px solid currentColor; border-radius: .15rem; }
.bag-icon::before { position: absolute; top: -.34rem; left: 50%; width: .36rem; height: .38rem; transform: translateX(-50%); border: 1.4px solid currentColor; border-bottom: 0; border-radius: .3rem .3rem 0 0; content: ''; }

.hero { padding-top: clamp(1.4rem, 3vw, 2.35rem); }
.hero-main { display: grid; min-height: clamp(26rem, 37vw, 33.5rem); grid-template-columns: .9fr 1.1fr; overflow: hidden; border-radius: .3rem 4.2rem .3rem .3rem; background: var(--coffee); color: var(--white); }
.hero-copy { container-type: inline-size; align-self: center; padding: 3rem clamp(2rem, 4.75vw, 4.75rem); }
.eyebrow { color: var(--berry); font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.hero-copy .eyebrow { color: var(--rose); }
.hero h1 { margin-block: 1rem 1.35rem; font-size: clamp(2.5rem, 18.4cqi, 6.2rem); line-height: .91; }
.hero h1 em { color: var(--rose); }
.hero-copy > p:not(.eyebrow) { max-width: 21rem; color: #f7e8e2; font-size: clamp(1rem, 1.35vw, 1.15rem); }
.hero-copy .button { margin-top: 1.5rem; }
.hero-image { width: 100%; height: 100%; background: #bb837a; object-fit: cover; object-position: 54% 50%; }
.button { display: inline-flex; min-height: 2.8rem; justify-content: center; align-items: center; padding: .65rem 1.19rem; border: 1px solid transparent; border-radius: 2rem; background: var(--coffee); color: var(--white); font-size: .9rem; line-height: 1.25; font-weight: 700; text-align: center; text-decoration: none; transition: background-color .18s, color .18s, border-color .18s; }
.button:hover:not(:disabled) { background: var(--berry); color: var(--white); }
.button:disabled { border-color: var(--line); color: var(--muted); background: #f4eee7; }
.button-cream { background: var(--white); color: var(--coffee); }
.button-cream:hover:not(:disabled) { background: var(--rose); color: var(--coffee); }
.hero :focus-visible { outline-color: var(--rose); }

.catalog { padding-block: clamp(3.7rem, 6vw, 6rem) clamp(4rem, 8vw, 7.25rem); scroll-margin-top: 4.8rem; }
.catalog-heading { display: grid; grid-template-columns: 1fr minmax(13rem, 19rem); gap: 1.75rem; align-items: end; margin-bottom: 2.2rem; }
.catalog-heading h2 { margin-top: .75rem; color: var(--coffee); font-size: clamp(2.55rem, 4.9vw, 4.8rem); }
.catalog-heading > p { color: var(--muted); }
.catalog-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 1.4rem; padding-block: 1rem; border-block: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .43rem; }
.filters button { min-height: 2.62rem; padding: .42rem .8rem; border: 1px solid var(--line); border-radius: 3rem; background: transparent; color: var(--coffee); font-size: .85rem; font-weight: 600; }
.filters button:hover { border-color: var(--berry); }
.filters button[aria-pressed='true'] { border-color: var(--coffee); background: var(--coffee); color: var(--white); }
.search { display: flex; min-height: 2.65rem; min-width: 14rem; align-items: center; gap: .6rem; padding: .35rem .72rem .35rem .9rem; border: 1px solid var(--line); border-radius: 2rem; background: var(--white); }
.search:focus-within { border-color: var(--berry); }
.search input { width: 100%; align-self: stretch; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--coffee); font-size: .9rem; }
.search input:focus-visible { outline: 0; }
.search-icon { position: relative; width: .75rem; height: .75rem; border: 1.4px solid var(--berry); border-radius: 50%; }
.search-icon::after { position: absolute; width: .34rem; height: 1.3px; right: -.25rem; bottom: -.1rem; transform: rotate(45deg); background: var(--berry); content: ''; }

.results-count { margin-block: .9rem 1.2rem; color: var(--muted); font-size: .9rem; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.85rem, 2vw, 1.5rem); }
.product-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: .7rem; background: var(--white); }
.product-media { position: relative; display: block; width: 100%; aspect-ratio: 1.04; padding: .7rem; overflow: hidden; border: 0; border-bottom: 1px solid var(--line); background: #fff; }
.product-media:focus-visible { z-index: 1; outline-offset: -3px; }
.product-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .22s; }
.product-media:hover img { transform: scale(1.035); }
.badge { position: absolute; inset: .65rem auto auto .65rem; padding: .2rem .57rem; border-radius: 2rem; background: #f9e8e6; color: #762842; font-size: .8rem; font-weight: 700; }
.product-copy { display: flex; flex: 1; flex-direction: column; gap: .7rem; padding: 1rem; }
.product-category { color: var(--berry); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.product-copy h3 { flex: 1; color: var(--coffee); font-size: 1rem; font-weight: 650; line-height: 1.35; }
.price { display: flex; min-height: 1.75rem; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.price strong { color: var(--coffee); font-size: 1.18rem; }
.price del { color: var(--muted); font-size: .83rem; }
.product-add { width: 100%; min-height: 2.65rem; padding-inline: .45rem; }
.empty-search { grid-column: 1 / -1; padding-block: 1rem; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: #f2e8df; }
.footer-inner { display: flex; min-height: 6.5rem; align-items: center; justify-content: space-between; gap: 1.2rem; padding-block: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; }

dialog { color: var(--ink); border: 0; }
dialog::backdrop { background: rgb(45 26 26 / .5); }
.drawer { margin: 0 0 0 auto; padding: 0; width: min(100%, 32.5rem); max-width: none; height: 100dvh; max-height: none; background: var(--white); }
.drawer-content { display: flex; min-height: 100%; flex-direction: column; gap: 1.25rem; padding: clamp(1.05rem, 4vw, 2rem); }
.dialog-top { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.dialog-top h2 { margin-top: .35rem; font-size: 2.75rem; color: var(--coffee); }
.close-button { display: grid; width: 2.65rem; height: 2.65rem; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--coffee); font-size: 1.65rem; line-height: 1; }
.close-button:hover { background: #f8e9e5; }
.cart-empty, .cart-footer > p, .order-note { color: var(--muted); }
.order-list { display: grid; margin: 0; padding: 0; list-style: none; }
.order-line { display: grid; grid-template-columns: 3.15rem minmax(0, 1fr) auto; align-items: start; gap: .7rem; padding-block: .86rem; border-bottom: 1px solid var(--line); }
.order-line > img, .order-unavailable-image { width: 3.15rem; height: 3.15rem; object-fit: contain; border: 1px solid var(--line); border-radius: .32rem; background: #fff; }
.line-name { display: block; font-size: .9rem; line-height: 1.3; overflow-wrap: anywhere; }
.line-meta { margin-top: .25rem; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.line-total { color: var(--coffee); font-size: .87rem; white-space: nowrap; }
.line-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .55rem; margin-top: .45rem; }
.quantity { display: inline-flex; align-items: center; gap: .36rem; font-size: .85rem; }
.quantity-button { display: grid; min-width: 2rem; min-height: 2rem; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--coffee); font-size: 1rem; line-height: 1; }
.quantity-button:hover:not(:disabled) { border-color: var(--berry); }
.quantity-button:disabled { color: #7e6f67; background: #f4eee7; }
.remove-button { min-height: 2rem; padding: 0 .17rem; border: 0; background: transparent; color: var(--berry); text-decoration: underline; text-underline-offset: .2rem; font-size: .82rem; }
.cart-footer { display: grid; gap: .8rem; margin-top: auto; }
.cart-total { display: flex; justify-content: space-between; align-items: center; gap: .8rem; font-weight: 650; }
.cart-total strong { color: var(--coffee); font-size: 1.28rem; white-space: nowrap; }
.cart-footer > p, .order-note { font-size: .87rem; }
.checkout { min-height: 3.2rem; }

.product-dialog { width: min(45rem, calc(100% - 1.4rem)); padding: 0; border-radius: .75rem; background: var(--white); }
.product-dialog-inner { display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; position: relative; min-height: 19rem; }
.product-dialog-inner > img { width: 100%; aspect-ratio: 1; padding: 1rem; background: #fff; object-fit: contain; }
.detail-close { position: absolute; top: .7rem; right: .7rem; z-index: 1; }
.detail-copy { display: grid; gap: .9rem; padding: 3rem 1.25rem 1.3rem; }
.detail-copy h2 { color: var(--coffee); font-size: 2rem; line-height: 1.1; }
.detail-copy > p:not(.eyebrow) { color: var(--muted); font-size: .9rem; }
.detail-source { width: fit-content; color: var(--berry); font-size: .85rem; text-underline-offset: .2rem; }
#detail-feedback:empty { display: none; }
.toast { position: fixed; z-index: 3; right: max(1rem, calc((100% - 79rem)/2)); bottom: 1.4rem; max-width: calc(100% - 2rem); padding: .78rem 1.05rem; border-radius: .35rem; background: var(--coffee); color: var(--white); box-shadow: 0 4px 18px #40282328; font-size: .9rem; }

.order-header { grid-template-columns: 1fr auto; }
.order-shell { width: min(calc(100% - 2.5rem), 44rem); margin-inline: auto; padding-block: clamp(2.75rem, 8vw, 6rem); }
.order-shell h1 { margin-bottom: .9rem; color: var(--coffee); font-size: clamp(2.75rem, 6vw, 5rem); }
#order-status { color: var(--muted); }
.order-panel { margin-top: 1.4rem; padding: .45rem clamp(.8rem, 3vw, 1.5rem) 1.4rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--white); }
.shared-total { padding-block: 1rem .45rem; }

@media (max-width: 960px) {
  .shell { width: calc(100% - 3rem); }
  .hero-main { grid-template-columns: .95fr 1.05fr; border-top-right-radius: 3rem; }
  .hero-copy { padding-inline: 2rem; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 670px) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { display: flex; min-height: 4.3rem; justify-content: space-between; }
  .site-nav { display: none; }
  .hero-main { min-height: 0; grid-template-columns: 1fr; border-top-right-radius: 2.4rem; }
  .hero-copy { padding: 2rem 1.3rem 1.65rem; }
  .hero h1 { margin-block: .75rem 1rem; font-size: clamp(2.5rem, 17cqi, 5.05rem); }
  .hero-image { width: 100%; height: auto; aspect-ratio: 1.58; object-position: center 48%; }
  .catalog { scroll-margin-top: 4.15rem; }
  .catalog-heading { grid-template-columns: 1fr; gap: .9rem; margin-bottom: 1.5rem; }
  .catalog-heading > p { max-width: 21rem; }
  .search { flex: 1; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-media { padding: .5rem; }
  .product-copy { padding: .72rem; }
  .product-copy h3 { font-size: .93rem; }
  .price { column-gap: .44rem; }
  .price strong { font-size: 1.07rem; }
  .footer-inner { min-height: 5rem; }
}
@media (max-width: 430px) {
  .product-dialog-inner { grid-template-columns: 1fr; }
  .product-dialog-inner > img { height: min(54vw, 13rem); }
  .detail-copy { padding-top: 1rem; }
  .footer-links { gap: .5rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
