/* ================================
   MESTRE ANDRÉ PIZZARIA - Design System
   Premium Yellow & Black Theme
   ================================ */

/* ==================== VARIABLES ==================== */
:root {
  --bg-primary: #0a0a0c;
  --bg-secondary: #131316;
  --bg-card: rgba(22, 22, 26, 0.7);
  --bg-card-hover: rgba(30, 30, 36, 0.9);
  --bg-glass: rgba(10, 10, 12, 0.75);
  --accent: #FF2E2E;
  --accent-hover: #FF4A4A;
  --accent-dim: rgba(255, 46, 46, 0.15);
  --accent-glow: rgba(255, 46, 46, 0.35);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --danger: #ef4444;
  --success: #10b981;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.05);
  --shadow-flat: inset 1px 1px 0px rgba(255, 255, 255, 0.05), inset -1px -1px 0px rgba(255, 46, 46, 0.1), 0 10px 30px rgba(0,0,0,0.6);
  --shadow-inset: inset 2px 2px 10px rgba(0,0,0,0.6), inset -1px -1px 3px rgba(255, 46, 46, 0.15);
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --tab-bar-height: 100px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==================== RESET ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  padding-bottom: calc(var(--tab-bar-height) + 16px);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, textarea, select { font-family: var(--font-body); }

/* ==================== HEADER ==================== */
.store-header {
  background: var(--bg-primary);
  padding: 28px 20px 24px;
  position: relative;
  overflow: hidden;
  border-bottom: none;
}
.header-glow {
  display: none;
}
.header-content { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.store-logo { width: 90px; height: 90px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 2px solid var(--accent); box-shadow: 0 0 25px rgba(255, 215, 0, 0.4); animation: float-logo 3.5s ease-in-out infinite; }
.store-logo img { width: 100%; height: 100%; object-fit: cover; }
@keyframes float-logo {
  0% { transform: translateY(0) scale(1); box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
  50% { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5); }
  100% { transform: translateY(0) scale(1); box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
}
.store-info h1 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.store-tagline { font-size: 0.85rem; color: var(--text-secondary); margin-top: 2px; }
.store-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.78rem; color: var(--text-muted); flex-wrap: wrap; }
.store-status { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.store-status.open { color: var(--success); }
.store-status.closed { color: var(--danger); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.store-status.open .status-dot { background: var(--success); box-shadow: 0 0 6px var(--success); animation: pulse-dot 2s infinite; }
.store-status.closed .status-dot { background: var(--danger); }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.search-wrapper { padding: 16px 16px 8px; position: sticky; top: 0; z-index: 20; background: transparent; pointer-events: none; }
.search-wrapper * { pointer-events: auto; }
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-primary);
  border-radius: var(--radius-xl); padding: 12px 18px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-inset);
  border: none;
}
.search-bar:focus-within { color: var(--accent); box-shadow: inset 8px 8px 16px #1d2024, inset -8px -8px 16px #353a40; transform: scale(0.99); }
.search-icon { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 0.95rem;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-clear {
  display: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-secondary); color: var(--text-muted);
  font-size: 1.1rem; line-height: 1; transition: 0.2s;
}
.search-clear.visible { display: flex; align-items: center; justify-content: center; }

/* ==================== CATEGORY GRID ==================== */
.category-grid { display: flex; overflow-x: auto; gap: 16px; padding: 16px 20px 24px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.category-grid::-webkit-scrollbar { display: none; }
.category-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 12px; width: 105px; height: 110px; flex-shrink: 0; scroll-snap-align: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-flat);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transform: perspective(1000px) translateY(0) rotateX(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s;
  cursor: pointer;
  color: var(--text-muted);
}
.category-card:active { transform: scale(0.97); box-shadow: var(--shadow-inset); color: var(--accent); }
.category-card:hover { transform: perspective(1000px) translateY(-4px) rotateX(2deg); box-shadow: var(--shadow-lg); color: var(--accent); }
.category-card-emoji { font-size: 2rem; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: transparent; color: inherit; }
.category-card-name { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; text-align: center; color: inherit; text-transform: uppercase; }
.category-card-count { font-size: 0.7rem; color: var(--text-secondary); margin-top: -6px; }

/* Category nav (Sticky Back Button) */
.category-nav { 
  padding: 8px 16px; 
  position: sticky; top: 0; z-index: 60;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-left: -16px; margin-right: -16px; 
  padding-left: 16px; padding-right: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}
.category-scroll { display: flex; overflow-x: auto; gap: 10px; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }
.cat-btn {
  white-space: nowrap; padding: 8px 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary); transition: all 0.2s;
}
.cat-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }
.cat-btn.back-btn { background: var(--bg-secondary); border-color: var(--border-strong); color: var(--accent); }

