:root {
  color-scheme: dark;
  --bordeaux: #70283b;
  --yellow: #fff0b8;
  --blue: #a9d6e5;
  --field: rgba(255, 255, 255, .055);
  --line: rgba(251, 234, 180, .16);
  --page-gutter: clamp(1rem, 3.2vw, 3.6rem);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bordeaux);
  color: var(--yellow);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-underline-offset: .24em; }
button, input, select, textarea { font: inherit; color: inherit; }
a, button, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: .3rem;
}
p, h1, h2, h3, dl { margin: 0; }
.container { width: min(100% - 2 * var(--page-gutter), 90rem); margin-inline: auto; }
.sr-only, .skip:not(:focus), .toast:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  z-index: 5;
  top: 1rem;
  left: 1rem;
  padding: .7rem;
  background: var(--bordeaux);
}

.site-header, .site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem 2rem;
  padding-block: 1.2rem;
}
.site-header { min-height: 5rem; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  width: fit-content;
  font-size: clamp(1.45rem, 2.8vw, 2.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.07em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark img { display: block; flex: none; border-radius: 50%; }
.site-nav, .footer-links { display: flex; align-items: center; gap: .55rem clamp(.75rem, 3.2vw, 3.1rem); }
.site-nav a, .footer-links a { text-decoration: none; }
.site-nav a:hover, .footer-links a:hover, .wordmark:hover { text-decoration: underline; }
.site-nav a, .cart-toggle { font-size: clamp(.9rem, 1.55vw, 1.18rem); white-space: nowrap; }
.cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
}
.cart-toggle:hover { text-decoration: underline; }
.cart-toggle span {
  min-width: 1.6rem;
  padding: .18rem .32rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  font-size: .75rem;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.featured { padding-block: .65rem clamp(1.75rem, 4vw, 3.25rem); }
.featured-carousel {
  width: min(100%, 25.5rem);
  margin-inline: auto;
  border: clamp(.6rem, 1.3vw, 1rem) solid var(--blue);
  background: var(--bordeaux);
}
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 2px solid var(--yellow); outline-offset: -4px; }
.carousel-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.carousel-image { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.carousel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  min-height: 4.5rem;
  padding: .65rem .8rem;
}
.carousel-caption {
  display: block;
  min-height: 1.6rem;
  border: 0;
  padding: .1rem 0;
  background: transparent;
  text-align: left;
  font-size: .96rem;
  font-weight: 700;
  line-height: 1.25;
}
.carousel-caption:disabled { opacity: 1; }
.carousel-caption:hover:enabled { text-decoration: underline; }
.carousel-position:not(:empty) { color: var(--yellow); font-size: .82rem; font-variant-numeric: tabular-nums; }
.carousel-controls:not([hidden]) { display: flex; flex: none; gap: .25rem; }
.carousel-controls button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
}
.carousel-controls button:hover { border-color: var(--yellow); }
.carousel-controls #carousel-play { font-size: .93rem; }

.gallery { padding-block: .45rem 5rem; }
.gallery-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 12.5rem);
  gap: .5rem 1rem;
  align-items: center;
  margin-bottom: clamp(.85rem, 2.35vw, 2rem);
  border-top: 1px solid var(--line);
  padding-top: .64rem;
}
.gallery-tools h1 { font-size: .94rem; line-height: 1.25; font-weight: 500; }
.catalog-search input {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: .5rem .05rem .45rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: .95rem;
}
.catalog-search input::placeholder { color: var(--yellow); opacity: 1; }
.search-status { grid-column: 1 / -1; color: var(--yellow); font-size: .9rem; }
.search-status:empty { display: none; }

.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(2rem, 5.8vw, 5.5rem) clamp(1rem, 3vw, 3rem);
}
.gallery-card { min-width: 0; }
.gallery-trigger {
  display: grid;
  gap: .85rem;
  width: 100%;
  padding: 0 0 .4rem;
  border: 0;
  background: transparent;
  text-align: left;
}
.gallery-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.gallery-label { font-size: clamp(.94rem, 1.5vw, 1.15rem); line-height: 1.25; }
.gallery-trigger:is(:hover, :focus-visible) .gallery-label { text-decoration: underline; }

