/* ═══════════════════════════════════════════════════
   CHARLOT PIZZA — styles.css
   Responsive · Sans emojis · Séparé du HTML
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700;1,900&family=Jost:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ──────────────────────────────── */
:root {
  --font-futura:    'Jost', 'Century Gothic', sans-serif;
  --font-display:   'Playfair Display', Georgia, serif;
  --font-helvetica: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --red:        #c23820;
  --red-dk:     #9a2e18;
  --red-lt:     rgba(194, 56, 32, .10);
  --gold:       #a87e30;
  --gold-lt:    #b08828;
  --gold-dk:    #6e5218;
  --navy:       #ffffff;
  --navy-lt:    #faf5ee;
  --cream:      #1e1008;
  --cream-dk:   #5a4030;
  --bg:         #f4ece0;
  --white:      #faf6ee;
  --dark:       #090909;
  --text:       #3d2b1a;
  --muted:      #7a6a58;
  --border:     rgba(140, 100, 50, .22);
  --green:      #2a7a3a;

  --radius:     10px;
  --shadow:     0 4px 16px rgba(0, 0, 0, .09);
  --shadow-lg:  0 16px 48px rgba(0, 0, 0, .14);

  --header-h:   108px;
  --nav-h:      48px;
  --cart-w:     375px;
}

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

html, body { height: 100%; }

body {
  font-family: var(--font-futura);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.3'/></svg>");
  background-size: 200px 200px;
  mix-blend-mode: multiply;
  opacity: .35;
}

body > * { position: relative; z-index: 1; }

/* ── HEADER ─────────────────────────────────────── */
.header {
  background: #fdf8f2;
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  overflow: hidden;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 2;
  min-width: 0;
}

.header-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.12));
}

.header-brand-text {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  font-style: italic;
  color: var(--cream);
  line-height: 1.1;
  letter-spacing: .02em;
  white-space: nowrap;
}

.brand-tag {
  font-family: var(--font-futura);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.brand-contact {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: .18rem;
  flex-wrap: wrap;
}

.brand-phone {
  font-family: var(--font-futura);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--red);
  text-decoration: none;
  letter-spacing: .02em;
  transition: color .15s;
}

.brand-phone:hover { color: var(--red-dk); }

.brand-address {
  font-family: var(--font-futura);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: .02em;
  transition: color .15s;
}

.brand-address:hover { color: var(--text); }

.brand-contact-sep {
  color: var(--muted);
  opacity: .45;
  font-size: 0.82rem;
}

.header-info {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 2;
  flex-shrink: 0;
}


.open-badge {
  display: inline-block;
  background: rgba(42,122,58,.2);
  border: 1px solid rgba(42,122,58,.6);
  color: #6dcc85;
  font-size: 0.72rem;
  font-weight: 700;
  padding: .18rem .7rem;
  border-radius: 999px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── CATEGORY NAV ───────────────────────────────── */
.cat-nav {
  background: #ede5d6;
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex;
  gap: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  position: sticky;
  top: var(--header-h);
  z-index: 49;
  height: var(--nav-h);
  align-items: stretch;
}

.cat-btn {
  background: none;
  border: none;
  font-family: var(--font-futura);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  padding: 0 1.4rem;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s, background .15s;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.cat-btn:hover { color: var(--gold-lt); background: rgba(212,160,23,.06); }

.cat-btn.active {
  color: var(--gold-lt);
  border-bottom-color: var(--gold);
  background: rgba(212,160,23,.08);
}

/* ── CART TOGGLE (mobile) ───────────────────────── */
.cart-toggle-btn {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  background: linear-gradient(135deg, var(--red), var(--red-dk));
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .75rem 1.25rem;
  font-family: var(--font-futura);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(200,33,14,.5);
  gap: .5rem;
  align-items: center;
}

.cart-toggle-badge {
  background: #fff;
  color: var(--red);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── LAYOUT ─────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 1fr var(--cart-w);
  align-items: start;
  max-height: calc(100vh - var(--header-h) - var(--nav-h));
  overflow: hidden;
}

/* ── MENU SECTION ───────────────────────────────── */
.menu-section {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  height: calc(100vh - var(--header-h) - var(--nav-h));
}

.menu-section::-webkit-scrollbar { width: 4px; }
.menu-section::-webkit-scrollbar-thumb {
  background: var(--gold-dk);
  border-radius: 4px;
}

/* ── CATEGORY TITLE ─────────────────────────────── */
.cat-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--cream);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}