/* ==================== HOME & MENU ==================== */
.menu-container { padding: 0 16px 20px; }
.home-section-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; color: var(--text-primary); margin: 24px 0 12px; padding-left: 20px; display: flex; justify-content: space-between; align-items: baseline; }
.home-section-title span { font-size: 0.8rem; font-weight: 500; color: var(--accent); }
.product-horizontal-scroll { display: flex; overflow-x: auto; gap: 16px; padding: 8px 20px 24px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.product-horizontal-scroll::-webkit-scrollbar { display: none; }
.product-horizontal-scroll .product-card { min-width: 260px; max-width: 280px; scroll-snap-align: center; margin: 6px 0; }
.menu-section { margin-bottom: 24px; }
.section-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin-bottom: 14px; color: var(--accent); }
.section-title .emoji { margin-right: 6px; }
.menu-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.product-card {
  display: flex; flex-direction: column; gap: 14px; padding: 18px; margin: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-flat);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transform: perspective(1000px) translateY(0) rotateX(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative; overflow: hidden;
  cursor: pointer;
}
.product-card:active { transform: scale(0.98); box-shadow: var(--shadow-inset); }
.product-card:hover { transform: perspective(1000px) translateY(-5px) rotateX(2deg); box-shadow: var(--shadow-lg); }
.product-img { width: 100%; height: 160px; border-radius: var(--radius-md); overflow: hidden; flex-shrink: 0; background: var(--bg-secondary); }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; box-shadow: var(--shadow-inset); }
.product-details { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.product-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.product-desc { font-size: 0.85rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.product-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.product-price { 
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--text-primary); 
  background: var(--bg-primary); padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow-inset);
}
.product-add-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-primary); color: var(--accent);
  box-shadow: var(--shadow-flat);
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s, box-shadow 0.2s; border: none; cursor: pointer;
}
.product-add-btn:hover, .product-add-btn:active { box-shadow: var(--shadow-inset); color: var(--accent); }

/* No results */
.no-results, .no-orders { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.no-results svg, .no-orders svg { margin: 0 auto 16px; opacity: 0.3; }
.no-results p, .no-orders p { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.no-results span, .no-orders span { font-size: 0.85rem; }

/* ==================== CART FAB ==================== */
.cart-fab {
  position: fixed; bottom: 72px; right: 16px; z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px;
  background: var(--bg-primary); color: var(--accent);
  border-radius: 50%;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  box-shadow: var(--shadow-flat);
  transition: box-shadow 0.3s, transform 0.2s; border: none;
}
.cart-fab svg { width: 24px; height: 24px; }
.cart-fab:hover { box-shadow: var(--shadow-inset); }
.cart-fab-total { display: none; }
.cart-fab.bounce { animation: fab-bounce 0.6s ease; }
@keyframes fab-bounce { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.15); } 60% { transform: scale(0.95); } }
.cart-count {
  min-width: 22px; height: 22px; border-radius: 50%;
  background: #000; color: var(--accent);
  font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ==================== CART SIDEBAR ==================== */
.cart-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.6); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.cart-overlay.active { opacity: 1; pointer-events: all; }
.cart-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(380px, 90vw);
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: var(--shadow-lg);
}
.cart-sidebar.active { transform: translateX(0); }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--border); }
.cart-header h2 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.cart-close { font-size: 1.8rem; color: var(--text-muted); transition: color 0.2s; }
.cart-close:hover { color: var(--text-primary); }
.cart-items { flex: 1; overflow-y: auto; padding: 12px 16px; }
.cart-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-muted); }
.cart-empty svg { opacity: 0.2; }
.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); position: relative;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { display: block; font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.cart-item-extras { display: block; font-size: 0.75rem; color: var(--text-muted); }
.cart-item-obs { display: block; font-size: 0.75rem; color: var(--accent); opacity: 0.8; }
.cart-item-price { display: block; font-weight: 700; font-size: 0.9rem; color: var(--accent); margin-top: 4px; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; }
.cart-item-remove { position: absolute; top: 6px; right: 8px; font-size: 1.2rem; color: var(--text-muted); transition: color 0.2s; }
.cart-item-remove:hover { color: var(--danger); }
.cart-footer { padding: 16px; border-top: 1px solid var(--border); padding-bottom: calc(var(--tab-bar-height) + 20px); }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 1.1rem; font-weight: 700; }
.cart-total-value { color: var(--accent); font-family: var(--font-display); font-size: 1.3rem; }
.btn-checkout {
  width: 100%; padding: 14px; border-radius: var(--radius-md);
  background: var(--accent); color: #000;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  transition: background 0.2s, transform 0.2s;
}
.btn-checkout:hover { background: var(--accent-hover); transform: translateY(-1px); }
.qty-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg-secondary); border: 1px solid var(--border);
  color: var(--accent); font-size: 1.1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.qty-btn:hover { border-color: var(--accent); background: var(--accent-dim); }
