/**
 * Cupom da Hora - CSS Principal
 */

/* =====================================================
   RESET E VARIÁVEIS
   ===================================================== */
:root {
    --primary: #673DE6;
    --primary-dark: #5025D1;
    --secondary: #FF6B35;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text: #1a1a2e;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --bg: #f8fafc;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px rgba(103, 61, 230, 0.15);
    --radius: 8px;
    --radius-lg: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* =====================================================
   UTILITÁRIOS
   ===================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
}

.btn-secondary:hover {
    background: #e55a2b;
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

/* =====================================================
   HEADER
   ===================================================== */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    border-bottom: 1px solid var(--border);
}

.header-container {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
}

.logo-text .text-primary { color: var(--primary); }
.logo-text .text-secondary { color: var(--secondary); }
.logo-text .text-dark { color: var(--primary-dark); }

/* Search */
.search-container {
    flex: 1;
    max-width: 500px;
    display: flex;
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.search-btn {
    padding: 12px 16px;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Navigation */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(103, 61, 230, 0.05);
}

.btn-login {
    padding: 8px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-login:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-cadastro {
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cadastro:hover {
    background: var(--primary-dark);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    padding: 8px;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

.menu-mobile {
    display: none;
    padding: 16px 20px;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
}

.menu-mobile.active {
    display: block;
}

.menu-mobile a {
    display: block;
    padding: 12px 0;
    color: var(--text);
    font-size: 15px;
    border-bottom: 1px solid var(--border);
}

.menu-mobile a:last-child {
    border-bottom: none;
}

/* Categorias Bar */
.categorias-bar {
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.categorias-bar::-webkit-scrollbar {
    display: none;
}

.categorias-scroll {
    display: flex;
    gap: 8px;
}

.categoria-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg);
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text);
}

.categoria-chip:hover,
.categoria-chip.active {
    background: var(--primary);
    color: #fff;
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
    background: linear-gradient(135deg, #f0e6ff 0%, #fff 50%, #ffe8e0 100%);
    padding: 60px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-white);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-title .highlight {
    color: var(--secondary);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.hero-stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.hero-stat-label {
    font-size: 14px;
    color: var(--text-light);
}

.hero-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    transform: rotate(-3deg);
    max-width: 300px;
    margin-left: auto;
}

.hero-card-header {
    font-size: 12px;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 8px;
}

.hero-card-loja {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-card-desconto {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

.hero-card-codigo {
    background: var(--bg);
    padding: 10px 20px;
    border-radius: var(--radius);
    font-family: monospace;
    font-weight: 600;
    letter-spacing: 2px;
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section {
    padding: 60px 0;
}

.section-alt {
    padding: 60px 0;
    background: var(--bg-white);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.section-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

/* =====================================================
   CUPONS
   ===================================================== */
.cupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.cupom-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.cupom-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.cupom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cupom-loja {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cupom-loja-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    object-fit: contain;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.cupom-loja-nome {
    font-weight: 600;
    color: var(--text);
}

.cupom-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.cupom-badge-exclusivo {
    background: var(--primary);
    color: #fff;
}

.cupom-badge-verificado {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.cupom-desconto {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--success);
    margin-bottom: 8px;
}

.cupom-titulo {
    font-weight: 600;
    margin-bottom: 4px;
}

.cupom-descricao {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.cupom-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 12px;
}

.cupom-verificado {
    color: var(--success);
    font-weight: 500;
}

.cupom-usos {
    color: var(--text-muted);
}

.cupom-btn {
    width: 100%;
    padding: 14px;
    border: 2px dashed var(--primary);
    background: rgba(103, 61, 230, 0.05);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.cupom-btn:hover {
    background: rgba(103, 61, 230, 0.1);
}

.cupom-btn.copiado {
    background: var(--success);
    border-color: var(--success);
    justify-content: center;
    color: #fff;
}

.cupom-codigo {
    font-family: monospace;
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    letter-spacing: 1px;
}

.cupom-btn-texto {
    background: var(--primary);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

.cupom-sem-codigo {
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}

.cupom-expira {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 12px;
}

.cupom-expira.urgente {
    color: var(--danger);
    font-weight: 500;
}

/* =====================================================
   LOJAS
   ===================================================== */
.lojas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.loja-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    border: 2px solid transparent;
}

.loja-card:hover {
    background: var(--bg-white);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.loja-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    border-radius: var(--radius);
    object-fit: contain;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.loja-nome {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
}

.loja-info {
    font-size: 12px;
}

.loja-cupons {
    color: var(--text-light);
}

.loja-cashback {
    display: block;
    color: var(--success);
    font-weight: 600;
    margin-top: 4px;
}

/* =====================================================
   CATEGORIAS GRID
   ===================================================== */
.categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.categoria-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-white);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    border: 2px solid var(--border);
    transition: all 0.2s;
}

.categoria-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.categoria-icone {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.categoria-info {
    flex: 1;
}

.categoria-nome {
    font-weight: 700;
    font-size: 16px;
}

.categoria-qtd {
    font-size: 13px;
    color: var(--text-light);
}

.categoria-seta {
    font-size: 20px;
    color: var(--text-muted);
}

/* =====================================================
   COMO FUNCIONA
   ===================================================== */
.passos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.passo {
    text-align: center;
    position: relative;
}

.passo-numero {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.passo-icone {
    font-size: 48px;
    margin-bottom: 16px;
    margin-top: 20px;
}

.passo-titulo {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.passo-descricao {
    font-size: 14px;
    color: var(--text-light);
}

/* =====================================================
   NEWSLETTER
   ===================================================== */
.newsletter {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 60px 20px;
    text-align: center;
}

.newsletter-content {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-titulo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.newsletter-descricao {
    color: rgba(255,255,255,0.9);
    margin-bottom: 24px;
}

.newsletter-form {
    display: flex;
    gap: 8px;
}

.newsletter-input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
}

.newsletter-btn {
    padding: 14px 24px;
    background: var(--secondary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.newsletter-btn:hover {
    background: #e55a2b;
}

.newsletter-aviso {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-top: 16px;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: var(--text);
    color: #fff;
    padding: 60px 0 30px;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.footer-logo-icon {
    font-size: 24px;
}

.footer-logo-text {
    font-weight: 800;
    font-size: 1.2rem;
}

.footer-desc {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    font-size: 20px;
    text-decoration: none;
}

.footer-col-titulo {
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #fff;
}

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

.footer-disclaimer {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 8px;
}

/* =====================================================
   PÁGINA DE LOJA
   ===================================================== */
.loja-header {
    background: var(--bg-white);
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}

.loja-header-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.loja-header-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    object-fit: contain;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.loja-header-info h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.loja-header-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.loja-header-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.loja-header-cashback {
    color: var(--success);
    font-weight: 600;
}

/* =====================================================
   PÁGINA DE BUSCA
   ===================================================== */
.busca-header {
    background: var(--bg-white);
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}

.busca-form {
    max-width: 600px;
    margin: 0 auto;
}

.busca-input-grande {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    outline: none;
    transition: border-color 0.2s;
}

.busca-input-grande:focus {
    border-color: var(--primary);
}

.busca-resultados {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-light);
}

/* =====================================================
   ALERTAS
   ===================================================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #065f46;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* =====================================================
   BREADCRUMB
   ===================================================== */
.breadcrumb {
    padding: 16px 0;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    margin: 0 8px;
}

/* =====================================================
   PAGINAÇÃO
   ===================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s;
}

.pagination a {
    background: var(--bg-white);
    color: var(--text);
    border: 1px solid var(--border);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: #fff;
    border: none;
}

/* =====================================================
   ESTADO VAZIO
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.empty-state-desc {
    color: var(--text-light);
    margin-bottom: 24px;
}

/* =====================================================
   RESPONSIVO
   ===================================================== */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-card {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .hero-stat-number {
        font-size: 1.4rem;
    }
    
    .section,
    .section-alt {
        padding: 40px 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .cupons-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .loja-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .loja-header-meta {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .search-container {
        display: none;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .lojas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
