/* ==========================================================================
   Sanlúcar Fried Chicken — menu styles
   Mobile-first, self-hosted fonts, no external assets.

   Support matrix: iOS 15+ (Safari / WKWebView), Android 8+ with
   Chrome/WebView 90+, Samsung Internet and Firefox Android. In-app browsers
   (Instagram, Facebook, TikTok) share these engines.
   ========================================================================== */

/* ---- Self-hosted fonts (OFL license) ---- */
@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/anton-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter-400-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/inter-600-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/inter-700-latin.woff2") format("woff2");
}

/* ---- Design tokens ---- */
:root {
  --color-charcoal: #1a1a1a;
  --color-cream: #fff6e5;
  --color-primary: #e8421f;        /* hot orange-red */
  --color-primary-strong: #c03314; /* darker shade for AA text on color */
  --color-accent: #ffb81c;         /* golden yellow */
  --color-white: #ffffff;
  --color-muted: #64543f;
  --color-border: #ecd9b8;

  --font-display: "Anton", "Arial Narrow", "Impact", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-soft: 0 10px 30px rgba(26, 26, 26, 0.08);
  --shadow-card: 0 6px 18px rgba(26, 26, 26, 0.1);

  --header-height: 64px;
  --nav-height: 52px;
  --tap-target: 44px;

  --max-width: 72rem;
}

/* ---- Reset / base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background: var(--color-cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Dynamic viewport: the URL bar on mobile makes plain 100vh taller than the
   visible area. Prefer 100dvh where supported, fall back to 100vh. */
@supports (min-height: 100dvh) {
  body {
    min-height: 100dvh;
  }
}

button,
a,
input,
select,
textarea,
label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:active,
a.btn:active,
.btn:active {
  transform: scale(0.98);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0;
}

a {
  color: var(--color-primary-strong);
}

/* ---- Accessibility helpers ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-charcoal);
  color: var(--color-white);
  padding: 0.75rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap-target);
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.btn--primary {
  background: var(--color-primary-strong);
  color: var(--color-white);
  box-shadow: 0 6px 18px rgba(192, 51, 20, 0.35);
}

@media (hover: hover) {
  .btn--primary:hover:not(:disabled) {
    background: var(--color-primary);
    transform: translateY(-1px);
  }
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

/* ---- Sticky header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-charcoal);
  color: var(--color-white);
  box-shadow: var(--shadow-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-white);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--tap-target);
  padding: 0 0.75rem;
  border-radius: 999px;
  color: var(--color-white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.header-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.header-action--cart {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
}

.icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.cart-badge {
  position: absolute;
  top: 0.15rem;
  right: 0.1rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-charcoal);
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  background: var(--color-charcoal);
  color: var(--color-white);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% -10%;
  height: 70%;
  background: radial-gradient(
    closest-side,
    rgba(232, 66, 31, 0.55),
    rgba(232, 66, 31, 0)
  );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1rem 3.5rem;
}

.hero__eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: var(--color-charcoal);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero__title {
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  max-width: 12ch;
  margin-bottom: 0.75rem;
}

.hero__subtitle {
  max-width: 34ch;
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero .btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ---- Promo strip ---- */
.promo-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-accent);
  color: var(--color-charcoal);
  font-weight: 600;
  padding: 0.65rem 1rem;
  text-align: left;
}

.promo-strip .icon {
  color: var(--color-charcoal);
}

/* ---- Sticky category nav ---- */
.category-nav {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-border);
}

.category-nav__list {
  display: flex;
  gap: 0.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.35rem 1rem;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-nav__list::-webkit-scrollbar {
  display: none;
}

.category-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: calc(var(--nav-height) - 0.7rem);
  padding: 0 1rem;
  border-radius: 999px;
  color: var(--color-charcoal);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.category-nav__link.is-active {
  background: var(--color-charcoal);
  color: var(--color-white);
  border-color: var(--color-charcoal);
}

/* ---- Menu / categories ---- */
.menu {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  scroll-margin-top: calc(var(--header-height) + var(--nav-height) + 8px);
}

.category {
  scroll-margin-top: calc(var(--header-height) + var(--nav-height) + 8px);
  margin-bottom: 2.5rem;
}

.category__title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

/* ---- Product grid ---- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.product-card__media {
  aspect-ratio: 4 / 3;
  background: var(--color-accent);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  flex: 1;
}

.product-card__name {
  font-size: 1.35rem;
}

.product-card__desc {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.product-card__price {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-primary-strong);
}

.product-card--soldout {
  opacity: 0.6;
}

.sold-out-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--color-charcoal);
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.85rem;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-charcoal);
  color: var(--color-white);
  padding: 2.5rem 1rem 1.5rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-footer__heading {
  font-size: 1.15rem;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.site-footer address {
  font-style: normal;
  color: rgba(255, 255, 255, 0.85);
}

.site-footer__phone {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--color-white);
  font-weight: 700;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links a {
  display: inline-block;
  min-height: var(--tap-target);
  line-height: var(--tap-target);
  color: var(--color-white);
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
}

.site-footer__madein {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ---- Static (placeholder) pages ---- */
.static-page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.static-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.static-page p {
  color: var(--color-muted);
}

/* ---- Responsive breakpoints ---- */
@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .brand__name {
    font-size: 1.35rem;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero__content {
    padding: 4.5rem 1rem 5rem;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   Cart, checkout and tracking
   ========================================================================== */

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 0.7rem;
  font-weight: 700;
}

.cart-toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translate(-50%, 150%);
  background: var(--color-charcoal);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 300;
}

.cart-toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* Cart bottom sheet (product options) */
.bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 400;
  visibility: hidden;
  pointer-events: none;
}