.qty-value { font-weight: 700; font-size: 1rem; min-width: 24px; text-align: center; }

/* ==================== MODALS ==================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-height: 90vh; width: 100%; max-width: 500px;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 5; font-size: 1.8rem; color: var(--text-muted); width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; }
.modal-img-wrapper { height: 240px; background: var(--bg-card); overflow: hidden; position: relative; }
.modal-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 20px; }
.modal-body h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--text-primary); margin-bottom: 6px; }
.modal-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 8px; }
.modal-price { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--accent); margin-bottom: 16px; }

/* Extras */
.modal-extras { margin-bottom: 16px; }
.extras-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 600; color: var(--text-secondary); transition: 0.2s; }
.extras-chevron { transition: transform 0.3s; }
.modal-extras.open .extras-chevron { transform: rotate(180deg); }
.extras-list { display: none; padding: 8px 0; }
.modal-extras.open .extras-list { display: block; }
.extra-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; cursor: pointer; }
.extra-item input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; }
.extra-name { flex: 1; font-size: 0.9rem; }
.extra-price { font-size: 0.85rem; color: var(--accent); font-weight: 600; }

/* Modal obs & qty */
.modal-obs { margin-bottom: 16px; }
.modal-obs label { display: block; font-weight: 600; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; }
.modal-obs textarea { width: 100%; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.88rem; resize: none; outline: none; transition: border-color 0.3s; }
.modal-obs textarea:focus { border-color: var(--accent); }
.modal-qty { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 16px; }
.btn-add-cart {
  width: 100%; padding: 14px; border-radius: var(--radius-md);
  background: var(--accent); color: #000;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  transition: background 0.2s, transform 0.2s;
}
.btn-add-cart:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ==================== CHECKOUT ==================== */
.checkout-content { padding: 24px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.checkout-content h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--accent); margin-bottom: 20px; }
.form-group { margin-bottom: 18px; }
.form-group label, .form-group-label { display: block; font-weight: 600; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.92rem;
  outline: none; transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: none; }
.field-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; display: block; }
.field-hint.success { color: var(--success); }
.field-hint.error { color: var(--danger); }

/* Delivery mode */
.delivery-mode-options { display: flex; gap: 10px; }
.delivery-mode-option {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer; transition: 0.2s;
}
.delivery-mode-option.selected { border-color: var(--accent); background: var(--accent-dim); }
.delivery-mode-option input { display: none; }
.delivery-mode-content { display: flex; flex-direction: column; gap: 2px; }
.delivery-mode-icon { display: flex; align-items: center; justify-content: flex-start; margin-bottom: 2px; color: var(--text-muted); transition: color 0.2s; }
.delivery-mode-option.selected .delivery-mode-icon { color: var(--accent); }
.delivery-mode-name { font-size: 0.85rem; font-weight: 600; }
.payment-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); margin-left: auto; transition: 0.2s; flex-shrink: 0; }
.delivery-mode-option.selected .payment-radio { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px var(--bg-card); }

/* Payment options */
.payment-section { margin: 20px 0; }
.payment-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer; transition: 0.2s;
}
.payment-option.selected { border-color: var(--accent); background: var(--accent-dim); }
.payment-option input { display: none; }
.payment-icon { display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: color 0.2s; }
.payment-option.selected .payment-icon { color: var(--accent); }
.payment-option-info { flex: 1; }
.payment-option-name { display: block; font-weight: 600; font-size: 0.92rem; }
.payment-option-desc { display: block; font-size: 0.78rem; color: var(--text-muted); }
.payment-option.selected .payment-radio { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px var(--bg-card); }

