/* ============================================
   FUSION KEYS — Catálogo de Licencias
   Floating Header + Armonizado con fusiondigitalperu
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
    --bg: #f4f6fb;
    --bg-hero: #0a0f1e;
    --card: #ffffff;
    --card-hover: #fafbff;
    --text: #101828;
    --text-light: #ffffff;
    --muted: #5d6b82;
    --muted-light: #8b97ad;
    --border: #e4e8f0;
    --border-hover: #c8cfe0;
    --soft: #eef1f8;
    --primary: #3366ff;
    --primary-dark: #2451d4;
    --primary-light: rgba(51, 102, 255, 0.10);
    --purple: #6c3cff;
    --purple-light: rgba(108, 60, 255, 0.08);
    --green: #22c55e;
    --green-dark: #16a34a;
    --green-light: rgba(34, 197, 94, 0.10);
    --amber: #f59e0b;
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.05);
    --shadow: 0 4px 16px rgba(16, 24, 40, 0.07);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.10);
    --shadow-glow: 0 0 24px rgba(51, 102, 255, 0.12);
    --shadow-card: 0 2px 8px rgba(16, 24, 40, 0.04);
    --shadow-card-hover: 0 12px 28px rgba(51, 102, 255, 0.12), 0 4px 10px rgba(16, 24, 40, 0.06);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --radius-pill: 50px;
    --radius-float: 22px;
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --max-width: 1220px;
    --nav-bg: rgba(255, 255, 255, 0.96);
}

body.dark-mode {
    --bg: #0f172a;
    --bg-hero: #020617;
    --card: #1e293b;
    --card-hover: #334155;
    --text: #f8fafc;
    --text-light: #ffffff;
    --muted: #94a3b8;
    --muted-light: #64748b;
    --border: #334155;
    --border-hover: #475569;
    --soft: #1e293b;
    --primary-light: rgba(51, 102, 255, 0.20);
    --purple-light: rgba(108, 60, 255, 0.20);
    --green-light: rgba(34, 197, 94, 0.20);
    --nav-bg: rgba(15, 23, 42, 0.92);
}

body.dark-mode .brand-logo-img {
    background: #ffffff;
    border-radius: 8px;
    padding: 2px 8px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(37,99,235,.10), transparent 30%),
        radial-gradient(circle at 90% 0%, rgba(91,44,255,.08), transparent 30%),
        radial-gradient(circle at 50% 100%, rgba(121,214,47,.09), transparent 28%),
        var(--bg);
    min-height: 100vh;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
button, input { font: inherit; }

/* =============================================
   STICKY HEADER (full-width)
   ============================================= */
.header-spacer {
    display: none;
}

#main-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-float {
    background: var(--nav-bg);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
}

/* ── Top Row: Logo + Search + Actions ── */
.header-top {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 16px 24px;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-self: start;
}

.brand-logo-img {
    height: 65px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* ── Header Search ── */
.header-search-desktop {
    width: 100%;
    min-width: 400px;
    max-width: 650px;
    position: relative;
    justify-self: center;
}

.search-icon-hd {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 15px;
    pointer-events: none;
}

.search-input-hd {
    width: 100%;
    background: var(--soft);
    border: 1.5px solid var(--border);
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    padding: 13px 20px 13px 46px;
    border-radius: var(--radius-pill);
    outline: none;
    transition: var(--transition);
}

.search-input-hd::placeholder {
    color: var(--muted);
}

.search-input-hd:focus {
    background: var(--card);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ── Header Nav (actions) ── */
.header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
    transition: var(--transition);
    white-space: nowrap;
}

.download-center-link {
    background: rgba(37, 99, 235, 0.08); /* Fondo azul súper sutil */
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--primary) !important;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    font-weight: 750;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: none;
}

body.dark-mode .download-center-link {
    background: rgba(144, 175, 248, 0.1);
    border-color: rgba(144, 175, 248, 0.2);
    color: #90aff8 !important;
}

