:root {
  color-scheme: light;
  --cream: #fff6e8;
  --paper: #fffbf4;
  --ink: #3e2318;
  --muted: #664b3b;
  --caramel: #924213;
  --brown: #702c16;
  --line: #e8d2b6;
  --rule: #bf9b76;
  --serif: Georgia, 'Times New Roman', serif;
  font: 1rem/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
body.has-cart { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
body:has(dialog[open]) { overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--caramel);
  outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; }
.shell { width: min(100%, 52rem); margin-inline: auto; padding-inline: 1rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header { background: #f9e6ca; border-bottom: 3px double var(--rule); }
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .5rem;
  padding-block: .42rem;
}
.brand-logo { grid-column: 2; display: block; width: clamp(7.25rem, 22vw, 8.25rem); height: auto; clip-path: inset(1% round 15%); }
.cart-trigger {
  display: flex;
  justify-self: end;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .25rem .65rem;
  border: 1px solid var(--rule);
  border-radius: .7rem;
  background: var(--cream);
  font-size: .875rem;
  font-weight: 700;
}
.badge { min-width: 1.35rem; padding-inline: .2rem; text-align: center; border-radius: 2rem; background: var(--brown); color: white; font-size: .75rem; }
.bag { position: relative; width: .9rem; height: .76rem; margin-top: .25rem; border: 1.5px solid currentColor; border-radius: .19rem; }
.bag::before { content: ''; position: absolute; width: .43rem; height: .37rem; top: -.38rem; left: .14rem; border: 1.5px solid currentColor; border-bottom: 0; border-radius: .3rem .3rem 0 0; }

.menu { padding-block: 1.1rem 2rem; }
h1 {
  display: flex;
  align-items: center;
  gap: clamp(.7rem, 3vw, 1.4rem);
  margin-bottom: 1rem;
  color: var(--brown);
  font: 400 clamp(1.95rem, 6vw, 3rem)/1.15 var(--serif);
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1::before, h1::after { content: ''; flex: 1; border-top: 2px dotted var(--rule); }
.search { display: flex; align-items: center; gap: .85rem; padding-inline: .9rem; background: var(--paper); border: 1px solid #b99d88; border-radius: .75rem; }
.search:focus-within { outline: 2px solid var(--caramel); outline-offset: 1px; }
.search input { width: 100%; min-width: 0; min-height: 3rem; padding: 0; background: none; border: 0; outline: none; }
.search input::placeholder { color: var(--muted); }
.magnifier { position: relative; width: .82rem; height: .82rem; border: 1.5px solid var(--muted); border-radius: 50%; flex: none; }
.magnifier::after { content: ''; position: absolute; width: .36rem; height: 1.5px; background: var(--muted); transform: rotate(45deg); right: -.27rem; bottom: -.11rem; }
.categories { display: flex; gap: .4rem; overflow-x: auto; padding: .25rem; margin: .75rem -.25rem 1rem; scrollbar-width: thin; }
.category { flex: none; min-height: 2.75rem; padding: .38rem .55rem; border: 1px solid #c9b09c; border-radius: 2rem; background: var(--paper); font-size: .875rem; font-weight: 700; }
.category[aria-pressed="true"] { background: var(--brown); border-color: var(--brown); color: white; }
.products, .cart-items { display: grid; padding: 0; margin: 0; list-style: none; }
.products { padding-inline: clamp(.7rem, 3vw, 1.25rem); border: 1px solid var(--line); border-radius: .7rem; background: var(--paper); }
.products:empty { display: none; }
.product {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: .45rem .75rem;
  padding-block: .85rem;
}
.product + .product { border-top: 2px dotted var(--line); }
.product-image { grid-row: span 2; }
.product-image { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: .62rem; background: #f3e5d5; overflow: hidden; }
.product-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.placeholder { position: relative; width: 58%; height: 58%; border-radius: 50%; background: #faefe3; }
.placeholder::before { content: ''; position: absolute; inset: 33% 19% 27%; background: #dfbb97; border-radius: 28% 28% 37% 37%; clip-path: polygon(14% 0, 86% 0, 100% 90%, 80% 100%, 20% 100%, 0 90%); }
.placeholder::after { content: ''; position: absolute; inset: 27% 27% 55%; background: #ba855b; border-radius: 50%; }
.product h2 { font: 400 1.05rem/1.3 var(--serif); letter-spacing: .035em; text-transform: uppercase; }
.product-description { margin-top: .27rem; color: var(--muted); font: italic 1rem/1.4 var(--serif); overflow-wrap: anywhere; }
.product-options { margin-top: .35rem; color: var(--muted); font-size: .875rem; }
.product-order { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; }
.price { display: grid; gap: .1rem; color: var(--caramel); font: 1.12rem/1.15 var(--serif); }
.price strong { white-space: nowrap; }
.price-prefix { color: var(--muted); font: italic .84rem/1.15 var(--serif); }
.select-product { min-height: 2.75rem; padding: .35rem .65rem; border: 1px solid #b48d70; border-radius: .6rem; background: #f8ecdf; color: var(--brown); font-weight: 700; font-size: .875rem; }
.empty, .storage-warning { padding: .9rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--paper); }
.storage-warning { margin-block: .5rem 1rem; }

.cart-bar { position: fixed; inset: auto 0 0; z-index: 2; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  min-height: 3.15rem;
  padding: .6rem .9rem;
  border: 1px solid transparent;
  border-radius: .72rem;
  background: var(--brown);
  color: white;
  text-align: start;
  font-weight: 700;
}
.primary strong { white-space: nowrap; }
.cart-bar-button { max-width: 50rem; margin-inline: auto; }

dialog {
  position: fixed;
  inset: auto 0 0;
  margin: 0 auto;
  padding: 0;
  width: min(100%, 36rem);
  max-width: none;
  max-height: min(92vh, 50rem);
  max-height: min(92dvh, 50rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 1.15rem 1.15rem 0 0;
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop { background: rgb(38 24 17 / 55%); }
.sheet { display: flex; flex-direction: column; max-height: inherit; }
.sheet form { min-height: 0; display: flex; flex-direction: column; }
.sheet-header, .sheet-footer { flex: none; padding: .75rem 1rem; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; border-bottom: 1px solid var(--line); }
.sheet-header h2 { font: bold 1.5rem/1.12 var(--serif); }
.sheet-footer { border-top: 1px solid var(--line); padding-bottom: calc(.75rem + env(safe-area-inset-bottom)); }
.sheet-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: .85rem 1rem; }
.close { flex: none; width: 2.75rem; height: 2.75rem; background: var(--cream); border: 1px solid var(--line); border-radius: 50%; font-size: 1.5rem; line-height: 1; }
.muted { color: var(--muted); }
fieldset { min-inline-size: 0; padding: 0; margin: .85rem 0; border: 0; }
legend { padding: 0; margin-bottom: .25rem; font-weight: 700; }
.option, .single-option { display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem; margin-bottom: .35rem; background: var(--cream); border: 1px solid var(--line); border-radius: .6rem; }
.option { min-height: 2.75rem; cursor: pointer; }
.option span { min-width: 0; overflow-wrap: anywhere; }
.option:has(:checked) { border-color: var(--caramel); background: #faecdc; }
.option input { flex: none; width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--brown); }
.option strong, .single-option strong { margin-left: auto; white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; border: 1px solid #c9b09c; border-radius: .55rem; }
.stepper button { width: 2.75rem; min-height: 2.75rem; border: 0; border-radius: .5rem; background: var(--cream); font-size: 1.25rem; }
.stepper button[aria-disabled="true"] { background: var(--paper); color: var(--muted); cursor: default; }
.stepper output { min-width: 2rem; text-align: center; font-weight: 650; }
.note-label { display: block; font-weight: 700; }
.note-label span { font-weight: 400; color: var(--muted); }
textarea { display: block; width: 100%; margin-top: .3rem; padding: .45rem .6rem; resize: vertical; border: 1px solid #b99d88; border-radius: .6rem; background: var(--paper); }
.error { color: #9a281c; font-weight: 650; }
.error:not(:empty) { margin-top: .55rem; }
.cart-items { gap: 0; }
.cart-item { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.cart-item h3 { font: bold 1.18rem/1.2 var(--serif); }
.cart-item .muted, .item-note { margin-top: .2rem; overflow-wrap: anywhere; }
.cart-item-actions { display: flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: center; margin-top: .5rem; }
.cart-item-actions strong { margin-left: auto; white-space: nowrap; }
.remove { min-height: 2.75rem; padding-inline: .45rem; border: 0; border-radius: .45rem; background: transparent; text-decoration: underline; color: var(--caramel); font-size: .875rem; }
.subtotal { display: flex; justify-content: space-between; gap: .6rem; padding-top: .8rem; font-size: 1.1rem; }
.cart-footer { display: flex; flex-wrap: wrap; gap: .55rem; }
.cart-footer button { flex: 1 1 10.5rem; justify-content: center; }
#checkout-send { flex-basis: 13rem; justify-content: space-between; }
#continue-shopping { background: var(--paper); border-color: var(--rule); color: var(--brown); }
.centered { justify-content: center; }
.checkout-notice { margin-block: .6rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--cream); color: var(--muted); }
.checkout-item-total { display: flex; justify-content: space-between; gap: .5rem; margin-top: .4rem; }
.checkout-fields { display: grid; gap: .8rem; margin-bottom: .85rem; }
.checkout-fields label { display: grid; min-width: 0; gap: .25rem; font-weight: 650; }
.checkout-fields label span { color: var(--muted); font-size: .875rem; }
.checkout-fields input, .checkout-fields select {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: .5rem .65rem;
  border: 1px solid #b99d88;
  border-radius: .55rem;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
.checkout-fields select:focus-visible { outline: 3px solid var(--caramel); outline-offset: 3px; }
.checkout-details { display: grid; grid-template-columns: minmax(5.75rem, auto) minmax(0, 1fr); gap: .25rem .7rem; margin: 0 0 .7rem; }
.checkout-details dt { font-weight: 650; }
.checkout-details dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.checkout-money { margin-top: .7rem; }
.checkout-money dd { text-align: right; }
.checkout-money :nth-last-child(-n + 2) { font-weight: 750; }
.checkout-error:not(:empty) { margin: 0 0 .8rem; }
.checkout-verification { margin-top: .65rem; max-width: 100%; }
.checkout-verification:empty, #checkout-progress:empty, #delivery-notice:empty { display: none; }
.checkout-number { margin-bottom: .45rem; overflow-wrap: anywhere; }
#checkout-result > p + .checkout-details { margin-top: .65rem; }
.pending-order { margin-bottom: .75rem; }
.secondary { background: var(--paper); border-color: var(--rule); color: var(--brown); }
button:disabled { cursor: default; opacity: .72; }
#checkout-dialog .sheet-header h2:focus { outline: none; }

@media (max-width: 30.99rem) {
  .cart-label { display: none; }
}

@media (min-width: 31rem) {
  .product { grid-template-columns: 6rem minmax(0, 1fr) auto; column-gap: 1.1rem; align-items: center; padding-block: 1rem; }
  .product-image { grid-row: auto; }
  .product h2 { font-size: 1.17rem; }
  .product-order { grid-column: auto; display: grid; justify-items: end; gap: .55rem; }
  .price { justify-items: end; }
}
@media (min-width: 48rem) {
  .menu { padding-top: 1.45rem; }
  dialog { inset: 0; margin: auto; border: 1px solid var(--line); border-radius: 1.15rem; }
}
