/* ======================================== */
/*               VARIÁVEIS GLOBAIS          */
/* ======================================== */
:root {
    /* Sistema de cores baseado no logo */
    --primary: #2d5a3d;
    --primary-light: #3d7c56;
    --primary-dark: #1e3d29;
    
    /* Cores da marca */
    --brand-red: #DC2626;
    --brand-yellow: #F59E0B;
    
    /* Cores neutras */
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    
    /* Cores semânticas */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Outras variáveis */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 2px 8px 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);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --transition-fast: 200ms ease;
    --transition-normal: 300ms ease;
}

/* ======================================== */
/*               ESTILOS BASE               */
/* ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    display: flex; 
    flex-direction: column; 
}

/* ======================================== */
/*           SKELETON LOADING               */
/* ======================================== */
@keyframes skeleton-loading {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 0px, var(--gray-100) 50px, var(--gray-200) 100px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}
.skeleton-text { height: 16px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-text:last-child { width: 80%; }
.skeleton-card { background: var(--white); border-radius: var(--border-radius); padding: 16px 20px; margin-bottom: 8px; box-shadow: var(--shadow); display: flex; justify-content: space-between; align-items: center; }
.skeleton-content { flex: 1; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 8px; border-radius: 4px; }
.skeleton-price { height: 18px; width: 60px; border-radius: 4px; }
.skeleton-button { width: 24px; height: 24px; border-radius: 4px; flex-shrink: 0; }

/* ======================================== */
/*                  HEADER                  */
/* ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: white;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}
.header-line-1 { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.header-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; position: relative; height: 100%; }
#logo-img { height: 50px; width: auto; flex-shrink: 0; }
.language-selector { display: flex; gap: 0.5rem; background: rgba(255, 255, 255, 0.1); padding: 0.25rem; border-radius: 25px; margin-left: 1rem; margin-right: 1rem; justify-content: center; }
.lang-btn { background: transparent; border: 1px solid transparent; color: rgba(255, 255, 255, 0.8); padding: 0.4rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all var(--transition-fast); }
.lang-btn:hover { background: rgba(255, 255, 255, 0.1); }
.lang-btn.active { background: white; color: var(--primary); border-color: white; }
.header-right-actions { display: flex; align-items: center; flex-shrink: 0; }
.list-icon-wrapper { position: relative; cursor: pointer; margin-right: 1rem; }
.list-icon { font-size: 1.5rem; color: white; }
.list-count { position: absolute; top: -8px; right: -8px; background: var(--warning); color: var(--gray-900); font-size: 0.75rem; font-weight: bold; padding: 0.2rem 0.4rem; border-radius: 12px; min-width: 20px; text-align: center; }
.menu-dropdown { position: relative; }
.menu-btn { background: rgba(255, 255, 255, 0.2); border: 2px solid rgba(255, 255, 255, 0.3); color: white; padding: 0.6rem 1.2rem; border-radius: 25px; font-size: 0.9rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; transition: all var(--transition-fast); }
.menu-btn:hover { background: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }
.menu-btn.active { background: var(--white); color: var(--primary); border-color: var(--white); }
.menu-icon { font-size: 1.2rem; }
.dropdown-content { position: absolute; top: 100%; right: 0; margin-top: 0.5rem; background: white; border-radius: var(--border-radius); box-shadow: var(--shadow-lg); min-width: 220px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all var(--transition-fast); z-index: 1001; }
.dropdown-content.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1.2rem; color: var(--gray-900); font-weight: 500; cursor: pointer; transition: all var(--transition-fast); border-bottom: 1px solid var(--gray-100); }
.dropdown-item:first-child { border-radius: var(--border-radius) var(--border-radius) 0 0; }
.dropdown-item:last-child { border-bottom: none; border-radius: 0 0 var(--border-radius) var(--border-radius); }
.dropdown-item:hover { background: var(--gray-50); padding-left: 1.5rem; }
.dropdown-item.active { background: var(--primary); color: white; }

/* ======================================== */
/*              CONTEÚDO PRINCIPAL          */
/* ======================================== */
.main {
    flex: 1; 
    padding: 80px 1rem 4rem 1rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background: var(--gray-50);
    position: relative;
    z-index: 2;
}
.header.scrolled ~ .main { padding-top: 100px; }
.category-section { margin-bottom: 2.5rem; scroll-margin-top: 80px; }
.header.scrolled ~ .main .category-section { scroll-margin-top: 100px; }
.category-header { display: flex; flex-direction: column; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--gray-200); }
.category-header-top-line { display: flex; align-items: center; width: 100%; gap: 0.5rem; margin-bottom: 0.25rem; }
.category-icon { font-size: 1.8rem; }
.category-title { font-size: 1.6rem; font-weight: 700; color: var(--gray-900); }
.category-subtitle { font-size: 0.9rem; color: var(--gray-600); margin-left: auto; font-weight: 500; padding-left: 8px; }
.salad-tag-container { width: 100%; padding-left: calc(1.8rem + 0.5rem); margin-top: 0.1rem; }
.salad-tag { background: var(--gray-100); color: var(--gray-700); padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--gray-300); animation: fadeIn var(--transition-normal); }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.items-grid { display: grid; gap: 0.5rem; }