.download-center-link:hover {
    background: var(--primary);
    color: #fff !important;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Currency Toggle */
.currency-toggle {
    position: relative;
    display: flex;
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 3px;
    gap: 2px;
}

.currency-btn {
    position: relative;
    z-index: 2;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    padding: 7px 12px;
    cursor: pointer;
    border-radius: 7px;
    transition: color var(--transition);
    white-space: nowrap;
}

.currency-btn.active {
    color: var(--text);
}

.currency-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    height: calc(100% - 6px);
    width: calc(50% - 4px);
    background: var(--card);
    border-radius: 7px;
    transition: transform var(--transition);
    z-index: 1;
    box-shadow: var(--shadow-sm);
}

.currency-toggle[data-active="USD"] .currency-slider {
    transform: translateX(calc(100% + 2px));
}

/* Cart & Icon Buttons */
.cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text);
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.cart-btn:hover {
    background: var(--soft);
    border-color: var(--border);
}

.cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--nav-bg);
}

/* ── Separator between rows ── */
.header-categories::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ── Bottom Row: Category Chips ── */
.header-categories {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}

.header-categories::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    background: var(--soft);
    border: 1px solid transparent;
    color: var(--muted);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.filter-chip i {
    font-size: 11px;
}

.filter-chip:hover {
    background: var(--card);
    border-color: var(--border);
    color: var(--text);
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}

/* Hamburger */
.hamburger {
    display: none;
    border: 0;
    background: var(--soft);
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 18px;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    justify-self: end;
}

.hamburger:hover {
    background: var(--card);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--border);
    gap: 10px;
    flex-direction: column;
}

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

.mobile-search {
    position: relative;
}

.mobile-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 13px;
}

.mobile-search-input {
    width: 100%;
    background: var(--soft);
    border: 1px solid transparent;
    color: var(--text);
    font-size: 14px;
    padding: 12px 14px 12px 38px;
    border-radius: var(--radius-pill);
    outline: none;
    transition: var(--transition);
}

.mobile-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 14px;
    justify-content: center;
}

.mobile-currency {
    display: flex;
    gap: 8px;
}

.mobile-currency .currency-btn {
    flex: 1;
    padding: 10px;
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 13px;
}

.mobile-currency .currency-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* =============================================
   HERO SECTION
   ============================================= */
#hero {
    background: var(--bg-hero);
    padding: 32px 20px;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 20% 30%, rgba(37,99,235,.15), transparent),
        radial-gradient(ellipse 50% 40% at 80% 60%, rgba(91,44,255,.10), transparent),
        radial-gradient(ellipse 40% 30% at 60% 90%, rgba(121,214,47,.08), transparent);
    pointer-events: none;
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.hero-text-content {
    flex: 1 1 400px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(121,214,47,.15);
    border: 1px solid rgba(121,214,47,.25);
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    margin-bottom: 20px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: .6; }
    50% { transform: scale(1.6); opacity: 0; }
}

.hero-title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-light);
    margin-bottom: 12px;
}

.hero-gradient {
    background: linear-gradient(135deg, var(--primary), var(--purple), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    color: var(--muted-light);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    max-width: 500px;
    margin-bottom: 0;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 16px 24px;
    width: fit-content;
    backdrop-filter: blur(8px);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-number {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.12);
}

/* =============================================
   CATALOG
   ============================================= */
#main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 36px 20px 48px;
}

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

.catalog-header h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* =============================================
   DOWNLOAD BANNER
   ============================================= */
#download-banner {
    max-width: var(--max-width);
    margin: -20px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.banner-inner {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: var(--shadow-lg);
}

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

.banner-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-light), var(--purple-light));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.banner-text h3 {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.banner-text p {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.banner-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    font-weight: 750;
    font-size: 13px;
    border-radius: 14px;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(37,99,235,.2);
}

.banner-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37,99,235,.3);
}



.product-count {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Product Card (Detailed Style) */
.product-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-bounce), box-shadow var(--transition), border-color var(--transition);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.4s ease both;
    box-shadow: var(--shadow-card);
}