/* ── ITEMS GRID ─────────────────────────────────── */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .85rem;
  margin-bottom: 2rem;
}

/* ── ITEM CARD ──────────────────────────────────── */
.item-card {
  background: var(--navy);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius);
  padding: .9rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .18s;
  position: relative;
}

.item-card:hover {
  border-color: var(--border);
  box-shadow: 0 4px 18px rgba(0,0,0,.12);
  transform: translateY(-1px);
}

.item-card.in-cart {
  border-color: rgba(212,160,23,.8);
  box-shadow: 0 0 18px rgba(212,160,23,.2);
}

.item-num {
  font-family: var(--font-helvetica);
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--dark);
  background: linear-gradient(135deg, var(--gold-lt), var(--gold));
  border-radius: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.item-info { width: 100%; min-width: 0; }

.item-name {
  font-family: var(--font-futura);
  font-size: .95rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: .16rem;
  line-height: 1.3;
}

.item-ing {
  font-size: 0.76rem;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.item-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: .4rem;
  flex-shrink: 0;
  margin-top: auto;
}

.item-price {
  font-family: var(--font-futura);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold-lt);
}

.item-price-sub {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: .05rem;
}

/* ── QTY CONTROLS ───────────────────────────────── */
.qty-ctrl { display: flex; align-items: center; gap: .3rem; }

.qty-btn {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--red), var(--red-dk));
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 5px;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: all .15s;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(200,33,14,.35);
}

.qty-btn:hover { filter: brightness(1.2); transform: scale(1.1); }

.qty-btn.minus {
  background: rgba(0,0,0,.07);
  color: var(--muted);
  border-color: rgba(0,0,0,.1);
  box-shadow: none;
}

.qty-btn.minus:hover { background: rgba(0,0,0,.12); }

.qty-num {
  font-family: var(--font-helvetica);
  font-weight: 800;
  font-size: 1rem;
  min-width: 16px;
  text-align: center;
  color: var(--gold-lt);
}

.add-btn {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--red), var(--red-dk));
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: all .15s;
  box-shadow: 0 2px 10px rgba(200,33,14,.4);
  flex-shrink: 0;
}

.add-btn:hover { filter: brightness(1.2); transform: scale(1.1); }

/* ── CART PANEL ─────────────────────────────────── */
.cart-panel {
  background: #fdf8f2;
  border-left: 1px solid var(--border);
  height: calc(100vh - var(--header-h) - var(--nav-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -4px 0 16px rgba(0,0,0,.07);
  position: relative;
}

.cart-header {
  padding: 1rem 1.25rem .85rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-shrink: 0;
}

.cart-close-btn {
  display: none;
  background: none;
  border: 1px solid rgba(212,160,23,.2);
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: .95rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.cart-close-btn:hover {
  background: rgba(200,33,14,.3);
  border-color: var(--red);
  color: #fff;
}

.cart-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 800;
  flex: 1;
  color: var(--cream);
}

.cart-count {
  background: linear-gradient(135deg, var(--red), var(--red-dk));
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  font-size: 0.76rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0 .35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 2px 8px rgba(200,33,14,.4);
}

.cart-count.bump { transform: scale(1.4); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: .8rem 1.1rem;
}

.cart-items::-webkit-scrollbar { width: 3px; }
.cart-items::-webkit-scrollbar-thumb { background: var(--gold-dk); border-radius: 4px; }

.cart-empty {
  text-align: center;
  padding: 2.5rem 0;
  color: var(--muted);
}

.cart-empty-icon {
  font-size: 2rem;
  margin-bottom: .75rem;
  opacity: .2;
  line-height: 1;
}

.cart-empty p { font-size: 0.9rem; line-height: 1.7; color: var(--muted); }

.cart-line {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  padding: .55rem 0;
  border-bottom: 1px solid rgba(212,160,23,.1);
  animation: slideIn .2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; }
}

.cart-line:last-child { border-bottom: none; }

.cl-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.5;
}

