:root {
    /* Paleta Cyber-Luxury VERDE ELEGANTE (DEFAULT DARK) */
    --bg-base: #05110d;
    /* Verde Obsidiana profundo */
    --bg-surface: #0a1814;
    /* Superficie bosque oscuro */
    --bg-glass: rgba(5, 17, 13, 0.8);
    --bg-input: rgba(255, 255, 255, 0.03);
    --border-color: rgba(0, 255, 136, 0.1);

    /* Gradientes y Acentos Neon Verdes */
    --accent-1: #00ff88;
    /* Verde Neón */
    --accent-2: #10b981;
    /* Esmeralda */
    --accent-3: #bcff00;
    /* Lima Eléctrico */
    --gradient-primary: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    --glow-primary: 0 0 40px rgba(0, 255, 136, 0.15);

    /* Textos */
    --text-pure: #ffffff;
    --text-main: #e2e8f0;
    --text-muted: #8b949e;

    /* Tipografía */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
    --bg-base: #f8fafc !important;
    --bg-surface: #ffffff !important;
    --bg-glass: rgba(255, 255, 255, 0.85) !important;
    --bg-input: rgba(0, 0, 0, 0.05) !important;
    --border-color: rgba(16, 185, 129, 0.15) !important;
    --text-pure: #0f172a !important;
    --text-main: #1e293b !important;
    --text-muted: #64748b !important;
    --accent-1: #10b981;
    --accent-2: #059669;
    --accent-3: #0ea5e9;
    --gradient-primary: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    --glow-primary: 0 0 40px rgba(16, 185, 129, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Premium Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 10px;
    background: var(--bg-base);
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--accent-1), var(--accent-2));
    border-radius: 10px;
    border: 3px solid var(--bg-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-1);
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- Header Flotante --- */
.floating-header {
    background: rgba(5, 17, 13, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 2000;
    border-bottom: 1px solid rgba(0, 255, 136, 0.08);
}

[data-theme="light"] .floating-header {
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.floating-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-decoration: none;
    color: white;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Búsqueda */
.search-form-premium {
    flex-grow: 1;
    max-width: 500px;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border-radius: 50px;
    padding: 12px 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.search-form-premium input {
    background: transparent;
    border: none;
    width: 100%;
    outline: none;
    color: var(--text-pure);
    font-size: 1rem;
}

.voice-search-btn {
    background: none;
    border: none;
    color: var(--accent-1);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-search-btn:hover {
    transform: scale(1.2);
    color: #fff;
}

.voice-search-btn.listening {
    color: #ef4444;
    animation: voice-pulse 1.5s infinite;
}

@keyframes voice-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Botones y Enlaces Premium Modernos - Texto Negro para Contraste */
.login-link-premium {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 22px;
    border-radius: 50px;
    color: var(--text-main) !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
    font-size: 0.85rem;
    box-shadow: none;
}

.login-link-premium i {
    color: var(--accent-1);
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.login-link-premium:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-1);
    color: var(--accent-1) !important;
    transform: translateY(-2px);
}

.login-link-premium:hover i {
    transform: scale(1.2);
}

.btn-outline-premium {
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid var(--accent-1);
    padding: 12px 28px;
    border-radius: 50px;
    color: var(--accent-1) !important;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    animation: btnGlow 3s infinite alternate;
}

@keyframes btnGlow {
    from {
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
    }

    to {
        box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
    }
}

.btn-outline-premium:hover {
    transform: translateY(-3px) scale(1.02);
    background: var(--accent-1);
    color: var(--bg-base) !important;
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.6);
}

.btn-outline-premium i {
    font-size: 1.1rem;
    transition: transform 0.4s ease;
}

.btn-outline-premium:hover i {
    transform: rotate(20deg);
    color: var(--bg-base) !important;
}

.nav-link-iconic,
.account-btn-iconic,
.theme-toggle-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1.1rem;
    backdrop-filter: blur(5px);
}

.nav-link-iconic:hover,
.account-btn-iconic:hover,
.theme-toggle-btn:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: block;
    color: #f59e0b;
}

.cart-btn-premium {
    position: relative;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-pure);
    text-decoration: none;
    transition: var(--transition);
}

.cart-pulse {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--gradient-primary);
    color: var(--bg-base);
    font-weight: 900;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Categorías con Movimiento Automático */
.category-nav-premium {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    /* Ocultar lo que sale del contenedor */
}

.category-pills {
    display: flex;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: max-content;
    /* Necesario para la animación */
    animation: scrollCategories 40s linear infinite;
    /* Movimiento constante */
}

/* Detener movimiento al pasar el mouse */
.category-nav-premium:hover .category-pills {
    animation-play-state: paused;
}

.cat-pill {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    display: block;
    font-weight: 500;
    /* Animación de Rotación 3D sutil */
    animation: pulseRotation 6s ease-in-out infinite;
}

.cat-pill:hover {
    background: var(--gradient-primary);
    color: var(--bg-base);
    border-color: var(--accent-1);
    transform: scale(1.1) rotate(0deg) !important;
    box-shadow: 0 0 20px var(--accent-1);
}

/* Keyframes para el movimiento infinito */
@keyframes scrollCategories {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Keyframes para la rotación 3D sutil */
@keyframes pulseRotation {

    0%,
    100% {
        transform: perspective(500px) rotateY(0deg);
    }

    50% {
        transform: perspective(500px) rotateY(15deg);
    }
}

/* --- Hero Section --- */
.hero-ultra {
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--accent-1);
    border-radius: 50px;
    color: var(--accent-1);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.hero-ultra h2 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.hero-ultra p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    padding: 40px 0;
}

.product-card-ultra {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 15px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.product-card-ultra::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-1), transparent);
    opacity: 0;
    transition: 0.5s;
}

.product-card-ultra:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
}

.product-card-ultra:hover::before {
    opacity: 1;
}

.img-wrapper-ultra {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.img-wrapper-ultra img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5));
    transition: 0.5s;
}

.product-card-ultra:hover img {
    transform: scale(1.1);
}

.price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-pure);
    font-family: var(--font-heading);
}

.btn-add-ultra {
    width: 100%;
    background: var(--text-pure);
    color: var(--bg-base);
    border: none;
    padding: 16px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-ultra:hover {
    background: var(--gradient-primary);
    color: white;
}

/* Responsive Moderno */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 1024px) {
    .search-form-premium {
        max-width: 350px;
    }

    .header-actions {
        gap: 15px;
    }

    .header-actions .login-link-premium span,
    .header-actions .btn-outline-premium span,
    .header-actions .login-link-premium i+span {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .floating-header {
        padding: 12px 0;
    }

    .floating-header .container {
        gap: 10px;
        justify-content: space-between;
    }

    .search-form-premium {
        display: none !important;
        /* Se activará con un botón de búsqueda en móvil */
    }

    .header-actions {
        gap: 8px;
    }

    .logo img {
        height: 40px !important;
    }

    .logo h1 {
        font-size: 1.4rem !important;
    }

    /* Hero */
    .hero-ultra {
        padding: 60px 0 !important;
        min-height: auto !important;
    }

    .hero-ultra h2 {
        font-size: 2.8rem !important;
    }

    .hero-ultra p {
        font-size: 1rem !important;
        padding: 0 15px;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
        gap: 15px !important;
    }

    .hero-btns a {
        width: 100% !important;
        margin: 0 !important;
    }

    /* PC Builder Banner */
    .banner-glass {
        flex-direction: column !important;
        padding: 30px !important;
        text-align: center;
    }

    .banner-info {
        max-width: 100% !important;
        margin-bottom: 25px;
    }

    .banner-visual {
        display: none;
    }

    .banner-info h2 {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        display: none;
    }

    .header-actions .login-link-premium,
    .header-actions .btn-outline-premium {
        padding: 10px !important;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .section-title-premium {
        font-size: 1.8rem !important;
    }

    /* Hero Home Corrections */
    .hero-ultra {
        min-height: auto !important;
        padding: 80px 20px !important;
        margin-top: 0 !important;
    }

    .hero-content {
        max-width: 100% !important;
    }

    .hero-btns {
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        gap: 15px !important;
    }

    .hero-btns a {
        width: 100% !important;
        max-width: 300px !important;
        padding: 18px 30px !important;
        font-size: 0.9rem !important;
    }

    /* PC Builder Banner Correction */
    .pc-builder-banner {
        margin-top: 20px !important;
    }

    .banner-glass {
        flex-direction: column !important;
        padding: 30px 20px !important;
        text-align: center !important;
    }

    .banner-info {
        max-width: 100% !important;
        margin-bottom: 30px !important;
    }

    .banner-visual {
        position: static !important;
        font-size: 5rem !important;
        margin-top: 20px;
    }

    .banner-info h2 {
        font-size: 1.8rem !important;
    }

    .banner-info .btn-add-ultra {
        width: 100% !important;
        justify-content: center !important;
        padding: 18px 20px !important;
    }

    /* Catalog & Category Adjustments */
    .section-header h3 {
        font-size: 2.2rem !important;
        letter-spacing: -1px !important;
    }

    .section-header p {
        font-size: 1rem !important;
    }

    .product-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 20px 0 !important;
    }

    .product-card-ultra {
        padding: 20px !important;
    }

    .img-wrapper-ultra {
        height: 200px !important;
    }

    /* Category Navigation Bar */
    .category-nav-premium {
        padding: 10px 0 !important;
    }

    .cat-pill {
        padding: 8px 18px !important;
        font-size: 0.85rem !important;
    }

    /* Category Catalog Controls */
    .catalog-controls {
        padding: 15px !important;
        flex-direction: column !important;
        gap: 15px !important;
        border-radius: 15px !important;
    }

    .sort-wrapper {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .sort-select {
        flex-grow: 1 !important;
        max-width: 200px !important;
    }

    /* Categories Grid in Home */
    .categories-grid-premium {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .category-card-ultra {
        padding: 20px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .categories-grid-premium {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Global Responsive Utilities */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

.text-center-mobile {
    @media (max-width: 768px) {
        text-align: center !important;
    }
}

.flex-column-mobile {
    @media (max-width: 768px) {
        flex-direction: column !important;
    }
}

/* Fix for overlapping elements on small screens */
section {
    overflow: hidden;
}

/* Ensure container doesn't overflow */
.main-wrapper {
    overflow: hidden;
}

/* Improved spacing for mobile */
@media (max-width: 768px) {
    section {
        padding: 40px 0 !important;
    }

    .section-title-premium {
        margin-bottom: 30px !important;
    }
}

/* Wishlist Button Active State */
.wishlist-btn.active i,
.wishlist-btn-detail.active i {
    color: #ff4757 !important;
    font-weight: 900;
    /* Forzar estilo sólido */
}

.wishlist-btn.active,
.wishlist-btn-detail.active {
    border-color: rgba(255, 71, 87, 0.3) !important;
    background: rgba(255, 71, 87, 0.05) !important;
}

/* --- ESTILOS PREMIUM PARA BOTÓN VISTA (OJITO) --- */
.btn-view-ultra {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
    color: #8b949e;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.btn-view-ultra:hover {
    background: rgba(0, 242, 254, 0.15) !important;
    border-color: #00f2fe !important;
    color: #00f2fe !important;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 242, 254, 0.3);
}

.btn-view-ultra i {
    font-size: 1.2rem;
}

.card-actions-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 10px;
    justify-content: center;
}

/* --- CATALOG CONTROLS & SORT SELECT PREMIUM --- */
.catalog-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: var(--bg-surface);
    padding: 20px 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.catalog-info {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-wrapper label {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sort-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-pure);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 45px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300ff88' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 14px;
    font-family: var(--font-body);
}

.sort-select:hover {
    border-color: var(--accent-1);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
}

.sort-select:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.3);
}

.sort-select option {
    background: #0a1814;
    color: #ffffff;
    padding: 15px;
}

[data-theme='light'] .sort-select option {
    background: #ffffff;
    color: #1e293b;
}

@media (max-width: 768px) {
    .catalog-controls {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 25px 20px;
    }

    .sort-wrapper {
        width: 100%;
        justify-content: center;
    }
}

/* --- LIVE SEARCH RESULTS PREMIUM --- */
.live-search-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    z-index: 3000;
    max-height: 450px;
    overflow-y: auto;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 255, 136, 0.05);
    padding: 10px;
    animation: searchReveal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes searchReveal {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    text-decoration: none !important;
    border-radius: 15px;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: scale(1.02);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.search-result-item img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.search-result-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-info h5 {
    margin: 0;
    color: var(--text-pure);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.search-result-info span {
    color: var(--accent-1);
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Scrollbar para el buscador */
.live-search-dropdown::-webkit-scrollbar {
    width: 5px;
}

.live-search-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.live-search-dropdown::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

/* Ajustes para modo claro */
[data-theme="light"] .live-search-dropdown {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}


/* --- MOBILE BOTTOM NAVIGATION (TAB BAR) --- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(5, 17, 13, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: none;
    /* Oculto en desktop */
    justify-content: space-around;
    align-items: center;
    z-index: 5000;
    border-top: 1px solid rgba(0, 255, 136, 0.15);
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

/* Animación para el contador del carrito */
.cart-pulse {
    animation: badgePulse 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.5);
    }

    100% {
        transform: scale(1);
    }
}

#mobile-cart-count:empty {
    display: none !important;
}


.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.65rem;
    gap: 4px;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: 1;
}

.mobile-nav-item.active {
    color: var(--accent-1);
}

.mobile-nav-item i {
    font-size: 1.3rem;
}

/* Item Central Resaltado (Armar PC) */
.mobile-nav-item.center-item {
    transform: translateY(-18px);
}

.center-inner {
    width: 58px;
    height: 58px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-base);
    font-size: 1.4rem;
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
    border: 5px solid #05110d;
    transition: 0.3s;
}

.mobile-nav-item.center-item span {
    margin-top: 2px;
    font-weight: 800;
    color: var(--accent-1);
    text-transform: uppercase;
    font-size: 0.6rem;
}

.mobile-nav-item.center-item:active .center-inner {
    transform: scale(0.9);
}

/* Contador Carrito Mobile */
.icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mobile-cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--accent-1);
    color: var(--bg-base);
    font-size: 0.65rem;
    font-weight: 900;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #05110d;
}

/* Ajustes Responsive para Mobile Tab Bar */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 80px;
        /* Espacio para que el nav no tape el contenido */
    }

    /* Ocultar elementos redundantes en el header móvil */
    .header-actions .login-link-premium:not(.cart-btn-premium) {
        display: none !important;
    }

    .btn-outline-premium {
        display: none !important;
    }

    /* Forzar ocultar la barra de búsqueda de escritorio en móviles, por si el HTML quedó en caché */
    .floating-header > .container > .search-form-premium {
        display: none !important;
    }

    /* Ocultar elementos que ya están en el Tab Bar o estorban */
    .user-account-nav,
    .cart-btn-premium,
    .dropdown-premium {
        display: none !important;
    }

    .floating-header .container {
        justify-content: space-between;
        gap: 10px;
    }
    
    .header-actions {
        gap: 10px !important;
    }
}

[data-theme="light"] .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .center-inner {
    border-color: #ffffff;
}

[data-theme="light"] #mobile-cart-count {
    border-color: #ffffff;
}

/* --- CYBER-LUXURY TOAST NOTIFICATIONS --- */
#toast-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
}

.toast {
    background: rgba(10, 15, 20, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-left: 4px solid var(--accent-1);
    color: #ffffff !important;
    padding: 15px 25px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 136, 0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.success {
    border-left-color: #00ff88;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 136, 0.2);
}

.toast.success::before {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #00ff88;
    font-size: 1.2rem;
}

.toast.error {
    border-left-color: #ff4757;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 71, 87, 0.2);
}

.toast.error::before {
    content: '\f057';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #ff4757;
    font-size: 1.2rem;
}

.toast.info {
    border-left-color: #00f2fe;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 242, 254, 0.2);
}

.toast.info::before {
    content: '\f05a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #00f2fe;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    #toast-container {
        left: 20px;
        right: 20px;
        bottom: 90px;
        align-items: center;
    }
    .toast {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}