/* ==========================================================================
   cardapio.css – CSS unificado do sistema de pedidos FoodTech
   Layout Moderno para Cardápio Digital
   Organização: Variáveis → Reset → Animações → Utilitários →
                Cardápio → Modal → Carrinho (escopado)
   ========================================================================== */

/* --------------------------------------------
   1. VARIÁVEIS GLOBAIS (único :root)
-------------------------------------------- */
:root {
  --primary: #ea1d2c;
  --primary-dark: #c71723;
  --primary-light: #ffebee;
  --success: #00a650;
  --warning: #ff9800;
  --danger: #dc3545;
  --info: #0091ea;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  --bg-primary: #f8f9fa;
  --bg-card: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --transition-fast: 0.15s cubic-bezier(0.4,0,0.2,1);
  --transition-base: 0.25s cubic-bezier(0.4,0,0.2,1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* --------------------------------------------
   2. RESET E BASE
-------------------------------------------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--gray-900);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: calc(100px + var(--safe-bottom));
}

/* Container principal */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px;
}

@media (max-width: 600px) {
  .app-container { padding: 0; }
}

/* --------------------------------------------
   3. ANIMAÇÕES GLOBAIS
-------------------------------------------- */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --------------------------------------------
   4. COMPONENTES COMPARTILHADOS
-------------------------------------------- */

/* Sistema de notificações (toast) */
.notification-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.notification {
  background: white;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: slideUp 0.2s ease;
  border-left: 4px solid;
  font-size: 14px;
}

.notification.success { border-left-color: var(--success); }
.notification.error   { border-left-color: var(--danger); }
.notification.info    { border-left-color: var(--info); }

.notification-icon { font-size: 18px; }
.notification-message { flex: 1; }

/* Compatibilidade com classes antigas (JS) */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: white;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: slideUp 0.2s ease;
  border-left: 4px solid;
  font-size: 14px;
}

/* Botão ícone padrão */
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--gray-100);
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-icon:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Alerta flutuante superior */
.toast-msg {
  position: fixed;
  top: 90px;
  right: 24px;
  background: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  border-left: 4px solid var(--danger);
  animation: slideInRight 0.3s ease;
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .toast-msg {
    right: 16px; left: 16px; top: 80px;
    padding: 10px 16px;
  }
}

/* ==========================================================================
   5. CARDÁPIO (index.php) – prefixo .page-cardapio
   ========================================================================== */

.page-cardapio .app-header {
  background: white;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.page-cardapio .header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-cardapio .restaurant-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.page-cardapio .restaurant-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  background: var(--gray-100);
}

.page-cardapio .restaurant-details { min-width: 0; }

.page-cardapio .restaurant-details h1 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-cardapio .restaurant-address {
  font-size: 0.75rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.page-cardapio .status-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.page-cardapio .status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Hero Banner - Destaque */
.page-cardapio .hero-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  padding: 32px 24px;
  color: white;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.page-cardapio .hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  pointer-events: none;
}

.page-cardapio .hero-banner h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.page-cardapio .hero-banner p {
  opacity: 0.9;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

.page-cardapio .alert-float {
  margin-bottom: 20px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideDown 0.4s ease;
}

.page-cardapio .alert-danger {
  background: #ffebee;
  border: 1px solid #ffcdd2;
  color: var(--danger);
}

.page-cardapio .search-section { margin-bottom: 24px; }

.page-cardapio .search-box {
  background: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  padding: 4px 4px 4px 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.page-cardapio .search-box input {
  flex: 1;
  border: none;
  padding: 14px 12px;
  font-size: 1rem;
  background: transparent;
  outline: none;
}

.page-cardapio .search-box button {
  background: var(--primary);
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 24px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.page-cardapio .search-box button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* Categorias - Filtros em chips */
.page-cardapio .categories-wrapper {
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding-bottom: 8px;
}

.page-cardapio .categories-wrapper::-webkit-scrollbar { display: none; }

.page-cardapio .categories-list {
  display: flex;
  gap: 8px;
  padding-bottom: 8px;
}

.page-cardapio .category-chip {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.page-cardapio .category-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-cardapio .category-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.page-cardapio .category-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 32px 0 16px;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-cardapio .category-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 2px;
}

/* Grid de Produtos - Layout responsivo */
.page-cardapio .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

@media (min-width: 1200px) {
  .page-cardapio .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1600px) {
  .page-cardapio .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .page-cardapio .products-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* Card de Produto - Moderno */
.page-cardapio .product-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: row;
  min-height: 130px;
  position: relative;
}

.page-cardapio .product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-300);
}

.page-cardapio .product-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.page-cardapio .product-card.unavailable {
  opacity: 0.6;
  filter: grayscale(0.3);
  cursor: not-allowed;
}

.page-cardapio .product-card.unavailable:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.page-cardapio .product-info {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.page-cardapio .product-image-wrapper {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  margin: 12px 16px 12px 0;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--gray-100);
}

@media (max-width: 768px) {
  .page-cardapio .product-image-wrapper { width: 80px; height: 80px; margin: 10px 12px 10px 0; }
}

@media (max-width: 480px) {
  .page-cardapio .product-image-wrapper { width: 70px; height: 70px; margin: 8px 10px 8px 0; }
}

.page-cardapio .product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.page-cardapio .product-card:hover .product-image { transform: scale(1.05); }

/* Badge flutuante sobre imagem */
.page-cardapio .product-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--primary);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  z-index: 2;
  text-transform: uppercase;
}

