/* ============================================
   Jimmy's House of Pizza - Order Online
   ============================================ */

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

:root {
  --red: #CC0000;
  --red-dark: #990000;
  --gold: #FFD700;
  --gold-dark: #B8960B;
  --black: #111111;
  --white: #FFFFFF;
  --gray: #888888;
  --green: #00CC44;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Open Sans', Arial, sans-serif;

  /* Theme colors (dark default) */
  --bg-body: #111111;
  --bg-panel: #0a0a0a;
  --bg-card: #1a1a1a;
  --bg-input: #1a1a1a;
  --bg-element: #222;
  --bg-hover: rgba(255, 255, 255, 0.05);
  --text-primary: #FFFFFF;
  --text-secondary: #ccc;
  --text-muted: #aaa;
  --text-faint: #666;
  --border-color: #333;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --input-scheme: dark;
}

[data-theme="light"] {
  --bg-body: #FAFAFA;
  --bg-panel: #F0F0F0;
  --bg-card: #FFFFFF;
  --bg-input: #FFFFFF;
  --bg-element: #F0F0F0;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --text-primary: #111111;
  --text-secondary: #333333;
  --text-muted: #555555;
  --text-faint: #888888;
  --border-color: #DDD;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --gold: #8A6F00;
  --gold-dark: #6B5500;
  --input-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-body: #FAFAFA;
    --bg-panel: #F0F0F0;
    --bg-card: #FFFFFF;
    --bg-input: #FFFFFF;
    --bg-element: #F0F0F0;
    --bg-hover: rgba(0, 0, 0, 0.04);
    --text-primary: #111111;
    --text-secondary: #333333;
    --text-muted: #555555;
    --text-faint: #888888;
    --border-color: #DDD;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --gold: #8A6F00;
    --gold-dark: #6B5500;
    --input-scheme: light;
  }
}

.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  max-width: 100vw;
  overscroll-behavior-y: contain;
}

body {
  font-family: var(--font-body);
  background: var(--bg-body);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100vw;
  min-height: 100vh;
  overscroll-behavior-y: contain;
  transition: background 0.3s ease, color 0.3s ease;
}

.screen, .order-layout {
  max-width: 100%;
  box-sizing: border-box;
}

.menu-side {
  min-width: 0;
}

/* ---------- Header ---------- */
.order-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-panel);
  border-bottom: 2px solid var(--red);
  position: sticky;
  top: 0;
  flex-wrap: nowrap;
  z-index: 200;
}

.header-logo-link {
  flex-shrink: 0;
}

.header-logo {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  object-fit: cover;
}

.header-text h1 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-text p {
  font-size: 0.75rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-my-order-btn {
  margin-left: auto;
  padding: 6px 14px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
  animation: pulse-glow 2s ease-in-out infinite;
}

.header-my-order-btn:hover {
  background: var(--red-dark);
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(204,0,0,0.4); }
  50% { box-shadow: 0 0 12px rgba(204,0,0,0.8); }
}

.header-user {
  margin-left: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}

.header-user .user-name {
  color: var(--text-primary);
  font-weight: 600;
}

.header-user .sign-out-link {
  color: var(--gray);
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.7rem;
}

.header-user .sign-out-link:hover {
  color: var(--text-primary);
}

/* ---------- Screens ---------- */
.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* ---------- Auth Screen ---------- */
.auth-container {
  max-width: 400px;
  margin: 60px auto;
  padding: 30px 20px;
  text-align: center;
}

.auth-container h2 {
  font-family: var(--font-display);
  color: var(--red);
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.auth-step {
  display: none;
}

.auth-step.active {
  display: block;
}

.auth-container label {
  display: block;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  margin-top: 18px;
}

.auth-container label:first-of-type {
  margin-top: 0;
}

.auth-container input[type="text"],
.auth-container input[type="tel"],
.auth-container input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--bg-input) !important;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  outline: none;
  transition: border-color 0.2s;
  color-scheme: var(--input-scheme);
  -webkit-appearance: none;
}

/* Kill browser autofill yellow background */
.auth-container input:-webkit-autofill,
.auth-container input:-webkit-autofill:hover,
.auth-container input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  caret-color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 50px !important;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray);
  font-size: 0.75rem;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 4px 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toggle-password:hover {
  color: var(--gold);
}

.auth-container input:focus {
  border-color: var(--gold);
}

.phone-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.phone-input-wrapper:focus-within {
  border-color: var(--gold);
}

.phone-prefix {
  padding: 14px 0 14px 16px;
  color: var(--gray);
  font-size: 1rem;
  font-weight: 600;
  flex-shrink: 0;
}

.phone-input-wrapper input {
  border: none !important;
  background: transparent !important;
  padding-left: 6px !important;
  border-radius: 0 !important;
}

.code-sent-msg {
  color: var(--green);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.name-hint {
  color: #666;
  font-size: 0.8rem;
  margin-top: 6px;
}

.error-msg {
  color: #FF4444;
  font-size: 0.85rem;
  margin-top: 10px;
  min-height: 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  width: 100%;
  text-align: center;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  margin-top: 20px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--red-dark);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}

.btn-secondary:hover {
  background: var(--gold);
  color: var(--black);
}

.btn-link {
  background: none;
  border: none;
  color: var(--gray);
  text-decoration: underline;
  padding: 10px;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.btn-link:hover {
  color: var(--white);
}

/* ---------- Order Layout ---------- */
.order-layout {
  display: flex;
  min-height: calc(100vh - 70px);
}

.menu-side {
  flex: 1;
  padding: 0 0 100px;
}

.cart-side {
  width: 340px;
  background: #0a0a0a;
  border-left: 1px solid #222;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
}

/* ---------- Order Nav Bar (Menu / Recent Orders / Favorites) ---------- */
.order-nav-bar {
  display: flex;
  background: #0a0a0a;
  border-bottom: 1px solid #222;
  padding: 0 10px;
  position: sticky;
  top: var(--sticky-header-h, 70px);
  z-index: 101;
}

.order-nav-btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
  text-align: center;
}

.order-nav-btn:hover {
  color: #aaa;
}

.order-nav-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.order-tab {
  display: none !important;
}

.order-tab.active {
  display: block !important;
}

.tab-content-padded {
  padding: 60px 15px 100px;
}

.tab-title {
  font-family: var(--font-display);
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.empty-state {
  text-align: center;
  color: #555;
  font-size: 0.9rem;
  padding: 30px 0;
}

/* ---------- Recent Orders ---------- */
.order-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 100%);
  border: 1px solid #333;
  border-left: 4px solid var(--red);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}

.order-card:hover {
  border-left-color: var(--gold);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
}

.order-card-date {
  font-size: 0.8rem;
  color: var(--gray);
}

.order-card-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
}

.order-card-items {
  margin-bottom: 12px;
}

.order-card-item {
  font-size: 0.85rem;
  color: #ddd;
  padding: 3px 0;
  font-weight: 600;
}

.order-card-item .qty {
  color: var(--gold);
  font-weight: 700;
}

.order-card-actions {
  display: flex;
  gap: 8px;
}

.order-card-btn {
  flex: 1;
  padding: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  cursor: pointer;
  background: var(--red-dark);
  color: var(--white);
  border: none;
  font-family: var(--font-body);
  border: 1px solid #444;
  background: #222;
  color: var(--white);
  transition: all 0.15s;
}

.order-card-btn:hover {
  background: var(--red);
}

/* ---------- Favorites ---------- */
.fav-card {
  background: #1a1a1a;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.fav-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.fav-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
}

.fav-card-total {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
}

.fav-card-items {
  margin-bottom: 10px;
}

.fav-card-item {
  font-size: 0.8rem;
  color: #ccc;
  padding: 2px 0;
}

.fav-card-actions {
  display: flex;
  gap: 8px;
}

.btn-save-fav {
  margin-top: 8px;
  font-size: 0.8rem;
  padding: 10px;
}

