/* ============================================
   TABLOIDE PÚBLICO - TEMA LARANJA/VERDE
   ============================================ */

:root {
    /* Cores principais */
    --cor-primaria: #FF6B35;
    --cor-primaria-hover: #E55A2B;
    --cor-secundaria: #2E8B57;
    --cor-secundaria-hover: #26734A;
    --cor-terciaria: #FFA500;
    --cor-quaternaria: #3CB371;
    --cor-destaque: #FFD700;
    
    /* Cores neutras */
    --cor-fundo: #F8F9FA;
    --cor-fundo-card: #FFFFFF;
    --cor-fundo-header: #FFFFFF;
    --cor-borda: #E2E8F0;
    --cor-texto: #2D3748;
    --cor-texto-claro: #718096;
    --cor-texto-muito-claro: #A0AEC0;
    --cor-sombra: rgba(0, 0, 0, 0.08);
    
    /* Gradientes */
    --gradiente-primario: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-terciaria) 100%);
    --gradiente-secundario: linear-gradient(135deg, var(--cor-secundaria) 0%, var(--cor-quaternaria) 100%);
    --gradiente-header: linear-gradient(135deg, #FF6B35 0%, #FF8C00 100%);
    
    /* Sombras */
    --sombra-leve: 0 2px 4px var(--cor-sombra);
    --sombra-media: 0 4px 12px var(--cor-sombra);
    --sombra-forte: 0 10px 25px var(--cor-sombra);
    --sombra-foco: 0 0 0 4px rgba(255, 107, 53, 0.2);
    
    /* Bordas */
    --raio-borda: 16px;
    --raio-borda-pequeno: 10px;
    --raio-borda-circular: 50%;
    
    /* Transições */
    --transicao-rapida: all 0.2s ease;
    --transicao-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transicao-lenta: all 0.5s ease;
    
    /* Tipografia */
    --fonte-titulo: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --fonte-texto: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--fonte-texto);
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

/* ========== TIPOGRAFIA ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--fonte-titulo);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* ========== CONTAINERS ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* ========== HEADER ========== */
.header-cliente {
    background: var(--gradiente-header);
    color: white;
    padding: 20px 0 0 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--sombra-media);
}

.header-cliente::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px, 20px 20px;
    opacity: 0.3;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 20px;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: var(--raio-borda);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cor-primaria);
    font-size: 28px;
    box-shadow: var(--sombra-media);
}

.logo h1 {
    font-size: 2rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-admin {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 24px;
    border-radius: var(--raio-borda-pequeno);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transicao-normal);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-admin:hover {
    background: white;
    color: var(--cor-primaria);
    transform: translateY(-2px);
    box-shadow: var(--sombra-forte);
}

/* Banner principal */
.header-banner {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--raio-borda);
    margin: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.banner-text h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.banner-text p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.banner-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cor-destaque);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.banner-graphic {
    display: none;
}

@media (min-width: 768px) {
    .banner-graphic {
        display: block;
        width: 200px;
        height: 200px;
        background: radial-gradient(circle, rgba(255,255,255,0.2) 40%, transparent 41%),
                    radial-gradient(circle, rgba(255,255,255,0.1) 30%, transparent 31%),
                    radial-gradient(circle, rgba(255,255,255,0.1) 20%, transparent 21%);
        border-radius: 50%;
        position: relative;
        animation: rotate 20s linear infinite;
    }
    
    @keyframes rotate {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
}

/* ========== NAVEGAÇÃO ========== */
.category-nav {
    background: white;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--sombra-leve);
}

.category-list {
    display: flex;
    list-style: none;
    overflow-x: auto;
    padding: 15px 0;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--cor-primaria) transparent;
}

.category-list::-webkit-scrollbar {
    height: 6px;
}

.category-list::-webkit-scrollbar-track {
    background: var(--cor-fundo);
}

.category-list::-webkit-scrollbar-thumb {
    background-color: var(--cor-primaria);
    border-radius: 10px;
}

.category-list li {
    flex-shrink: 0;
}

.category-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--cor-fundo);
    border-radius: 30px;
    text-decoration: none;
    color: var(--cor-texto);
    font-weight: 600;
    transition: var(--transicao-normal);
    border: 2px solid transparent;
    white-space: nowrap;
}