/* Delivery method buttons */
.delivery-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.delivery-method-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 0.85rem; font-weight: 500; transition: 0.2s;
}
.delivery-method-btn.selected { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.delivery-method-btn input { display: none; }

/* Change */
.change-section { margin-top: 14px; }
.change-toggle { display: flex; gap: 8px; margin-bottom: 10px; }
.change-btn { flex: 1; padding: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500; transition: 0.2s; }
.change-btn.active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.change-input-row { display: flex; align-items: center; gap: 8px; }
.change-prefix { font-weight: 700; color: var(--accent); }
.change-input-row input { flex: 1; padding: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.92rem; outline: none; }
.change-input-row input:focus { border-color: var(--accent); }

/* Checkout summary */
.checkout-summary { margin: 20px 0; padding: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); }
.checkout-summary h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.summary-item { display: flex; justify-content: space-between; font-size: 0.88rem; padding: 4px 0; }
.summary-extras { font-size: 0.75rem; color: var(--text-muted); padding-left: 12px; margin-bottom: 4px; }
.summary-total { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-weight: 700; font-size: 1.05rem; color: var(--accent); }
.btn-send-order {
  width: 100%; padding: 14px; border-radius: var(--radius-md);
  background: var(--accent); color: #000;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.2s, transform 0.2s;
}
.btn-send-order:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ==================== SUCCESS MODAL ==================== */
.success-content { text-align: center; padding: 40px 24px; }
.success-icon { margin-bottom: 16px; color: var(--success); }
.success-content h2 { color: var(--accent); margin-bottom: 8px; }
.success-sub { font-size: 0.88rem; color: var(--text-muted); margin-top: 6px; }
.success-note { font-size: 0.82rem; color: var(--accent); margin-top: 12px; padding: 10px; background: var(--accent-dim); border-radius: var(--radius-sm); }
.success-content .btn-checkout { margin-top: 20px; }

/* ==================== PIX MODAL ==================== */
.pix-content { text-align: center; padding: 24px; }
.pix-header { margin-bottom: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-direction: column; }
.pix-icon { color: var(--accent); display: flex; align-items: center; justify-content: center; padding: 8px; background: rgba(255, 215, 0, 0.1); border-radius: 50%; width: 56px; height: 56px; margin: 0 auto; }
.pix-header h2 { font-family: var(--font-display); color: var(--accent); margin-top: 4px; }
.pix-amount-label { font-size: 0.85rem; color: var(--text-muted); }
.pix-amount { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--accent); margin-bottom: 16px; }
.pix-qr-wrapper { background: #fff; border-radius: var(--radius-md); padding: 16px; display: inline-block; margin-bottom: 16px; }
.pix-qr-img { width: 200px; height: 200px; }
.pix-instruction { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 10px; }
.pix-code-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; word-break: break-all; }
.pix-code-text { font-size: 0.72rem; color: var(--text-secondary); font-family: monospace; }
.btn-pix-copy {
  width: 100%; padding: 12px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--accent);
  color: var(--accent); font-weight: 600; font-size: 0.92rem;
  transition: 0.2s; margin-bottom: 8px;
}
.btn-pix-copy:hover { background: var(--accent-dim); }
.btn-pix-copy.copied { background: var(--success); color: #fff; border-color: var(--success); }
.pix-close-btn { margin-top: 4px; }

/* ==================== WHATSAPP FAB ==================== */
.whatsapp-fab {
  position: fixed; bottom: calc(var(--tab-bar-height) + 16px); left: 16px; z-index: 50;
  width: 52px; height: 52px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-fab:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5); }

/* ==================== BOTTOM TAB BAR ==================== */
.bottom-tab-bar {
  position: fixed; bottom: 12px; left: 16px; right: 16px; z-index: 80;
  display: flex; height: 60px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.bottom-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 0.7rem; color: var(--text-muted);
  transition: all 0.3s;
  width: 42px; height: 42px; border-radius: 50%; flex: none; margin: auto;
  box-shadow: var(--shadow-flat); background: transparent;
}
.bottom-tab.active { color: var(--accent); box-shadow: var(--shadow-inset); }
.bottom-tab svg { transition: transform 0.2s; }
.bottom-tab.active svg { transform: scale(1.1); }
.bottom-tab span { display: none; }
.tab-page { display: none; }
.tab-page.active { display: block; }
.tab-cart-icon-wrapper { position: relative; }
.tab-cart-badge {
  position: absolute; top: -6px; right: -10px;
  min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--accent); color: #000;
  font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ==================== MY ORDERS ==================== */