.page-cardapio .unavailable-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-cardapio .product-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.page-cardapio .product-description {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.page-cardapio .product-price {
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary);
  margin-top: auto;
}

@media (max-width: 480px) {
  .page-cardapio .product-price { font-size: 0.9rem; }
}

.page-cardapio .old-price {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: 500;
}

/* BADGES DE PRODUTO — COMPLETAS */
.page-cardapio .product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  max-width: 100%;
}

.page-cardapio .badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

/* Destaque */
.page-cardapio .badge-destaque {
  background: #fef3c7;
  color: #b45309;
}

/* Novo */
.page-cardapio .badge-novo {
  background: var(--primary);
  color: white;
}

/* Restrições Alimentares */
.page-cardapio .badge-vegano {
  background: #dcfce7;
  color: #15803d;
}

.page-cardapio .badge-vegetariano {
  background: #ecfdf5;
  color: #047857;
}

.page-cardapio .badge-organico {
  background: #f0fdf4;
  color: #166534;
}

.page-cardapio .badge-sem-acucar {
  background: #fef2f2;
  color: #991b1b;
}

.page-cardapio .badge-sem-lactose {
  background: #fff7ed;
  color: #9a3412;
}

.page-cardapio .badge-sem-gluten {
  background: #fffbeb;
  color: #92400e;
}

/* Bebidas */
.page-cardapio .badge-gelada {
  background: #e0f2fe;
  color: #0369a1;
}

.page-cardapio .badge-alcoolica {
  background: #faf5ff;
  color: #7e22ce;
}

/* Botão flutuante do carrinho */
.page-cardapio .cart-floating {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  right: 24px;
  z-index: 1001;
  animation: slideInRight 0.3s ease-out;
}

.page-cardapio .cart-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: all 0.2s;
}

.page-cardapio .cart-btn:hover {
  transform: scale(1.05);
  color: white;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}

@media (max-width: 480px) {
  .page-cardapio .cart-floating { bottom: 16px; right: 16px; }
  .page-cardapio .cart-btn { padding: 10px 20px; gap: 8px; font-size: 0.85rem; }
}

/* Banner de cupom */
.page-cardapio .coupon-banner {
  background: var(--success);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
  text-align: center;
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Banner LGPD */
.page-cardapio .lgpd-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--gray-900);
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  z-index: 999;
  font-size: 0.85rem;
}

.page-cardapio .lgpd-btn {
  background: var(--primary);
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.page-cardapio .lgpd-btn.reject { background: var(--gray-700); }

.page-cardapio .lgpd-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* ==========================================================================
   6. MODAL DE PRODUTO (produto_modal.php)
   ========================================================================== */

.product-modal {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  min-height: 100vh;
  position: relative;
  padding-bottom: 100px;
}

.product-modal .product-image-wrapper {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #f0f0f0;
}

@media (max-width: 480px) {
  .product-modal .product-image-wrapper { height: 180px; }
}

.product-modal .product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-modal .product-info {
  padding: 20px;
  background: var(--bg-card);
}

.product-modal .product-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

@media (max-width: 480px) {
  .product-modal .product-title { font-size: 18px; }
}

.product-modal .product-description {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 12px;
  line-height: 1.5;
}

.product-modal .product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.price-original {
  font-size: 14px;
  color: var(--gray-600);
  text-decoration: line-through;
}

.price-current {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

@media (max-width: 480px) {
  .price-current { font-size: 20px; }
}

.section {
  padding: 0 20px;
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title i {
  color: var(--primary);
  font-size: 18px;
}

.section-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

.section-badge.optional {
  background: var(--gray-200);
  color: var(--gray-700);
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
}

.option-card:hover,
.option-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.option-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
}

@media (max-width: 480px) {
  .option-content { padding: 10px 12px; }
}

.option-info { flex: 1; }

.option-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.option-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.option-description {
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 4px;
}

.option-select {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--gray-600);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.option-card.selected .option-select {
  border-color: var(--primary);
  background: var(--primary);
}

.option-card.selected .option-select::after {
  content: "✓";
  color: white;
  font-size: 12px;
}

.checkbox-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.checkbox-option:hover,
.checkbox-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.checkbox-custom {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--gray-600);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.checkbox-option.selected .checkbox-custom {
  border-color: var(--primary);
  background: var(--primary);
}

.checkbox-option.selected .checkbox-custom::after {
  content: "✓";
  color: white;
  font-size: 12px;
}

.counter-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f5f5;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #e0e0e0;
}

.counter-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.counter-max {
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-600);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--gray-200);
  border-radius: 30px;
  padding: 4px;
}