/* ---------- Category Nav ---------- */
.order-category-nav {
  background: #111;
  border-bottom: 2px solid var(--red);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: calc(var(--sticky-header-h, 70px) + var(--sticky-nav-h, 38px));
  z-index: 100;
}

.order-category-nav::-webkit-scrollbar {
  display: none;
}

.order-category-tabs {
  display: flex;
  padding: 0 10px;
  min-width: max-content;
}

.order-cat-tab {
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  border-bottom: 3px solid transparent;
  background: none;
  font-family: var(--font-body);
  transition: all 0.2s;
}

.order-cat-tab:hover {
  color: var(--white);
}

.order-cat-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ---------- Menu Loading ---------- */
.order-menu-loading {
  text-align: center;
  padding: 50px 20px;
  color: var(--gray);
}

.order-menu-loading.hidden {
  display: none;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #333;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Menu Sections ---------- */
.order-menu-section {
  display: none;
  padding: 15px;
}

.order-menu-section.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.order-section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 15px;
}

/* ---------- Menu Items ---------- */
.order-menu-item {
  display: flex;
  align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 6px;
  margin-bottom: 2px;
}

.order-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.order-menu-item:active {
  background: rgba(204, 0, 0, 0.15);
}

.order-item-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.order-item-badge {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 6px;
  text-transform: uppercase;
  vertical-align: middle;
  background: #666;
  color: #ccc;
}

.order-item-badge.unavailable {
  background: #444;
  color: #888;
}

.order-item-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
  margin-left: 10px;
  white-space: nowrap;
}

.order-item-price-multi {
  display: flex;
  gap: 10px;
  margin-left: 10px;
}

.order-item-price-multi span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  text-align: center;
  min-width: 50px;
}

.order-item-price-multi .size-label-sm {
  display: block;
  font-size: 0.7rem;
  color: var(--gray);
  font-weight: 400;
}

.order-item-add {
  width: 32px;
  height: 32px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.order-item-add:hover {
  background: var(--red-dark);
}

.order-menu-item.unavailable {
  opacity: 0.4;
  pointer-events: none;
}

/* ---------- Cart ---------- */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #222;
  flex-wrap: wrap;
  gap: 8px;
}

.close-cart-btn {
  display: none;
  width: 100%;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  text-align: left;
  padding: 0 0 8px;
  border-bottom: 1px solid #222;
}

.close-cart-btn:hover {
  color: var(--white);
}

.cart-header h3 {
  font-family: var(--font-display);
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1rem;
}

.cart-count {
  background: var(--red);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}

.cart-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--gray);
}

.cart-hint {
  font-size: 0.8rem;
  margin-top: 5px;
  color: #555;
}

.cart-items {
  flex: 1;
  padding: 10px 16px;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 8px;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
}

.cart-item-size {
  font-size: 0.7rem;
  color: var(--gray);
}

.cart-item-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-edit-btn {
  background: none;
  border: 1px solid #444;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-edit-btn:hover {
  background: #333;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #444;
  background: #1a1a1a;
  color: var(--white);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.qty-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.qty-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  min-width: 18px;
  text-align: center;
}

/* ---------- Cart Totals ---------- */
.cart-totals {
  padding: 16px 16px calc(60px + env(safe-area-inset-bottom, 220px));
  border-top: 2px solid #222;
  background: #0d0d0d;
}

.special-instructions {
  margin-bottom: 12px;
}

.special-instructions label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.special-instructions textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 6px;
  color: var(--white);
  resize: none;
  outline: none;
  -webkit-text-fill-color: var(--white);
  color-scheme: dark;
}

.special-instructions textarea:focus {
  border-color: var(--gold);
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.85rem;
  color: #ccc;
}

.total-final {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  padding-top: 10px;
  margin-top: 5px;
  border-top: 1px solid #333;
}

.btn-place-order {
  margin-top: 15px;
  font-size: 1rem;
  padding: 16px;
}

