/* ==========================================================================
   Squared Joy — Square Pizza Joint Aesthetic
   Warm, appetizing, neon-meets-diner vibes
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Bebas+Neue&family=Source+Sans+3:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&family=Rubik:wght@300;400;500;600;700&display=swap');

:root {
  --red: #d23f2f;
  --red-dark: #a83024;
  --yellow: #f0b43c;
  --yellow-light: #f7cd6b;
  --orange: #e07a2e;
  --cream: #f6f4f1;
  --cream-dark: #e6e1da;
  --brown: #353535;
  --brown-light: #4a4a4a;
  --charcoal: #262626;
  --charcoal-light: #353535;
  --white: #ffffff;
  --text-dark: #262626;
  --text-mid: #625d58;
  --text-light: #a39d97;
  --overlay: rgba(38,38,38, 0.65);

  --font-display: 'Archivo Black', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --container-max: 1280px;
  --header-height: 0px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  /* Let native iOS momentum scroll run unimpeded */
  -webkit-overflow-scrolling: touch;
}
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--cream);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Removed `overscroll-behavior-y: none` — it killed native momentum on iOS
     Chrome and made the page feel "stuck" mid-scroll. */
}
@media (prefers-reduced-motion: no-preference) {
  /* keep smooth anchor-scroll, but only on user gesture-driven scrolls — iOS momentum stays native */
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; font-size: inherit; border: none; outline: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: none; border: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* === CONTAINER === */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 1.25rem; }

/* === HEADER === */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  min-height: 72px;
  background: var(--charcoal);
  z-index: 1000;
  display: flex; align-items: center;
  padding: 0.5rem 0;
  border-bottom: 3px solid var(--red);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.header__logo {
  display: flex; align-items: center;
}
.header__logo-img {
  height: 54px; width: auto;
  filter: brightness(1.8) contrast(1.1);
}
.header__cart {
  position: relative; display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1rem; border-radius: var(--radius-full);
  background: var(--red); color: var(--white);
  font-weight: 700; font-size: 0.9rem;
  transition: all 0.2s;
}
.header__cart:hover { background: var(--red-dark); transform: scale(1.05); }
.header__cart svg { width: 20px; height: 20px; }
.header__cart-count {
  background: var(--yellow); color: var(--charcoal);
  font-size: 0.75rem; font-weight: 700;
  min-width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* === HERO === */
.hero {
  position: relative;
  background: linear-gradient(135deg, #f6f4f1 0%, #ece8e2 100%);
  padding: 2.5rem 0 3rem;
  overflow: hidden;
  border-bottom: 1px solid var(--cream-dark);
}
.hero::before {
  content: ''; position: absolute; right: -120px; top: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240,180,60,0.4), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; left: -60px; bottom: -100px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(210,63,47,0.12), transparent 70%);
  pointer-events: none;
}
.hero__content {
  position: relative; z-index: 1;
  max-width: 800px;
}
.hero__status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: rgba(38,38,38,0.04);
  border: 1px solid rgba(38,38,38,0.1);
  border-radius: var(--radius-full);
  color: var(--charcoal);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.5s ease;
}
.hero__status strong { color: var(--charcoal); font-weight: 700; }
.hero__status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 0 0 currentColor;
}
.hero__status--open { color: #22c55e; }
.hero__status--open .hero__status-dot { background: #22c55e; animation: pulseDot 2s ease-in-out infinite; }
.hero__status--closed { color: #fca5a5; }
.hero__status--closed .hero__status-dot { background: #ef4444; }
.hero__status--pickup { color: var(--orange); }
.hero__status--pickup strong { color: var(--orange); }
.hero__status--pickup .hero__status-dot { background: var(--orange); }
/* Pickup-only special day: delivery option shown but disabled */
.form-radio--disabled, .pill-tab--disabled { opacity: 0.45; cursor: not-allowed; }
.form-radio--disabled input, .pill-tab--disabled input { cursor: not-allowed; }
/* Pickup-only hint: flash a few times to grab attention, then stays highlighted */
.pickup-hint {
  display: block;
  margin-top: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-weight: 700;
  color: var(--orange);
  border: 1.5px solid rgba(224,122,46, 0.55);
  animation: pickupHintFlash 1s ease-in-out 4;
}
@keyframes pickupHintFlash {
  0%, 100% { background: rgba(224,122,46, 0.08); }
  50% { background: rgba(224,122,46, 0.34); }
}
@media (prefers-reduced-motion: reduce) {
  .pickup-hint { animation: none; background: rgba(224,122,46, 0.12); }
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 6rem);
  color: var(--white);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  animation: fadeInUp 0.5s ease 0.05s both;
}
.hero__title span { color: var(--yellow); }
.hero__title--logo {
  margin: 0; padding: 0;
  font-size: 0; line-height: 0;
  animation: fadeInUp 0.5s ease 0.05s both;
}
.hero__title--logo img {
  height: clamp(140px, 22vw, 220px);
  width: auto; display: block;
}
.hero__subtitle {
  font-size: 1rem; color: rgba(255,255,255,0.6);
  margin-top: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  animation: fadeInUp 0.5s ease 0.1s both;
}
.hero__actions {
  display: flex; gap: 0.75rem; margin-top: 1.75rem; flex-wrap: wrap;
  animation: fadeInUp 0.5s ease 0.15s both;
}
.hero__cta {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.95rem 1.8rem; border-radius: var(--radius-full);
  font-weight: 700; font-size: 1rem;
  transition: all 0.2s;
}
.hero__cta--primary {
  background: var(--yellow); color: var(--charcoal);
}
.hero__cta--primary:hover { background: var(--yellow-light); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(240,180,60,0.3); }
.hero__cta--secondary {
  background: transparent; color: var(--charcoal);
  border: 1.5px solid rgba(38,38,38,0.2);
}
.hero__cta--secondary:hover { background: rgba(38,38,38,0.05); border-color: var(--charcoal); }

/* === CATEGORY NAV === */
.category-nav {
  position: sticky; top: var(--header-height); z-index: 900;
  background: var(--white);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  padding: 0.75rem 0;
}
.category-nav__inner {
  display: flex; gap: 0.5rem; overflow-x: auto;
  padding: 0 1.25rem;
  -ms-overflow-style: none; scrollbar-width: none;
  /* Restrict touch handling to horizontal pan only — vertical swipes pass through
     to the page so iOS doesn't "swallow" vertical scroll when finger is on the pills. */
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}
.category-nav__inner::-webkit-scrollbar { display: none; }
.category-nav__pill {
  flex-shrink: 0; padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  background: transparent;
  border: 2px solid var(--cream-dark);
  color: var(--text-mid);
  font-size: 0.85rem; font-weight: 600;
  white-space: nowrap; transition: all 0.2s;
}
.category-nav__pill:hover { border-color: var(--red); color: var(--red); }
.category-nav__pill.active {
  background: var(--red); border-color: var(--red);
  color: var(--white);
}

/* === MENU === */
.menu { padding: 2rem 0 8rem; }

.menu-section {
  margin-bottom: 3rem;
  scroll-margin-top: calc(var(--header-height) + 60px);
}
.menu-section__header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--cream-dark);
}
.menu-section__icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  background: var(--red); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.menu-section__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  color: var(--charcoal);
  line-height: 1.2;
}
.menu-section__count {
  font-size: 0.8rem; color: var(--text-light); font-weight: 500;
}

