/* assets/css/style.css */

/* Importamos Poppins para todo el sitio */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* --- PALETA DE COLORES BIKEROOM --- */
    --biker-verde: #4E8A7E;
    --biker-gris: #7A7A7A; /* Aclarado ligeramente para mejor contraste */
    --biker-gris-claro: #A8A8A8; /* Modificado de #9A9A9A a #A8A8A8 para cumplir WCAG AA sobre fondos oscuros */
    --biker-negro: #000000;
    --biker-carbon: #121212;
    --biker-blanco: #FFFFFF;
    --fuente-principal: 'Poppins', sans-serif;
}

body {
    background-color: var(--biker-negro);
    color: var(--biker-blanco);
    font-family: var(--fuente-principal);
    font-weight: 400;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6, .text-uppercase, .categoria-texto {
    font-family: var(--fuente-principal);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* --- ACCESIBILIDAD Y FORMULARIOS GLOBALES --- */
.form-label {
    color: var(--biker-gris-claro);
    font-weight: 500;
}

.form-control, .form-select {
    background-color: var(--biker-carbon) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--biker-blanco) !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    background-color: #1a1a1a !important;
    border-color: var(--biker-verde) !important;
    box-shadow: 0 0 0 0.25rem rgba(78, 138, 126, 0.25) !important;
}

.form-control::placeholder {
    color: var(--biker-gris) !important;
    opacity: 1; /* Firefox reduce la opacidad por defecto, esto lo fuerza al 100% */
}

/* --- NAVBAR --- */
.navbar-biker {
    background-color: var(--biker-negro) !important;
    position: sticky !important;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid var(--biker-carbon);
    transition: all 0.3s ease;
}

/* --- OFFCANVAS --- */
.offcanvas-biker {
    background-color: var(--biker-negro) !important;
    border-right: 1px solid var(--biker-carbon) !important;
    width: 280px !important;
}

.offcanvas-biker .nav-link {
    font-size: 0.95rem !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--biker-gris-claro) !important;
    transition: color 0.3s ease;
    padding: 12px 0 !important;
}

.offcanvas-biker .nav-link:hover,
.offcanvas-biker .nav-link.active {
    color: var(--biker-blanco) !important;
}

/* --- BOTONES GLOBALES --- */
.btn-biker {
    background-color: var(--biker-verde);
    color: var(--biker-blanco);
    font-weight: 700;
    letter-spacing: 1px;
    border: 1px solid var(--biker-verde);
    transition: all 0.3s ease;
}

.btn-biker:hover {
    background-color: transparent;
    color: var(--biker-verde);
    transform: translateY(-2px);
}

.btn-biker-dark {
    background-color: var(--biker-negro);
    color: var(--biker-blanco);
    border: 1px solid var(--biker-negro);
    transition: all 0.3s ease;
}

.btn-biker-dark:hover {
    background-color: var(--biker-verde);
    border-color: var(--biker-verde);
    color: var(--biker-blanco);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 138, 126, 0.3);
}

/* --- HERO (VIDEO HOME) --- */
.hero-video-container {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
}

.hero-video-container video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 40%, rgba(0,0,0,1) 100%);
    z-index: 2;
}

/* --- CATEGORÍAS (BENTO GRID - HOME) --- */
.categoria-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--biker-carbon);
}

.categoria-card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15);
    border-color: var(--biker-blanco);
}

.categoria-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1;
    transition: background 0.3s ease;
}

.categoria-card:hover .categoria-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.categoria-texto {
    position: relative;
    z-index: 2;
    color: var(--biker-blanco);
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.9);
    margin: 0;
    transition: all 0.3s ease;
}

.categoria-card:hover .categoria-texto {
    color: var(--biker-blanco);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* --- CARRUSEL INFINITO DE MARCAS --- */
.logos-marquee {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
}

.logos-track {
    display: inline-block;
    animation: scrollLogos 25s linear infinite;
}

.logos-track:hover {
    animation-play-state: paused;
}

.brand-logo {
    height: 45px;
    margin: 0 50px;
    filter: grayscale(100%) opacity(0.5);
    transition: all 0.4s ease;
}

.brand-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

@keyframes scrollLogos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- UTILIDADES GLOBALES --- */
.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.tracking-wide {
    letter-spacing: 3px;
}

/* --- ESTRUCTURA CATÁLOGO --- */
.catalog-header {
    background-color: var(--biker-carbon);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-sidebar {
    background-color: var(--biker-carbon);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 100px;
}

/* Menú de categorías superior (Texto) */
.categoria-link-texto {
    color: var(--biker-gris-claro) !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    white-space: nowrap;
    position: relative;
    padding-bottom: 5px;
    transition: all 0.3s ease;
}

@media (min-width: 992px) {
    .categoria-link-texto { font-size: 0.9rem; }
}

.categoria-link-texto:hover,
.categoria-link-texto.activo {
    color: var(--biker-verde) !important;
}

.categoria-link-texto::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--biker-verde);
    transition: width 0.3s ease;
}