.bottom-sheet.is-open {
  visibility: visible;
  pointer-events: auto;
}

.bottom-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.bottom-sheet.is-open .bottom-sheet__backdrop {
  opacity: 1;
}

.bottom-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--color-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 0.75rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(26, 26, 26, 0.25);
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.bottom-sheet.is-open .bottom-sheet__panel {
  transform: translateY(0);
}

.bottom-sheet__handle {
  width: 2.5rem;
  height: 0.3rem;
  border-radius: 999px;
  background: var(--color-border);
  margin: 0 auto 0.5rem;
}

.bottom-sheet__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--color-muted);
  cursor: pointer;
  border-radius: 50%;
}

.bottom-sheet__title {
  font-size: 1.4rem;
  margin: 0.25rem 0 0.75rem;
  padding-right: 2.5rem;
}

.bottom-sheet__group {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  margin: 0 0 1rem;
}

.bottom-sheet__legend {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.bottom-sheet__option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.4rem 0;
  font-size: 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
}

.bottom-sheet__option:last-child {
  border-bottom: 0;
}

.bottom-sheet__option input {
  width: 20px;
  height: 20px;
  accent-color: var(--color-primary);
  flex: 0 0 auto;
}

.bottom-sheet__option-name {
  flex: 1;
}

.bottom-sheet__option-price {
  color: var(--color-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.bottom-sheet__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.bottom-sheet__actions .btn {
  flex: 1;
}

.bottom-sheet__submit {
  flex: 2;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--color-border);
  color: var(--color-muted);
}

.badge--required {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Cart page */
.cart {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.cart__title,
.checkout__title,
.tracking__title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.cart-lines {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.cart-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.cart-line__info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.cart-line__name {
  font-weight: 700;
}

.cart-line__options,
.cart-line__price {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.cart-line__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-line__qty {
  width: 3.5rem;
  padding: 0.4rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.cart-line__remove {
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
}

.cart-line__total {
  font-weight: 700;
  white-space: nowrap;
}

.promo {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.promo__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 12rem;
}

.promo__field input {
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.cart-totals {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.cart-totals__row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
}

.cart-totals__row--discount {
  color: var(--color-primary-strong);
}

.cart-totals__row--grand {
  font-weight: 700;
  font-size: 1.2rem;
  border-top: 1px solid var(--color-border);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

.cart-totals__vat {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.cart-totals__vat ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.cart-totals__vat li {
  display: flex;
  justify-content: space-between;
  padding: 0.2rem 0;
}

.cart-empty {
  text-align: center;
  padding: 2rem 0;
}

/* Checkout form */
.checkout {
  margin-top: 2rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.checkout__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.field__label {
  font-weight: 700;
  font-size: 0.9rem;
}

.req {
  color: var(--color-primary);
}

.field input,
.field select,
.field textarea {
  padding: 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkout__payment {
  display: flex;
  justify-content: space-between;
  margin: 1rem 0;
  padding: 0.75rem;
  background: var(--color-cream);
  border-radius: var(--radius-sm);
}

.checkout__subtitle {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
}

.fulfillment-toggle,
.payment-methods {
  border: none;
  padding: 0;
  margin: 0;
}

.fulfillment-toggle legend,
.payment-methods legend {
  padding: 0;
}

.fulfillment-toggle__options,
.payment-methods__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fulfillment-option,
.payment-option {
  flex: 1 1 auto;
  min-width: 10rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
}

.fulfillment-option.is-selected,
.payment-option.is-selected {
  border-color: var(--color-primary);
  background: #fff1ec;
}

.fulfillment-option input,
.payment-option input {
  accent-color: var(--color-primary);
}

.cash-field {
  margin: 0.75rem 0;
}

.cash-field[hidden] {
  display: none;
}

.estimate {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  background: var(--color-cream);
  border-radius: var(--radius-sm);
}

.estimate__line {
  font-weight: 700;
  margin: 0;
}

.estimate__range {
  margin: 0.2rem 0 0;
  color: var(--color-muted);
}

.estimate__busy {
  margin: 0.5rem 0 0;
  color: var(--color-primary-strong);
  font-weight: 600;
}

.field__hint {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.field__static {
  display: block;
  padding: 0.6rem 0;
  font-weight: 600;
}

.delivery-area {
  margin: 0 0 0.75rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.free-delivery-hint {
  margin: 0.25rem 0;
  color: var(--color-primary-strong);
  font-weight: 600;
  font-size: 0.9rem;
}

.tracking__fulfillment,
.tracking__payment,
.tracking__address {
  color: var(--color-muted);
  margin: 0.25rem 0;
}

.tracking__updated {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 0.75rem;
}

/* Visual stepper */
.stepper {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 0;
}

.stepper__step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.stepper__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-border);
  flex: 0 0 auto;
  transition: background 0.2s ease;
}

.stepper__step.is-current {
  color: var(--color-primary-strong);
  font-weight: 700;
}

.stepper__step.is-current .stepper__dot {
  background: var(--color-primary);
}

.stepper__step.is-done .stepper__dot {
  background: #2e7d32;
}

@media (prefers-reduced-motion: reduce) {
  .stepper__dot {
    transition: none;
  }
}

.consent {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

.btn--block {
  width: 100%;
}

.form-error {
  color: var(--color-primary-strong);
  font-weight: 700;
}

.form-success {
  color: #2e7d32;
  font-weight: 700;
}

/* Tracking page */
.tracking {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.tracking__status {
  font-family: var(--font-display);
  font-size: 1.6rem;
  text-transform: uppercase;
  margin: 0.5rem 0;
}

.tracking__number,
.tracking__pickup {
  color: var(--color-muted);
}

.tracking__refresh {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.tracking__summary {
  margin-top: 2rem;
}

.tracking__summary-title {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.status-confirmed { color: var(--color-primary-strong); }
.status-preparing { color: var(--color-accent); }
.status-ready { color: #2e7d32; }
.status-completed { color: var(--color-muted); }
.status-cancelled,
.status-rejected { color: #b00020; }

@media (min-width: 768px) {
  .checkout__grid {
    grid-template-columns: 1fr 1fr;
  }

  .field--full {
    grid-column: 1 / -1;
  }
}

/* ---- Sticky bottom cart bar (menu) ---- */
.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: var(--color-charcoal);
  color: var(--color-white);
  box-shadow: 0 -6px 20px rgba(26, 26, 26, 0.25);
}

.cart-bar__info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.cart-bar__count {
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: 700;
}

.cart-bar__total {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.cart-bar__cta {
  margin-left: auto;
  min-width: 9rem;
}

/* Add bottom padding to the menu so the sticky bar never covers the footer. */
body.has-cart-bar .site-footer {
  padding-bottom: 7rem;
}

/* ---- Quantity stepper (44px tap targets) ---- */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.qty-stepper__btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  border-radius: var(--radius-sm);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-charcoal);
}

.qty-stepper__value {
  min-width: 2.5rem;
  text-align: center;
  font-weight: 700;
}

/* ---- Forms: prevent iOS zoom on focus (font-size >= 16px) ---- */
.field input,
.field select,
.field textarea,
.promo__field input,
.cart-line__qty {
  font-size: 16px;
}

/* Sticky checkout submit bar */
.checkout__sticky {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: var(--color-white);
  padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom));
  margin: 0 -1.5rem -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-shadow: 0 -6px 18px rgba(26, 26, 26, 0.08);
}

.checkout__sticky .btn--block {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
}

/* Collapsible order summary on checkout */
.order-summary {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  background: var(--color-white);
}

.order-summary > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.order-summary > summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--color-charcoal);
  border-bottom: 2px solid var(--color-charcoal);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.order-summary[open] > summary::after {
  transform: rotate(225deg);
}

.order-summary > summary::-webkit-details-marker {
  display: none;
}

/* aspect-ratio fallback: fixed-height media boxes before aspect-ratio support. */
.product-card__media {
  position: relative;
  height: 0;
  padding-top: 75%; /* 4:3 */
  background: var(--color-accent);
  overflow: hidden;
}

.product-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@supports (aspect-ratio: 4 / 3) {
  .product-card__media {
    height: auto;
    padding-top: 0;
    aspect-ratio: 4 / 3;
  }

  .product-card__media img {
    position: static;
  }
}

/* Error variant for the toast */
.cart-toast.is-error {
  background: #b00020;
}

/* Cookie-blocked warning banner */
.cookie-warning {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  background: #fff1ec;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
}

.cookie-warning__text {
  flex: 1 1 12rem;
  margin: 0;
  font-weight: 600;
  color: var(--color-primary-strong);
}


/* Alérgenos: siempre con texto (no solo color) y con contraste suficiente */
.allergens {
  margin: 0.35rem 0;
  font-size: 0.85rem;
  line-height: 1.35;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #b26a00;
  background: #fff6e5;
  color: #5c3700;
}
.allergens--sin { border-color: #2e7d32; background: #eaf6ea; color: #1b5e20; }
.allergens--consulta { border-color: #8a8a8a; background: #f1f1f1; color: #333; }
.option-allergens { display: block; font-size: 0.78rem; color: #5c3700; }
.option-allergens--consulta { color: #444; }
.allergens-notice { font-size: 0.82rem; color: #444; margin: 0.75rem 0; }