.product-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

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

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
}

.product-badge.available { background: rgba(10, 15, 30, 0.6); backdrop-filter: blur(8px); }
.product-badge.available .badge-dot { background: var(--green); box-shadow: 0 0 8px var(--green); }

.product-badge.bestseller { background: rgba(239, 68, 68, 0.9); }
.product-badge.bestseller .badge-icon { font-size: 12px; }

.product-badge.offer { background: rgba(108, 60, 255, 0.9); }
.product-badge.offer .badge-icon { font-size: 12px; }

.product-badge.recommended { background: rgba(245, 158, 11, 0.9); color: #000; border: none; }
.product-badge.recommended .badge-icon { font-size: 12px; color: #000; }

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Skeletons */
#skeletonGrid .product-card {
    height: 380px;
    background: var(--card);
}
.skeleton-img { width: 100%; height: 180px; background: var(--border); border-radius: 12px; margin-bottom: 16px; animation: pulse 1.5s infinite ease-in-out; }
.skeleton-text { display: flex; flex-direction: column; gap: 8px; }
.skeleton-line { background: var(--border); height: 14px; border-radius: 4px; animation: pulse 1.5s infinite ease-in-out; }
.skeleton-line.title { height: 24px; width: 80%; }
.skeleton-line.subtitle { width: 60%; margin-bottom: auto; }
.skeleton-features { display: flex; gap: 12px; }
.skeleton-features .skeleton-line { height: 40px; width: 100%; }
.skeleton-btn { height: 48px; background: var(--border); border-radius: 12px; margin-top: auto; animation: pulse 1.5s infinite ease-in-out; }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.product-image {
    width: 100%;
    height: 180px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-body {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: var(--card);
}

.product-category {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0ea5e9;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.product-category i { font-size: 14px; }

.product-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Features Grid */
.product-features {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}
.feature:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: var(--border);
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--soft);
    color: var(--primary);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.feature-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

/* Prices */
.product-prices {
    display: flex;
    margin-bottom: 20px;
    align-items: center;
}

.price-col {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.price-col:first-child {
    border-right: 1px solid var(--border);
}

.price-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price-old {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: line-through;
    position: absolute;
    top: -14px;
    left: 0;
    white-space: nowrap;
}

.price-value { font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; margin-top: 4px; }
.price-value.pen { color: var(--primary); }
.price-value.usd { color: var(--green-dark); }

/* Add Button & Trust Badge */
.add-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0;
}
.add-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.no-results i { font-size: 40px; margin-bottom: 16px; opacity: .3; display: block; }

/* =============================================
   ACTIVATION INFO
   ============================================= */
#activation-info {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px 48px;
}

.info-inner h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.info-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}

.info-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.info-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 12px;
}

.info-icon.phone { background: #fef3c7; color: #d97706; }
.info-icon.online { background: var(--primary-light); color: var(--primary); }
.info-icon.invite { background: var(--purple-light); color: var(--purple); }
.info-icon.vpn { background: var(--green-light); color: var(--green-dark); }

.info-card h4 { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.info-card p { font-size: 13px; color: var(--muted); line-height: 1.5; font-weight: 500; }

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.6);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-float);
    max-width: 480px;
    width: 100%;
    position: relative;
    transform: translateY(16px) scale(0.97);
    transition: transform var(--transition);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-overlay.active .modal { transform: translateY(0) scale(1); }

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,.9);
    border: 1px solid var(--border);
    color: var(--muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 5;
}

.modal-close:hover { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

.modal-hero-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    overflow: hidden;
}

.modal-hero-image img { width: 100%; height: 100%; object-fit: cover; }

.modal-body { padding: 24px 32px 32px; background: var(--card); }

.modal-category {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.modal-category i { font-size: 14px; }

.modal-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.3;
}

