:root { 
    --nav-bg: #081f40;        
    --brand-blue: #2563eb;    
    --brand-hover: #1d4ed8;  
    --text-main: #334155;
    --bg-light: #f8fafc;
    --top-bar-bg: #f1f5f9;
}

* {
    font-family: 'Inter', sans-serif;
}


.nav-link, .dropdown-item, .btn, .badge, h1, h2, h3, .fw-800 {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

body { 
    font-family: 'Inter', sans-serif !important; 
    background-color: var(--bg-light);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}


h1, h2, h3, h4, h5, h6, 
.fw-800, .footer-title, .navbar-brand, 
.btn-brand, .price-text, .nav-link, .top-link {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* Estado inicial para evitar saltos (se activa con JS) */
main {
    opacity: 0;
}

.top-bar { 
    background-color: var(--top-bar-bg); 
    border-bottom: 1px solid #e2e8f0; 
    padding: 8px 0; 
}

.top-link { 
    color: #64748b !important; 
    text-decoration: none; 
    font-size: 0.72rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    transition: 0.2s; 
    display: inline-flex;
    align-items: center;
}

.top-link i {
    font-size: 0.9rem;
    color: var(--brand-blue);
    margin-right: 5px;
}

.top-link:hover { 
    color: var(--brand-blue) !important; 
}

.main-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.search-wrapper {
    background: #f1f5f9;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.search-input {
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0.9rem;
}

.btn-cart-outline {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: var(--text-main);
    font-weight: 600;
    transition: 0.3s;
    background: white;
}

.btn-cart-outline:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.navbar-custom {
    background-color: var(--nav-bg) !important;
}

.nav-link {
    color: #f8fafc !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 12px 20px !important;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    color: var(--brand-blue) !important;
}

.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 16px !important;
    background: white;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08) !important;
}

.img-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.img-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.price-text {
    font-weight: 800;
    color: var(--nav-bg);
    font-size: 1.3rem;
}


.btn-brand {
    background-color: var(--brand-blue);
    color: white !important;
    border-radius: 10px;
    font-weight: 700;
    padding: 10px 20px;
    border: none;
    transition: 0.3s;
}

.btn-brand.btn-md {
    padding: 8px 16px;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;

}

.btn-brand:hover {
    background-color: var(--brand-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}


.btn-brand:focus, 
.btn-brand:active:focus {
    outline: none !important;
    box-shadow: none !important;
    background-color: var(--brand-blue); /* Usa el color base de tu marca */
    filter: none !important;
}


.btn-brand:focus {
    box-shadow: 0 0 0 0.25rem rgba(64, 89, 228, 0.25) !important; /* Un resplandor suave del mismo color */
}

/* Forzar a que el botón se vea sólido aunque esté procesando */
.btn-brand:disabled {
    opacity: 0.9 !important;
    cursor: not-allowed;
    background-color: #4059E4 !important; /* Tu color principal */
    border-color: #4059E4 !important;
    color: white !important;
}

.thumb-container {
    width: 60px;
    height: 60px;
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 5px;
    cursor: pointer;
    transition: 0.3s;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.thumb-container.active-thumb {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 1px var(--brand-blue);
}

.main-footer {
    background-color: #081f40;
    color: #94a3b8;
    padding: 40px 0 20px;
}

.footer-title {
    color: white;
    font-weight: 800;
    margin-bottom: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 30px;
}

.modal-content {
    border-radius: 20px;
}

.modal-body .form-control {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.modal-body .form-control:focus {
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    border-color: var(--brand-blue);
}


.form-control {
    border: 1.5px solid #cbd5e1 !important; /* Un gris más visible */
    transition: all 0.2s ease-in-out;
}

.form-control:focus {
    background-color: #ffffff !important;
    border-color: var(--brand-blue) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1) !important;
    color: var(--nav-bg);
}

.form-label {
    color: var(--nav-bg) !important;
    margin-bottom: 0.5rem;
}


.card, .product-card {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important; /* Un gris más oscuro que el fondo */
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 
                0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}

.product-card:hover {
    transform: translateY(-8px); /* La tarjeta "flota" hacia arriba */
    border-color: var(--brand-blue) !important; /* El borde se ilumina */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.img-container {
    background-color: #ffffff;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
}


body {
    background-color: #f1f5f9 !important; /* Un gris apenas más oscuro para que el blanco resalte más */
}

/* Clase para la transición suave */
.seccion-contrasena {
    overflow: hidden;
    max-height: 500px; /* Un valor lo suficientemente alto para el contenido */
    opacity: 1;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
}

/* Estado cuando está oculto */
.seccion-contrasena.oculto {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0 !important; /* Evita que el margen residual cause saltos */
}

.bg-disabled {
    background-color: #e7e7e7 !important;
}

/* ==========================================================================
   OPTIMIZACIÓN MÓVIL (RESPONSIVE)
   ========================================================================== */
@media (max-width: 768px) {
    /* Reducir el tamaño de los títulos en móvil */
    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.3rem !important; }

    /* Ajustar las tarjetas de producto para que no ocupen toda la pantalla */
    .product-card {
        padding: 12px !important;
        margin-bottom: 10px;
    }

    .img-container {
        height: auto; /* Imagen un poco más pequeña en móvil */
    }

    /* Hacer que el botón de carrito en el header sea más compacto */
    .btn-cart-outline {
        padding: 8px 12px !important;
    }
    
    #cart-total-header {
        display: none; /* Escondemos el monto total para ahorrar espacio, dejamos solo el icono */
    }

    /* El menú lateral (Offcanvas) debe ocupar casi toda la pantalla */
    .offcanvas {
        width: 85% !important;
    }

    /* Ajuste de padding general para que el contenido no toque los bordes */
    main {
        padding: 0 15px;
    }
}