.my-orders-page { padding: 20px 16px; }
.my-orders-header { margin-bottom: 20px; }
.my-orders-header h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.my-orders-subtitle { font-size: 0.85rem; color: var(--text-muted); }
.my-order-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; }
.my-order-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.my-order-number { font-family: var(--font-display); font-weight: 700; color: var(--accent); }
.my-order-status { font-size: 0.82rem; font-weight: 600; }
.my-order-date { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px; }
.my-order-items { font-size: 0.85rem; color: var(--text-secondary); padding: 8px 0; border-top: 1px solid var(--border); }
.my-order-total { font-weight: 700; color: var(--accent); font-family: var(--font-display); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.loading-orders { text-align: center; padding: 40px; color: var(--text-muted); }

/* ==================== FOOTER ==================== */
.store-footer { text-align: center; padding: 20px; font-size: 0.75rem; color: var(--text-muted); }

/* ==================== ADMIN ==================== */
.login-screen {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1500 50%, #0a0a0a 100%);
}
.login-card {
  width: min(400px, 90vw); padding: 40px 32px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(20px) scale(0.97);
  transition: opacity 0.5s, transform 0.5s;
}
.login-card.visible { opacity: 1; transform: translateY(0) scale(1); }
.login-logo { text-align: center; margin-bottom: 16px; }
.login-logo-img { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto; border: 2px solid var(--accent); box-shadow: 0 0 24px rgba(255, 215, 0, 0.3); }
.login-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--accent); text-align: center; }
.login-subtitle { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-bottom: 28px; }
.login-field { margin-bottom: 18px; }
.login-field label { display: block; font-weight: 600; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; }
.login-field input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.95rem;
  outline: none; transition: border-color 0.3s;
}
.login-field input:focus { border-color: var(--accent); }
.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 44px; }
.toggle-password { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.login-error { color: var(--danger); font-size: 0.82rem; text-align: center; margin-bottom: 12px; opacity: 0; transition: opacity 0.3s; }
.login-error.visible { opacity: 1; }
.login-btn {
  width: 100%; padding: 14px; border-radius: var(--radius-md);
  background: var(--accent); color: #000;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  transition: background 0.2s, transform 0.2s;
}
.login-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* Login success overlay */
.login-success-overlay {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(0,0,0,0.8);
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.35s;
}
.login-success-overlay.active { opacity: 1; }
.login-success-content { text-align: center; color: var(--accent); }
.login-spinner { width: 48px; height: 48px; border: 4px solid var(--border); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 12px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-success-text { font-family: var(--font-display); font-weight: 600; }

/* ==================== ADMIN PANEL ==================== */
.admin-container { max-width: 900px; margin: 0 auto; padding: 20px 16px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.admin-header h1 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.admin-header h1 span { color: var(--accent); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-admin {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 600; transition: 0.2s;
}
.btn-admin.primary { background: var(--accent); color: #000; }
.btn-admin.secondary { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary); }
.btn-admin.secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-admin.danger { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--danger); }
.btn-admin.danger:hover { background: rgba(239, 68, 68, 0.25); }

/* Admin stats */
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; text-align: center; }
.stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* Order cards */
.order-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; margin-bottom: 14px; }
.order-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.order-meta { display: flex; flex-direction: column; gap: 2px; }
.order-number { font-family: var(--font-display); font-weight: 700; color: var(--accent); font-size: 1rem; }
.order-time { font-size: 0.78rem; color: var(--text-muted); }
.order-status-badge { padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.order-customer { margin-bottom: 12px; }
.order-customer strong { display: block; font-size: 1rem; color: var(--text-primary); }
.order-phone { font-size: 0.82rem; color: var(--text-muted); margin-right: 10px; }
.order-delivery-mode { font-size: 0.82rem; }
.order-address { display: block; font-size: 0.82rem; color: var(--text-secondary); margin-top: 4px; }
.order-items { padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.order-item-line { font-size: 0.88rem; padding: 3px 0; }
.item-qty { font-weight: 700; color: var(--accent); }
.item-extras { font-size: 0.78rem; color: var(--text-muted); }
.item-obs { font-size: 0.78rem; color: var(--accent); opacity: 0.8; }
.order-obs { font-size: 0.82rem; color: var(--accent); margin-bottom: 8px; }
.order-payment { margin-bottom: 8px; }
.payment-info { font-size: 0.85rem; color: var(--text-secondary); }
.order-total { display: flex; justify-content: space-between; align-items: center; font-size: 1rem; margin-bottom: 14px; }
.order-total strong { color: var(--accent); font-family: var(--font-display); font-size: 1.15rem; }
.order-footer { border-top: 1px solid var(--border); padding-top: 12px; }
.order-status-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.status-btn { padding: 6px 10px; border-radius: var(--radius-sm); font-size: 0.75rem; background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-muted); transition: 0.2s; }
.status-btn.active { border-color: var(--status-color); color: var(--status-color); background: rgba(255,255,255,0.05); }
.status-btn:hover { border-color: var(--status-color); color: var(--status-color); }
.order-quick-actions { display: flex; gap: 8px; margin-bottom: 10px; }
.payment-toggle { padding: 6px 14px; border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 600; background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-muted); transition: 0.2s; }
.payment-toggle.paid { border-color: var(--success); color: var(--success); background: rgba(34,197,94,0.1); }
.copy-btn { padding: 6px 14px; border-radius: var(--radius-sm); font-size: 0.82rem; background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-muted); transition: 0.2s; }
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Labels */
.order-labels { display: flex; flex-wrap: wrap; gap: 6px; }
.order-label-btn { padding: 4px 10px; border-radius: 12px; font-size: 0.72rem; font-weight: 600; background: var(--bg-secondary); border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); transition: 0.2s; }
.order-label-btn.active { background: var(--label-color); color: #000; border-color: var(--label-color); }
.order-applied-labels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.label-badge { padding: 3px 10px; border-radius: 10px; font-size: 0.72rem; font-weight: 700; color: #000; }

/* Labels modal */
.labels-modal-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.labels-modal-backdrop.active { opacity: 1; pointer-events: all; }
.labels-modal { width: min(420px, 90vw); background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.labels-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.labels-modal-header h2 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.labels-modal-close { font-size: 1.5rem; color: var(--text-muted); }
.labels-modal-body { padding: 20px; }
.label-create-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.label-create-form input { flex: 1; min-width: 120px; padding: 8px 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 0.88rem; outline: none; }
.label-create-form input:focus { border-color: var(--accent); }
.label-color-picker { display: flex; gap: 6px; }
.label-color-btn { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; transition: 0.2s; }
.label-color-btn.selected { border-color: #fff; transform: scale(1.2); }
.label-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.label-delete { font-size: 1.2rem; color: var(--text-muted); }
.label-delete:hover { color: var(--danger); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 600px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-header { flex-direction: column; align-items: flex-start; }
  .admin-actions { width: 100%; overflow-x: auto; }
}
@media (min-width: 768px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==================== UPSELL MODAL ==================== */
.upsell-content {
  max-width: 420px;
  padding: 0 !important;
  overflow: hidden;
}
.upsell-header {
  text-align: center;
  padding: 28px 24px 18px;
  background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(255,165,0,0.05));
  border-bottom: 1px solid rgba(255,215,0,0.1);
}
.upsell-emoji {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 12px;
  color: #FFD700;
  background: rgba(255, 215, 0, 0.1);
  width: 64px;
  height: 64px;
  border-radius: 50%;
}
.upsell-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFD700;
  margin: 0 0 6px;
}
.upsell-subtitle {
  font-size: 0.82rem;
  color: #999;
  margin: 0;
  line-height: 1.4;
}
.upsell-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px 16px;
}
.upsell-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.2s ease;
  margin-bottom: 8px;
}
.upsell-item:hover {
  background: rgba(255,215,0,0.05);
  border-color: rgba(255,215,0,0.15);
}
.upsell-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.upsell-item-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  flex-shrink: 0;
  color: var(--accent);
}
.upsell-item-info {
  min-width: 0;
}
.upsell-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f5f5f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upsell-item-price {
  font-size: 0.78rem;
  color: #FFD700;
  font-weight: 600;
  margin-top: 2px;
}
.btn-upsell-add {
  background: rgba(255,215,0,0.12);
  color: #FFD700;
  border: 1px solid rgba(255,215,0,0.25);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}
.btn-upsell-add:hover {
  background: rgba(255,215,0,0.2);
  border-color: rgba(255,215,0,0.4);
}
.btn-upsell-add.added {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  border-color: rgba(34,197,94,0.3);
}
.upsell-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.btn-upsell-continue {
  width: 100%;
  padding: 12px;
  background: #FFD700;
  color: #0a0a0a;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all 0.2s ease;
}
.btn-upsell-continue:hover {
  background: #f0c800;
  transform: translateY(-1px);
}
.btn-upsell-skip {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: #777;
  border: none;
  border-radius: 10px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.2s ease;
}
.btn-upsell-skip:hover {
  color: #aaa;
}
