.order-header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(8px, 1.8vw, 28px);
  max-width: 1700px;
  min-height: 76px;
  margin-inline: auto;
  padding: 8px 3%;
}

.order-brand {
  width: clamp(64px, 10vw, 120px);
}

.order-nav {
  grid-column: 2;
  display: flex;
  align-items: stretch;
  justify-self: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #cddccc;
  border-radius: 15px;
  background: #fffdf7;
  box-shadow: 0 4px 12px #174b2910;
}

.order-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 44px;
  padding: 6px 16px;
  border-radius: 10px;
  color: #174b29;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

@media (hover: hover) {
  .order-nav a:not([aria-current="page"]):hover { background: #eaf2e6; }
}

.order-nav a[aria-current="page"] {
  background: #174b29;
  color: #fffdf7;
  font-weight: 800;
}

.order-nav a:focus-visible { outline: 2px solid #955019; outline-offset: -2px; }
.order-nav a[aria-current="page"]:focus-visible { outline-color: #ffd786; }

.order-nav-icon {
  position: relative;
  flex: none;
  inline-size: 17px;
  block-size: 17px;
}

.order-nav-icon::before,
.order-nav-icon::after { position: absolute; content: ''; }

.order-nav-home::before {
  inset: 3px auto auto 4px;
  width: 9px;
  height: 9px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.order-nav-home::after {
  inset: 7px 3px 2px;
  border: 1.5px solid currentColor;
  border-top: 0;
  border-radius: 0 0 2px 2px;
}

.order-nav-menu::before {
  inset: 1px 3px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.order-nav-menu::after {
  inset: 5px 6px auto;
  height: 1px;
  background: currentColor;
  box-shadow: 0 3px currentColor, 0 6px currentColor;
}

.order-nav-calendar::before {
  inset: 3px 2px 1px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.order-nav-calendar::after {
  inset: 7px 2px auto;
  border-block-start: 1.5px solid currentColor;
}

.order-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr);
  min-height: clamp(220px, 20vw, 286px);
  margin-block-end: 12px;
  overflow: hidden;
  border-radius: 22px;
  background: var(--green);
  color: var(--paper);
}

.order-intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  padding: 24px clamp(20px, 3vw, 48px);
}

.order-intro h1 {
  font-size: clamp(2rem, 4.65vw, 4.75rem);
  font-weight: 900;
  line-height: 1.2;
}

.order-intro h1 span {
  color: var(--yellow);
  white-space: nowrap;
}

.order-intro-description { font-size: .9375rem; line-height: 1.6; }

.order-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 22rem);
  min-height: 50px;
  padding-inline: 14px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--green);
  cursor: text;
}

.order-search:focus-within {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

.order-search svg {
  flex: none;
  width: 22px;
  height: 22px;
}

.order-search input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 1rem;
}

.order-search input::placeholder {
  color: var(--muted);
}

.order-photos {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 3px;
  margin: 10px 0 10px 10px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--yellow);
  direction: ltr;
}

.order-photo {
  position: relative;
  background: var(--green);
}

.order-photo img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-photo-juice img { object-position: 37% 62%; }
.order-photo-kebab img { object-position: 52% 54%; }
.order-photo-pizza img { object-position: 50% 68%; }

.order-promotion:not([hidden]) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  margin-block-end: 8px;
  padding: 11px 13px;
  border: 1px solid #dfcd96;
  border-radius: 14px;
  background: #fff9e9;
  color: var(--green);
}

.order-promotion-mark {
  display: grid;
  min-width: 83px;
  min-height: 73px;
  place-content: center;
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--green);
  color: var(--paper);
  text-align: center;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.35;
}

.order-promotion-mark bdi {
  color: var(--yellow);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
}

.order-promotion-copy h2 { font-size: 1.125rem; font-weight: 800; line-height: 1.45; }
.order-promotion-validity, .order-promotion-terms { font-size: .875rem; line-height: 1.65; }
.order-promotion-validity { margin-block-start: 2px; font-weight: 650; }
.order-promotion-terms { margin-block-start: 4px; color: var(--muted); }