.category-list a i {
    color: var(--cor-primaria);
    font-size: 18px;
}

.category-list a:hover {
    background: var(--cor-primaria);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--sombra-media);
}

.category-list a:hover i {
    color: white;
}

.category-list a.active {
    background: var(--gradiente-primario);
    color: white;
    box-shadow: var(--sombra-media);
}

.category-list a.active i {
    color: white;
}

/* ========== SEÇÕES ========== */
.main-content-cliente {
    padding: 40px 0;
}

.section-ofertas {
    margin-bottom: 60px;
    scroll-margin-top: 80px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--cor-primaria);
}

.section-icon {
    width: 70px;
    height: 70px;
    background: var(--gradiente-primario);
    border-radius: var(--raio-borda);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    box-shadow: var(--sombra-media);
}

.section-header h2 {
    font-size: 2rem;
    margin: 0;
    color: var(--cor-texto);
    flex: 1;
}

.count-badge {
    background: var(--gradiente-secundario);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: var(--sombra-media);
}

/* ========== GRID DE PRODUTOS ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: var(--raio-borda);
    overflow: hidden;
    box-shadow: var(--sombra-media);
    transition: var(--transicao-normal);
    position: relative;
    border: 1px solid var(--cor-borda);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--sombra-forte);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradiente-primario);
}

/* Imagem do produto */
.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

/* Badge de desconto */
.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradiente-primario);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: var(--sombra-media);
    z-index: 2;
    animation: pulse 2s infinite;
}

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

/* Badge de urgência */
.urgency-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gradiente-secundario);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

/* Informações do produto */
.product-info {
    padding: 24px;
}

.product-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--cor-secundaria);
    background: rgba(46, 139, 87, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--cor-texto);
    line-height: 1.4;
    min-height: 56px;
}

.product-details {
    font-size: 0.95rem;
    color: var(--cor-texto-claro);
    margin-bottom: 20px;
    line-height: 1.6;
    min-height: 48px;
}

/* Preço */
.product-price {
    margin-bottom: 20px;
}

.old-price {
    display: block;
    text-decoration: line-through;
    color: var(--cor-texto-muito-claro);
    font-size: 1rem;
    margin-bottom: 4px;
}

.new-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-value {
    color: var(--cor-primaria);
    font-size: 1.8rem;
    font-weight: 800;
}

.price-unit {
    color: var(--cor-texto-claro);
    font-size: 1rem;
}

/* Validade */
.product-validity {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: rgba(255, 107, 53, 0.05);
    border-radius: var(--raio-borda-pequeno);
    margin-top: 20px;
    border-left: 4px solid var(--cor-primaria);
}

.validity-icon {
    color: var(--cor-primaria);
    font-size: 20px;
}

.validity-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--cor-texto);
}

.validity-days {
    background: var(--cor-primaria);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Estado sem ofertas */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: var(--raio-borda);
    box-shadow: var(--sombra-media);
}

.empty-icon {
    font-size: 4rem;
    color: var(--cor-borda);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--cor-texto-claro);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--cor-texto-muito-claro);
    max-width: 400px;
    margin: 0 auto;
}

/* ========== FOOTER ========== */
.footer-cliente {
    background: linear-gradient(135deg, #2D3748 0%, #1A202C 100%);
    color: white;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 1.2rem;
}

.footer-section h3 i {
    color: var(--cor-primaria);
}

.footer-section p {
    margin-bottom: 12px;
    opacity: 0.8;
    line-height: 1.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 10px;
    opacity: 0.6;
    font-size: 0.9rem;
}

.admin-credits a {
    color: var(--cor-primaria);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transicao-rapida);
}

.admin-credits a:hover {
    color: white;
    text-decoration: underline;
}

/* ========== BOTÃO VOLTAR AO TOPO ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradiente-primario);
    color: white;
    border: none;
    border-radius: var(--raio-borda-circular);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transicao-normal);
    box-shadow: var(--sombra-media);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-forte);
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
}

@media (max-width: 992px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .banner-stats {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.75rem;
    }
    
    .banner-text h2 {
        font-size: 1.8rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .section-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .category-list {
        gap: 5px;
    }
    
    .category-list a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* ========== ANIMAÇÕES ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease backwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

/* ========== UTILITÁRIOS ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }