/* ========== DESIGN SYSTEM & VARIABLES ========== */
:root {
    /* ===== GicoPlay · Midnight Teal ===== */
    --primary: #00F5FD;            /* cyan eléctrico de marca */
    --primary-gradient: linear-gradient(135deg, #00F5FD, #00B4D8);
    --primary-dark: #00C2D9;
    --secondary: #00B4D8;          /* teal de apoyo (reemplaza el morado) */
    --accent: #FFC857;             /* dorado sutil para destacar ofertas */
    --bg-dark: #07181F;            /* fondo base teal-noche (NO negro) */
    --bg-deep: #04121A;
    --bg-card: #0E2330;            /* tarjetas */
    --bg-header: rgba(7, 24, 31, 0.72);
    --bg-gradient:
        radial-gradient(1200px 620px at 12% -8%, rgba(0,245,253,0.10), transparent 60%),
        radial-gradient(1000px 700px at 112% 8%, rgba(0,180,216,0.10), transparent 55%),
        linear-gradient(165deg, #07181F 0%, #0B2A3A 55%, #07181F 100%);
    --text-main: #EAF6F8;
    --text-muted: #8FB3BD;
    --border: rgba(0, 245, 253, 0.10);
    --success: #00e676;
    --warning: #FFB300;
    --danger: #ff5252;
    --white: #ffffff;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    --glow: 0 0 24px rgba(0, 245, 253, 0.35);
    --glass: rgba(0, 245, 253, 0.03);
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --radius: 20px;
}


/* ========== LIGHT THEME OVERRIDES (Frost) ========== */
[data-theme="light"] {
    --bg-dark: #EAF4F6;
    --bg-card: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.82);
    --bg-gradient:
        radial-gradient(1000px 560px at 12% -8%, rgba(0,245,253,0.14), transparent 60%),
        linear-gradient(165deg, #F2FAFB 0%, #DCEEF2 100%);
    --text-main: #0A2630;
    --text-muted: #5A7884;
    --border: rgba(10, 38, 48, 0.08);
    --white: #0A2630;
    --shadow: 0 10px 25px -5px rgba(8, 38, 48, 0.10), 0 8px 10px -6px rgba(8, 38, 48, 0.06);
    --glow: 0 0 22px rgba(0, 180, 216, 0.25);
    --glass: rgba(0, 180, 216, 0.04);
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    background-color: var(--bg-dark);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    transition: var(--transition);
}

/* ========== HEADER (Mercado Libre Style) ========== */
.header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    padding: 10px 0;
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 30px;
    height: 60px;
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 2px;
    letter-spacing: -1.5px;
    position: relative;
    padding-right: 15px;
}

.logo-emblem {
    height: 40px;
    width: auto;
    margin-right: 9px;
    filter: drop-shadow(0 0 10px rgba(0, 245, 253, 0.45));
    transition: var(--transition);
}
.logo:hover .logo-emblem {
    filter: drop-shadow(0 0 16px rgba(0, 245, 253, 0.75));
    transform: translateY(-1px) scale(1.03);
}

.logo-net {
    color: var(--white);
    font-style: italic;
}

.logo-salen {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    margin-left: 2px;
    box-shadow: 0 0 15px var(--primary);
    animation: pulse 2s infinite;
}

.logo:hover .logo-dot {
    background: var(--white);
    box-shadow: 0 0 20px var(--white);
}

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

.cart-bump {
    animation: cart-bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cart-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

.search-container {
    flex: 1;
    position: relative;
    max-width: 600px;
}

.search-container input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 12px 20px;
    padding-right: 50px;
    border-radius: 8px;
    color: var(--white);
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.sync-indicator {
    position: absolute;
    right: -75px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--bg-card);
    border-radius: 6px;
    border: 1px solid var(--border);
    opacity: 0.8;
    transition: var(--transition);
}

.sync-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}

.sync-indicator.syncing .sync-dot {
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
    animation: pulse 0.5s infinite;
}

.sync-text {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.sync-indicator.syncing .sync-text {
    color: var(--primary);
}

@media (max-width: 992px) {
    .sync-indicator {
        display: none;
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary);
}

/* ── Region Picker ───────────────────────────────────────────── */
.region-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 6px 11px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.region-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

#region-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 230px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.35);
    padding: 6px;
    z-index: 900;
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
#region-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.region-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background .12s;
}
.region-option:hover { background: var(--bg-dark); }
.region-option.active { background: rgba(0,212,255,0.07); }

.region-option-flag { font-size: 1.15rem; line-height: 1; }
.region-option-info { display: flex; flex-direction: column; flex: 1; }
.region-option-name { color: var(--text-main); font-size: 0.82rem; font-weight: 700; }
.region-option-meta { color: var(--text-muted); font-size: 0.7rem; margin-top: 1px; }

/* Mantener compatibilidad con código antiguo sin mostrar el selector oculto */
.currency-selector, .rate-indicator { display: none !important; }

.theme-toggle {
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.cart-btn {
    position: relative;
    font-size: 1.4rem;
    color: var(--white);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary);
    color: var(--bg-dark);
    font-size: 0.7rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== SECONDARY NAV (Categories) ========== */
.nav-sub {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-top: 5px;
    padding-bottom: 5px;
}

.category-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.category-link:hover {
    color: var(--white);
}

/* ========== HERO BANNER ========== */
/* ========== HERO BANNER (PREMIUM RE-DESIGN) ========== */
.hero-carousel {
    margin: 30px 0;
    min-height: 400px;
    background: radial-gradient(circle at 70% 30%, #0F3447 0%, #07181F 100%);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0;
    border: 1px solid var(--border);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.hero-slide-content {
    width: 100%;
    height: 100%;
}

.hero-creative-container {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0 80px;
    position: relative;
    z-index: 10;
}

.hero-text-side {
    max-width: 550px;
    z-index: 5;
    animation: fadeInUp 0.8s ease-out;
}

.animated-badge {
    background: var(--primary-gradient);
    color: var(--bg-dark);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    animation: badgePulse 2s infinite;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #a5a5a5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.btn-hero-primary {
    background: #fff;
    color: #000;
    padding: 16px 35px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(255,255,255,0.1);
}

.btn-hero-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255,255,255,0.2);
    background: var(--primary);
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--success);
    font-weight: 600;
}

.hero-visual-side {
    position: relative;
    width: 480px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cinematic Visual Container */
.cinema-visual {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
}

/* TV / Main Screen */
.main-screen {
    position: relative;
    width: 320px;
    height: 200px;
    z-index: 5;
    transform: rotateY(-15deg) rotateX(5deg);
    transition: var(--transition);
}

.screen-glow {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--primary);
    filter: blur(60px);
    opacity: 0.3;
    animation: screenGlow 4s infinite alternate;
}

.screen-bezel {
    background: #1a1a20;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), inset 0 0 20px rgba(255,255,255,0.05);
    height: 100%;
}

.screen-inner {
    background: #000;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stream-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff5252;
    color: white;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
    animation: blink 1s infinite;
}

.play-orbit {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    border: 1px solid rgba(0, 212, 255, 0.3);
    animation: orbitPlay 3s infinite ease-in-out;
}

.screen-stand {
    width: 100px;
    height: 15px;
    background: #111;
    margin: 0 auto;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

/* Poster Stack */
.poster-stack {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 140px;
    height: 200px;
    z-index: 4;
}

.poster-card {
    position: absolute;
    width: 120px;
    height: 160px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 5px 10px 20px rgba(0,0,0,0.5);
    transition: var(--transition);
}

.poster-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.poster-title {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.poster-card.p1 { transform: rotate(-10deg) translate(-20px, -10px); z-index: 1; }
.poster-card.p2 { transform: rotate(5deg) translate(0, 10px); z-index: 2; border-color: var(--primary); }
.poster-card.p3 { transform: rotate(15deg) translate(20px, -5px); z-index: 3; }

/* Cinema Props */
.cinema-props {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ── Reseller Auth Styles ──────────────────────────────────── */
.auth-btn-header {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 212, 255, 0.05));
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    margin-right: 10px;
}

.auth-btn-header:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

.auth-btn-header i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .auth-btn-text {
        display: none;
    }
    .auth-btn-header {
        padding: 8px;
        border-radius: 50%;
    }
}

.auth-modal {
    max-width: 400px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 24px !important;
    padding: 40px !important;
    position: relative;
    overflow: hidden;
}

.auth-modal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 15px;
}

.auth-header h2 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-group {
    margin-bottom: 20px;
}

.auth-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s;
}

.auth-group input:focus {
    border-color: var(--primary);
    background: rgba(0, 212, 255, 0.05);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.1);
}

.auth-submit-btn {
    width: 100%;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.auth-error {
    background: rgba(255, 82, 82, 0.1);
    color: #ff5252;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 20px;
    border: 1px solid rgba(255, 82, 82, 0.2);
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.close-modal-btn:hover {
    color: var(--text-main);
}

.cinema-props i {
    position: absolute;
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.4;
    filter: blur(0.5px);
}

.prop-1 { top: 10%; right: 5%; animation: float 5s infinite; }
.prop-2 { bottom: 15%; right: 15%; animation: float 4s infinite 1s; font-size: 1.5rem !important; }
.prop-3 { bottom: 5%; left: 10%; animation: float 6s infinite reverse; }

/* Animations Overrides/Additions */
@keyframes screenGlow {
    from { opacity: 0.2; filter: blur(40px); }
    to { opacity: 0.4; filter: blur(70px); }
}

@keyframes blink {
    50% { opacity: 0.4; }
}

@keyframes orbitPlay {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(0,212,255,0); }
    50% { transform: scale(1.1); box-shadow: 0 0 20px rgba(0,212,255,0.3); }
}

/* Decorative Shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: rgba(0, 212, 255, 0.15);
    top: -100px;
    right: -50px;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: rgba(155, 89, 182, 0.15);
    bottom: -50px;
    left: 20%;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: rgba(0, 230, 118, 0.1);
    top: 40%;
    left: -75px;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes badgePulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(0, 212, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}

@keyframes float {
    0% { transform: translateY(0) perspective(1000px) rotateY(-20deg) rotateX(10deg); }
    50% { transform: translateY(-20px) perspective(1000px) rotateY(-15deg) rotateX(5deg); }
    100% { transform: translateY(0) perspective(1000px) rotateY(-20deg) rotateX(10deg); }
}

@media (max-width: 1200px) {
    .hero-creative-container { padding: 0 40px; }
    .hero-title { font-size: 2.8rem; }
}

@media (max-width: 992px) {
    .hero-visual-side { display: none; }
    .hero-text-side { max-width: 100%; text-align: center; }
    .hero-actions { justify-content: center; flex-direction: column; }
    .hero-carousel { min-height: 350px; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    .hero-desc { font-size: 1rem; }
}


/* ========== MAIN CONTENT LAYOUT ========== */
.store-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 24px;
    margin-top: 30px;
    padding-bottom: 80px;
}

/* (Filtros eliminados) */

/* ========== PRODUCT GRID ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.card-img {
    height: 200px;
    background: linear-gradient(160deg, #0F3040, #0B2430);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
    position: relative;
    overflow: hidden;
}

.card-img img {
    width: 75%;
    height: 75%;
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

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

.card-img i {
    transition: var(--transition);
}

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

.region-badge {
    display: none; /* Removed from design by request */
}

.badge-co {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    color: #000;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.3);
}

.badge-global {
    background: linear-gradient(135deg, #00F5FD, #00B4D8);
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}



.card-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 5px;
}


.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
}

.card-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 5px;
}

.card-installments {
    font-size: 0.8rem;
    color: var(--success);
    margin-bottom: 12px;
}

.card-shipping {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 600;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-add-cart {
    margin-top: 15px;
    background: var(--primary-gradient);
    color: #fff;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-add-cart:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
    filter: brightness(1.1);
}

.btn-add-cart:active {
    transform: scale(0.98);
}

/* ========== CART SIDEBAR (estático, dentro del store-layout) ========== */
.cart-sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 14px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
    box-shadow: none;
}

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

.cart-header h3 {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.cart-item-img {
    width: 40px;
    height: 40px;
    background: #25252b;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

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

.cart-item-title {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 3px;
    line-height: 1.25;
}

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

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

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.btn-checkout {
    width: 100%;
    background: var(--primary);
    color: var(--bg-dark);
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1050;
    display: none;
}

.overlay.active {
    display: block;
}

/* ========== MOBILE CART BAR + BOTTOM SHEET ========== */
.mobile-cart-bar { display: none; }
@media (max-width: 992px) {
    /* Barra inferior fija visible solo en móvil/tablet */
    .mobile-cart-bar {
        display: flex;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        z-index: 1090;
        background: linear-gradient(135deg, var(--primary), #0055ff);
        color: #0a0a0f;
        border-radius: 14px;
        padding: 10px 14px;
        align-items: center;
        gap: 10px;
        font-weight: 800;
        box-shadow: 0 10px 28px rgba(0,212,255,0.35), 0 2px 6px rgba(0,0,0,0.4);
        cursor: pointer;
        transform: translateY(0);
        transition: transform .25s ease, opacity .25s ease;
    }
    .mobile-cart-bar.hidden { transform: translateY(150%); opacity: 0; pointer-events: none; }

    .mobile-cart-bar .mcb-icon-wrap {
        position: relative;
        width: 36px; height: 36px;
        background: rgba(0,0,0,0.18);
        border-radius: 10px;
        display: flex; align-items: center; justify-content: center;
        font-size: 1rem;
        flex-shrink: 0;
    }
    .mobile-cart-bar .mcb-badge {
        position: absolute;
        top: -5px; right: -5px;
        background: #ff4757;
        color: #fff;
        font-size: 0.65rem;
        min-width: 18px; height: 18px;
        border-radius: 9px;
        display: flex; align-items: center; justify-content: center;
        padding: 0 5px;
        font-weight: 800;
        border: 2px solid var(--primary);
    }
    .mobile-cart-bar .mcb-info { display: flex; flex-direction: column; line-height: 1.1; }
    .mobile-cart-bar .mcb-label { font-size: 0.65rem; opacity: 0.75; letter-spacing: 1px; text-transform: uppercase; }
    .mobile-cart-bar .mcb-total { font-size: 1rem; font-weight: 900; }
    .mobile-cart-bar .mcb-cta {
        margin-left: auto;
        display: flex; align-items: center; gap: 6px;
        font-size: 0.82rem;
        background: rgba(0,0,0,0.15);
        padding: 6px 10px;
        border-radius: 10px;
    }

    /* En móvil, el cart-sidebar pasa a ser bottom-sheet deslizable */
    .cart-sidebar {
        position: fixed !important;
        left: 0; right: 0; bottom: 0;
        top: auto !important;
        margin: 0;
        width: 100%;
        max-height: 78vh;
        background: var(--bg-card);
        border: none;
        border-top: 1px solid var(--border);
        border-radius: 18px 18px 0 0;
        padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
        z-index: 1100;
        transform: translateY(100%);
        transition: transform .3s cubic-bezier(0.4,0,0.2,1);
        box-shadow: 0 -14px 40px rgba(0,0,0,0.55);
    }
    .cart-sidebar.open { transform: translateY(0); }
    /* Drag handle */
    .cart-sidebar::before {
        content: '';
        display: block;
        width: 40px; height: 4px;
        background: rgba(255,255,255,0.18);
        border-radius: 999px;
        margin: 0 auto 10px;
    }
    /* Mostrar el botón de cerrar (X) en el header del bottom sheet en móvil */
    .cart-header #cart-close-mobile { display: inline-flex !important; }

    /* Overlay oscuro al abrir el bottom sheet */
    .overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 1095;
        display: none;
    }
    .overlay.active { display: block !important; }
}
/* En desktop, ocultar el botón cerrar móvil */
.cart-header #cart-close-mobile { display: none; }

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .store-layout {
        grid-template-columns: 1fr;
    }
    .nav-main {
        gap: 15px;
    }
    .logo {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-link.hide-mobile, .nav-sub {
        display: none;
    }
    .hero-carousel {
        height: 200px;
        padding: 0 20px;
    }
    .hero-slide-content h2 {
        font-size: 1.5rem;
    }
    /* (Cart en móvil ahora es bottom sheet; la regla anterior queda anulada por el bloque MOBILE CART BAR) */
}

/* ========== TOAST NOTIFICATION ========== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: var(--bg-dark);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
    z-index: 2000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.active {
    transform: translateX(-50%) translateY(0);
}

.toast i {
    font-size: 1.2rem;
}

/* PAYMENT ANIMATIONS */
.payment-option { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 15px 10px; background: var(--bg-dark); border: 2px solid var(--border); border-radius: 14px; cursor: pointer; text-align: center; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; }
.payment-option img { height: 22px; margin-bottom: 8px; filter: grayscale(100%); opacity: 0.6; transition: all 0.3s ease; }
.payment-option .method-info { display: flex; align-items: center; gap: 8px; }
.payment-option .method-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 700; letter-spacing: 0.5px; }
.payment-option[data-method="binance"].active { background: rgba(243, 186, 47, 0.05); border-color: #F3BA2F; box-shadow: 0 0 15px rgba(243, 186, 47, 0.15); }
.payment-option[data-method="binance"].active img { filter: grayscale(0%); opacity: 1; transform: scale(1.1); }
.payment-option[data-method="binance"].active .method-label { color: #F3BA2F; }
.payment-option[data-method="wompi"].active { background: rgba(255, 60, 80, 0.05); border-color: #ff3c50; box-shadow: 0 0 15px rgba(255, 60, 80, 0.15); }
.payment-option[data-method="wompi"].active img { filter: grayscale(0%); opacity: 1; transform: scale(1.1); }
.payment-option[data-method="wompi"].active .method-label { color: #ff3c50; }

.payment-option[data-method="paypal"].active { background: rgba(0, 112, 186, 0.06); border-color: #0070ba; box-shadow: 0 0 15px rgba(0, 112, 186, 0.18); }
.payment-option[data-method="paypal"].active img { filter: grayscale(0%); opacity: 1; transform: scale(1.1); }
.payment-option[data-method="paypal"].active .method-label { color: #0099e6; }
.payment-option[data-method="paypal"].active .method-icon-anim i { color: #0099e6; animation: none; }
.method-icon-anim i { font-size: 1rem; color: var(--text-muted); transition: all 0.3s ease; }
.payment-option.active .method-icon-anim i { color: #F3BA2F; animation: rotateGlobe 3s linear infinite; }
@keyframes rotateGlobe { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.flag-anim { width: 18px; height: 18px; display: none; }
.payment-option.active .flag-anim { display: block; }
.flag-circle { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); animation: flagPulse 2s ease-in-out infinite; }
.flag-yellow { flex: 2; background: #FCD116; }
.flag-blue { flex: 1; background: #003893; }
.flag-red { flex: 1; background: #CE1126; }
@keyframes flagPulse { 0% { transform: scale(1); box-shadow: 0 0 5px rgba(255, 255, 255, 0.2); } 50% { transform: scale(1.15); box-shadow: 0 0 15px rgba(252, 209, 22, 0.5); } 100% { transform: scale(1); box-shadow: 0 0 5px rgba(255, 255, 255, 0.2); } }

/* ========== STOCK TAGS & STATUS ========== */
.stock-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 800;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(12px);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.in-stock {
    background: rgba(0, 230, 118, 0.9); /* Más opaco para mejor visibilidad */
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}

.low-stock {
    background: rgba(255, 152, 0, 0.95); /* Naranja vibrante */
    color: #fff;
    box-shadow: 0 0 25px rgba(255, 152, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.3);
}

.out-of-stock {
    background: rgba(255, 50, 50, 0.9);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 50, 50, 0.4);
}

@keyframes pulse-intense {
    0% { transform: scale(1); box-shadow: 0 0 10px rgba(255, 152, 0, 0.5); }
    50% { transform: scale(1.08); box-shadow: 0 0 30px rgba(255, 152, 0, 0.8); }
    100% { transform: scale(1); box-shadow: 0 0 10px rgba(255, 152, 0, 0.5); }
}

.pulse {
    animation: pulse-intense 1.5s infinite ease-in-out;
}

.btn-disabled {
    background: #333 !important;
    color: #666 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.7;
}

.btn-disabled:hover {
    transform: none !important;
    filter: none !important;
}
/* ========== WHATSAPP FLOATING BUTTON ========== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.6);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    background: #1e293b;
    color: #fff;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid #1e293b;
}

.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #25d366;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.7;
    animation: whatsapp-ping 2s infinite;
}

@keyframes whatsapp-ping {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 28px;
    }
    .whatsapp-tooltip {
        display: none; /* Hide tooltip on mobile to avoid blocking */
    }
}

/* ========== NEW PRODUCT TOAST ========== */
.toast-new-product {
    bottom: 100px;
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--primary);
    padding: 15px 25px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 20px rgba(0, 212, 255, 0.2);
    min-width: 300px;
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 2000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-new-product.active {
    transform: translateX(-50%) translateY(0);
}

/* ========== CARD ACTIONS (SIDE BY SIDE) ========== */
.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.qty-selector {
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 10px;
    height: 42px; /* Coincide con el botón */
    overflow: hidden;
    flex-shrink: 0;
}

.qty-btn {
    width: 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.qty-input {
    width: 35px;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--white);
    font-weight: 800;
    font-size: 1rem;
    text-align: center;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Redefinir el botón para que sea flexible */
.btn-add-cart {
    margin-top: 0 !important;
    flex: 1;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.cart-item-qty {
    font-size: 0.75rem;
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
    padding: 4px 10px;
    border-radius: 30px;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.qty-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    filter: grayscale(1);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.qty-limit-reached {
    animation: shake 0.3s ease-in-out;
    border-color: #ff3232 !important;
    box-shadow: 0 0 15px rgba(255, 50, 50, 0.3);
}

/* ============================================================
   ============== MOBILE RESPONSIVE OPTIMIZATIONS ==============
   ============================================================ */

/* iOS safe area + evitar zoom al enfocar inputs */
@supports (padding: env(safe-area-inset-top)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* ───────── Tablet y móvil grande (≤ 992px) ─────────────────── */
@media (max-width: 992px) {
    .container { width: 96%; }
    .hero-carousel { min-height: 320px; }
    .hero-title { font-size: 2.6rem; }
}

/* ───────── Móvil estándar (≤ 768px) ────────────────────────── */
@media (max-width: 768px) {
    /* Inputs: 16px previene auto-zoom en iOS Safari */
    input, select, textarea { font-size: 16px !important; }

    .container { width: 100%; padding: 0 14px; }

    /* — HEADER: dos filas (logo+acciones, búsqueda) — */
    .header { padding: 8px 0; }
    .nav-main {
        flex-wrap: wrap;
        gap: 10px;
        height: auto;
        padding: 6px 0;
        row-gap: 8px;
    }
    .logo {
        font-size: 1.55rem;
        padding-right: 8px;
        order: 1;
    }
    .nav-actions {
        order: 2;
        margin-left: auto;
        gap: 8px;
    }
    .search-container {
        order: 3;
        flex: 1 1 100%;
        max-width: 100%;
    }
    .search-container input {
        padding: 10px 16px;
        padding-right: 42px;
        font-size: 16px;
    }
    /* Botones del header más compactos */
    .region-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
        gap: 3px;
    }
    #region-rate-label { display: none; }
    .theme-toggle {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    .auth-btn-header {
        padding: 7px 10px;
        margin-right: 0;
        min-width: 38px;
        min-height: 38px;
        justify-content: center;
    }
    /* Badge de saldo e historial: visibles pero compactos */
    #reseller-balance-btn {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
    }
    #reseller-history-btn {
        padding: 6px 9px !important;
        font-size: 0.75rem !important;
    }
    #reseller-history-btn i { font-size: 0.85rem; }
    .cart-btn { font-size: 1.3rem; }
    .cart-count {
        width: 17px;
        height: 17px;
        font-size: 0.65rem;
        top: -7px;
        right: -8px;
    }

    /* — HERO — */
    .hero-carousel {
        min-height: 280px;
        height: auto;
        margin: 18px 0;
        padding: 30px 0;
        border-radius: 18px;
    }
    .hero-creative-container { padding: 0 22px; }
    .hero-title { font-size: 1.9rem; margin-bottom: 14px; }
    .hero-desc { font-size: 0.92rem; margin-bottom: 22px; }
    .hero-actions { gap: 14px; }
    .btn-hero-primary {
        padding: 13px 24px;
        font-size: 0.92rem;
        width: 100%;
        justify-content: center;
    }
    .animated-badge {
        font-size: 0.72rem;
        padding: 5px 12px;
        margin-bottom: 14px;
    }

    /* — LAYOUT TIENDA — */
    .store-layout {
        gap: 18px;
        margin-top: 18px;
        padding-bottom: 60px;
    }

    /* — SECTION HEADER (título + ordenar) — */
    .section-header {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        margin-bottom: 16px;
    }
    .section-header h2 { font-size: 1.15rem; }
    .sort-options {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.82rem;
    }
    .sort-options select {
        flex: 1;
        background: var(--bg-card);
        border: 1px solid var(--border);
        color: var(--text-main);
        padding: 8px 10px;
        border-radius: 8px;
        font-size: 0.85rem;
    }

    /* — PRODUCT GRID: 2 columnas siempre que sea posible — */
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .card-img { height: 165px; }
    .card-body { padding: 12px; }
    .card-title { font-size: 0.88rem; height: 2.5rem; margin-bottom: 6px; }
    .card-price { font-size: 1.1rem; }
    .card-category { font-size: 0.65rem; letter-spacing: 0.5px; }
    .card-installments { font-size: 0.72rem; }

    /* — CARD ACTIONS (qty + add) — */
    .card-actions { gap: 6px; margin-top: 10px; }
    .qty-selector { height: 38px; }
    .qty-btn { width: 26px; font-size: 0.72rem; }
    .qty-input { width: 28px; font-size: 0.88rem; }
    .btn-add-cart {
        height: 38px;
        font-size: 0.78rem;
        padding: 0 6px;
        border-radius: 10px;
    }

    /* — CART como bottom-sheet en móvil: estilos finos para items — */
    .cart-header h3 { font-size: 0.95rem; letter-spacing: 1.2px; }
    .cart-item-img { width: 48px; height: 48px; font-size: 1.1rem; }
    .cart-item-title { font-size: 0.82rem; }

    /* — MODALES: padding consistente, scroll vertical, esquinas — */
    .modal-content,
    #checkout-modal > div,
    #success-modal > div,
    #topup-modal > div,
    #history-modal > div,
    #profile-modal > div,
    #logout-modal > div,
    #inactivity-modal > div {
        max-width: 95vw !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    /* Padding interno ajustado en los que vienen con inline 30px+ */
    #checkout-modal .modal-content { padding: 22px !important; }
    #topup-modal > div { padding: 24px 18px !important; }
    #history-modal > div,
    #profile-modal > div { width: 95vw !important; }

    /* Reducir tipografía dentro del checkout */
    #checkout-modal h3, #checkout-modal h2 { font-size: 1.1rem; }
    #checkout-modal label { font-size: 0.85rem; }

    /* Touch targets mínimos */
    button, .nav-link, select, input[type="submit"] {
        min-height: 38px;
    }
    .qty-btn, .toggle-pass, .search-btn { min-height: 0; }

    /* WhatsApp flotante: ajustar por encima de la barra de navegador */
    .whatsapp-float {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }

    /* Inactivity modal: countdown más pequeño */
    #inactivity-countdown { font-size: 2rem !important; }
}

/* ───────── Móvil mediano (≤ 600px) ─────────────────────────── */
@media (max-width: 600px) {
    .logo { font-size: 1.4rem; }
    .logo-dot { width: 6px; height: 6px; }
    #region-currency-label { font-size: 0.72rem; }
    .nav-actions { gap: 6px; }

    /* Texto del balance no muestra el símbolo $ completo cuando es largo */
    #reseller-balance-display {
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Hero más compacto */
    .hero-title { font-size: 1.65rem; }
    .hero-desc { font-size: 0.85rem; }
    .hero-carousel { min-height: 240px; padding: 24px 0; }
}

/* ───────── Móvil pequeño (≤ 480px) ─────────────────────────── */
@media (max-width: 480px) {
    .container { padding: 0 10px; }

    /* Header aún más compacto */
    .logo { font-size: 1.25rem; padding-right: 4px; }
    .region-btn { padding: 5px 7px; font-size: 0.7rem; }
    #region-flag { font-size: 0.9rem; }
    /* Mostrar solo la bandera para ahorrar espacio cuando hay botones de distribuidor */
    #region-currency-label,
    .region-btn .fa-chevron-down { display: none; }
    .theme-toggle { width: 32px; height: 32px; }
    .auth-btn-header { padding: 6px 8px; min-width: 34px; min-height: 34px; }
    .auth-btn-header i { font-size: 1rem; }

    /* Permitir que nav-actions envuelva si hay muchos botones (reseller logueado) */
    .nav-actions { flex-wrap: wrap; justify-content: flex-end; }

    /* Search compactado */
    .search-container input { padding: 9px 14px; padding-right: 38px; }

    /* Product grid: aún 2 columnas pero más estrechas */
    .product-grid { gap: 10px; }
    .card-img { height: 140px; }
    .card-body { padding: 10px; }
    .card-title { font-size: 0.82rem; height: 2.4rem; }
    .card-price { font-size: 1rem; }

    /* Card actions: stack vertical si el ancho es muy chico */
    .card-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .qty-selector {
        align-self: center;
        width: fit-content;
    }
    .btn-add-cart { width: 100%; }

    /* Hero */
    .hero-creative-container { padding: 0 16px; }
    .hero-title { font-size: 1.45rem; line-height: 1.1; }
    .hero-desc { font-size: 0.8rem; margin-bottom: 18px; }
    .hero-carousel { min-height: 220px; padding: 20px 0; border-radius: 14px; }

    /* Cart sidebar: padding aún menor */
    .cart-sidebar { padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); }

    /* Modales aún más ajustados */
    #checkout-modal .modal-content { padding: 18px !important; }
    #topup-modal > div { padding: 22px 14px !important; }

    /* WhatsApp flotante más pequeño */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: calc(16px + env(safe-area-inset-bottom));
        right: 16px;
    }

    /* Toast: ajustar al ancho de pantalla */
    .toast, .toast-new-product {
        min-width: auto;
        width: calc(100% - 32px);
        max-width: 360px;
        font-size: 0.85rem;
        padding: 12px 18px;
    }
}

/* ───────── Pantallas muy pequeñas (≤ 360px) ────────────────── */
@media (max-width: 360px) {
    .product-grid { grid-template-columns: 1fr; }
    .card-img { height: 190px; }
    .logo { font-size: 1.15rem; }
    .nav-actions { gap: 4px; }
    #reseller-balance-display { max-width: 50px; font-size: 0.7rem !important; }
}

/* ───────── Landscape móvil: hero más bajo ──────────────────── */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
    .hero-carousel { min-height: 180px; padding: 16px 0; }
    .hero-title { font-size: 1.5rem; margin-bottom: 10px; }
    .hero-desc { font-size: 0.82rem; margin-bottom: 14px; }
}

/* ============================================================
   ============== MEJORAS RESPONSIVE v3.6 ======================
   Aditivas: no modifican reglas previas, solo refinan
   el comportamiento en móviles sin afectar el desktop.
   ============================================================ */

/* Mejoras base globales para tacto y rendimiento */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
img, svg { max-width: 100%; height: auto; }

/* (Filtros eliminados — el sidebar de la tienda ahora aloja el carrito estático) */

/* Section header (escritorio) */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}
.section-header h2 { font-size: 1.4rem; color: var(--text-main); }
.sort-options {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.sort-options select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color .15s;
}
.sort-options select:hover, .sort-options select:focus {
    border-color: var(--primary);
    outline: none;
}

/* (Sidebar de filtros eliminado) */

/* Móvil estándar (≤ 768px): refinamientos finales */
@media (max-width: 768px) {
    /* Modales a full-viewport en iOS */
    .modal { height: 100dvh; }

    /* Modal de éxito: evitar que se corte el ticket flotante */
    #success-modal .modal-content {
        margin-top: 70px;
        padding: 24px 18px !important;
    }
    #delivery-content {
        font-size: 0.85rem;
        padding: 18px !important;
        word-break: break-all;
    }

    /* Checkout: stack del grid 1fr 1fr inline */
    #checkout-modal form > div[style*="grid-template-columns: 1fr 1fr"],
    #profile-modal form > div[style*="grid-template-columns:1fr 1fr"],
    #profile-modal form > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    /* Métodos de pago: si no caben en una fila, envolver */
    .payment-methods { flex-wrap: wrap; }
    .payment-option { min-width: calc(50% - 6px); }

    /* Topup: que el botón y los inputs respiren */
    #topup-modal > div { padding: 24px 18px !important; }
    #topup-quick-btns { flex-wrap: wrap; }
    .quick-topup-btn { min-width: calc(33.333% - 6px); }

    /* History/logout/inactivity modals: padding más cómodo */
    #history-modal > div { width: 96vw !important; }
    #logout-modal > div,
    #inactivity-modal > div { padding: 0; }
    #logout-modal > div > div,
    #inactivity-modal > div > div { padding-left: 22px !important; padding-right: 22px !important; }

    /* Toast WhatsApp tooltip ya está oculto, pero el botón flotante por encima de teclados */
    .whatsapp-float { z-index: 999; }

    /* Tarjetas: feedback táctil reemplaza el hover en móvil */
    .card { transition: transform .2s ease, border-color .2s ease; }
    .card:hover { transform: none; box-shadow: none; }
    .card:active { transform: scale(0.98); border-color: var(--primary); }
    .btn-add-cart:hover { transform: none; }
    .btn-add-cart:active { transform: scale(0.96); }

    /* Hero: botones sin truncar */
    .hero-actions { width: 100%; }
    .hero-trust { font-size: 0.8rem; justify-content: center; }
}

/* Móvil pequeño (≤ 480px) refinamientos */
@media (max-width: 480px) {
    /* Stack vertical en botones de logout/inactivity */
    #logout-modal > div > div[style*="display:flex"][style*="gap:12px"],
    #inactivity-modal > div > div[style*="display:flex"][style*="gap:12px"] {
        flex-direction: column;
    }
    /* Toast no debe pegarse a los bordes */
    .toast { bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* Pantallas muy pequeñas (≤ 360px): 1 columna pero más alta */
@media (max-width: 360px) {
    .nav-actions { gap: 4px; }
    .auth-btn-header { padding: 5px 7px; min-width: 32px; min-height: 32px; }
    #reseller-balance-btn { padding: 5px 8px !important; }
    #reseller-history-btn { padding: 5px 7px !important; }
    .hero-title { font-size: 1.3rem; }
    .hero-desc { font-size: 0.78rem; }
}

/* Reducir animaciones cuando el usuario lo prefiere (accesibilidad) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Asegurar que los modales con position:fixed manejen safe-area-inset (iOS) */
.modal, #checkout-modal, #success-modal, #topup-modal, #history-modal,
#profile-modal, #logout-modal, #inactivity-modal {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* Focus visible mejorado para accesibilidad y navegación con teclado */
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Scrollbar refinada (no afecta funcionalidad) */
.cart-items::-webkit-scrollbar,
#history-list::-webkit-scrollbar { width: 6px; }
.cart-items::-webkit-scrollbar-thumb,
#history-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}
.cart-items::-webkit-scrollbar-thumb:hover,
#history-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}




/* ═══════════════ NS TICKER (línea fija inferior, marquee a WhatsApp) ═══════════════ */
:root { --ns-ticker-h: 40px; }

.ns-ticker {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: var(--ns-ticker-h);
    z-index: 1080;
    background: linear-gradient(90deg, #07070d 0%, #0d0d18 50%, #07070d 100%);
    border-top: 1px solid rgba(0,212,255,0.18);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.45);
    overflow: hidden;
    display: flex;
    align-items: center;
    /* Fade en los bordes para que los items aparezcan/desaparezcan suaves */
    mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}

.ns-ticker-track {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 0;
    animation: nsTickerScroll 38s linear infinite;
    width: max-content;
    will-change: transform;
}
.ns-ticker:hover .ns-ticker-track {
    animation-play-state: paused;   /* se detiene al pasar el cursor */
}

@keyframes nsTickerScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }   /* 50% porque duplicamos el contenido */
}

.ns-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 20px;
    color: #f1f5f9;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-decoration: none;
    line-height: 1;
    transition: color .2s, transform .2s;
}
.ns-ticker-item i {
    font-size: 1rem;
    color: var(--ti-c, #00F5FD);
    text-shadow: 0 0 12px var(--ti-c, #00F5FD);
}
.ns-ticker-item:hover {
    color: #ffffff;
    transform: translateY(-1px);
}
.ns-ticker-item:hover i { filter: brightness(1.15); }

/* Variantes color del icono y un sutil hover */
.ns-ti--gold   { --ti-c: #fbbf24; }
.ns-ti--purple { --ti-c: #7DD3FC; }
.ns-ti--cyan   { --ti-c: #00F5FD; }
.ns-ti--green  { --ti-c: #25D366; }
.ns-ti--wa     { --ti-c: #25D366; color:#25D366; font-weight:800; }
.ns-ti--wa:hover { color:#1ebe5d; }

/* Separador (punto luminoso) entre items */
.ns-ticker-sep {
    display: inline-block;
    width: 4px; height: 4px;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    margin: 0 4px;
    flex-shrink: 0;
}

/* Padding inferior para que nada quede tapado por el ticker */
body { padding-bottom: var(--ns-ticker-h); }

/* La barra de carrito móvil debe sentarse encima del ticker */
@media (max-width: 992px) {
    .mobile-cart-bar { bottom: calc(var(--ns-ticker-h) + 10px + env(safe-area-inset-bottom)) !important; }
}

/* WhatsApp flotante también se eleva un poco */
.whatsapp-float { bottom: calc(20px + var(--ns-ticker-h) + env(safe-area-inset-bottom)) !important; }

/* Responsive: en móvil el ticker es un poco más bajo y la fuente menor */
@media (max-width: 560px) {
    :root { --ns-ticker-h: 36px; }
    .ns-ticker-item { font-size: 0.78rem; padding: 0 14px; gap: 7px; }
    .ns-ticker-item i { font-size: 0.92rem; }
}

/* Preferencia: reducir animación si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
    .ns-ticker-track { animation-duration: 90s; }
}



/* === WhatsApp Promo Card === */
/* === WhatsApp Promo Card === */
/* === WhatsApp Promo Card === */

.card-wa-promo {
    border: 1.5px solid rgba(139,92,246,0.5) !important;
    cursor: pointer;
    transition: transform .25s, box-shadow .25s;
    overflow: hidden;
}
.card-wa-promo:hover {
    transform: translateY(-6px) !important;
    border-color: #25d366 !important;
    box-shadow: 0 14px 40px rgba(37,211,102,0.35) !important;
}

/* ---- Banner: fondo animado violeta/indigo ---- */
.wa-banner {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a0533 0%, #2d1b69 40%, #0d2a4a 70%, #1a0533 100%);
    background-size: 300% 300%;
    animation: wa-shift 8s ease infinite;
}
@keyframes wa-shift {
    0%,100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* Anillo de orbita decorativo */
.wa-banner::before {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 156px; height: 156px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px dashed rgba(255,255,255,0.2);
    pointer-events: none;
}

/* Glow central verde */
.wa-glow-circle {
    position: absolute;
    top: 50%; left: 50%;
    width: 88px; height: 88px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,211,102,0.35) 0%, transparent 70%);
    animation: wa-glow 2.6s ease-in-out infinite;
    z-index: 1;
}
@keyframes wa-glow {
    0%,100% { transform: translate(-50%,-50%) scale(1);    opacity: 0.7; }
    50%      { transform: translate(-50%,-50%) scale(1.45); opacity: 1; }
}

/* Signo ? grande */
.wa-big-q {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.8rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    font-family: "Inter", sans-serif;
    z-index: 3;
    animation: wa-q 2.6s ease-in-out infinite;
}
@keyframes wa-q {
    0%,100% { text-shadow: 0 0 20px rgba(37,211,102,0.85); transform: translate(-50%,-50%) scale(1); }
    50%      { text-shadow: 0 0 36px rgba(37,211,102,1), 0 0 70px rgba(0,212,255,0.55); transform: translate(-50%,-50%) scale(1.1); }
}

/* Brazo de orbita: arranca en el centro y gira */
.wa-orbit {
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    z-index: 2;
    animation: wa-spin 7s linear infinite;
    animation-delay: var(--delay, 0s);
}
@keyframes wa-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Icono al final del brazo, contra-rota para quedar siempre de frente */
.wa-picon {
    position: absolute;
    width: 32px; height: 32px;
    margin-top: -16px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(255,255,255,0.2);
    border: 1.5px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(2px);
    animation: wa-counter 7s linear infinite;
    animation-delay: var(--delay, 0s);
}
@keyframes wa-counter {
    from { transform: translateX(68px) rotate(0deg); }
    to   { transform: translateX(68px) rotate(-360deg); }
}
.card-wa-promo:hover .wa-picon {
    background: rgba(37,211,102,0.28);
    border-color: rgba(37,211,102,0.65);
}

/* Badge chip */
.wa-chip {
    display: inline-block;
    background: rgba(37,211,102,0.13);
    border: 1px solid rgba(37,211,102,0.4);
    color: #25d366;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Boton WhatsApp */
.btn-wa-ask {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    border: none;
    padding: 11px 16px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .2s, box-shadow .2s;
    animation: wa-btn 2.2s ease-in-out infinite;
}
@keyframes wa-btn {
    0%,100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.55); }
    50%      { box-shadow: 0 0 0 8px rgba(37,211,102,0); }
}
.btn-wa-ask:hover { transform: scale(1.05); box-shadow: 0 8px 26px rgba(37,211,102,0.45); }
.btn-wa-ask .fa-whatsapp { font-size: 1.1rem; }

.card-wa-promo .card-title { color: var(--text-main) !important; }
/* === end WA Promo Card === */

/* ============================================================
   GicoPlay · Capa de animaciones (optimizada, no satura)
   Solo transform/opacity (GPU) · respeta reduced-motion y móvil
   ============================================================ */

/* Aurora sutil sobre el degradado teal de fondo */
body::after {
    content: '';
    position: fixed;
    inset: -20%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(38% 32% at 20% 22%, rgba(0,245,253,0.10), transparent 70%),
        radial-gradient(34% 30% at 82% 70%, rgba(0,180,216,0.10), transparent 70%);
    filter: blur(8px);
    will-change: transform, opacity;
    animation: gp-aurora 18s ease-in-out infinite alternate;
}
@keyframes gp-aurora {
    0%   { transform: translate3d(0,0,0) scale(1);          opacity: .75; }
    50%  { transform: translate3d(2%, -1.5%, 0) scale(1.06); opacity: 1; }
    100% { transform: translate3d(-1.5%, 1.5%, 0) scale(1.03); opacity: .8; }
}

/* Entrada suave al cargar */
.header { animation: gp-fade-down .6s ease both; }
.hero-carousel { animation: gp-fade-up .7s ease both; }
@keyframes gp-fade-down { from { opacity:0; transform: translateY(-12px); } to { opacity:1; transform:none; } }
@keyframes gp-fade-up   { from { opacity:0; transform: translateY(16px); }  to { opacity:1; transform:none; } }

/* Glow cyan adicional en hover de tarjetas */
.card { will-change: transform; }
.card:hover {
    box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 0 22px rgba(0,245,253,.22);
}

/* Brillo "shine" cruzando los botones principales al hover */
.btn-add-cart, .btn-hero-primary, .btn-checkout { position: relative; overflow: hidden; }
.btn-add-cart::after, .btn-hero-primary::after, .btn-checkout::after {
    content: '';
    position: absolute; top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-18deg);
    transition: left .6s ease;
    pointer-events: none;
}
.btn-add-cart:hover::after, .btn-hero-primary:hover::after, .btn-checkout:hover::after { left: 140%; }

/* Reveal on-scroll (lo activa el IntersectionObserver del HTML) */
.reveal { opacity: 0; transform: translateY(22px);
    transition: opacity .55s ease, transform .55s cubic-bezier(.23,1,.32,1);
    will-change: opacity, transform; }
.reveal.in-view { opacity: 1; transform: none; }

/* Móvil: aligerar (sin blur pesado ni aurora intensa) */
@media (max-width: 768px) {
    body::after { filter: blur(4px); animation-duration: 26s; opacity: .6; }
}

/* Accesibilidad/rendimiento: menos movimiento => apagar efectos */
@media (prefers-reduced-motion: reduce) {
    body::after { display: none; }
    .header, .hero-carousel { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .btn-add-cart::after, .btn-hero-primary::after, .btn-checkout::after { display: none; }
}