.ordering {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.4rem, 5vw, 5rem);
  padding-block: clamp(1.6rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}
.ordering h2, .product-details h2, .cart-header h2 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 600;
  line-height: .99;
  letter-spacing: -.065em;
}
.order-intro > p, .order-steps, .product-delivery { font-size: 1rem; line-height: 1.46; }
.order-intro > p { margin-top: .95rem; max-width: 35ch; }
.format-prices { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; margin-top: .9rem; }
.format-prices div { display: flex; align-items: baseline; gap: .42rem; }
.format-prices dd { margin: 0; font-weight: 700; }
.order-steps ol { margin: 0 0 1.05rem; padding-left: 1.25rem; }
.order-steps li + li { margin-top: .45rem; }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.5rem 2rem; flex-wrap: wrap; }
.site-footer .wordmark { font-size: 1.4rem; }
.footer-links { flex-wrap: wrap; font-size: .94rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: .65rem 1rem;
  border: 1px solid var(--yellow);
  border-radius: .15rem;
  background: transparent;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.button:hover { background: var(--field); }
.button-primary, .button-primary:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--bordeaux);
}
.button-primary:hover { filter: brightness(.94); }

dialog {
  padding: 0;
  color: var(--yellow);
  border: 1px solid var(--line);
  background: var(--bordeaux);
}
dialog::backdrop { background: rgb(28 10 15 / .77); }
.product-dialog { width: min(57rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); border-radius: .25rem; }
.product-panel { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.dialog-close {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0 0 .12rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bordeaux);
  font: 1.7rem/1 Arial, sans-serif;
}
.dialog-close:hover { border-color: var(--yellow); }
.product-actions {
  position: sticky;
  z-index: 1;
  top: .75rem;
  display: flex;
  justify-content: flex-end;
  height: 0;
  padding-inline: .75rem;
  pointer-events: none;
}
.product-actions .dialog-close { flex: none; pointer-events: auto; }
.product-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; max-height: min(78dvh, 44rem); object-fit: contain; align-self: center; }
.product-details { align-self: center; padding: clamp(1.2rem, 4vw, 2.5rem); }
.product-details h2 { font-size: clamp(1.95rem, 4.1vw, 3.65rem); margin-bottom: .7rem; }
.product-feedback { margin-top: .55rem; color: var(--yellow); }
.product-feedback:empty { display: none; }
.product-form { display: grid; gap: .55rem; margin-top: 1.25rem; }
.product-form label { font-size: .94rem; font-weight: 600; }
.product-form select {
  min-height: 2.85rem;
  min-width: 0;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: .15rem;
  padding: .5rem 1.8rem .5rem .7rem;
  background:
    linear-gradient(45deg, transparent 50%, var(--yellow) 50%) right .84rem center / 5px 5px no-repeat,
    linear-gradient(135deg, var(--yellow) 50%, transparent 50%) right .53rem center / 5px 5px no-repeat,
    var(--field);
}
.product-form option { background: var(--bordeaux); color: var(--yellow); }
.product-price { font-size: 1.53rem; font-weight: 700; }
.cart {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 29rem);
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border-width: 0 0 0 1px;
}
.cart[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.cart-header, .cart-footer { padding: 1rem 1.2rem; }
.cart-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--line); }
.cart-header h2 { font-size: clamp(1.8rem, 6vw, 2.45rem); }
.cart-body { overflow: auto; padding: 1rem 1.2rem; }
.cart-body > p { line-height: 1.43; }
.cart-footer:empty { display: none; }
.cart-footer { display: grid; gap: .55rem; border-top: 1px solid var(--line); }
.cart-footer p, .cart-line p { color: var(--yellow); font-size: .91rem; line-height: 1.38; }
.cart-footer .total { display: flex; justify-content: space-between; gap: .5rem; font-size: 1.15rem; font-weight: 700; }
.cart-list { padding: 0; margin: 0; list-style: none; }
.cart-line { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) auto; gap: .7rem; align-items: start; padding-block: .85rem; border-bottom: 1px solid var(--line); }
.cart-line img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: contain; }
.cart-line h3 { font-size: 1.01rem; margin-bottom: .18rem; }
.cart-line strong { white-space: nowrap; }
.cart-notice { margin-bottom: .7rem; padding: .6rem .7rem; border: 1px solid var(--line); }
.quantity { display: flex; align-items: center; gap: .38rem; margin-top: .35rem; }
.quantity button { width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--line); background: transparent; border-radius: .15rem; font-weight: 700; }
.quantity button:hover:enabled { border-color: var(--yellow); }
.quantity span { min-width: 1rem; text-align: center; font-variant-numeric: tabular-nums; }
.checkout {
  width: min(54rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  max-width: none;
  overflow: hidden;
  border-radius: .25rem;
}
.checkout[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.checkout-header, .checkout-footer { padding: .75rem clamp(.9rem, 2.5vw, 1.3rem); }
.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  border-bottom: 1px solid var(--line);
}
.checkout-header h2 { font-size: clamp(1.45rem, 4vw, 2.05rem); line-height: 1; letter-spacing: -.055em; }
.checkout-header .dialog-close { flex: none; }
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  min-height: 0;
  overflow: auto;
}
.checkout-layout.has-receipt { grid-template-columns: 1fr; }
.checkout-summary, .checkout-form, .checkout-receipt { min-width: 0; padding: 1.1rem clamp(.9rem, 2.5vw, 1.3rem); }
.checkout-summary { border-right: 1px solid var(--line); }
.checkout-summary summary { font-weight: 700; cursor: pointer; }
.checkout-summary p, .checkout-receipt p { margin-top: .65rem; line-height: 1.4; }
.checkout-items { padding-left: 1.1rem; margin-block: .8rem; }
.checkout-items li { margin-block: .4rem; line-height: 1.4; }
.checkout-form fieldset { display: grid; min-width: 0; gap: .75rem; padding: 0; margin: 0; border: 0; }
.checkout-form legend { margin-bottom: .9rem; font-weight: 700; }
.checkout-form label { display: grid; gap: .28rem; font-size: .94rem; }
.checkout-form input, .checkout-form textarea {
  display: block;
  width: 100%;
  min-height: 2.55rem;
  padding: .5rem .65rem;
  border: 1px solid var(--line);
  border-radius: .15rem;
  background: var(--field);
  font-size: 1rem;
}
.checkout-form textarea { resize: vertical; }
.checkout-form p { margin-top: -.35rem; font-size: .88rem; line-height: 1.35; }
.checkout-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
  border-top: 1px solid var(--line);
  font-size: .94rem;
}
.checkout-footer [hidden] { display: none; }