/* ======================================== */
/*              CARDS DE ITENS              */
/* ======================================== */
.item-card { background: var(--white); border-radius: var(--border-radius); box-shadow: var(--shadow); transition: all var(--transition-fast); position: relative; overflow: hidden; padding: 16px 20px; animation: fadeInUp 0.4s ease forwards; }
.item-card:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.item-main-line { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.item-name { font-weight: 800; font-size: 1.1rem; color: var(--gray-900); flex: 1; margin-right: 1rem; }
.item-price-action { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.item-price { font-weight: 900; font-size: 1.1rem; color: var(--brand-red); font-variant-numeric: tabular-nums; }
.add-btn { background: none; border: none; color: var(--brand-yellow); font-size: 1.4rem; font-weight: 700; cursor: pointer; transition: all var(--transition-fast); padding: 0.25rem; border-radius: 4px; position: relative; min-width: 28px; text-align: center; }
.add-btn:hover { background: var(--brand-yellow); color: var(--gray-900); transform: scale(1.15); border-radius: 50%; }
.add-btn:active { transform: scale(0.95); }
.add-btn.added { background: var(--success); color: white; animation: pulse 0.5s ease; }
.success-check { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: white; opacity: 0; transform: scale(0); }
.success-check.show { animation: checkPop 0.6s ease forwards; }
@keyframes checkPop { 0% { opacity: 0; transform: scale(0) rotate(-180deg); } 50% { opacity: 1; transform: scale(1.2) rotate(10deg); } 100% { opacity: 0; transform: scale(0.8) rotate(0deg); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.item-description { color: var(--gray-600); font-size: 0.85rem; line-height: 1.4; margin-left: 0; padding-right: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.item-card.has-image { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.item-image { width: 80px; height: 80px; border-radius: var(--border-radius-sm); object-fit: cover; background: var(--gray-100); flex-shrink: 0; }
.category-section[data-category="especiais"] .item-image { width: 96px; height: 96px; }
.item-content { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.has-image .item-main-line { margin-bottom: 0.25rem; }
.has-image .item-description { padding-right: 0; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ======================================== */
/*                  FOOTER                  */
/* ======================================== */
.footer {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--primary);
    color: white;
    position: relative; 
    z-index: 1;
    margin-top: auto; 
}
.footer-content { max-width: 600px; margin: 0 auto; }
.footer h3 { font-size: 1.5rem; margin-bottom: 1rem; color: white; }
.footer p { margin-bottom: 0.5rem; opacity: 0.9; }

/* ======================================== */
/*                  MODAIS                  */
/* ======================================== */

/* --- Base para todos os overlays de modais --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* --- Estilos específicos para o Modal de Lista --- */
.list-modal {
    justify-content: center;
    align-items: center;
}
.list-modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform var(--transition-normal);
}
.list-modal.show .list-modal-content {
    transform: translateY(0);
}
.list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid var(--gray-200); }
.list-title { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }
.close-list { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--gray-600); transition: color var(--transition-fast); }
.close-list:hover { color: var(--gray-900); }
.list-items { margin-bottom: 1.5rem; }
.list-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem; margin-bottom: 0.5rem; background: var(--gray-50); border-radius: var(--border-radius); border: 1px solid var(--gray-200); }
.list-item-info { flex: 1; }
.list-item-name { font-weight: 600; margin-bottom: 0.25rem; color: var(--gray-900); }
.list-item-details { font-size: 0.75rem; color: var(--gray-600); line-height: 1.3; }
.list-item-controls { display: flex; align-items: center; gap: 1rem; }
.quantity-controls { display: flex; align-items: center; gap: 0.5rem; }
.quantity-btn { background: var(--primary); color: white; border: none; width: 28px; height: 28px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition-fast); }
.quantity-btn:hover { background: var(--primary-light); }
.quantity { font-weight: 600; min-width: 30px; text-align: center; color: var(--gray-900); }
.list-item-price { font-weight: 700; color: var(--brand-red); font-size: 1.1rem; }
.list-empty { text-align: center; padding: 3rem; color: var(--gray-600); }
.list-total { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: var(--gray-100); border-radius: var(--border-radius); margin-bottom: 1.5rem; }
.list-total-label { font-size: 1.2rem; font-weight: 700; color: var(--gray-900); }
.list-total-value { font-size: 1.5rem; font-weight: 900; color: var(--brand-red); }
.list-actions { display: flex; gap: 1rem; }
.list-action-btn { flex: 1; padding: 0.8rem 1.5rem; border: none; border-radius: 25px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); }
.btn-secondary { background: transparent; color: var(--gray-700); border: 2px solid var(--gray-300); }
.btn-secondary:hover { border-color: var(--gray-400); background: var(--gray-50); }
.list-observations { margin-bottom: 1.5rem; padding: 1rem; background: var(--gray-50); border-radius: var(--border-radius); border: 1px solid var(--gray-200); }
.observations-label { display: block; font-weight: 600; color: var(--gray-900); margin-bottom: 0.5rem; font-size: 0.9rem; }
.observations-input { width: 100%; padding: 0.75rem; border: 2px solid var(--gray-300); border-radius: var(--border-radius-sm); font-family: inherit; font-size: 0.9rem; line-height: 1.4; resize: none; transition: border-color var(--transition-fast); background: var(--white); box-sizing: border-box; text-align: left; vertical-align: top; text-indent: 0 !important; padding-left: 0.75rem !important; margin: 0; outline: none; }
.observations-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1); }
.observations-input::placeholder { color: var(--gray-500); font-size: 0.85rem; }