.categoria-link-texto:hover::after,
.categoria-link-texto.activo::after {
    width: 100%;
}

/* --- PRODUCT CARDS (TARJETAS DE PRODUCTO) --- */
.product-card {
    background-color: var(--biker-carbon);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative; /* Asegura el contexto para el botón absoluto */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.product-img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #1a1a1a;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.img-back {
    opacity: 0;
}

.product-card:hover .img-front {
    opacity: 0;
}

.product-card:hover .img-back {
    opacity: 1;
    transform: scale(1.03);
}

/* Botón Deslizante Agregar Carrito */
.btn-add-cart {
    position: absolute;
    bottom: -60px;
    left: 5%;
    width: 90%;
    background-color: var(--biker-blanco);
    color: var(--biker-negro);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 4px;
    padding: 10px 0;
    z-index: 3;
    transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
    border: none;
}

.btn-add-cart:hover {
    background-color: var(--biker-verde);
    color: var(--biker-blanco);
}

.product-card:hover .btn-add-cart {
    bottom: 15px;
}

/* Info del Producto en Tarjeta */
.product-brand {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    color: var(--biker-gris-claro);
}

.product-title {
    color: var(--biker-blanco);
    font-weight: 500;
    transition: color 0.2s ease;
}

.product-card:hover .product-title {
    color: var(--biker-verde);
}

.product-price {
    color: var(--biker-blanco);
    font-size: 0.95rem;
    font-weight: 600;
}

/* Mejora de legibilidad global para textos secundarios */
.text-muted {
    color: #b0b0b0 !important;
}

/* ===========================================================
   BARRA DE NAVEGACI\u00d3N INFERIOR — EXCLUSIVA M\u00d3VIL
   Solo aplica en pantallas < 992px (d-lg-none la oculta en desktop)
   =========================================================== */
@media (max-width: 991.98px) {

    /* Padding al body para que el contenido no quede tapado por la barra */
    body {
        padding-bottom: 70px;
    }

    /* Barra fija en el fondo */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 62px;
        background-color: rgba(10, 10, 10, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid #1f1f1f;
        display: flex;
        align-items: stretch;
        z-index: 1040;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    }

    /* Cada \u00edtem de la barra */
    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: #666;
        font-size: 0.6rem;
        font-family: 'Poppins', sans-serif;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-decoration: none;
        transition: color 0.2s ease;
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
        border: none;
        background: none;
        padding: 0;
    }

    .mobile-nav-item i {
        font-size: 1.2rem;
        transition: transform 0.2s ease, color 0.2s ease;
    }

    .mobile-nav-item:hover,
    .mobile-nav-item.active {
        color: var(--biker-verde, #4E8A7E);
    }

    .mobile-nav-item:hover i,
    .mobile-nav-item.active i {
        transform: translateY(-2px);
        color: var(--biker-verde, #4E8A7E);
    }

    /* Bot\u00f3n del Carrito: pill central destacado */
    .mobile-nav-cart {
        position: relative;
    }

    .mobile-cart-icon-wrap {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-cart-badge {
        position: absolute;
        top: -6px;
        right: -10px;
        background-color: var(--biker-verde, #4E8A7E);
        color: #000;
        font-size: 0.55rem;
        font-weight: 900;
        min-width: 16px;
        height: 16px;
        border-radius: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 3px;
        line-height: 1;
    }

    /* Bot\u00f3n "Ver" en tarjetas de producto — solo m\u00f3vil */
    .mobile-product-cta {
        position: absolute;
        bottom: 8px;
        right: 8px;
        background-color: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(4px);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50px;
        font-size: 0.65rem;
        font-weight: 700;
        padding: 4px 10px;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        z-index: 20;
        transition: background-color 0.2s, border-color 0.2s;
    }

    .mobile-product-cta:hover,
    .mobile-product-cta:focus {
        background-color: var(--biker-verde, #4E8A7E);
        border-color: var(--biker-verde, #4E8A7E);
        color: #000;
    }
}