/* Category banner image */
.menu-section__banner {
  width: 100%; height: 200px; border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 1.5rem;
  position: relative;
}
.menu-section__banner img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s;
}
.menu-section__banner:hover img { transform: scale(1.05); }

.menu-grid {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
}
@media (min-width: 640px) { .menu-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .menu-grid { grid-template-columns: repeat(3, 1fr); } }

/* === PRODUCT CARD === */
.product-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex; flex-direction: column;
  animation: fadeInUp 0.5s ease both;
  border: 1px solid var(--cream-dark);
  cursor: pointer;
}
/* Card with image: side-by-side */
.product-card--has-img .product-card__body {
  flex-direction: row; gap: 1rem;
}
.product-card__img {
  width: 110px; height: 110px; border-radius: var(--radius-md);
  overflow: hidden; flex-shrink: 0; align-self: center;
}
.product-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.product-card:hover .product-card__img img { transform: scale(1.08); }
.product-card--has-img .product-card__text {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
  border-color: var(--red);
}

/* Badge: inside image corner */
.product-card__img { position: relative; }
.product-card__badge {
  position: absolute; top: 0.35rem; left: 0.35rem; z-index: 1;
  padding: 0.15rem 0.45rem;
  background: var(--red);
  color: var(--white);
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
}
.product-card__body {
  flex: 1; padding: 1.25rem 1.25rem 0.75rem; display: flex; flex-direction: column;
}
.product-card__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  color: var(--charcoal);
  line-height: 1.3;
  margin-bottom: 0.4rem;
}
.product-card__desc {
  font-size: 0.82rem; color: var(--text-mid); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.product-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--cream);
  border-top: 1px solid var(--cream-dark);
  margin-top: auto;
}
.product-card__price {
  font-family: var(--font-display);
  font-size: 1.15rem; color: var(--red);
}
.product-card__price small { font-family: var(--font-body); font-size: 0.75rem; color: var(--text-light); font-weight: 500; }
.product-card__add {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--red); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(210,63,47,0.3);
}
.product-card__add:hover { background: var(--red-dark); transform: scale(1.1); }
.product-card__add:active { transform: scale(0.95); }
.product-card__add.added { background: var(--orange); }
.product-card__add svg { width: 20px; height: 20px; pointer-events: none; }
.product-card__add * { pointer-events: none; }

/* Unavailable products — greyed out, non-clickable */
.product-card--unavailable {
  opacity: 0.55;
  filter: grayscale(70%);
  pointer-events: none;
  user-select: none;
}
.product-card--unavailable .product-card__name { color: var(--text-light); }
.product-card__unavailable {
  display: inline-flex; align-items: center;
  font-size: 0.78rem; font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.45rem 0.75rem;
  background: var(--cream-dark);
  border-radius: var(--radius-full);
}

/* Stagger */
.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

/* === FLOATING CART BUTTON === */
.cart-fab {
  position: fixed; bottom: 1.25rem; right: 1.25rem;
  z-index: 950;
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 0.85rem 1.25rem 0.85rem 1rem;
  background: var(--red); color: var(--white);
  border-radius: var(--radius-full);
  box-shadow: 0 8px 24px rgba(210,63,47,0.35), 0 2px 6px rgba(0,0,0,0.08);
  font-weight: 700;
  transition: all 0.2s;
  cursor: pointer;
  animation: fadeInUp 0.3s ease;
}
.cart-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(210,63,47,0.45), 0 3px 8px rgba(0,0,0,0.1); }
.cart-fab:active { transform: translateY(0); }
.cart-fab svg { width: 22px; height: 22px; flex-shrink: 0; }
.cart-fab__count {
  position: absolute; top: -6px; left: -6px;
  min-width: 22px; height: 22px; padding: 0 5px;
  background: var(--yellow); color: var(--charcoal);
  border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.cart-fab__total {
  font-family: var(--font-display);
  font-size: 1rem;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .cart-fab { bottom: 1rem; right: 1rem; padding: 0.75rem 1rem 0.75rem 0.85rem; }
  .cart-fab__total { font-size: 0.9rem; }
}
.cart-bar__btn:hover { background: var(--red-dark); }

/* === CART DRAWER === */
.cart-drawer { position: fixed; inset: 0; z-index: 1100; pointer-events: none; }
.cart-drawer.open { pointer-events: auto; }
.cart-drawer__backdrop {
  position: absolute; inset: 0; background: var(--overlay);
  opacity: 0; transition: opacity 0.3s;
}
.cart-drawer.open .cart-drawer__backdrop { opacity: 1; }
.cart-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 440px;
  background: var(--cream);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.cart-drawer.open .cart-drawer__panel { transform: translateX(0); }
.cart-drawer__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--charcoal); color: var(--white);
}
.cart-drawer__header h2 { font-family: var(--font-display); font-size: 1.2rem; text-transform: uppercase; }
.cart-drawer__close {
  width: 36px; height: 36px;
  border-radius: 50%; background: rgba(255,255,255,0.1);
  color: var(--white); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.cart-drawer__close:hover { background: rgba(255,255,255,0.2); }
.cart-drawer__items { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.cart-drawer__empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-light); font-size: 0.9rem; }
.cart-drawer__footer { padding: 1.25rem 1.5rem; background: var(--white); border-top: 2px solid var(--cream-dark); }
.cart-drawer__total {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem; font-size: 1rem;
}
.cart-drawer__total strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--red); }