/* ---------- Size Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #1a1a1a;
  border: 2px solid #333;
  border-radius: 12px;
  padding: 24px;
  max-width: 340px;
  width: 90%;
  text-align: center;
}

.modal-content h3 {
  font-family: var(--font-display);
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.size-modal-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.size-option-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #222;
  border: 2px solid #333;
  border-radius: 8px;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
}

.size-option-btn:hover {
  border-color: var(--gold);
  background: #2a2a2a;
}

.size-option-btn .size-price {
  color: var(--gold);
  font-weight: 700;
}

.modal-cancel {
  margin-top: 12px;
}

/* ---------- Customize Modal ---------- */
.modal-customize {
  max-width: 560px;
  max-height: 85vh;
  overflow-y: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.customize-item-name {
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 16px;
  text-align: center;
}

.customize-section {
  margin-bottom: 16px;
  border-top: 1px solid #333;
  padding-top: 12px;
}

.customize-section h4 {
  color: var(--gold);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* Blinking CASH ONLY banner on the confirmation screen */
.cash-only-banner {
  background: var(--gold);
  color: #111;
  font-weight: 900;
  font-size: 1.1rem;
  text-align: center;
  padding: 10px 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 3px solid var(--red);
  border-radius: 8px;
  margin: 12px 14px 6px;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.5);
  animation: cashBlink 1s ease-in-out infinite;
}

@keyframes cashBlink {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 18px rgba(255, 215, 0, 0.5); }
  50%       { opacity: 0.55; transform: scale(0.98); box-shadow: 0 0 4px rgba(255, 215, 0, 0.2); }
}

.customize-section .collapsible-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  padding: 4px 0;
}

.customize-section .collapse-caret {
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.customize-section.collapsible.collapsed .collapse-caret {
  transform: rotate(-90deg);
}

.customize-section.collapsible.collapsed .collapsible-body {
  display: none !important;
}

.customize-section.collapsible:not(.collapsed) .collapsible-header {
  margin-bottom: 10px;
}

.customize-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.customize-size-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #222;
  border: 2px solid #333;
  border-radius: 8px;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
}

.customize-size-btn:hover {
  border-color: var(--gold);
  background: #2a2a2a;
}

.customize-size-btn.selected {
  border-color: var(--gold);
  background: #2a2a1a;
}

.customize-size-btn .size-price {
  color: var(--gold);
  font-weight: 700;
}

.customize-modifiers-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.customize-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #222;
  border-radius: 6px;
  color: var(--white);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s;
}

.customize-checkbox:hover {
  background: #2a2a2a;
}

.customize-checkbox input[type="checkbox"],
.customize-checkbox input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}

.customize-pick-msg {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.sauce-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sauce-row .sauce-main {
  flex: 1;
  margin: 0;
}

.sauce-qty-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.sauce-qty-btn {
  width: 28px;
  height: 28px;
  background: #333;
  color: var(--white);
  border: 1px solid #444;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.sauce-qty-btn:first-child {
  border-radius: 4px 0 0 4px;
}

.sauce-qty-btn:last-child {
  border-radius: 0 4px 4px 0;
}

.sauce-qty-btn:hover {
  background: #444;
}

.sauce-qty-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #222;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
  border-top: 1px solid #444;
  border-bottom: 1px solid #444;
}

.customize-tier-indicator {
  font-size: 0.8rem;
  font-weight: 700;
  color: #00CC44;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-align: center;
}

.customize-checkbox .mod-price {
  color: var(--gold);
  font-weight: 600;
  margin-left: auto;
}

