/* ==========================================================================
   TONINHO LANCHES - STYLE SYSTEM (PREMIUM DESIGN)
   ========================================================================== */

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

:root {
  /* Cores Temáticas Rústico-Premium */
  --bg-primary: #120b07;       /* Marrom quase preto ultra profundo */
  --bg-secondary: rgba(30, 19, 12, 0.95);     /* Marrom chocolate escuro translúcido */
  --bg-card: rgba(40, 27, 18, 0.88);          /* Marrom médio elegante translúcido */
  --accent-gold: #e2b13c;      /* Ouro queimado premium */
  --accent-gold-rgb: 226, 177, 60;
  --accent-orange: #f97316;    /* Laranja quente para CTAs */
  --text-primary: #f5efe6;     /* Off-white cremoso */
  --text-secondary: #bca08d;   /* Marrom claro para legendas */
  --success-green: #22c55e;    /* Verde para status Aberto */
  --danger-red: #ef4444;       /* Vermelho para status Fechado e exclusão */
  
  /* Fontes */
  --font-display: 'Outfit', sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  /* Sombras & Efeitos */
  --gold-glow: 0 0 15px rgba(226, 177, 60, 0.25);
  --gold-glow-strong: 0 0 25px rgba(226, 177, 60, 0.5);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset Geral */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-display);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.6) 100%),
    url("wood_bg.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Scrollbar Customizada */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* Layout Geral */
.container {
  max-width: 600px; /* Largura perfeita para celular no desktop */
  margin: 0 auto;
  padding: 0 16px 100px 16px; /* Espaço inferior para o botão do carrinho */
  position: relative;
}

/* Header */
.header {
  text-align: center;
  padding: 30px 20px;
  margin-top: 20px;
  margin-bottom: 25px;
  background: rgba(30, 19, 12, 0.85); /* Vidro chocolate escuro */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  border: 1px solid rgba(226, 177, 60, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  box-shadow: var(--card-shadow), 0 0 30px rgba(0, 0, 0, 0.5);
}

.logo-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
  box-shadow: 0 0 25px rgba(226, 177, 60, 0.6), var(--card-shadow);
  transition: var(--transition);
  animation: logo-glow 3s infinite alternate;
}

@keyframes logo-glow {
  0% {
    box-shadow: 0 0 15px rgba(226, 177, 60, 0.4), var(--card-shadow);
  }
  100% {
    box-shadow: 0 0 35px rgba(249, 115, 22, 0.8), var(--card-shadow);
    transform: scale(1.02);
  }
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg-secondary);
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  margin-top: 5px;
  display: flex;
  flex-direction: column;
}

.brand-title span {
  font-family: var(--font-display);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--accent-gold);
  font-weight: 600;
  margin-top: 4px;
}

/* Status Badge */
.status-row {
  display: flex;
  gap: 10px;
  margin-top: 5px;
  font-size: 0.85rem;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-badge.open .status-dot {
  background-color: var(--success-green);
  box-shadow: 0 0 8px var(--success-green);
}

.status-badge.closed .status-dot {
  background-color: var(--danger-red);
  box-shadow: 0 0 8px var(--danger-red);
}

/* Categorias Navegação Horizontal */
.categories-nav {
  position: sticky;
  top: 10px;
  background: rgba(30, 19, 12, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  padding: 12px 10px;
  margin-bottom: 25px;
  border-radius: 50px;
  border: 1px solid rgba(226, 177, 60, 0.2);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  box-shadow: var(--card-shadow);
}

.categories-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 18px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

.category-btn.active, .category-btn:hover {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: var(--gold-glow);
}

/* Cardápio Grid */
.menu-section {
  margin-bottom: 35px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--accent-gold);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--accent-gold);
  padding-left: 10px;
}

.products-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Card do Produto */
.product-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 15px;
  display: flex;
  gap: 15px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(226, 177, 60, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), var(--gold-glow);
}

.product-img-wrapper {
  width: 90px;
  height: 90px;
  min-width: 90px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-img {
  transform: scale(1.08);
}

.product-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.product-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.product-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.product-price small {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-right: 2px;
}

/* Botão Adicionar */
.btn-add {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
  transition: var(--transition);
}

.btn-add:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(249, 115, 22, 0.5);
}

.btn-add:active {
  transform: scale(0.95);
}