.toast:not(:empty) {
  position: fixed;
  z-index: 2;
  right: .8rem;
  bottom: .8rem;
  max-width: calc(100% - 1.6rem);
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: .15rem;
  background: var(--bordeaux);
  font-size: .95rem;
  line-height: 1.3;
}

@media (max-width: 740px) {
  .site-header { min-height: 4.1rem; padding-block: .7rem; }
  .gallery { padding-bottom: 3rem; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 1rem; }
  .ordering { grid-template-columns: 1fr; }
  .product-panel { grid-template-columns: 1fr; }
  .product-photo { max-height: min(45dvh, 23rem); }
  .checkout { position: fixed; inset: 0; width: 100%; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .checkout-layout { grid-template-columns: 1fr; align-content: start; }
  .checkout-summary { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 420px) {
  .site-header { gap: .4rem; }
  .site-header .wordmark { gap: .35rem; font-size: 1.18rem; }
  .site-header .wordmark img { width: 30px; height: 30px; }
  .site-nav { gap: .5rem; }
  .site-nav a, .cart-toggle { font-size: .84rem; }
  .gallery-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 8rem); }
  .gallery-tools h1 { font-size: .87rem; }
  .catalog-search input { font-size: .87rem; }
  .gallery-trigger { gap: .5rem; }
}
@media (max-width: 360px) {
  .site-nav a:first-child { display: none; }
}