.cl-qty { font-size: 0.82rem; color: var(--muted); white-space: nowrap; margin-top: .05rem; }

.cl-price {
  font-family: var(--font-futura);
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold-lt);
  white-space: nowrap;
}

.cl-rm {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(0,0,0,.3);
  font-size: .95rem;
  padding: 0 .1rem;
  transition: color .15s;
  line-height: 1;
  margin-top: .05rem;
}

.cl-rm:hover { color: var(--red); }

/* ── CART FOOTER ────────────────────────────────── */
.cart-footer {
  padding: .85rem 1.1rem 1.2rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: .35rem;
}

.total-row.main {
  font-family: var(--font-futura);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gold-lt);
  margin: .45rem 0 .9rem;
  padding-top: .45rem;
  border-top: 1px solid rgba(212,160,23,.2);
}

.pay-btn {
  width: 100%;
  padding: .85rem;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  font-style: italic;
  cursor: pointer;
  letter-spacing: .04em;
  box-shadow: 0 4px 14px rgba(194,56,32,.35);
  transition: all .18s;
}

.pay-btn:hover:not(:disabled) {
  background: var(--red-dk);
  transform: translateY(-1px);
}

.pay-btn:disabled { opacity: .25; cursor: default; box-shadow: none; }

#pay-msg {
  font-size: 0.82rem;
  text-align: center;
  margin-top: .35rem;
  min-height: 1em;
  font-style: italic;
}

#pay-msg.ok  { color: #6dcc85; }
#pay-msg.err { color: #ff7060; }

/* ── PIZZA MODAL ────────────────────────────────── */
.pizza-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4,8,20,.82);
  z-index: 300;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  padding: 1rem;
}

.pizza-modal-backdrop.open { display: flex; }

.pizza-modal {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  width: min(580px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn .3s cubic-bezier(.34,1.2,.64,1);
  overflow: hidden;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(.94) translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.pizza-modal-header {
  padding: 1.25rem 1.5rem .9rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: #fdf8f2;
}

.pizza-modal-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold-lt), var(--gold));
  color: var(--dark);
  font-family: var(--font-helvetica);
  font-size: 0.85rem;
  font-weight: 900;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  margin-bottom: .45rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.pizza-modal-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  font-style: italic;
  color: var(--cream);
  line-height: 1.25;
  padding-right: 2.5rem;
}

.pizza-modal-ing {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: .3rem;
}

.pizza-modal-close {
  position: absolute;
  top: .9rem;
  right: .9rem;
  background: rgba(0,0,0,.05);
  border: 1px solid rgba(168,130,60,.22);
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--muted);
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pizza-modal-close:hover {
  background: rgba(200,33,14,.3);
  border-color: var(--red);
  color: #fff;
}

.pizza-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem 1.5rem;
}

.pizza-modal-body::-webkit-scrollbar { width: 4px; }
.pizza-modal-body::-webkit-scrollbar-thumb { background: var(--gold-dk); border-radius: 4px; }

.pm-section-title {
  font-family: var(--font-futura);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: .55rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding-bottom: .28rem;
  border-bottom: 1px solid rgba(212,160,23,.15);
}

.pm-desc {
  font-size: .95rem;
  color: var(--text);
  line-height: 1.65;
  background: rgba(212,160,23,.06);
  border: 1px solid rgba(212,160,23,.15);
  border-radius: 8px;
  padding: .7rem .95rem;
  margin-bottom: 1rem;
}

.pm-allergens {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-bottom: 1.2rem;
}

.pm-allergen-tag {
  background: rgba(212,160,23,.1);
  border: 1px solid rgba(212,160,23,.35);
  color: var(--gold-lt);
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  padding: .2rem .65rem;
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* Size buttons */
.pm-size-row {
  display: flex;
  gap: .4rem;
  margin-bottom: 1rem;
}

.pm-size-btn {
  flex: 1;
  background: rgba(0,0,0,.03);
  border: 1.5px solid rgba(168,130,60,.28);
  border-radius: 7px;
  font-family: var(--font-futura);
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  padding: .45rem .25rem;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
  line-height: 1.4;
}

.pm-size-btn:hover { border-color: var(--gold); color: var(--gold-lt); }

.pm-size-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  border-color: var(--gold);
  color: var(--dark);
  font-weight: 800;
}

