/* ==========================================================================
   1. NAVEGACIÓN (NAVBAR ESTILO SAMURA) Y MENÚ LATERAL
   ========================================================================== */
.navbar {
    position: sticky;
    top: 0;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4%;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    width: 100%;
    box-sizing: border-box;
}

/* Distribución de 3 columnas (Izquierda, Centro, Derecha) */
.nav-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
}

.nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 1;
}

/* Logo BE$T con gradiente dorado */
.logo-best {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.logo-img {
    height: 55px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Botones de íconos (Hamburguesa, Lupa y Login) */
.menu-toggle-btn, 
.nav-icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: transform 0.2s ease;
    text-decoration: none;
}

.menu-toggle-btn:hover, 
.nav-icon-btn:hover {
    transform: scale(1.1);
}

/* Formulario de Búsqueda Integrado */
.search-nav-form {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    padding: 2px 8px;
    margin: 0;
    transition: all 0.3s ease;
}

.search-nav-form input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 4px 8px;
    font-size: 13px;
    outline: none;
    width: 90px;
}

/* --- ESTILOS DEL ICONO DEL CARRITO EN LA NAVBAR --- */
.cart-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-badge-count {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #d4af37;
    color: #000;
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    min-width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.7);
    line-height: 1;
}

/* ==========================================================================
   CORRECCIÓN RESPONSIVA PARA CELULARES (ANCHO < 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 6px 10px !important;
        flex-wrap: nowrap !important;
    }

    /* Achicamos espacio lateral de las columnas */
    .nav-left, .nav-right {
        gap: 6px !important;
    }

    /* Reducción proporcional del logo para pantallas delgadas */
    .logo-img {
        height: 38px !important;
        max-width: 110px !important;
    }

    /* Ajustar el buscador en móvil para no desbordar */
    .search-nav-form {
        padding: 2px 4px !important;
        border-color: transparent !important; /* Oculta el borde para ahorrar espacio */
        background: transparent !important;
    }

    .search-nav-form input {
        width: 0px !important; /* Esconde el campo de texto en celulares pequeños */
        padding: 0 !important;
        opacity: 0;
        pointer-events: none;
    }

    /* Si el usuario toca la lupa o en pantallas medianas muestra la caja */
    .search-nav-form:focus-within {
        background: rgba(255, 255, 255, 0.08) !important;
        border-color: rgba(212, 175, 55, 0.4) !important;
    }

    .search-nav-form:focus-within input {
        width: 70px !important;
        padding: 2px 6px !important;
        opacity: 1;
        pointer-events: auto;
    }
}

/* ==========================================================================
   MENÚ LATERAL DESPLEGABLE (OFF-CANVAS)
   ========================================================================== */
.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    z-index: 1001;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background-color: #111111;
    border-right: 1px solid var(--gold-primary, #d4af37);
    z-index: 1002;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.side-menu.active {
    left: 0;
}

.side-menu-overlay.active {
    display: block;
}

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.side-menu-title {
    color: var(--gold-light, #d4af37);
    font-weight: 800;
    letter-spacing: 1px;
}

.close-menu-btn {
    background: none;
    border: none;
    color: var(--gold-light, #d4af37);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.side-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 15px;
}

.menu-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.menu-link:hover {
    color: var(--gold-light, #d4af37);
    padding-left: 6px;
}

/* ==========================================================================
   2. BANNER Y PIE DE PÁGINA
   ========================================================================== */
.trust-banner-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px 15px;
    margin-top: 40px;
    background-color: #0a0a0a;
    border-top: 1px solid rgba(212, 175, 55, 0.25);
}

.trust-banner-img {
    max-width: 650px;
    width: 90%;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 768px) {
    .trust-banner-container {
        padding: 15px 10px;
    }
    .trust-banner-img {
        max-width: 100%;
    }
}

.btn-back-link,
a.btn-back-link,
a.btn-back-link:visited {
    color: var(--gold-primary, #d4af37) !important;
    text-decoration: none !important;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease, transform 0.2s ease;
}

.btn-back-link:hover {
    color: #ffffff !important;
    transform: translateX(-3px);
}

.footer-legal-links {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px 15px 30px 15px;
}

.footer-legal-links p {
    color: #888888;
    font-size: 0.8rem;
    margin: 0;
}

.footer-legal-links a,
.footer-legal-links a:visited {
    color: #aaaaaa !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.footer-legal-links a:hover {
    color: var(--gold-primary, #d4af37) !important;
    text-decoration: underline !important;
}