.customize-notes-input {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  background: #222;
  border: 1px solid #333;
  border-radius: 6px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.customize-notes-input::placeholder {
  color: #666;
}

.customize-scroll-area {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.customize-footer {
  border-top: 1px solid #333;
  padding-top: 14px;
  padding-bottom: 8px;
  text-align: center;
  flex-shrink: 0;
  background: #1a1a1a;
}

.customize-total {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.customize-total span {
  color: var(--gold);
}

/* Cart modifier display */
.cart-item-modifiers {
  font-size: 0.78rem;
  color: var(--gold-dark);
  margin-top: 2px;
}

.cart-item-cooking {
  font-size: 0.78rem;
  color: #aaa;
  font-style: italic;
  margin-top: 2px;
}

/* ---------- Confirmation Screen ---------- */
.confirm-banner {
  background: linear-gradient(135deg, #006622 0%, #00aa44 100%);
  padding: 30px 20px;
  text-align: center;
  width: 100%;
}

.confirm-banner-check {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

.confirm-banner h1 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@media (max-width: 600px) {
  .confirm-banner h1 { font-size: 1.4rem; letter-spacing: 2px; }
  .confirm-banner { padding: 25px 15px; }
}

.confirm-container {
  max-width: 500px;
  margin: 20px auto;
  padding: 20px 20px calc(30px + env(safe-area-inset-bottom, 220px));
  text-align: center;
}

.confirm-container h2 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.confirm-subtitle {
  color: #aaa;
  margin-bottom: 25px;
}

.confirm-details {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 16px;
  text-align: left;
  margin-bottom: 25px;
  border: 1px solid #222;
}

.confirm-details .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.85rem;
  color: #ccc;
}

.confirm-details .detail-row.total {
  font-weight: 700;
  color: var(--gold);
  font-size: 1rem;
  border-top: 1px solid #333;
  padding-top: 10px;
  margin-top: 5px;
}

.confirm-details .detail-instructions {
  font-size: 0.85rem;
  color: #aaa;
  padding: 8px 0;
  font-style: italic;
  border-top: 1px solid #333;
  margin-top: 6px;
}

.confirm-details .detail-label {
  font-size: 0.8rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #333;
}

.confirm-details .detail-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.85rem;
  color: var(--white);
}

.confirm-details .detail-item .item-qty {
  color: var(--gray);
  margin-left: 4px;
}

.confirm-notice {
  background: #1a1000;
  border: 1px solid var(--gold-dark);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 25px;
}

.confirm-notice p {
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 8px;
  line-height: 1.5;
}

.confirm-notice p:last-child {
  margin-bottom: 0;
}

.confirm-notice a {
  color: var(--gold);
  text-decoration: none;
}

.confirm-warning {
  font-size: 0.8rem !important;
  color: var(--red) !important;
  font-style: italic;
}

.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Mobile Cart Button ---------- */
.mobile-cart-btn {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: var(--red);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  font-family: var(--font-body);
  cursor: pointer;
  z-index: 150;
  text-align: center;
}

.mobile-cart-btn:hover {
  background: var(--red-dark);
}

/* ---------- Toast ---------- */
.toast-msg {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  z-index: 600;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- reCAPTCHA ---------- */
#recaptcha-container {
  margin-top: 15px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .cart-side {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 300;
    height: 100vh;
  }

  .cart-side.open {
    display: flex;
  }

  .close-cart-btn {
    display: block;
  }

  .mobile-cart-btn {
    display: block;
  }

  .order-layout {
    display: block;
  }

  .menu-side {
    padding-bottom: 70px;
  }

  .cart-header {
    padding-top: 20px;
  }

  .cart-header h3 {
    font-size: 1.2rem;
  }

  .close-cart-btn {
    display: block;
  }

  .order-header {
    padding: 6px 10px;
    gap: 6px;
  }

  .header-text h1 {
    font-size: 0.75rem;
  }

  .header-text p {
    font-size: 0.6rem;
  }

  .header-user {
    font-size: 0.65rem;
  }

  .order-nav-bar {
    position: sticky;
    top: var(--sticky-header-h, 52px);
    z-index: 101;
  }

  .order-category-nav {
    position: sticky;
    top: calc(var(--sticky-header-h, 52px) + var(--sticky-nav-h, 40px));
    z-index: 100;
  }

  .header-my-order-btn {
    padding: 4px 10px;
    font-size: 0.65rem;
  }

  .header-logo {
    width: 35px;
    height: 35px;
  }
}

@media (min-width: 769px) {
  .header-text h1 {
    font-size: 1.2rem;
  }

  .order-cat-tab {
    padding: 14px 20px;
    font-size: 0.85rem;
  }

  .order-menu-section {
    padding: 20px 30px;
  }
}