/* Cart Item */
.cart-item {
  display: flex; flex-direction: column; gap: 0.4rem;
  padding: 0.75rem 1rem; background: var(--white);
  border-radius: var(--radius-md); margin-bottom: 0.5rem;
  border: 1px solid var(--cream-dark);
}
.cart-item__info { display: flex; justify-content: space-between; align-items: center; }
.cart-item__name { font-weight: 700; font-size: 0.9rem; color: var(--charcoal); }
.cart-item__subtotal { font-weight: 700; font-size: 0.9rem; color: var(--red); }
.cart-item__controls { display: flex; align-items: center; gap: 0.5rem; }
.cart-item__qty-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--cream); border: 1px solid var(--cream-dark);
  color: var(--charcoal); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.cart-item__qty-btn:hover { border-color: var(--red); color: var(--red); }
.cart-item__qty { min-width: 24px; text-align: center; font-weight: 700; }
.cart-item__remove {
  width: 28px; height: 28px; border-radius: 50%;
  color: var(--text-light); font-size: 1.1rem; margin-left: auto;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.cart-item__remove:hover { color: var(--red); background: rgba(210,63,47,0.08); }

/* === BUTTONS (shared) === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md);
  font-weight: 700; transition: all 0.2s;
}
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { border: 2px solid var(--cream-dark); color: var(--text-mid); background: var(--white); }
.btn--ghost:hover { border-color: var(--red); color: var(--red); }
.btn--full { width: 100%; }
.btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* === CHECKOUT MODAL === */
.checkout-modal {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; overflow-y: auto;
}
.checkout-modal__backdrop { position: absolute; inset: 0; background: var(--overlay); }
.checkout-modal__panel {
  position: relative; width: 100%; max-width: 520px;
  background: var(--cream); border-radius: var(--radius-xl);
  max-height: 90vh; overflow: hidden; z-index: 1;
  display: flex; flex-direction: column;
}
.checkout-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--charcoal); color: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  flex-shrink: 0;
}
.checkout-modal__header h2 { font-family: var(--font-display); font-size: 1.2rem; text-transform: uppercase; }
.checkout-modal__close {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.1); color: var(--white);
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
}
.checkout-modal__close:hover { background: rgba(255,255,255,0.2); }
.checkout-form {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1 1 auto; overflow-y: auto; min-height: 0;
  -webkit-overflow-scrolling: touch;
}

/* Mobile: edge-to-edge but with internal scroll on the form, not the whole modal */
@media (max-width: 639px) {
  .checkout-modal { padding: 0; align-items: stretch; }
  .checkout-modal__panel {
    max-width: 100%; max-height: 100dvh;
    border-radius: 0;
  }
  .checkout-modal__header {
    border-radius: 0; padding: 1rem 1.25rem;
  }
  .checkout-modal__header h2 { font-size: 1.05rem; }
  .checkout-form { padding: 1rem 1.25rem 1.5rem; }
}

