/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
}

/* Container principal */
.container-principal {
    max-width: 100vw;
    margin: 0 auto;
    padding: 0;
    background: #fff;
    min-height: 100vh;
}

/* Header fixo */
.header-fixo {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    padding: 15px 20px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-header {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.carrinho-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.carrinho-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Conteúdo principal */
.main-content {
    margin-top: 80px;
    padding: 20px 15px;
}

/* Título principal */
.titulo-principal {
    text-align: center;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Categorias */
.categoria {
    margin-bottom: 40px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    background: white;
}

.categoria-header {
    padding: 20px;
    text-align: center;
    color: white;
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.categoria-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.categoria:hover .categoria-header::before {
    left: 100%;
}

.categoria.salgados .categoria-header {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.categoria.doces .categoria-header {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
}

.categoria.cento .categoria-header {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.categoria.combos .categoria-header {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.categoria.bebidas .categoria-header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* Grid de produtos */
.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* Card do produto */
.produto-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.produto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.produto-imagem {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.produto-card:hover .produto-imagem {
    transform: scale(1.05);
}

.produto-info {
    padding: 20px;
}

.produto-nome {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
}

.produto-detalhes {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
}

.produto-preco {
    font-size: 20px;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 15px;
}

/* Controles de quantidade */
.quantidade-controles {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.quantidade-input {
    width: 60px;
    height: 40px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
}

.quantidade-input:focus {
    outline: none;
    border-color: #25d366;
}

.btn-adicionar {
    flex: 1;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-adicionar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-adicionar:hover::before {
    left: 100%;
}

.btn-adicionar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

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

/* Contador no produto */
.produto-contador {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(255, 71, 87, 0.4);
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Mensagens de erro */
.erro-mensagem {
    background: #ff4757;
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 10px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Botão ir para carrinho */
.btn-carrinho-fixo {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.btn-carrinho-fixo:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

/* Responsividade para telas muito pequenas */
@media (max-width: 360px) {
    .produtos-grid {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 15px;
    }
    
    .produto-info {
        padding: 15px;
    }
    
    .titulo-principal {
        font-size: 24px;
    }
    
    .categoria-header {
        font-size: 18px;
        padding: 15px;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Melhorias de acessibilidade */
.btn-adicionar:focus,
.carrinho-btn:focus,
.quantidade-input:focus {
    outline: 2px solid #25d366;
    outline-offset: 2px;
}

/* Animação de entrada */
.produto-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.produto-card:nth-child(1) { animation-delay: 0.1s; }
.produto-card:nth-child(2) { animation-delay: 0.2s; }
.produto-card:nth-child(3) { animation-delay: 0.3s; }
.produto-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