.modal-description {
    font-size: 14px;
    color: var(--text);
    line-height: 1.7;
    font-weight: 600;
    margin-bottom: 24px;
    background: var(--soft);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.desc-link {
    color: var(--primary);
    text-decoration: underline;
    word-break: break-all;
}

.modal-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.modal-feature-box {
    background: var(--soft);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-feature-icon {
    color: var(--primary);
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.modal-feature-text { display: flex; flex-direction: column; }
.modal-feature-title { font-size: 10px; font-weight: 800; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; }
.modal-feature-value { font-size: 13px; font-weight: 700; color: #111827; }

.modal-feature-box:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.modal-price-row {
    margin-bottom: 24px;
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 0;
    display: flex;
    align-items: center;
}

.modal-price {
    display: flex;
    width: 100%;
}

.modal-price-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.modal-price-col:first-child {
    border-right: 1px solid var(--border);
}

.modal-price-old {
    font-size: 13px;
    color: var(--muted);
    text-decoration: line-through;
    font-weight: 600;
}

.modal-price-current {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.03em;
}
.modal-price-current.pen { color: var(--primary); }
.modal-price-current.usd { color: var(--green-dark); }

.modal-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: var(--purple);
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 750;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-add-btn:hover {
    background: #5a26e6; /* darker purple */
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(91,44,255,.3);
}

/* =============================================
   CART DRAWER
   ============================================= */
.cart-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.5);
    backdrop-filter: blur(6px);
    z-index: 300;
    opacity: 0; visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.active { opacity: 1; visibility: visible; }

.cart-drawer {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: min(400px, 90vw);
    background: var(--card);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--transition);
    box-shadow: -8px 0 40px rgba(15,23,42,.15);
}

.cart-overlay.active .cart-drawer { transform: translateX(0); }

.cart-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 20px; border-bottom: 1px solid var(--border);
}

.cart-header h3 {
    font-size: 16px; font-weight: 800;
    display: flex; align-items: center; gap: 8px;
}

.cart-close {
    background: var(--soft); border: 1px solid var(--border);
    color: var(--muted); width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 16px; cursor: pointer;
    transition: var(--transition);
}

.cart-close:hover { background: var(--card); color: var(--text); }

.cart-items { flex: 1; overflow-y: auto; padding: 12px 20px; }

.cart-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--border);
}

.cart-item-icon {
    width: 40px; height: 40px; border-radius: var(--radius-xs);
    overflow: hidden; flex-shrink: 0; background: var(--soft);
    display: flex; align-items: center; justify-content: center;
}

.cart-item-icon img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
    font-size: 13px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.cart-item-price { font-size: 12px; color: var(--primary); font-weight: 700; }

.cart-item-qty { display: flex; align-items: center; gap: 8px; }

.qty-btn {
    background: var(--soft); border: 1px solid var(--border);
    color: var(--muted); width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; font-size: 14px; cursor: pointer;
    transition: var(--transition); font-weight: 700;
}

.qty-btn:hover { background: var(--primary-light); color: var(--primary); }

.qty-value { font-size: 13px; font-weight: 700; min-width: 18px; text-align: center; }

.cart-empty {
    text-align: center; padding: 40px 20px;
    color: var(--muted); font-size: 14px; font-weight: 500;
}

.cart-footer { padding: 18px 20px; border-top: 1px solid var(--border); }

/* ── Checkout Form ── */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--border);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group select {
    background: var(--soft);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 8px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input::placeholder {
    color: var(--muted);
}

.form-group input:focus,
.form-group select:focus {
    background: var(--card);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.cart-total {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px; font-size: 16px; font-weight: 800;
}

.cart-total span:last-child { color: var(--primary); font-size: 20px; }

.whatsapp-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; width: 100%; background: #25d366;
    color: #fff; font-size: 14px; font-weight: 750;
    padding: 14px; border-radius: 14px; transition: var(--transition);
}

.whatsapp-btn:hover {
    background: #1da851;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37,211,102,.3);
}

/* =============================================
   TOAST
   ============================================= */
.toast {
    position: fixed; bottom: 30px; left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--card); border: 1px solid var(--primary);
    color: var(--text); font-size: 13px; font-weight: 700;
    padding: 12px 20px; border-radius: 14px;
    display: flex; align-items: center; gap: 8px;
    z-index: 400; opacity: 0; transition: all var(--transition);
    box-shadow: 0 8px 24px rgba(37,99,235,.15);
}

