﻿/* ===== RESET & ROOT ===== */
:root {
    --bg: #070711;
    --bg2: #0d0d1a;
    --glass: rgba(255,255,255,0.04);
    --glass-hover: rgba(255,255,255,0.08);
    --border: rgba(255,255,255,0.07);
    --border-glow: rgba(99,102,241,0.4);
    --text: #f0f0ff;
    --text2: rgba(240,240,255,0.65);
    --text3: rgba(240,240,255,0.4);
    --indigo: #6366f1;
    --violet: #8b5cf6;
    --purple: #a855f7;
    --grad: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
    --grad2: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 32px;
    --tr: 0.25s ease;
    --shadow: 0 8px 40px rgba(0,0,0,0.4);
    --glow: 0 0 40px rgba(99,102,241,0.2);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== ANIMATED BACKGROUND ===== */
.bg-orbs {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    overflow: hidden;
}
.orb {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: 0.35;
    animation: float 8s ease-in-out infinite;
}
.orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #6366f1, transparent 70%);
    top: -200px; left: -100px;
    animation-delay: 0s;
}
.orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    top: 40%; right: -150px;
    animation-delay: -3s;
}
.orb-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #06b6d4, transparent 70%);
    bottom: -100px; left: 30%;
    animation-delay: -6s;
}
@keyframes float {
    0%,100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.bg-grid {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px; margin: 0 auto; padding: 0 24px;
    position: relative; z-index: 1;
}

/* ===== HEADER ===== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 14px 0;
    background: rgba(7,7,17,0.85);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    transition: background var(--tr);
}
.header.scrolled { background: rgba(7,7,17,0.97); }
.header .container { display: flex; align-items: center; gap: 32px; }

.logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 1.4rem; font-weight: 800;
    color: var(--text); text-decoration: none;
    white-space: nowrap; flex-shrink: 0;
}
.logo-icon { font-size: 1.5rem; }
.accent {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex; align-items: center; gap: 4px;
    flex-wrap: nowrap; overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
}
.nav::-webkit-scrollbar { display: none; }
.nav-link {
    color: var(--text2); text-decoration: none;
    font-size: 0.82rem; font-weight: 500;
    padding: 6px 12px; border-radius: var(--r-sm);
    white-space: nowrap;
    transition: color var(--tr), background var(--tr);
}
.nav-link:hover { color: var(--text); background: var(--glass); }

.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 8px; margin-left: auto; flex-shrink: 0;
}
.hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: var(--tr);
}

/* ===== HERO ===== */
.hero {
    padding: 150px 0 60px; text-align: center;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 20px; border-radius: 50px;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.3);
    color: #a5b4fc; font-size: 0.85rem; font-weight: 600;
    margin-bottom: 28px;
}
.badge-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #6366f1;
    animation: ping 1.5s ease-in-out infinite;
}
@keyframes ping {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.4); }
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 900; line-height: 1.1; letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--text);
}
.gradient-text {
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem; color: var(--text2);
    max-width: 580px; margin: 0 auto 40px;
}
.hero-subtitle strong { color: #a5b4fc; font-weight: 600; }

/* Stats */
.hero-stats {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin-bottom: 48px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px 40px;
    display: inline-flex;
}
.stat-item { text-align: center; padding: 0 32px; }
.stat-num {
    display: block; font-size: 2.2rem; font-weight: 900;
    background: var(--grad);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; line-height: 1;
}
.stat-lbl { font-size: 0.78rem; color: var(--text3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }
.stat-divider { width: 1px; height: 40px; background: var(--border); flex-shrink: 0; }

/* Search */
.search-wrap {
    position: relative; max-width: 560px; margin: 0 auto 32px;
}
.search-ic {
    position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
    font-size: 1.1rem; pointer-events: none;
}
.search-input {
    width: 100%; padding: 18px 52px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    color: var(--text); font-size: 1rem; font-family: inherit;
    outline: none; transition: border-color var(--tr), box-shadow var(--tr);
}
.search-input::placeholder { color: var(--text3); }
.search-input:focus {
    border-color: var(--indigo);
    box-shadow: var(--glow);
}
.search-clear {
    position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
    cursor: pointer; color: var(--text3); font-size: 1.1rem;
    transition: color var(--tr);
}
.search-clear:hover { color: var(--text); }

/* Filter Pills */
.filter-pills {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 8px; margin-bottom: 8px;
}
.pill {
    padding: 8px 18px; border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text2); font-size: 0.83rem; font-weight: 500;
    cursor: pointer; transition: all var(--tr);
    font-family: inherit;
}
.pill:hover { border-color: var(--indigo); color: var(--text); background: rgba(99,102,241,0.1); }
.pill.active {
    background: var(--grad); border-color: transparent;
    color: #fff; font-weight: 600;
}

/* ===== MAIN ===== */
.main { padding: 20px 0 100px; }

.results-count {
    text-align: center; color: var(--text3);
    font-size: 0.9rem; margin-bottom: 40px;
    min-height: 22px;
}

/* ===== CATEGORY ===== */
.category { margin-bottom: 80px; }
.category.hidden-cat { display: none; }

.cat-header {
    display: flex; align-items: center; gap: 20px;
    margin-bottom: 28px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.cat-icon-wrap {
    font-size: 2rem; padding: 14px;
    background: rgba(from var(--cat-color) r g b / 0.12);
    border: 1px solid rgba(from var(--cat-color) r g b / 0.25);
    border-radius: var(--r-md); flex-shrink: 0;
    box-shadow: 0 0 20px rgba(from var(--cat-color) r g b / 0.1);
}
/* Fallback for browsers that don't support relative color */
.cat-icon-wrap { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.25); }

.cat-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; }
.cat-desc { color: var(--text3); font-size: 0.9rem; }
.cat-count {
    margin-left: auto; padding: 6px 14px;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 50px;
    color: #a5b4fc; font-size: 0.78rem; font-weight: 600;
    white-space: nowrap; flex-shrink: 0;
}

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

.card {
    display: flex; flex-direction: column;
    padding: 22px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    text-decoration: none; color: inherit;
    transition: all var(--tr);
    position: relative; overflow: hidden;
    cursor: pointer;
}
.card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--grad); opacity: 0;
    transition: opacity var(--tr);
}
.card::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(99,102,241,0.06), transparent 70%);
    opacity: 0; transition: opacity var(--tr);
}
.card:hover {
    background: var(--glass-hover);
    border-color: var(--border-glow);
    transform: translateY(-5px);
    box-shadow: var(--shadow), var(--glow);
}
.card:hover::before { opacity: 1; }
.card:hover::after { opacity: 1; }
.card.hidden { display: none !important; }

.card-emoji {
    font-size: 2rem; margin-bottom: 14px;
    transition: transform var(--tr);
}
.card:hover .card-emoji { transform: scale(1.15); }

.card-title {
    font-size: 1rem; font-weight: 700;
    color: var(--text); margin-bottom: 8px; line-height: 1.3;
}
.card-desc {
    font-size: 0.85rem; color: var(--text2);
    flex-grow: 1; margin-bottom: 16px; line-height: 1.5;
}
.card-tag {
    display: inline-block; padding: 4px 12px;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.2);
    color: #a5b4fc; font-size: 0.72rem; font-weight: 600;
    border-radius: 50px; align-self: flex-start;
}
.card-arrow {
    position: absolute; right: 18px; bottom: 18px;
    color: var(--text3); font-size: 1rem;
    transition: all var(--tr); opacity: 0;
}
.card:hover .card-arrow { opacity: 1; color: #a5b4fc; transform: translateX(3px); }

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center; padding: 80px 20px;
    color: var(--text2);
}
.no-results-icon { font-size: 4rem; margin-bottom: 16px; }
.no-results h3 { font-size: 1.5rem; margin-bottom: 8px; color: var(--text); }
.no-results p { color: var(--text3); }