/* Indicador de esgotado */
.product-card.paused {
  opacity: 0.6;
}
.product-card.paused .btn-add {
  background: #4a4a4a;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}
.paused-tag {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);
  background: rgba(18, 11, 7, 0.9);
  color: var(--danger-red);
  font-weight: 800;
  border: 2px solid var(--danger-red);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 1.1rem;
  letter-spacing: 2px;
  pointer-events: none;
}

/* Carrinho Flutuante Inferior */
.cart-floating-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  width: calc(100% - 32px);
  max-width: 568px;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--accent-gold);
  border-radius: 50px;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), var(--gold-glow);
  z-index: 999;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-floating-bar.active {
  transform: translateX(-50%) translateY(0);
}

.cart-float-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cart-icon-wrapper {
  position: relative;
}

.cart-count-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent-orange);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
}

.cart-text-details {
  display: flex;
  flex-direction: column;
}

.cart-float-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.cart-float-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.cart-float-total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-gold);
}

/* Modal do Carrinho / Finalização */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 600px;
  background: var(--bg-secondary);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 2px solid var(--accent-gold);
  padding: 24px 20px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(226, 177, 60, 0.1);
  padding-bottom: 12px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--accent-gold);
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.8rem;
  cursor: pointer;
}

/* Itens no Carrinho */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 12px 16px;
  border-radius: 12px;
}

.cart-item-name {
  font-weight: 600;
  font-size: 1rem;
}

.cart-item-price {
  font-size: 0.9rem;
  color: var(--accent-gold);
  margin-top: 2px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-quantity {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-quantity:hover {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.cart-item-qty {
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* Formulário de Entrega */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  color: white;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(226, 177, 60, 0.15);
}

.delivery-options-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.delivery-btn {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.delivery-btn.active {
  background: rgba(226, 177, 60, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* Resumo Financeiro */
.summary-box {
  background: var(--bg-card);
  padding: 16px;
  border-radius: 12px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px dashed rgba(226, 177, 60, 0.2);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.summary-row.total {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-gold);
}

/* Botão Enviar WhatsApp */
.btn-submit-order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  border: none;
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  transition: var(--transition);
}

.btn-submit-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.btn-submit-order:active {
  transform: translateY(0);
}

/* ==========================================================================
   PAINEL DE ADMINISTRAÇÃO (LOGIN & CRUD)
   ========================================================================== */

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid rgba(226, 177, 60, 0.2);
  margin-bottom: 25px;
}

.admin-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--accent-gold);
}

.admin-login-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid rgba(226, 177, 60, 0.2);
  padding: 30px;
  box-shadow: var(--card-shadow);
  max-width: 400px;
  margin: 80px auto;
  text-align: center;
}

.admin-login-card h2 {
  font-family: var(--font-serif);
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.admin-login-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.btn-admin {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-admin:hover {
  transform: translateY(-1px);
  box-shadow: var(--gold-glow);
}

/* Grid de Administração */
.admin-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}

.admin-product-item {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-bottom: 12px;
  transition: var(--transition);
}

.admin-product-item:hover {
  border-color: rgba(226, 177, 60, 0.15);
}

.admin-prod-details {
  display: flex;
  align-items: center;
  gap: 15px;
}

.admin-prod-img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
}

.admin-prod-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.admin-prod-text p {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.admin-prod-controls {
  display: flex;
  gap: 8px;
}

.btn-admin-action {
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-admin-action.edit {
  background: rgba(226, 177, 60, 0.15);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.btn-admin-action.edit:hover {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.btn-admin-action.pause {
  background: rgba(249, 115, 22, 0.15);
  color: var(--accent-orange);
  border: 1px solid var(--accent-orange);
}

.btn-admin-action.pause.active {
  background: var(--accent-orange);
  color: white;
}

.btn-admin-action.delete {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger-red);
  border: 1px solid var(--danger-red);
}

.btn-admin-action.delete:hover {
  background: var(--danger-red);
  color: white;
}

/* Badge de Categoria */
.category-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hidden {
  display: none !important;
}

/* Alertas de Notificação */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--bg-secondary);
  border: 1px solid var(--accent-gold);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  box-shadow: var(--card-shadow), var(--gold-glow);
  z-index: 10000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.active {
  transform: translateX(-50%) translateY(0);
}