.toast i { color: var(--primary); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =============================================
   FAQ SECTION
   ============================================= */
.faq-title {
    font-size: 24px;
    font-weight: 850;
    margin-bottom: 24px;
    color: var(--text);
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 18px 24px;
    background: var(--soft);
    border: none;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--border);
}

.faq-question i {
    transition: transform var(--transition);
    color: var(--muted);
}

.faq-item.active .faq-question {
    background: var(--border);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--card);
}

.faq-answer p, .faq-answer ul {
    padding: 20px 24px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.faq-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-bullets li {
    position: relative;
    padding-left: 16px;
}
.faq-bullets li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* =============================================
   FOOTER
   ============================================= */
#main-footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 48px 20px 24px;
    color: var(--muted);
    font-size: 14px;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 400px;
}

.footer-brand-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-brand-header p {
    margin: 0;
    line-height: 1.4;
}

.footer-logo {
    height: 60px;
    flex-shrink: 0;
}
body.dark-mode .footer-logo {
    background: #ffffff;
    border-radius: 8px;
    padding: 4px 12px;
}



.footer-links-group {
    display: flex;
    flex-direction: column;
}

.footer-heading {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-payments {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 32px;
}

.payment-local {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--soft);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    letter-spacing: 0.05em;
    color: var(--muted);
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

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

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card:nth-child(1) { animation-delay: 0.02s; }
.product-card:nth-child(2) { animation-delay: 0.05s; }
.product-card:nth-child(3) { animation-delay: 0.08s; }
.product-card:nth-child(4) { animation-delay: 0.11s; }
.product-card:nth-child(5) { animation-delay: 0.14s; }
.product-card:nth-child(6) { animation-delay: 0.17s; }
.product-card:nth-child(7) { animation-delay: 0.20s; }
.product-card:nth-child(8) { animation-delay: 0.23s; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .header-top {
        display: flex;
        justify-content: space-between;
        padding: 10px 16px;
    }
    .header-search-desktop { display: none; }
    .header-nav { display: none; }
    .hamburger { display: block; }

    .header-categories { padding: 0 14px 10px; gap: 4px; justify-content: flex-start; }
    .filter-chip { font-size: 11px; padding: 5px 10px; }

    .hero-title { font-size: 26px; }
    .hero-desc { font-size: 14px; }

    .hero-stats { gap: 16px; padding: 14px 20px; }
    .stat-number { font-size: 18px; }

    #main-content { padding: 24px 14px 36px; }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .product-image { height: 160px; }
    
    /* Make features more compact on mobile */
    .product-features {
        padding-bottom: 16px;
        margin-bottom: 16px;
    }
    .feature-icon {
        width: 44px; height: 44px; font-size: 18px;
    }
    .feature-title { font-size: 12px; }
    .feature-desc { font-size: 11px; }
    
    .price-value { font-size: 20px; }
    .price-icon { width: 36px; height: 36px; font-size: 16px; }

    .info-grid { grid-template-columns: 1fr 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
    .nav-link-text { display: none; }

    .catalog-header h2 { font-size: 18px; }

    /* Mobile Drawer Modal (Bottom Sheet) */
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .modal {
        border-radius: 24px 24px 0 0;
        margin-top: auto;
        transform: translateY(100%);
        border: none;
        max-width: 100%;
        max-height: 90vh;
        overflow-y: auto;
    }
    .modal-overlay.active .modal {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    .info-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 10px; padding: 10px 14px; }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-brand-header {
        justify-content: center;
    }
    .footer-payments {
        justify-content: center;
    }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