/* ===== FOOTER ===== */
.footer {
    padding: 60px 0; text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg2);
}
.footer-logo {
    font-size: 1.5rem; font-weight: 800; margin-bottom: 16px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.footer-desc {
    color: var(--text2); margin-bottom: 24px; font-size: 0.95rem;
}
.footer-desc a { color: #a5b4fc; text-decoration: none; }
.footer-desc a:hover { text-decoration: underline; }
.footer-links {
    display: flex; justify-content: center; gap: 24px;
    margin-bottom: 24px; flex-wrap: wrap;
}
.footer-links a {
    color: var(--text3); text-decoration: none; font-size: 0.88rem;
    transition: color var(--tr); padding: 4px 0;
}
.footer-links a:hover { color: #a5b4fc; }
.footer-legal { color: var(--text3); font-size: 0.8rem; }

/* ===== MOBILE MENU ===== */
@media (max-width: 900px) {
    .nav { display: none; position: fixed; top: 65px; left: 0; right: 0; bottom: 0; flex-direction: column; background: rgba(7,7,17,0.98); backdrop-filter: blur(20px); padding: 24px; gap: 8px; z-index: 99; overflow-y: auto; }
    .nav.open { display: flex; }
    .nav-link { font-size: 1.1rem; padding: 14px 16px; border-radius: var(--r-sm); }
    .hamburger { display: flex; }
    .hero-stats { padding: 16px 24px; }
    .stat-item { padding: 0 16px; }
    .stat-num { font-size: 1.8rem; }
    .cards-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .cat-header { flex-wrap: wrap; }
    .cat-count { margin-left: 0; }
}

@media (max-width: 480px) {
    .hero { padding: 120px 0 50px; }
    .hero-stats { display: none; }
    .cards-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 2rem; }
    .filter-pills { gap: 6px; }
    .pill { padding: 7px 14px; font-size: 0.78rem; }
}

/* ===== FADE IN ANIMATION ===== */
.card {
    animation: fadeUp 0.4s ease backwards;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.cards-grid .card:nth-child(1) { animation-delay: 0.03s; }
.cards-grid .card:nth-child(2) { animation-delay: 0.06s; }
.cards-grid .card:nth-child(3) { animation-delay: 0.09s; }
.cards-grid .card:nth-child(4) { animation-delay: 0.12s; }
.cards-grid .card:nth-child(5) { animation-delay: 0.15s; }
.cards-grid .card:nth-child(6) { animation-delay: 0.18s; }
.cards-grid .card:nth-child(7) { animation-delay: 0.21s; }
.cards-grid .card:nth-child(8) { animation-delay: 0.24s; }


/* ===== AMAZON — Botón header ===== */
.amz-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 50px;
    background: rgba(255,153,0,0.1);
    border: 1px solid rgba(255,153,0,0.3);
    text-decoration: none;
    color: #FF9900;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}
.amz-btn:hover {
    background: rgba(255,153,0,0.18);
    border-color: rgba(255,153,0,0.6);
    box-shadow: 0 0 16px rgba(255,153,0,0.2);
}
.amz-btn-logo { width: 52px; height: auto; display: block; }
.amz-btn-label { font-size: 0.75rem; opacity: 0.85; }

/* ===== AMAZON — Card nativa ===== */
.card-amazon {
    border-color: rgba(255,153,0,0.2);
}
.card-amazon:hover {
    border-color: rgba(255,153,0,0.45);
    box-shadow: var(--shadow), 0 0 30px rgba(255,153,0,0.1);
}
.card-amazon::before { background: linear-gradient(90deg, #FF9900, #FFB74D); }
.card-tag-amazon {
    background: rgba(255,153,0,0.12);
    border-color: rgba(255,153,0,0.25);
    color: #FF9900;
}


/* ── Banner sticky superior (debajo del header) ── */