/* Form */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; font-size: 0.8rem; font-weight: 700;
  color: var(--text-mid); margin-bottom: 0.4rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.form-input, .form-textarea {
  width: 100%; padding: 0.8rem 1rem;
  background: var(--white); border: 2px solid var(--cream-dark);
  border-radius: var(--radius-md); color: var(--text-dark);
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--red); box-shadow: 0 0 0 3px rgba(210,63,47,0.1);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-light); }
.form-textarea { resize: vertical; min-height: 60px; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b5b54' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; cursor: pointer; }
.form-hint { display: block; font-size: 0.78rem; color: var(--orange); margin-top: 0.4rem; font-weight: 500; }
.form-error { color: var(--red); font-size: 0.85rem; margin-top: 0.75rem; padding: 0.75rem; background: rgba(210,63,47,0.08); border-radius: var(--radius-sm); border: 1px solid rgba(210,63,47,0.2); }

/* Radio group */
.form-radios { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.form-radio { flex: 1; cursor: pointer; }
.form-radio input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.form-radio__label {
  display: flex; align-items: center; justify-content: center;
  padding: 0.75rem; background: var(--white);
  border: 2px solid var(--cream-dark); border-radius: var(--radius-md);
  color: var(--text-mid); font-weight: 600; font-size: 0.9rem;
  transition: all 0.2s;
}
.form-radio__label:hover { border-color: var(--red); color: var(--red); }
.form-radio input:checked + .form-radio__label {
  border-color: var(--red); background: var(--red); color: var(--white);
}

/* Checkout summary */
.checkout-summary { margin-bottom: 1rem; padding: 1rem; background: var(--white); border-radius: var(--radius-md); border: 1px solid var(--cream-dark); }
.checkout-summary__title { font-size: 0.8rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.5rem; font-weight: 700; }

/* === ORDER TRACKING PAGE === */
.tracking-page {
  padding-top: calc(72px + 2rem);
  padding-bottom: 3rem; min-height: 100vh;
  background: linear-gradient(180deg, var(--cream) 0%, var(--white) 100%);
}
.tracking-loading { text-align: center; padding: 4rem 1rem; }
.tracking-empty { text-align: center; padding: 4rem 1rem; }
.tracking-empty__icon { font-size: 3rem; margin-bottom: 1rem; }
.tracking-empty h2 { margin-bottom: 0.5rem; }
.tracking-empty p { color: var(--text-mid); margin-bottom: 1.5rem; }

.tracking-thankyou {
  text-align: center; padding: 2rem 0; margin-bottom: 1.5rem;
}
.tracking-thankyou__icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: var(--white); font-size: 2.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 8px 32px rgba(210,63,47,0.3);
  animation: bounceIn 0.6s ease;
}
.tracking-thankyou h1 {
  font-family: var(--font-display); font-size: 1.75rem;
  text-transform: uppercase; color: var(--charcoal);
}
.tracking-thankyou p { color: var(--text-mid); margin-top: 0.5rem; }

.tracking-hash {
  text-align: center; font-size: 0.9rem; color: var(--text-light);
  margin-bottom: 2rem; font-family: monospace; letter-spacing: 0.05em;
}
.tracking-hash strong {
  color: var(--charcoal); font-size: 1.2rem;
  font-family: var(--font-display);
}

/* Progress steps */
.tracking-progress {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin: 2rem auto; max-width: 500px; padding: 0 1rem;
}
.tracking-step {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.tracking-step__dot {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  transition: all 0.3s; z-index: 1;
}
.tracking-step.active .tracking-step__dot {
  border-color: var(--orange); background: var(--orange); color: var(--white);
  box-shadow: 0 0 0 5px rgba(224,122,46,0.2);
}
.tracking-step.completed .tracking-step__dot {
  border-color: var(--red); background: var(--red); color: var(--white);
}
.tracking-step__label { font-size: 0.7rem; color: var(--text-light); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.tracking-step.active .tracking-step__label { color: var(--orange); }
.tracking-step.completed .tracking-step__label { color: var(--red); }
.tracking-step__line { flex: 1; height: 3px; background: var(--cream-dark); min-width: 30px; align-self: flex-start; margin-top: 16px; }
.tracking-step__line.completed { background: var(--red); }

/* Timer */
.tracking-timer { text-align: center; margin: 2rem 0; }
.tracking-timer__circle { position: relative; width: 200px; height: 200px; margin: 0 auto; }
.tracking-timer__svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tracking-timer__bg { fill: none; stroke: var(--cream-dark); stroke-width: 8; }
.tracking-timer__progress {
  fill: none; stroke: var(--red); stroke-width: 8; stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 8px rgba(210,63,47,0.4));
}
.tracking-timer__text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.tracking-timer__time {
  font-family: var(--font-display); font-size: 2.8rem; color: var(--charcoal); line-height: 1;
}
.tracking-timer__label { font-size: 0.7rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.3rem; font-weight: 600; }
.tracking-timer__info { color: var(--text-mid); margin-top: 1rem; font-size: 0.9rem; }

/* Ready-at time (replaces the countdown, 5.11.2026.) */
.tracking-readyat { text-align: center; margin: 2rem auto; padding: 1.5rem 1rem; max-width: 320px; background: var(--white); border: 2px solid var(--red); border-radius: 16px; }
.tracking-readyat__label { font-size: 0.75rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.tracking-readyat__time { font-family: var(--font-display); font-size: 3.2rem; color: var(--charcoal); line-height: 1.1; margin-top: 0.3rem; }
.tracking-readyat__date { font-size: 0.9rem; color: var(--text-mid); font-weight: 600; }
.tracking-readyat__info { color: var(--text-mid); margin: 0.8rem 0 0; font-size: 0.9rem; }

/* Ready message */
.tracking-ready { text-align: center; padding: 2rem; }
.tracking-ready__icon { font-size: 3rem; margin-bottom: 1rem; }
.tracking-ready h2 { color: var(--red); font-family: var(--font-display); text-transform: uppercase; }
.tracking-ready.animate { animation: bounceIn 0.5s ease; }

/* Order details */
.tracking-details {
  margin: 2rem auto 0; padding: 1.5rem; background: var(--white);
  border: 1px solid var(--cream-dark); border-radius: var(--radius-lg);
  max-width: 500px;
}
.tracking-details h3 { font-family: var(--font-display); font-size: 1rem; text-transform: uppercase; margin-bottom: 1rem; }
.tracking-details__type { font-size: 0.8rem; color: var(--text-light); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.tracking-item { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--cream-dark); font-size: 0.9rem; }
.tracking-item__name { flex: 1; font-weight: 500; }
.tracking-item__qty { color: var(--text-light); margin: 0 1rem; }
.tracking-item__price { color: var(--red); font-weight: 700; }
.tracking-details__total { text-align: right; padding-top: 0.75rem; margin-top: 0.5rem; font-family: var(--font-display); font-size: 1.1rem; color: var(--red); }
.tracking-actions { text-align: center; margin-top: 2rem; }

/* === PRODUCT DETAIL MODAL (refactored — absolute positioning, bulletproof) === */
.product-modal {
  position: fixed; inset: 0; z-index: 1150;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}
.product-modal.open { pointer-events: auto; }
.product-modal__backdrop {
  position: absolute; inset: 0; background: var(--overlay);
  opacity: 0; transition: opacity 0.3s;
}
.product-modal.open .product-modal__backdrop { opacity: 1; }

/* Panel — fullscreen on mobile, centered dialog on desktop */
/* === Product modal panel — pure absolute positioning, NO flex/grid.
   Panel has EXPLICIT height. Scroll and footer use absolute positioning inside. === */
.product-modal__panel {
  position: fixed;
  left: 50%;
  top: 50%;
  width: calc(100% - 32px);
  max-width: 560px;
  height: 90vh;
  height: 90dvh;
  max-height: 800px;
  background: var(--cream);
  border-radius: 16px;
  overflow: hidden;
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  transition: transform 0.22s ease-out, opacity 0.18s ease-out;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}

.product-modal.open .product-modal__panel {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Phones: fullscreen modal, no rounded corners, slide-up animation. */
@media (max-width: 639px) {
  .product-modal__panel {
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: none;
  }
  .product-modal.open .product-modal__panel {
    transform: translateY(0);
  }
}

/* Close button — absolute top-right */
.product-modal__close {
  position: absolute; top: 0.75rem; right: 0.75rem; z-index: 5;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--charcoal); color: var(--white);
  font-size: 2rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  border: 2px solid rgba(255,255,255,0.85); cursor: pointer;
}
/* Invisible extra touch area around the X (~64px) — easier to hit with a thumb */
.product-modal__close::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; }
.product-modal__close:hover { background: var(--red); transform: scale(1.1); }

/* Scroll area — absolutely positioned to fill panel except for the footer slot at bottom.
   touch-action + overscroll-behavior prevent iOS touch-scroll from getting "stuck"
   or chaining to body scroll. */
.product-modal__scroll {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 84px;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  scroll-padding-bottom: 1rem;
}
/* Backdrop must not steal touch from the modal — close-on-tap via JS only. */
.product-modal__backdrop {
  touch-action: none;
}
/* No visible scrollbar — it cut a grey strip down the edge-to-edge photo */
.product-modal__scroll { scrollbar-width: none; }
.product-modal__scroll::-webkit-scrollbar { display: none; }
.product-modal__image {
  width: 100%; height: 180px;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  overflow: hidden;
}
.product-modal__image img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto; object-fit: contain;
}
/* Pizza photos run edge to edge across the whole modal */
.product-modal__image--photo { height: auto; aspect-ratio: 3 / 2; background: #1b1b1b; }
.product-modal__image--photo img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.product-modal__sticky-name {
  position: sticky; top: 0; z-index: 2;
  background: var(--cream);
  padding: 0.9rem 1.25rem 0.35rem;
  font-family: var(--font-display); font-size: 1.15rem;
  text-transform: uppercase; color: var(--charcoal);
  line-height: 1.2;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.product-modal__sticky-name.stuck {
  border-bottom-color: var(--cream-dark);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.product-modal__body {
  padding: 0 1.25rem 1.5rem;
}
.product-modal__price {
  font-family: var(--font-display); font-size: 1.05rem;
  color: var(--red); margin-bottom: 0.4rem;
}
.product-modal__desc {
  font-size: 0.85rem; color: var(--text-mid); line-height: 1.45;
  margin-bottom: 0.85rem;
}

/* Sections */
.product-modal__section {
  margin-bottom: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--cream-dark);
}
.product-modal__section-title {
  font-family: var(--font-display); font-size: 0.85rem;
  text-transform: uppercase; color: var(--charcoal);
  margin-bottom: 0.5rem;
}

/* Option checkboxes */
.product-modal__options {
  display: flex; flex-direction: column; gap: 0.25rem;
}
.product-modal__option {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0.85rem; border-radius: var(--radius-md);
  cursor: pointer; transition: background 0.15s;
}
.product-modal__option:hover { background: var(--white); }
.product-modal__option input[type="checkbox"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.product-modal__option-mark {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--cream-dark); background: var(--white);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.product-modal__option-mark::after {
  content: '✓'; font-size: 0.75rem; font-weight: 700;
  color: var(--white); opacity: 0; transition: opacity 0.15s;
}
.product-modal__option input:checked + .product-modal__option-mark {
  background: var(--red); border-color: var(--red);
}
.product-modal__option input:checked + .product-modal__option-mark::after { opacity: 1; }
.product-modal__option-name {
  flex: 1; font-size: 0.9rem; font-weight: 500; color: var(--charcoal);
}
.product-modal__option-price {
  font-size: 0.85rem; font-weight: 600; color: var(--red); white-space: nowrap;
}

/* Changes checkbox */
.product-modal__checkbox {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0.85rem; border-radius: var(--radius-md);
  cursor: pointer; transition: background 0.15s;
}
.product-modal__checkbox:hover { background: var(--white); }
.product-modal__checkbox input[type="checkbox"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.product-modal__checkbox-mark {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--cream-dark); background: var(--white);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.product-modal__checkbox-mark::after {
  content: '✓'; font-size: 0.75rem; font-weight: 700;
  color: var(--white); opacity: 0; transition: opacity 0.15s;
}
.product-modal__checkbox input:checked + .product-modal__checkbox-mark {
  background: var(--orange); border-color: var(--orange);
}
.product-modal__checkbox input:checked + .product-modal__checkbox-mark::after { opacity: 1; }
.product-modal__checkbox-label {
  font-size: 0.9rem; font-weight: 500; color: var(--charcoal);
}
.product-modal__checkbox-price {
  font-weight: 700; color: var(--orange);
}
.product-modal__changes-note {
  padding: 0.5rem 0.85rem 0;
  animation: fadeInUp 0.2s ease;
}

/* Footer bar — pinned at bottom of panel via absolute positioning. Fixed 84px height (matches scroll bottom offset). */
.product-modal__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84px;
  padding: 1rem 1.5rem;
  background: var(--white);
  border-top: 2px solid var(--cream-dark);
  box-sizing: border-box;
  z-index: 4;
}
/* Qty stepper sits on the left of the footer, vertically centered. */
.product-modal__qty {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--cream);
  border-radius: var(--radius-full);
  border: 2px solid var(--cream-dark);
  white-space: nowrap;
}
.product-modal__qty-btn {
  display: inline-block;
  vertical-align: middle;
  width: 40px; height: 40px; line-height: 40px;
  text-align: center;
  font-size: 1.2rem; font-weight: 700; color: var(--charcoal);
  transition: all 0.15s; border-radius: 50%;
  border: 0; background: transparent; cursor: pointer;
}
.product-modal__qty-btn:hover { color: var(--red); }
.product-modal__qty-value {
  display: inline-block;
  vertical-align: middle;
  min-width: 28px; text-align: center;
  font-weight: 700; font-size: 1rem; color: var(--charcoal);
}
/* Add-to-cart button takes remaining width to the right of the qty stepper. */
.product-modal__add-btn {
  position: absolute;
  left: 168px;             /* qty width (~120px) + 1.5rem left padding + small gap */
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  height: 52px;
  text-align: center;
  background: var(--red); color: var(--white);
  font-weight: 700; font-size: 1rem;
  border-radius: var(--radius-full);
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(210,63,47,0.3);
  border: 0; cursor: pointer;
}
.product-modal__add-btn:hover { background: var(--red-dark); }
.product-modal__add-btn:active { transform: translateY(-50%) scale(0.98); }

/* Cart item extras display */
.cart-item__extras {
  display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0 0 0.25rem;
}
.cart-item__extra {
  font-size: 0.75rem; color: var(--text-light); background: var(--cream);
  padding: 0.15rem 0.5rem; border-radius: var(--radius-sm);
}
.cart-item__extra--change {
  color: var(--orange); background: rgba(224,122,46,0.08);
}

/* === TOAST === */
.toast-container, #toastContainer {
  position: fixed; top: calc(var(--header-height) + 1rem); right: 1rem;
  z-index: 2000; display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  padding: 0.75rem 1.25rem; background: var(--charcoal); color: var(--white);
  border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  pointer-events: auto; font-size: 0.9rem; font-weight: 600;
  transform: translateX(100%); opacity: 0; transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
  border-left: 4px solid var(--red);
}
.toast.show { transform: translateX(0); opacity: 1; }

/* === FOOTER === */
.footer {
  background: var(--cream-dark, #ece8e2);
  color: var(--charcoal);
  padding: 3.5rem 0 1.5rem;
  font-size: 0.875rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(38,38,38,0.08);
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  padding-bottom: 2rem;
  align-items: start;
}
.footer__col--brand { display: flex; align-items: flex-start; }
.footer__logo {
  height: 90px; width: auto; display: block;
}
.footer__heading {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.footer__heading--sub {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: rgba(38,38,38,0.7);
}
.footer__text {
  color: rgba(38,38,38,0.65);
  line-height: 1.55; margin: 0 0 0.5rem;
}
.footer__link {
  display: block;
  color: var(--red);
  text-decoration: none;
  margin-top: 0.35rem;
  transition: color 0.15s;
  font-weight: 500;
}
.footer__link:hover { color: var(--charcoal); text-decoration: underline; }
.footer__hours {
  width: 100%; border-collapse: collapse;
}
.footer__hours td {
  padding: 0.25rem 0;
  color: rgba(38,38,38,0.75);
  font-variant-numeric: tabular-nums;
}
.footer__hours td:first-child { color: var(--charcoal); font-weight: 500; }
.footer__hours td:last-child { text-align: right; color: rgba(38,38,38,0.6); }
.footer__bottom {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(38,38,38,0.1);
  color: rgba(38,38,38,0.5);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer__legal { display: inline-flex; gap: 0.5rem; align-items: center; }
.footer__legal a { color: rgba(38,38,38,0.55); text-decoration: underline; }
.footer__legal a:hover { color: var(--red); }
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* === SPINNER === */
.spinner {
  width: 32px; height: 32px; border: 4px solid var(--cream-dark);
  border-top-color: var(--red); border-radius: 50%;
  animation: spin 0.7s linear infinite; margin: 0 auto;
}

/* === ANIMATIONS === */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounceIn { 0% { opacity: 0; transform: scale(0.6); } 60% { transform: scale(1.1); } 100% { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero { padding: 2rem 0 2.25rem; }
  .hero__title { font-size: clamp(2.5rem, 14vw, 4rem); }
  .hero__actions { gap: 0.5rem; }
  .hero__cta { padding: 0.8rem 1.25rem; font-size: 0.9rem; }
  .menu-section__banner { height: 140px; }
  .form-radios { flex-direction: column; }
  .tracking-timer__circle { width: 160px; height: 160px; }
  .tracking-timer__time { font-size: 2.2rem; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--cream-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* Modal helpers */
.product-modal__scroll * { scroll-margin: 0; }
.product-modal input[type="checkbox"]:focus { outline: none; }
.product-modal__option--stepper {
  display: flex; align-items: center; padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--cream-dark);
  gap: 0.5rem;
  min-height: 44px;
  box-sizing: border-box;
}
.product-modal__option--stepper:last-child { border-bottom: none; }
.product-modal__option--stepper .pm-row-check {
  display: flex; align-items: center; gap: 0.6rem; flex: 1; cursor: pointer; min-width: 0;
}
.product-modal__option--stepper .product-modal__option-name { font-size: 0.9rem; }
.product-modal__option--stepper .product-modal__option-price {
  font-size: 0.85rem; color: var(--red); font-weight: 600; text-align: right; white-space: nowrap;
  min-width: 60px; line-height: 28px;
}
.pm-free-tag {
  background: #dcfce7; color: #15803d; font-size: 0.7rem; font-weight: 700;
  padding: 0.15rem 0.4rem; border-radius: 99px; line-height: 1;
}
.pm-stepper {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
  flex-shrink: 0; height: 28px;
  width: 0; margin-left: 0; border-width: 0;
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s, width 0.15s, margin-left 0.15s;
}
.pm-stepper.shown {
  opacity: 1; pointer-events: auto;
  width: auto; margin-left: 0; margin-right: 0.5rem;
  border-width: 1px;
}
.pm-stepper__btn {
  width: 28px; height: 28px; border: none; background: var(--cream); cursor: pointer;
  font-size: 1rem; font-weight: 700; color: var(--text-mid); display: flex; align-items: center; justify-content: center;
  font-family: inherit; transition: background 0.15s; padding: 0;
}
.pm-stepper__btn:hover { background: var(--cream-dark); }
.pm-stepper__val {
  width: 24px; text-align: center; font-size: 0.85rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* Reserve stepper space even when hidden so layout doesn't shift */
.pm-stepper-placeholder {
  display: inline-block; width: 90px; flex-shrink: 0;
}

/* Free extras badge */
.pm-free-badge {
  font-size: 0.7rem; font-weight: 600; color: #15803d;
  background: #dcfce7; padding: 0.1rem 0.4rem; border-radius: 99px;
  vertical-align: middle; margin-left: 0.3rem;
}

/* Schedule Picker */
.schedule-picker__tabs {
  display: flex; gap: 4px;
  background: var(--cream-dark, #f0e9df);
  border-radius: 10px; padding: 4px;
}
.schedule-picker__tab {
  flex: 1; padding: 0.7rem 0.75rem; border: none; background: transparent;
  font-size: 0.9rem; font-weight: 600; cursor: pointer; font-family: inherit;
  color: var(--text-mid); transition: all 0.18s ease;
  border-radius: 7px;
}
.schedule-picker__tab.active {
  background: var(--charcoal); color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.schedule-picker__tab:not(.active):active { transform: scale(0.97); }
.schedule-picker__form {
  display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem;
}
.schedule-picker__day, .schedule-picker__time { width: 100%; }

/* Header closed message */
.header__closed {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 600; color: #ef4444;
  white-space: nowrap;
}
.header__closed-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ef4444; flex-shrink: 0;
}

/* Grayed out products when store is closed */
body.store-closed .product-card {
  opacity: 0.45; pointer-events: none; filter: grayscale(60%);
}
body.store-closed .product-card__add { display: none; }
body.store-closed .menu-section__image { opacity: 0.45; filter: grayscale(60%); }

.form-input--upper { text-transform: uppercase; }
.form-input--upper::placeholder { text-transform: none; }




/* === STANDALONE CHECKOUT PAGE === */
.checkout-page__header {
  position: sticky; top: 0; z-index: 30;
  background: var(--charcoal); color: var(--white);
  padding: 0.75rem 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.checkout-page__header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.checkout-page__back {
  display: inline-flex; align-items: center; gap: 0.25rem;
  color: var(--white); padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.95rem;
}
.checkout-page__back:hover { background: rgba(255,255,255,0.08); }
.checkout-page__title { font-family: var(--font-display); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.02em; }
.checkout-page__spacer { width: 80px; }
.checkout-page { padding: 1.25rem 0 3rem; min-height: calc(100dvh - 60px); }
.checkout-page__body { max-width: 560px; }
.checkout-page__form { background: var(--white); border-radius: var(--radius-xl); padding: 1.25rem 1.25rem 1.5rem; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
@media (min-width: 640px) {
  .checkout-page__form { padding: 1.75rem 2rem; }
}


/* === Pill tabs (delivery/pickup, payment method) === */
.pill-tabs {
  display: flex; gap: 4px;
  background: var(--cream-dark, #f0e9df);
  border-radius: 10px; padding: 4px;
}
.pill-tab {
  flex: 1; cursor: pointer; position: relative;
  font-family: inherit; user-select: none;
}
.pill-tab input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.pill-tab > span {
  display: block; text-align: center;
  padding: 0.7rem 0.75rem;
  border-radius: 7px;
  font-size: 0.9rem; font-weight: 600;
  color: var(--text-mid); transition: all 0.18s ease;
}
.pill-tab input:checked + span {
  background: var(--charcoal); color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.pill-tab:not(:has(input:checked)) > span:active { transform: scale(0.97); }

/* Tighter spacing for checkout-page form on mobile */
.checkout-page__form .form-group { margin-bottom: 0.85rem; }

/* Order summary table */
.cs-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.cs-row { border-bottom: 1px solid var(--cream-dark); }
.cs-row:last-child { border-bottom: none; }
.cs-name { padding: 0.5rem 0.5rem 0.5rem 0; vertical-align: top; color: var(--text-dark); line-height: 1.35; }
.cs-price { padding: 0.5rem 0 0.5rem 0.5rem; vertical-align: top; text-align: right; white-space: nowrap; color: var(--text-mid); font-variant-numeric: tabular-nums; }
.cs-main { font-weight: 600; color: var(--text-dark); }
.cs-sub { margin-left: 0.85rem; margin-top: 0.1rem; font-size: 0.76rem; color: var(--text-light); }
.cs-sub--note { color: var(--orange); }
.cs-row--fee .cs-name, .cs-row--fee .cs-price { color: var(--orange); font-weight: 600; }
.cs-row--total { border-top: 2px solid var(--cream-dark); }
.cs-row--total .cs-name, .cs-row--total .cs-price { padding-top: 0.65rem; font-family: var(--font-display); font-size: 0.95rem; }
.cs-row--total .cs-price strong { color: var(--red); }

.payment-note {
  margin-top: 0.6rem;
  padding: 0.7rem 0.85rem;
  background: rgba(38,38,38, 0.04);
  border-left: 3px solid var(--charcoal-light);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.45;
}

/* === LEGAL PAGES (uvjeti, privatnost) === */
.legal-page { padding: 1.5rem 0 3rem; min-height: calc(100dvh - 60px); }
.legal-page__body { max-width: 760px; line-height: 1.6; color: var(--text-dark); }
.legal-page__body h2 { font-family: var(--font-display); font-size: 1.1rem; margin: 1.6rem 0 0.5rem; color: var(--charcoal); text-transform: uppercase; letter-spacing: 0.02em; }
.legal-page__body ul { margin: 0.5rem 0 0.75rem 1.2rem; }
.legal-page__body li { margin-bottom: 0.35rem; }
.legal-page__body p { margin-bottom: 0.6rem; font-size: 0.95rem; }
.legal-page__body a { color: var(--red); text-decoration: underline; }
.legal-page__body code { background: var(--cream-dark); padding: 0.05rem 0.35rem; border-radius: 4px; font-size: 0.85em; }
.legal-page__link { font-weight: 600; display: inline-block; padding: 0.5rem 0; }

/* === CONSENT TEXT under Naruči button === */
.checkout-consent { font-size: 0.78rem; color: var(--text-light); text-align: center; line-height: 1.45; margin-top: 0.75rem; padding: 0 0.5rem; }
.checkout-consent a { color: var(--red); text-decoration: underline; }

/* === GDPR consent banner (first-visit) === */
.gdpr-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5000;
  background: var(--charcoal); color: var(--white);
  padding: 1rem 1.25rem;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
  font-size: 0.85rem;
}
.gdpr-banner__text { flex: 1 1 280px; line-height: 1.4; }
.gdpr-banner a { color: #fff; text-decoration: underline; }
.gdpr-banner__btn {
  background: var(--red); color: #fff; border: none;
  padding: 0.55rem 1rem; border-radius: 0.5rem;
  font-weight: 700; cursor: pointer; font-size: 0.85rem;
  font-family: inherit;
}
.gdpr-banner__btn:hover { background: var(--red-dark, #c92a36); }

/* === Squared Joy additions === */
.hero__tagline {
  margin: 1rem 0 1.5rem;
  font-size: 1rem;
  color: var(--text-mid);
  letter-spacing: 0.01em;
}
.hero__tagline strong { color: var(--charcoal); }
.pickup-info {
  display: block;
  margin-top: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: rgba(38,38,38,0.05);
  border: 1px solid rgba(38,38,38,0.12);
  color: var(--text-dark);
}
.menu-section__intro {
  margin-top: 0.5rem;
  max-width: 62ch;
  color: var(--text-mid);
  font-size: 0.95rem;
}
.hero__status-note { color: var(--text-mid); }

/* === Squared Joy: compact vertical cards, 4–5 per row === */
.menu-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 640px)  { .menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px)  { .menu-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; } }
@media (min-width: 1180px) { .menu-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.product-card--has-img .product-card__body { flex-direction: column; gap: 0; }
.product-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--white);
  overflow: hidden;
  border-bottom: 1px solid var(--cream-dark);
}
.product-card__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 0.6rem;
  transition: opacity 0.35s ease, transform 0.4s ease;
}

.product-card__media-alt {
  object-fit: cover !important;
  padding: 0 !important;
  opacity: 0;
}
/* Hover swap only on devices with a real mouse — on touch screens :hover "sticks" after a tap */
@media (hover: hover) and (pointer: fine) {
  .product-card:hover .product-card__media-main { transform: scale(1.04); }
  .product-card:hover .product-card__media--hover .product-card__media-main { opacity: 0; }
  .product-card:hover .product-card__media--hover .product-card__media-alt { opacity: 1; }
}
.product-card__media .product-card__badge { top: 0.5rem; left: 0.5rem; z-index: 2; }

.product-card__body { padding: 0.85rem 0.9rem 0.6rem; }
.product-card__name { font-size: 0.85rem; margin-bottom: 0.3rem; }
.product-card__desc { font-size: 0.76rem; line-height: 1.45; }
.product-card__footer { padding: 0.55rem 0.9rem; }
.product-card__price { font-size: 1rem; }
.product-card__add { width: 36px; height: 36px; }
.product-card__add svg { width: 18px; height: 18px; }

@media (max-width: 639px) {
  .product-card__body { padding: 0.7rem 0.7rem 0.5rem; }
  .product-card__footer { padding: 0.5rem 0.7rem; }
  .product-card__desc { -webkit-line-clamp: 2; }
}

/* Pizze: 3 u redu (velike slike) · umaci i pića: 6 u redu na desktopu */
.menu-grid--wide { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 640px) { .menu-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 1024px) { .menu-grid--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.menu-grid--wide .product-card__media { aspect-ratio: 3 / 2; }
.menu-grid--wide .product-card__media img { padding: 1rem; }
.menu-grid--wide .product-card__body { padding: 1.1rem 1.25rem 0.75rem; }
.menu-grid--wide .product-card__name { font-size: 1.15rem; }
.menu-grid--wide .product-card__desc { font-size: 0.9rem; -webkit-line-clamp: 3; }
.menu-grid--wide .product-card__footer { padding: 0.75rem 1.25rem; }
.menu-grid--wide .product-card__price { font-size: 1.25rem; }
.menu-grid--wide .product-card__add { width: 44px; height: 44px; }

.menu-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 480px)  { .menu-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px)  { .menu-grid--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .menu-grid--compact { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.menu-grid--compact .product-card__media { aspect-ratio: 1 / 1; }
.menu-grid--wide .product-card__media img { object-fit: cover; padding: 0; }

/* Mobitel (nema hovera): druga slika samo dok se drži prst na kartici, s mekim fadeom */
@media (hover: none) {
  .product-card:has(.product-card__media--hover) { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  .product-card__media--hover img {
    transition: opacity 0.6s cubic-bezier(.4, 0, .2, 1);
    will-change: opacity;
    transform: none !important;
  }
  .product-card__media--hover.is-pressed .product-card__media-main { opacity: 0; }
  .product-card__media--hover.is-pressed .product-card__media-alt { opacity: 1; }
  .product-card:hover { transform: none; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
}

/* === Hero: blaga pozadinska slika pizze s fadeom (jako zumirana fotka odozgo) === */
.hero { padding: 3rem 0 3.5rem; }
.hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: auto;
  width: 64%; height: auto;
  border-radius: 0;
  background: url('/assets/img/products/pizza-pepperoni-top.webp') 40% 45% / 190% auto no-repeat;
  opacity: 0.62;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.7) 18%, #000 42%),
                      linear-gradient(180deg, #000 75%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.7) 18%, #000 42%),
                      linear-gradient(180deg, #000 75%, transparent 100%);
          mask-composite: intersect;
  filter: saturate(0.9);
  pointer-events: none;
}
.hero::after { display: none; }
@media (max-width: 767px) {
  .hero::before {
    width: 100%;
    opacity: 0.32;
    background-size: 250% auto;
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.35) 0%, #000 55%, rgba(0,0,0,.6) 100%);
            mask-image: linear-gradient(180deg, rgba(0,0,0,.35) 0%, #000 55%, rgba(0,0,0,.6) 100%);
  }
}

/* Bez crvenog obruba na hoveru kartice */
.product-card:hover { border-color: var(--cream-dark); }



/* Manual "ne primamo narudžbe": longer text, so the pill becomes a soft red card */
.hero__status--busy {
  display: flex; align-items: flex-start; gap: 0.6rem;
  width: fit-content; max-width: 22rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: rgba(254,242,242,0.94); box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border: 1px solid rgba(239,68,68,0.35);
  text-align: left;
}
.hero__status--busy .hero__status-dot { flex-shrink: 0; margin-top: 0.4em; }
.hero__status--busy strong { font-weight: 600; font-size: 0.9rem; line-height: 1.4; }

/* Oven capacity: more than 8 pizzas online */
.schedule-picker__toomany {
  margin-top: 0.6rem; padding: 0.7rem 0.9rem; border-radius: 10px;
  background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b;
  font-size: 0.9rem; font-weight: 600; line-height: 1.4;
}

/* Sidrena cijena uz svaku cijenu, npr. "02.11.2026.: 9,40 €" (helpers/anchor_price.php) */
.anchor-price {
  display: block; font-family: var(--font-body, inherit); font-size: 11px; font-weight: 500;
  line-height: 1.3; letter-spacing: 0; color: #7a7470; margin-top: 2px; white-space: nowrap; text-transform: none;
}
.anchor-price:empty { display: none; }
.anchor-price--modal { font-size: 12px; margin: -2px 0 8px; }
.product-modal__option-price .anchor-price { font-size: 10px; text-align: right; }
.cart-item__subtotal .anchor-price, .cs-price .anchor-price { text-align: right; font-size: 10.5px; }