.stepper-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 14px;
  transition: all 0.2s;
}

.stepper-btn:hover {
  background: var(--primary);
  color: white;
}

.stepper-value {
  font-weight: 600;
  font-size: 15px;
  min-width: 30px;
  text-align: center;
  color: var(--gray-900);
}

.observations-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s;
  background: white;
}

.observations-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--gray-200);
  padding: 12px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-width: 680px;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .bottom-bar { padding: 10px 16px; gap: 12px; }
}

.qty-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-200);
  border-radius: 40px;
  padding: 4px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 16px;
  transition: all 0.2s;
}

.qty-btn:hover:not(:disabled) {
  background: var(--primary);
  color: white;
}

.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-value-large {
  font-weight: 700;
  font-size: 18px;
  min-width: 45px;
  text-align: center;
  color: var(--gray-900);
}

@media (max-width: 480px) {
  .qty-btn { width: 36px; height: 36px; font-size: 14px; }
  .qty-value-large { font-size: 16px; min-width: 35px; }
}

.btn-submit {
  flex: 1;
  background: var(--primary);
  border: none;
  border-radius: 44px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.btn-text {
  color: white;
  font-weight: 700;
  font-size: 15px;
}

.btn-price {
  color: white;
  font-weight: 800;
  font-size: 16px;
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 30px;
}

@media (max-width: 480px) {
  .btn-text { font-size: 13px; }
  .btn-price { font-size: 14px; padding: 3px 8px; }
}

.alert-message {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  display: none;
}

.alert-error {
  background: var(--primary-light);
  color: var(--primary);
  border-left: 4px solid var(--primary);
}

.alert-warning {
  background: #fef7e0;
  color: #b06000;
  border-left: 4px solid var(--warning);
}

/* Scrollbar do modal */
.product-modal .scrollable-content {
  max-height: calc(100vh - 240px);
  overflow-y: auto;
  padding: 20px 20px 120px 20px;
  scrollbar-width: thin;
}

.product-modal .scrollable-content::-webkit-scrollbar {
  width: 6px;
}

.product-modal .scrollable-content::-webkit-scrollbar-track {
  background: transparent;
}

.product-modal .scrollable-content::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 10px;
}

/* ==========================================================================
   7. CARRINHO (carrinho.php) – TUDO prefixado com .page-carrinho
   ========================================================================== */

.page-carrinho .app-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0;
  position: relative;
}

/* Header */
.page-carrinho .app-header {
  background: var(--bg-card);
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-carrinho .back-button {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--gray-100);
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.page-carrinho .back-button:focus-visible {
  outline: 2px solid var(--primary);
}

.page-carrinho .header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-carrinho .header-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-carrinho .item-counter {
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  min-width: 28px;
  text-align: center;
}

.page-carrinho .btn-icon-header {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--gray-100);
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Alertas */
.page-carrinho .alert-float {
  margin: 16px 16px 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: slideDown 0.3s ease;
}

.page-carrinho .alert-warning {
  background: #fff8e1;
  border-left: 4px solid var(--warning);
  color: #b76e00;
}

.page-carrinho .alert-danger {
  background: #ffebee;
  border-left: 4px solid var(--danger);
  color: #c62828;
}

.page-carrinho .alert-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.page-carrinho .alert-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-carrinho .alert-title {
  font-weight: 700;
  font-size: 14px;
}

.page-carrinho .alert-text {
  font-size: 13px;
}

/* Cupom */
.page-carrinho .coupon-section {
  background: white;
  margin: 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.page-carrinho .coupon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  cursor: pointer;
}

.page-carrinho .coupon-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-carrinho .coupon-icon {
  width: 32px;
  height: 32px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.page-carrinho .coupon-title-text { font-weight: 600; }

.page-carrinho .coupon-toggle {
  transition: transform 0.2s;
}

.page-carrinho .coupon-toggle.rotated { transform: rotate(180deg); }

.page-carrinho .coupon-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.page-carrinho .coupon-body.open { max-height: 800px; }

.page-carrinho .coupon-content {
  padding: 0 16px 16px;
  border-top: 1px solid var(--gray-200);
}

.page-carrinho .coupon-input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.page-carrinho .coupon-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-full);
  font-size: 14px;
}