.order-categories {
  position: sticky;
  top: 0;
  z-index: 9;
  display: grid;
  grid-template-columns: .9fr .85fr 1.35fr .8fr 1.55fr 1.4fr;
  gap: 6px;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.order-categories button {
  min-width: 0;
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  color: var(--green);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.order-categories.order-categories-custom {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
}
.order-categories-custom button { flex: 1 0 auto; white-space: nowrap; }

.order-categories button:hover {
  background: #e8f4df;
}

.order-categories button[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green);
  color: var(--paper);
  box-shadow: inset 0 -3px var(--yellow);
}

.order-result {
  margin-block: 9px 3px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 600;
}

@media (max-width: 1150px) {
  .order-header-inner { padding-inline: 2%; }
}

@media (min-width: 801px) and (max-width: 1050px) {
  .order-intro { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .order-intro-copy { padding-inline: 20px; }
}

@media (max-width: 800px) {
  .order-header-inner { padding-inline: 4%; }
}

@media (max-width: 560px) {
  .order-header-inner {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 64px;
    gap: clamp(6px, 2.4vw, 13px);
    padding-block: 6px;
  }

  .order-brand { width: clamp(64px, 19vw, 88px); }
  .order-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    justify-self: stretch;
    gap: 2px;
    padding: 3px;
    border-radius: 13px;
  }
  .order-nav a { padding-inline: 4px; font-size: clamp(.8125rem, 3.55vw, .95rem); }
  .order-nav-icon { display: none; }

  .order-intro {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    margin-block-end: 7px;
    border-radius: 17px;
  }

  .order-intro-copy { gap: 11px; padding: 16px; }
  .order-intro h1 { font-size: clamp(2rem, 9vw, 3rem); }
  .order-search { width: 100%; }
  .order-photos { min-height: clamp(88px, 26vw, 120px); margin: 0 6px 6px; border-radius: 11px; }
  .order-photo-juice img { object-position: 37% 66%; }
  .order-photo-pizza img { object-position: 50% 74%; }

  .order-promotion:not([hidden]) { gap: 4px 8px; padding: 9px; }
  .order-promotion-mark {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    min-height: 36px;
    padding: 4px 8px;
  }
  .order-promotion-mark bdi { font-size: 1.375rem; }
  .order-promotion-copy { display: contents; }
  .order-promotion-copy h2 { font-size: 1rem; }
  .order-promotion-validity, .order-promotion-terms { grid-column: 1 / -1; margin-block-start: 0; }

  .order-categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }
  .order-categories button { min-height: 48px; padding-inline: 3px; font-size: .875rem; }
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.45vw, 21px);
  margin-block-start: 20px;
}

.food-card {
  container-type: inline-size;
  position: relative;
  display: grid;
  min-width: 0;
}

.food-card-face {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 2px 0 #d6e5cf, 0 6px 18px #174b2913;
}

.food-card:focus-within .food-card-face { border-color: var(--leaf); }

.food-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-start-start-radius: 17px;
  border-start-end-radius: 17px;
  background: #e8f4df;
}

.food-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[data-food-category="juice"] .food-image img { object-position: 50% 62%; }

.food-image .food-tag, .food-photo-note {
  position: absolute;
  z-index: 1;
  min-width: 0;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: .75rem;
  line-height: 1.45;
}

.food-image .food-tag {
  inset: 8px 8px auto auto;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
}

.food-photo-note {
  inset: auto auto 7px 7px;
  background: #173e25ee;
  color: var(--paper);
}

.food-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  padding: clamp(9px, 1.1vw, 16px);
}

.food-card h3 {
  color: var(--green);
  font-size: clamp(.9375rem, 1.55vw, 1.1875rem);
  font-weight: 800;
  line-height: 1.45;
}

.food-category, .food-description {
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.65;
}