.pm-size-btn .sl { display: block; }
.pm-size-btn .sp { display: block; font-size: 0.78rem; opacity: .9; margin-top: .08rem; }

/* Base buttons */
.pm-base-row {
  display: flex;
  gap: .4rem;
  margin-bottom: 1.2rem;
}

.pm-base-btn {
  flex: 1;
  background: rgba(0,0,0,.03);
  border: 1.5px solid rgba(168,130,60,.22);
  border-radius: 7px;
  font-family: var(--font-futura);
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  padding: .45rem .25rem;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
}

.pm-base-btn:hover { border-color: var(--gold); color: var(--gold-lt); }

.pm-base-btn.active {
  background: rgba(212,160,23,.12);
  border-color: var(--gold);
  color: var(--gold-lt);
}

/* Ingredient chips */
.pm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: 1.2rem;
}

.pm-chip {
  display: flex;
  align-items: center;
  gap: .28rem;
  background: rgba(42,122,58,.15);
  border: 1.5px solid rgba(42,122,58,.4);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6dcc85;
  padding: .25rem .65rem;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}

.pm-chip:hover { background: rgba(200,33,14,.15); border-color: var(--red); color: #ff7060; }

.pm-chip.removed {
  background: rgba(200,33,14,.12);
  border-color: var(--red);
  color: #ff7060;
  text-decoration: line-through;
  opacity: .75;
}

.pm-chip-icon { font-size: 0.73rem; }

/* Supplement grid */
.pm-sup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
  margin-bottom: 1rem;
}

.pm-sup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,.03);
  border: 1.5px solid rgba(168,130,60,.18);
  border-radius: 7px;
  padding: .45rem .65rem;
  cursor: pointer;
  transition: all .15s;
}

.pm-sup-item:hover { border-color: rgba(212,160,23,.4); background: rgba(212,160,23,.06); }
.pm-sup-item.selected { border-color: rgba(212,160,23,.6); background: rgba(212,160,23,.1); }

.pm-sup-name { font-size: .9rem; font-weight: 500; color: var(--cream); }
.pm-sup-price { font-family: var(--font-futura); font-size: 0.82rem; font-weight: 700; color: var(--muted); margin-top: .06rem; }

.pm-sup-qty {
  display: flex;
  align-items: center;
  gap: .28rem;
  margin-left: .4rem;
}

.pm-sup-qty-btn {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--red), var(--red-dk));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}

.pm-sup-qty-btn.minus { background: rgba(0,0,0,.07); color: var(--muted); }
.pm-sup-qty-btn.minus:hover { background: rgba(0,0,0,.13); }
.pm-sup-qty-btn:not(.minus):hover { filter: brightness(1.2); }

.pm-sup-qty-num {
  font-family: var(--font-helvetica);
  font-size: .95rem;
  font-weight: 700;
  min-width: 13px;
  text-align: center;
  color: var(--gold-lt);
}

/* Modal footer */
.pizza-modal-footer {
  padding: .9rem 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fdf8f2;
}

.pm-total-label {
  font-size: .9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.pm-total-price {
  font-family: var(--font-futura);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-lt);
}

.pm-add-btn {
  background: linear-gradient(135deg, var(--red), var(--red-dk));
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  font-style: italic;
  padding: .7rem 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(200,33,14,.4);
  transition: all .15s;
  letter-spacing: .02em;
}

.pm-add-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200,33,14,.5);
}