/* --- Estilos específicos para os Modais de Personalização --- */
.customization-modal {
    justify-content: center;
    align-items: flex-start;
    padding-top: 8vh;
    z-index: 2100;
}
.customization-modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 6px 16px 12px 16px;
    width: 90%;
    max-width: 380px;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100vh);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-lg);
}
.customization-modal.show .customization-modal-content {
    transform: translateY(0);
}
.modal-handle { width: 36px; height: 4px; background: var(--gray-300); border-radius: 2px; margin: 6px auto 12px auto; }
.modal-product-title { font-size: 1.32rem; font-weight: 700; color: var(--gray-900); margin-bottom: 10px; text-align: center; }
.customization-section { margin-bottom: 10px; }
.customization-label { font-size: 0.96rem; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; display: block; }
.size-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.size-option { padding: 8px; border: 2px solid var(--gray-200); border-radius: 8px; background: white; cursor: pointer; transition: all var(--transition-fast); text-align: center; min-height: 40px; display: flex; flex-direction: column; justify-content: center; }
.size-option.selected { border-color: var(--primary); background: #f0fdf4; }
.size-option .size { font-size: 1.2rem; font-weight: 600; color: var(--gray-900); }
.size-option .price { font-size: 1.02rem; color: var(--brand-red); font-weight: 700; margin-top: 1px; }
.sugar-options { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.sugar-option { padding: 8px 6px; border: 1px solid var(--gray-200); border-radius: 6px; background: white; cursor: pointer; font-size: 0.96rem; transition: all var(--transition-fast); text-align: center; min-height: 38px; display: flex; align-items: center; justify-content: center; }
.sugar-option.selected { border-color: var(--primary); background: #f0fdf4; font-weight: 600; }
.ice-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ice-option { padding: 8px; border: 2px solid var(--gray-200); border-radius: 6px; background: white; cursor: pointer; font-size: 1.08rem; font-weight: 500; transition: all var(--transition-fast); text-align: center; min-height: 38px; display: flex; align-items: center; justify-content: center; }
.ice-option.selected { border-color: var(--primary); background: #f0fdf4; }
.observations-textarea { width: 100%; padding: 12px; border: 2px solid var(--gray-200); border-radius: 10px; font-size: 15px; resize: none; font-family: inherit; background: var(--gray-50); height: 70px; transition: all var(--transition-fast); }
.observations-textarea:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1); }
.char-counter { font-size: 11px; color: var(--gray-600); text-align: right; margin-top: 4px; }
.confirm-button { width: 100%; padding: 10px; background: var(--primary); color: white; border: none; border-radius: 8px; font-size: 1.2rem; font-weight: 600; cursor: pointer; margin-top: 8px; transition: all var(--transition-fast); min-height: 40px; }
.confirm-button:active { transform: scale(0.98); }
.confirm-button:disabled { background: var(--gray-400); cursor: not-allowed; }
.confirm-button:hover:not(:disabled) { background: var(--primary-light); }
.customization-modal-content::-webkit-scrollbar { width: 4px; }
.customization-modal-content::-webkit-scrollbar-track { background: transparent; }
.customization-modal-content::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }

/* --- Estilos específicos para o Modal de Introdução --- */
.intro-modal { z-index: 2200; justify-content: center; align-items: center; }
.intro-modal.hidden { opacity: 0; visibility: hidden; }
.intro-modal-content { background: white; border-radius: var(--border-radius-lg); padding: 2rem; max-width: 400px; width: 90%; text-align: center; transform: scale(1); transition: transform var(--transition-normal); }
.intro-modal.hidden .intro-modal-content { transform: scale(0.9); }
.intro-logo { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 1.5rem auto; display: block; }
.intro-title { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin-bottom: 1.5rem; }
.intro-steps { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.intro-step { display: flex; align-items: center; gap: 1rem; text-align: left; }
.step-number { width: 32px; height: 32px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.step-text { font-size: 1rem; color: var(--gray-700); }
.intro-btn { background: var(--primary); color: white; border: none; padding: 0.8rem 2rem; border-radius: 25px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); width: 100%; }
.intro-btn:hover { background: var(--primary-light); transform: translateY(-2px); }

/* ======================================== */
/*            COMPONENTES DIVERSOS          */
/* ======================================== */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
    z-index: 999;
    display: none; 
    align-items: center; 
    justify-content: center; 
}
.fab:hover {
    background: var(--primary-light);
    transform: scale(1.1);
}
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gray-900);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 2001;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}
.hidden { display: none !important; }