.food-card-order {
  display: grid;
  gap: 8px;
  margin-block-start: auto;
  padding-block-start: 9px;
}

.food-options {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.food-option-title {
  display: block;
  margin-block-end: 5px;
  padding: 0;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.4;
}

.food-option-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.food-option {
  position: relative;
  display: grid;
  min-inline-size: 0;
}

.food-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.food-option-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 48px;
  padding: 4px 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f5f8f2;
  color: var(--green);
  font-size: .8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-align: center;
}

.food-option-face small { font-size: .8125rem; }

.food-option input:checked + .food-option-face {
  border-color: #c59322;
  background: var(--cream);
  box-shadow: inset 0 -2px 0 #e3b549;
}

.food-option input:focus-visible + .food-option-face {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

@container (min-width: 270px) {
  .food-option-list:has(> :nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.quantity-control.food-quantity {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  width: 100%;
  max-width: 142px;
  background: #f5f8f2;
}

.food-quantity output { font-weight: 800; font-variant-numeric: tabular-nums; }
.food-quantity button[aria-disabled="true"] { opacity: .45; cursor: default; }

@media (hover: hover) and (pointer: fine) {
  .food-option input:hover + .food-option-face { border-color: var(--leaf); }
}

.food-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 8px;
}

.food-price {
  color: var(--green);
  font-size: clamp(1.125rem, 1.65vw, 1.375rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.food-price small { color: var(--muted); font-size: .75rem; font-weight: 500; }

.add-food {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding-inline: 11px;
  border-radius: 9px;
  background: var(--green);
  color: var(--paper);
  font-size: .875rem;
  font-weight: 700;
}

.add-food span { color: var(--yellow); font-size: 1.25rem; line-height: 1; }
.add-food:hover { background: #235d37; }

@container (max-width: 195px) {
  .add-food { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes food-card-enter {
    from { opacity: .72; translate: 0 11px; }
    to { opacity: 1; translate: 0 0; }
  }

  .food-card.has-entered {
    animation: food-card-enter .45s cubic-bezier(.2, .75, .25, 1);
  }

  .add-food { transition: transform .16s ease, background-color .16s ease; }
  .add-food:active { transform: translateY(2px) scale(.96); }
}

@media (any-hover: hover) and (any-pointer: fine) and (prefers-reduced-motion: no-preference) {
  .food-card-face {
    transform-style: preserve-3d;
    transition: transform .27s cubic-bezier(.2, .75, .25, 1), box-shadow .25s;
  }

  .food-image, .food-card-body { transition: transform .25s ease; }
  .food-image img { transition: transform .36s ease; }

  .food-image::after {
    position: absolute;
    inset: -40%;
    background: radial-gradient(ellipse, #fff4cf64 0%, #fff4cf17 26%, transparent 58%);
    opacity: 0;
    pointer-events: none;
    transform: translate(var(--food-light-x, 0%), var(--food-light-y, 0%));
    transition: opacity .22s ease, transform .16s ease;
    content: '';
  }

  .food-card.is-tilting { z-index: 2; }

  .food-card.is-tilting .food-card-face {
    transform: perspective(850px) translateY(-5px) rotateX(var(--food-tilt-x)) rotateY(var(--food-tilt-y));
    box-shadow: 0 4px 0 #c4d8bc, 0 17px 30px #174b293a;
    transition-duration: .12s, .25s;
  }

  .food-card.is-tilting .food-image { transform: translateZ(11px); }
  .food-card.is-tilting .food-image img { transform: scale(1.06); }
  .food-card.is-tilting .food-card-body { transform: translateZ(6px); }
  .food-card.is-tilting .food-image::after { opacity: .75; }
}

@media (max-width: 1150px) {
  .food-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 621px) and (max-width: 800px) {
  .food-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .food-card-face { border-radius: 13px; }
  .food-image { border-start-start-radius: 12px; border-start-end-radius: 12px; }
}

.cart-panel {
  position: sticky;
  top: 20px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  /* Keep the summary visible below the order header before the cart becomes sticky. */
  max-height: calc(100svh - 125px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 8px 24px #174b2912;
}

.cart-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 16px;
  background: var(--green);
  color: var(--paper);
}

.cart-header h2 {
  margin-inline-end: auto;
  font-size: 1.25rem;
  font-weight: 800;
}

.cart-header h2:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

.cart-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.cart-close { display: none; }

.cart-scroll {
  min-height: 0;
  padding-inline: 16px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scroll-padding-block: 8px;
}

.empty-cart {
  padding: 25px 8px;
  color: var(--muted);
  text-align: center;
}

.empty-cart svg {
  width: 46px;
  height: 46px;
  margin-block-end: 5px;
  padding: 8px;
  border-radius: 50%;
  background: #e8f4df;
  color: var(--green);
}

.empty-cart h3 { color: var(--green); font-size: 1rem; }
.empty-cart p { font-size: .875rem; }

.cart-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cart-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}

.cart-item-no-photo { grid-template-columns: minmax(0, 1fr); }
.cart-item img { object-fit: cover; border-radius: 9px; }
.cart-item h3 { font-size: .9375rem; line-height: 1.55; }
.cart-item-variant { color: var(--muted); font-size: .8125rem; }

.cart-item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 8px;
  margin-block-start: 7px;
}

.quantity-control {
  display: grid;
  grid-template-columns: 44px minmax(25px, auto) 44px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f8f1;
  color: var(--green);
  text-align: center;
}

.quantity-control button {
  min-height: 44px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--green);
  font-size: 1.25rem;
  line-height: 1;
}

.quantity-control button:hover:enabled { background: #e8f4df; }
.quantity-control button:disabled { opacity: .45; }
.quantity-control button:focus-visible { outline-offset: -3px; }
.cart-item-quantity { font-size: .9375rem; font-weight: 800; }

.cart-item-price, .cart-total strong, .mobile-cart strong, .cart-count-pill, .cart-item-quantity {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cart-item-price {
  margin-inline-start: auto;
  color: var(--green);
  font-size: .9375rem;
}

.cart-item-price small { color: var(--muted); font-size: .8125rem; }

.cart-options { padding-block: 13px; }
.cart-options h3 { margin-block-end: 6px; font-size: .875rem; }

.fulfillment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #edf3e9;
}

.fulfillment button {
  min-height: 44px;
  padding: 4px;
  border-radius: 8px;
  background: transparent;
  color: var(--green);
  font-size: .875rem;
  line-height: 1.4;
}

.fulfillment button[aria-pressed="true"] {
  background: var(--paper);
  box-shadow: 0 1px 4px #174b2926;
  font-weight: 800;
}

.fulfillment-hint, .delivery-note {
  margin-block-start: 7px;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.6;
}

.delivery-note { padding: 7px 9px; border-radius: 8px; background: #fff1cc; color: #674808; }

.cart-note { margin-block-start: 9px; }

.cart-note summary {
  min-height: 44px;
  padding-block: 8px;
  color: var(--green);
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
}

.cart-note summary span { margin-inline-start: 5px; color: var(--muted); font-size: .8125rem; font-weight: 400; }
.cart-note summary:focus-visible { outline: 3px solid var(--orange); }
.cart-note textarea { display: block; width: 100%; padding: 6px 9px; font-size: 1rem; resize: vertical; }

.cart-summary {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #f4f8f1;
}

.cart-total {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 8px;
  color: var(--green);
  font-size: .9375rem;
  font-weight: 700;
}

.cart-total strong { font-size: 1.375rem; line-height: 1.3; }
.cart-total small, .mobile-cart small { font-size: .8125rem; font-weight: 500; }
.cart-summary-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.checkout-button { flex: 1; min-height: 46px; padding: 8px 12px; }
.checkout-button:disabled { background: #e4ede0; color: var(--muted); opacity: 1; }

.cart-clear {
  min-height: 46px;
  padding: 7px 9px;
  border: 1px solid #dfc5b6;
  border-radius: 8px;
  background: var(--paper);
  color: #823d26;
  font-size: .875rem;
  font-weight: 700;
}

.cart-clear:hover { background: #fff1e8; }
.mobile-cart { display: none; }

@media (max-width: 800px) {
  .cart-backdrop { position: fixed; z-index: 20; inset: 0; background: #10241480; }

  .cart-panel {
    position: fixed;
    z-index: 30;
    inset: auto 0 0;
    max-width: 600px;
    max-height: 90svh;
    max-height: 90dvh;
    margin-inline: auto;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform .2s;
    visibility: hidden;
  }

  .cart-panel.is-open { transform: none; visibility: visible; }
  .cart-header { padding-block: 8px; }

  .cart-close {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid #ffffff66;
    border-radius: 10px;
    background: transparent;
    color: var(--paper);
    font-size: 1.5rem;
    line-height: 1;
  }

  .cart-summary { padding-block-end: max(12px, env(safe-area-inset-bottom)); }

  .mobile-cart {
    position: fixed;
    z-index: 15;
    inset: auto 4% max(12px, env(safe-area-inset-bottom));
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 4px 8px;
    min-height: 53px;
    padding: 7px 13px;
    border-radius: 12px;
    background: var(--green);
    color: var(--paper);
    box-shadow: 0 6px 20px #174b2940;
    font-size: .875rem;
    font-weight: 700;
  }

  .mobile-cart-label { display: inline-flex; align-items: center; gap: 7px; }
  .mobile-cart strong { font-size: 1rem; }
}

html:has(.checkout-dialog[open], .cart-panel.is-open) { overflow: hidden; }

.checkout-dialog {
  --checkout-padding: clamp(12px, 3vw, 22px);
  width: min(670px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  max-height: min(90svh, 760px);
  max-height: min(90dvh, 760px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}

.checkout-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--checkout-padding);
  background: var(--green);
  color: var(--paper);
}

.checkout-header p { color: #e9efd6; font-size: .875rem; }
.checkout-header h2 { font-size: clamp(1.25rem, 4vw, 1.5rem); line-height: 1.4; }
.checkout-header h2:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 3px; }

.checkout-header .close-dialog {
  position: static;
  flex: 0 0 44px;
  height: 44px;
  border: 1px solid #ffffff60;
  border-radius: 9px;
  background: transparent;
  color: var(--paper);
  box-shadow: none;
}

.checkout-content {
  min-height: 0;
  padding: var(--checkout-padding);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scroll-padding-block: var(--checkout-padding);
}

.checkout-notice {
  margin-block-end: 14px;
  padding: 8px 11px;
  border-radius: 8px;
  background: #fff1cc;
  color: #674808;
  font-size: .875rem;
  line-height: 1.6;
}

#checkout-form, #checkout-review { display: grid; gap: 14px; }

.checkout-fieldset, .checkout-review-section {
  min-width: 0;
  margin: 0;
  padding: 11px 13px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbf7;
}

.checkout-fieldset legend, .checkout-review-section h3 {
  padding-inline: 4px;
  color: var(--green);
  font-size: 1rem;
  font-weight: 800;
}

.checkout-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; }
.checkout-field-wide { grid-column: 1 / -1; }
.checkout-fields label { display: block; color: var(--ink); font-size: .875rem; font-weight: 650; }

.checkout-fields input {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-block-start: 3px;
  padding: 6px 9px;
  border: 1px solid #c8d9c4;
  border-radius: 8px;
  background: var(--paper);
  font-size: 1rem;
}

.checkout-fields input:user-invalid { border-color: #963818; }
.checkout-fields input[aria-invalid="true"] { border-color: #963818; }
.checkout-fields input:focus-visible { outline: 2px solid var(--leaf); outline-offset: 1px; }
.checkout-required { color: #963818; font-weight: 800; }
.checkout-field-error { color: #963818; font-size: .8125rem; line-height: 1.55; }
.checkout-field-error:not(:empty) { margin-block-start: 4px; }
.checkout-hint, .checkout-optional { color: var(--muted); font-size: .8125rem; font-weight: 400; }
.checkout-hint { display: block; margin-block-start: 3px; line-height: 1.55; }
.checkout-optional { margin-inline-start: 3px; }

.checkout-extra { margin-block-start: 10px; border-top: 1px solid var(--line); }
.checkout-extra summary { min-height: 44px; padding-block: 8px; color: var(--green); font-size: .875rem; font-weight: 700; cursor: pointer; }
.checkout-extra summary:focus-visible { outline: 2px solid var(--leaf); }

.checkout-details { display: grid; gap: 9px; margin: 8px 0 0; }
.checkout-details div { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 8px; }
.checkout-details dt { color: var(--muted); font-size: .875rem; }
.checkout-details dd { margin: 0; overflow-wrap: anywhere; text-align: right; white-space: pre-line; font-weight: 650; }

.checkout-line, .checkout-sum {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 10px;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
}

.checkout-line b, .checkout-sum b { white-space: nowrap; }
.checkout-sum { border-bottom: 0; color: var(--green); font-size: 1rem; font-weight: 700; }
.checkout-mode { margin-block-start: 5px; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }

.checkout-footer {
  padding: 9px var(--checkout-padding);
  border-block-start: 1px solid var(--line);
  background: #f4f8f1;
}

.checkout-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.checkout-actions button, .checkout-actions a { min-height: 46px; padding: 7px 13px; line-height: 1.4; text-align: center; }
.checkout-actions .checkout-review-button:disabled { background: #e4ede0; border-color: var(--line); color: var(--muted); opacity: 1; }
.checkout-review-requirements { color: var(--muted); font-size: .8125rem; line-height: 1.55; }
.checkout-review-requirements:not(:empty) { margin-block-start: 6px; }
.checkout-whatsapp-image > p { font-size: .875rem; margin-block-end: 8px; }
.checkout-image-links { display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 6px; }
.checkout-image-links a, .checkout-image-share { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px; }
.checkout-status:not(:empty) {
  margin-block-end: 8px;
  font-size: .875rem;
  color: var(--ink);
}
.checkout-review-arrow { display: none; }

.checkout-edit {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f8f1;
  color: var(--green);
  font-weight: 700;
}

.checkout-edit:hover { background: #e8f4df; }

@media (max-width: 800px) {
  .checkout-dialog {
    position: fixed;
    inset: var(--checkout-viewport-top, 0px) 0 auto;
    width: 100%;
    max-width: none;
    height: 100svh;
    height: 100dvh;
    max-height: var(--checkout-viewport-height, none);
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .checkout-header { padding-block: max(8px, env(safe-area-inset-top)) 8px; }
  .checkout-footer {
    padding-block: 10px max(24px, calc(12px + env(safe-area-inset-bottom, 0px)));
    background: var(--paper);
    box-shadow: 0 -4px 16px #174b2914;
  }

  .checkout-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  #checkout-review-actions { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }

  .checkout-actions .checkout-review-button {
    min-height: 52px;
    gap: 10px;
    padding: 9px 16px;
    border: 1px solid #e4b542;
    background: var(--yellow);
    color: var(--green);
    font-size: 1.0625rem;
    font-weight: 800;
    text-align: center;
  }

  .checkout-review-button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
  .checkout-review-button:active { background: #f1bd43; }
  .checkout-review-arrow {
    display: block;
    flex: none;
    width: 9px;
    height: 9px;
    border: solid currentColor;
    border-width: 0 0 2px 2px;
    transform: rotate(45deg);
  }
}

@media (max-width: 480px) {
  .checkout-fields { grid-template-columns: minmax(0, 1fr); }
  .checkout-details div { grid-template-columns: 83px minmax(0, 1fr); }
  .checkout-actions button { padding-inline: 7px; }
}