/* ── PAYMENT MODAL ──────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4,8,20,.87);
  z-index: 200;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  padding: 1rem;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  width: min(440px, 100%);
  padding: 1.75rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn .3s cubic-bezier(.34,1.2,.64,1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0,0,0,.05);
  border: 1px solid rgba(168,130,60,.22);
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--muted);
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(200,33,14,.3);
  border-color: var(--red);
  color: #fff;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 900;
  font-style: italic;
  color: var(--cream);
  margin-bottom: .2rem;
}

.modal-sub {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.modal-summary {
  background: rgba(212,160,23,.06);
  border: 1px solid rgba(212,160,23,.15);
  border-radius: 9px;
  padding: .7rem .95rem;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
  line-height: 1.6;
}

.modal-summary strong {
  display: block;
  font-family: var(--font-futura);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold-lt);
  margin-bottom: .15rem;
}

#customer-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1rem;
}

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

.pay-label {
  font-size: .78rem;
  font-family: var(--font-futura);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pay-input {
  background: #fff;
  border: 1px solid rgba(168,130,60,.3);
  border-radius: 7px;
  padding: .6rem .85rem;
  color: var(--text);
  font-size: .92rem;
  outline: none;
  transition: border-color .2s;
}
.pay-input:focus { border-color: var(--gold); }
.pay-input::placeholder { color: rgba(60,40,20,.3); }

.pay-confirm-btn {
  width: 100%;
  padding: .75rem;
  background: linear-gradient(135deg, var(--red), #c8320e);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-futura);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  transition: opacity .2s;
  margin-top: .25rem;
}
.pay-confirm-btn:hover { opacity: .88; }
.pay-confirm-btn:disabled { opacity: .5; cursor: not-allowed; }

#sumup-card-wrap {
  background: rgba(0,0,0,.03);
  border: 1.5px solid rgba(168,130,60,.22);
  border-radius: 9px;
  padding: .9rem;
  min-height: 120px;
}

#sumup-card { min-height: 100px; }

.test-notice {
  margin-top: .8rem;
  background: rgba(212,160,23,.06);
  border: 1px solid rgba(212,160,23,.2);
  border-radius: 7px;
  padding: .55rem .85rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

.test-notice code {
  background: rgba(212,160,23,.12);
  padding: .08rem .28rem;
  border-radius: 3px;
  font-family: monospace;
  color: var(--gold-lt);
  font-size: 0.78rem;
}

/* ── SUCCESS SCREEN ─────────────────────────────── */
.success-screen {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.success-screen.open { display: flex; }

.success-card {
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2.5rem 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.success-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--green), #1a5c30);
  border: 2px solid rgba(109,204,133,.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.1rem;
  font-size: 1.75rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(42,122,58,.4);
}

.success-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 900;
  font-style: italic;
  color: var(--cream);
  margin-bottom: .5rem;
}

.success-sub {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.4rem;
}

.order-code {
  font-family: var(--font-helvetica);
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--gold-lt);
  letter-spacing: .1em;
  background: rgba(212,160,23,.08);
  border: 1px solid rgba(212,160,23,.3);
  border-radius: 9px;
  padding: .55rem 1.3rem;
  display: inline-block;
  margin-bottom: .7rem;
}

.eta-badge {
  display: inline-block;
  background: rgba(42,122,58,.2);
  border: 1px solid rgba(42,122,58,.5);
  color: #6dcc85;
  font-size: 0.88rem;
  font-weight: 600;
  padding: .28rem .85rem;
  border-radius: 999px;
  margin-bottom: .9rem;
}

.success-txn {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.new-order-btn {
  background: linear-gradient(135deg, var(--red), var(--red-dk));
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  padding: .75rem 1.8rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  font-style: italic;
  cursor: pointer;
  letter-spacing: .04em;
  box-shadow: 0 4px 16px rgba(200,33,14,.4);
  transition: all .15s;
}

.new-order-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* ── DIVIDER HELPER ─────────────────────────────── */
.pm-base-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
  background: rgba(212,160,23,.04);
  border-radius: 6px;
  padding: .5rem .7rem;
  border-left: 2px solid rgba(212,160,23,.25);
}

/* ════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ════════════════════════════════════════════════════ */