/* ======================================== */
/*                MEDIA QUERIES             */
/* ======================================== */
@media (max-width: 767px) {
    .main { padding-top: 120px; }
    .category-section { scroll-margin-top: 120px; }
}
@media (min-width: 768px) {
    .items-grid { grid-template-columns: repeat(2, 1fr); }
    .language-selector { margin-left: 2rem; margin-right: 2rem; }
}
@media (min-width: 1024px) {
    .items-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}
@media (max-height: 640px) {
    .customization-modal { padding-top: 4vh; }
    .customization-modal-content { max-height: 92vh; padding: 4px 16px 8px 16px; }
    .modal-product-title { font-size: 1.2rem; margin-bottom: 8px; }
    .customization-section { margin-bottom: 8px; }
    .customization-label { font-size: 0.9rem; margin-bottom: 3px; }
    .size-option { padding: 6px; min-height: 36px; }
    .size-option .size { font-size: 1.08rem; }
    .size-option .price { font-size: 0.96rem; }
    .sugar-option { padding: 6px 4px; min-height: 34px; font-size: 0.9rem; }
    .ice-option { padding: 6px; min-height: 34px; font-size: 0.96rem; }
    .confirm-button { padding: 8px; font-size: 1.08rem; min-height: 36px; margin-top: 6px; }
}