.page-carrinho .btn-apply-coupon {
  background: var(--primary);
  border: none;
  border-radius: var(--radius-full);
  padding: 0 20px;
  color: white;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.page-carrinho .coupon-error {
  display: none;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #ffebee;
  border-radius: var(--radius-sm);
  color: #c62828;
  font-size: 12px;
  align-items: center;
  gap: 8px;
}

.page-carrinho .coupon-applied-card {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 12px;
}

.page-carrinho .coupon-applied-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.page-carrinho .coupon-tag {
  background: var(--success);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.page-carrinho .btn-remove-coupon {
  background: none;
  border: none;
  color: var(--gray-600);
  cursor: pointer;
}

.page-carrinho .coupon-benefit {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.page-carrinho .coupon-discount-value {
  color: var(--success);
  font-weight: 700;
}

/* Itens */
.page-carrinho .items-section { padding: 0 16px; }

.page-carrinho .section-title {
  font-size: 20px;
  font-weight: 800;
  margin: 24px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-carrinho .cart-item-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  border: 1px solid var(--gray-100);
}

.page-carrinho .item-image-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .page-carrinho .item-image-wrapper { width: 70px; height: 70px; }
}

.page-carrinho .item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.page-carrinho .item-badge-quantity {
  position: absolute;
  bottom: -6px;
  right: -6px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.page-carrinho .item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-carrinho .item-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.page-carrinho .item-name {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.page-carrinho .item-actions { display: flex; gap: 8px; }

.page-carrinho .btn-item-action {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  color: var(--gray-600);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.page-carrinho .btn-item-action:focus-visible {
  outline: 2px solid var(--primary);
}

.page-carrinho .btn-item-action.edit:hover {
  background: #e3f2fd;
  color: #1976d2;
}

.page-carrinho .btn-item-action.duplicate:hover {
  background: #e8f5e9;
  color: #2e7d32;
}

.page-carrinho .item-price-tag {
  font-weight: 700;
  color: var(--primary);
  font-size: 15px;
}

.page-carrinho .item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page-carrinho .tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-700);
}

.page-carrinho .tag-size { background: #e3f2fd; color: #1565c0; }
.page-carrinho .tag-half { background: #fce4ec; color: #ad1457; }

.page-carrinho .item-observation {
  font-size: 12px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-50);
  padding: 8px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

.page-carrinho .item-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.page-carrinho .quantity-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  padding: 4px;
}

.page-carrinho .btn-stepper {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: var(--transition-fast);
}

.page-carrinho .btn-stepper.remove { color: var(--danger); }

.page-carrinho .item-subtotal {
  font-weight: 700;
  font-size: 16px;
}

/* Estado vazio */
.page-carrinho .empty-state {
  text-align: center;
  padding: 60px 20px;
}

.page-carrinho .empty-icon-wrapper {
  width: 100px;
  height: 100px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 40px;
  color: var(--gray-400);
}

.page-carrinho .empty-title {
  font-size: 22px;
  margin-bottom: 12px;
}

.page-carrinho .empty-text {
  color: var(--gray-600);
  margin-bottom: 24px;
}

.page-carrinho .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: white;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 700;
}

/* Resumo */
.page-carrinho .summary-section {
  background: white;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: 24px 16px 0;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.page-carrinho .summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.page-carrinho .summary-title {
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-carrinho .summary-badge {
  background: var(--gray-100);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
}

.page-carrinho .summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.page-carrinho .summary-row.total {
  border-bottom: none;
  font-weight: 800;
  font-size: 18px;
  padding-top: 16px;
}

.page-carrinho .discount { color: var(--success); }

/* Entrega */
.page-carrinho .delivery-section { padding: 20px 16px 40px; }

.page-carrinho .delivery-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-carrinho .delivery-subtitle {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 20px;
}

.page-carrinho .delivery-options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-carrinho .delivery-option-card {
  display: flex;
  align-items: center;
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  gap: 16px;
}

.page-carrinho .delivery-option-card:focus-visible {
  outline: 2px solid var(--primary);
}

.page-carrinho .option-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.page-carrinho .option-delivery .option-icon-wrapper { background: #e3f2fd; color: #1976d2; }
.page-carrinho .option-balcao .option-icon-wrapper   { background: #e8f5e9; color: #2e7d32; }
.page-carrinho .option-mesa .option-icon-wrapper     { background: #fff3e0; color: #e65100; }

.page-carrinho .option-content { flex: 1; }

.page-carrinho .option-name {
  font-weight: 700;
  font-size: 16px;
}

.page-carrinho .option-meta {
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-carrinho .option-arrow {
  color: var(--gray-400);
  font-size: 14px;
}

.page-carrinho .min-order-alert {
  background: #fff8e1;
  margin: 20px 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  color: #b76e00;
}