/* ── Large desktop (≥1400px): wider grid ─────────── */
@media (min-width: 1400px) {
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* ── Tablet landscape (≤1100px): smaller cart ────── */
@media (max-width: 1100px) {
  :root { --cart-w: 320px; }

  .brand-name  { font-size: 1.45rem; }
  .header-logo { width: 68px; height: 68px; }

  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* ── Tablet portrait (≤900px): collapse cart ─────── */
@media (max-width: 900px) {
  :root { --header-h: 72px; }

  .header {
    padding: 0 1.25rem;
    height: var(--header-h);
  }

  .header-logo  { width: 58px; height: 58px; }
  .brand-name   { font-size: 1.3rem; }
  .brand-tag, .brand-contact { display: none; }

  .header-info  { display: none; }

  .cat-nav { padding: 0 1rem; }
  .cat-btn  { padding: 0 1rem; font-size: 0.82rem; }

  /* Collapse cart into overlay */
  .layout {
    display: block;
    max-height: none;
    overflow: visible;
    z-index: auto;
  }

  .menu-section {
    height: auto;
    overflow: visible;
    padding: 1.25rem 1rem;
  }

  /* Cart becomes a fixed side drawer */
  .cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 90vw);
    height: 100vh;
    z-index: 150;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.25,.8,.25,1);
    border-left: 2px solid var(--gold);
  }

  .cart-panel.open {
    transform: translateX(0);
    box-shadow: -8px 0 40px rgba(0,0,0,.18);
  }

  /* Cart overlay backdrop */
  .cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 149;
  }

  .cart-overlay.open { display: block; }

  /* Show floating cart button */
  .cart-toggle-btn { display: flex; }

  /* Show close button inside cart */
  .cart-close-btn { display: flex; }
}

/* ── Mobile (≤600px): tighter layout ─────────────── */
@media (max-width: 600px) {
  :root { --header-h: 64px; }

  .header { padding: 0 1rem; gap: .75rem; }
  .header-logo { width: 48px; height: 48px; }
  .brand-name  { font-size: 1.15rem; }

  .cat-nav { padding: 0 .5rem; }
  .cat-btn  { padding: 0 .75rem; font-size: 0.78rem; letter-spacing: .04em; }

  .menu-section { padding: 1rem .75rem; }

  .items-grid {
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
  }

  .item-name   { font-size: .85rem; }
  .item-ing    { font-size: 0.7rem; }
  .item-price  { font-size: .95rem; }
  .add-btn     { width: 22px; height: 22px; font-size: 1.1rem; }
  .qty-btn     { width: 20px; height: 20px; font-size: 1rem; }
  .qty-num     { font-size: .88rem; }

  .cat-title   { font-size: 1.4rem; }

  /* Pizza modal full-screen on mobile */
  .pizza-modal {
    width: 100%;
    max-height: 95vh;
    border-radius: 14px 14px 0 0;
    align-self: flex-end;
  }

  .pizza-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .pizza-modal-name { font-size: 1.15rem; }

  .pm-size-row  { gap: .3rem; }
  .pm-size-btn  { font-size: .82rem; padding: .4rem .2rem; }
  .pm-base-btn  { font-size: .8rem; padding: .38rem .2rem; }

  .pm-sup-grid  { grid-template-columns: 1fr; }

  .pizza-modal-footer {
    flex-direction: column;
    gap: .75rem;
    padding: .85rem 1.1rem 1.1rem;
  }

  .pizza-modal-footer > div,
  .pm-add-btn { width: 100%; }

  .pm-add-btn   { text-align: center; padding: .8rem; }
  .pm-total-price { font-size: 1.35rem; }

  .cart-toggle-btn { bottom: 1rem; right: 1rem; }

  /* Payment modal as bottom sheet */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    padding: 1.25rem 1.1rem;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    animation: modalInBottom .3s cubic-bezier(.25,.8,.25,1);
  }

  .modal-title { font-size: 1.3rem; padding-right: 2.2rem; }

  .modal-sub { margin-bottom: .8rem; }

  .modal-summary {
    font-size: 0.85rem;
    padding: .55rem .75rem;
    margin-bottom: .85rem;
  }

  .modal-summary strong { font-size: 1.05rem; }

  #sumup-card-wrap { padding: .65rem; }
}

@keyframes modalInBottom {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ── Very small mobile (≤400px) ──────────────────── */
@media (max-width: 400px) {
  .items-grid {
    grid-template-columns: 1fr;
  }

  .item-card { padding: .8rem; }
}

/* ── Reduced motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
