/* ==========================================
   SHOPPING BY NIGHT - Estilos Globales
   ========================================== */

:root {
    --primary: #4f46e5;
    --primary-light: #eef2ff;
    --accent: #f43f5e;
    --accent-light: #fff1f2;
    --bg: #ffffff;
    --bg-secondary: #f9fafb;
    --text: #4b5563;
    --text-light: #9ca3af;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --white: #ffffff;
    --gray-light: #f3f4f6;
    --gray: #e5e7eb;
    --gray-dark: #d1d5db;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.06);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s ease;
    --font: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   HEADER
   ========================================== */

.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray);
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    gap: 1rem;
}

.logo {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo-img {
    height: 74px;
    width: auto;
    max-width: 300px;
    display: block;
}

@media (max-width: 768px) {
    .logo-img {
        height: 56px;
        max-width: 220px;
    }
    
    .header {
        padding: 0.5rem 1rem;
    }
    
    .header-inner {
        min-height: 60px;
    }
}

.logo span {
    color: var(--accent);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav a:hover {
    color: var(--accent);
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gray-light);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    position: relative;
}

.lang-selector select {
    background: transparent;
    border: none;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
    outline: none;
}

.lang-selector select option {
    background: var(--white);
    color: var(--text);
}

/* ==========================================
   HERO
   ========================================== */

.hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--white) 100%);
    color: var(--primary);
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--gray-light);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.03) 0%, transparent 60%);
    animation: pulse 4s ease-in-out infinite;
}

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

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto 3rem;
    background: var(--white);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    font-family: var(--font);
    outline: none;
    color: var(--text);
}

.search-box button {
    padding: 1rem 2rem;
    background: var(--accent);
    color: var(--white);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
    font-size: 1rem;
}

.search-box button:hover {
    background: #d63050;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ==========================================
   CATEGORÍAS
   ========================================== */

.categories {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: #666;
    font-size: 1.1rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.9rem;
    color: #777;
    line-height: 1.4;
}

/* ==========================================
   CÓDIGOS
   ========================================== */

.codes-section {
    padding: 4rem 2rem;
    background: var(--white);
}

.codes-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.codes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.codes-header h2 {
    font-size: 1.75rem;
    color: var(--primary);
}

.codes-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.6rem 1rem;
    border: 1px solid var(--gray);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    background: var(--white);
    color: var(--text);
    cursor: pointer;
    outline: none;
}

.filter-select:focus {
    border-color: var(--accent);
}

.codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.code-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--gray);
    transition: var(--transition);
    position: relative;
}

.code-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.code-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--success-light);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.code-store {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.3rem;
}

.code-discount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.code-description {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.code-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 1rem;
}

.code-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.code-actions {
    display: flex;
    gap: 0.8rem;
}

.btn {
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: #d63050;
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
}

.btn-copy {
    background: var(--primary);
    color: var(--white);
}

.btn-copy:hover {
    background: #2d2d44;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: var(--white);
    color: var(--text);
    padding: 4rem 2rem 2rem;
    margin-top: auto;
    border-top: 1px solid var(--gray-light);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-col h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.footer-col p {
    opacity: 0.8;
    line-height: 1.7;
    font-size: 0.95rem;
    color: var(--text);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--gray-light);
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    opacity: 0.8;
}

/* ==========================================
   CMP (Cookie Banner)
   ========================================== */

.cmp-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 2rem;
    z-index: 9999;
    display: none;
    animation: slideUp 0.4s ease;
}

.cmp-banner.active {
    display: block;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cmp-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cmp-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.cmp-text p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.cmp-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.cmp-actions .btn {
    white-space: nowrap;
}

/* ==========================================
   PÁGINAS LEGALES
   ========================================== */

.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.legal-page h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.legal-page h2 {
    font-size: 1.3rem;
    color: var(--primary);
    margin: 2rem 0 1rem;
}

.legal-page p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text);
}

.legal-page ul {
    margin: 1rem 0 1.5rem 1.5rem;
    line-height: 1.8;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .search-box {
        flex-direction: column;
        border-radius: var(--radius);
    }

    .search-box button {
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .codes-grid {
        grid-template-columns: 1fr;
    }

    .cmp-inner {
        flex-direction: column;
        text-align: center;
    }

    .codes-header {
        flex-direction: column;
    }
}

/* ==========================================
   UTILIDADES
   ========================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

.affiliate-notice {
    background: rgba(233, 69, 96, 0.08);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.9rem;
    color: #666;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 3rem;
    color: #888;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin-left: 0.5rem;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    z-index: 10001;
    animation: fadeInRight 0.3s ease;
    font-weight: 500;
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}