/* ==========================================================================
   CSS PERSONALIZADO PARA MÁS MOLDEO - VERSIÓN DEFINITIVA
   Estilo Premium - Universo de Estrellas & Detalles Dorados
   ========================================================================== */

:root {
    --color-oscuro: #111111;         
    --color-oro: #c5a059;            
    --color-oro-brillante: #e5c07b;  
    --color-fondo: #090a0f;          
    --color-gris-suave: #eae6e1;
}

/* BLOQUEO DE SCROLL EN PC MIENTRAS EL LOADER ESTÁ ACTIVO */
body.loading-active {
    overflow: hidden !important;
    height: 100vh;
}

body {
    background-color: transparent !important;
    color: #ffffff; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ==========================================================================
   MENÚ DE NAVEGACIÓN
   ========================================================================== */
.navbar-custom {
    background-color: rgba(9, 10, 15, 0.95) !important; 
    backdrop-filter: blur(15px) saturate(180%); 
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2); 
    padding: 12px 0;
    transition: all 0.3s ease;
}

.navbar-logo-mini {
    height: 35px;
    width: 35px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--color-oro);
}

.navbar-custom .brand-text {
    color: var(--color-oro) !important;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.2);
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 20px !important;
    margin: 4px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: block;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--color-oro) !important;
    background-color: rgba(197, 160, 89, 0.15) !important; 
}

.navbar-collapse {
    background-color: rgba(15, 17, 23, 0.98);
    border-radius: 12px;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid rgba(197, 160, 89, 0.2);
}

.custom-toggler {
    border: none !important;
    background: transparent !important;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 20px;
}

.custom-toggler:focus {
    box-shadow: none;
}

.toggler-icon-bar {
    width: 100%;
    height: 2px;
    background-color: var(--color-oro);
    border-radius: 2px;
    transition: all 0.2s ease-in-out;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    background-color: transparent !important;
    padding-top: 6rem !important; 
    padding-bottom: 4rem !important;
    overflow: hidden;
}

.logo-hero-compact {
    width: 100% !important;
    max-width: 320px !important; 
    height: auto !important; 
    aspect-ratio: 1 / 1; 
    object-fit: cover;
    border-radius: 25px; 
    border: 3px solid var(--color-oro); 
    box-shadow: 0 10px 35px rgba(197, 160, 89, 0.35); 
    transition: transform 0.3s ease;
    background-color: var(--color-oscuro);
}

.logo-hero-compact:hover {
    transform: scale(1.03);
}

.hero-title {
    font-size: calc(2.2rem + 1.5vw) !important;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.hero-subtitle {
    font-size: calc(0.9rem + 0.3vw) !important;
    letter-spacing: 5px !important;
}

.hero-desc {
    font-size: calc(1rem + 0.2vw) !important;
    line-height: 1.6;
    max-width: 650px;
}

.divider-gold {
    width: 60px;
    height: 3px;
    background-color: var(--color-oro);
    border-radius: 2px;
}

.text-light-muted {
    color: #cccccc !important;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn-gold {
    background-color: var(--color-oscuro);
    color: var(--color-oro);
    border: 2px solid var(--color-oro);
    transition: all 0.3s ease;
    font-size: 1.1rem !important;
    padding: 12px 40px !important;
    letter-spacing: 1px;
}

.btn-gold:hover {
    background-color: var(--color-oro);
    color: var(--color-oscuro);
    box-shadow: 0 5px 20px rgba(197, 160, 89, 0.4);
    transform: translateY(-2px);
}

.btn-dark-gold {
    background-color: var(--color-oro);
    color: #000000 !important;
    border: 1px solid var(--color-oro);
    transition: all 0.3s ease;
}

.btn-dark-gold:hover {
    background-color: var(--color-oro-brillante);
    border-color: var(--color-oro-brillante);
    box-shadow: 0 5px 15px rgba(229, 192, 123, 0.3);
    transform: translateY(-1px);
}

/* ==========================================================================
   FILTROS POR CATEGORÍA
   ========================================================================== */
.btn-filtro {
    color: #cccccc !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background-color: rgba(255, 255, 255, 0.03) !important;
    transition: all 0.3s ease;
    border-radius: 20px;
    padding: 6px 16px;
    text-transform: capitalize;
}

.btn-filtro:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--color-oro) !important;
}

.btn-filtro.active {
    color: #000000 !important;
    background-color: var(--color-oro) !important;
    border-color: var(--color-oro) !important;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.3);
}

/* ==========================================================================
   TARJETAS DE PRODUCTO
   ========================================================================== */
#catalogo {
    background-color: transparent !important;
}

#catalogo h2 {
    color: #ffffff !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.card-producto {
    border: 1px solid rgba(255, 215, 0, 0.15) !important;
    background-color: rgba(20, 22, 30, 0.75) !important; 
    backdrop-filter: blur(8px); 
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    position: relative;
}

.card-producto:hover {
    transform: translateY(-8px);
    border-color: var(--color-oro) !important;
    box-shadow: 0 15px 35px rgba(197, 160, 89, 0.18) !important;
}

/* CONTENEDOR E IMAGEN CON ALTURA UNIFORME RIGUROSA */
.img-wrapper {
    position: relative;
    width: 100%;
    height: 350px; /* Altura fija uniforme para PC */
    overflow: hidden;
    background: #151722 linear-gradient(90deg, #151722 0%, #1e2230 50%, #151722 100%);
    background-size: 200% 100%;
}

.card-producto .card-img-top,
.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center;
    transition: transform 0.5s ease;
}

.card-producto:hover .card-img-top,
.img-wrapper:hover img {
    transform: scale(1.06);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-wrapper:hover .image-overlay {
    opacity: 1;
}

.card-producto .card-title {
    color: #ffffff !important;
    font-size: 1.2rem;
    font-weight: 700;
}

.card-producto .card-text {
    color: #cccccc !important;
    font-size: 0.88rem;
}

.card-producto p.text-gold {
    color: var(--color-oro-brillante) !important;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-producto p.fs-4 {
    color: #ffffff !important; 
    font-weight: 800;
}

.badge-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(0, 0, 0, 0.85);
    color: var(--color-oro-brillante);
    border: 1px solid var(--color-oro);
    padding: 5px 14px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: bold;
    border-radius: 20px;
    z-index: 10;
    letter-spacing: 1px;
}

/* ==========================================================================
   FONDO Y MODAL (ESTRUCTURA CORREGIDA PARA CARRUSEL)
   ========================================================================== */
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    background: radial-gradient(ellipse at bottom, #10121a 0%, #050609 100%); 
    overflow: hidden;
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    animation: twinkle var(--duration, 3s) infinite ease-in-out;
    opacity: 0;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: var(--max-opacity, 0.8);
        transform: scale(1.2);
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.4); 
    }
}

.border-gold-modal {
    border: 2px solid var(--color-oro) !important;
    border-radius: 20px !important;
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.3);
    overflow: hidden !important;
}

/* CARRUSEL FIJO NATURA DE BOOTSTRAP */
#carouselModal {
    position: relative;
    width: 100%;
    overflow: hidden !important;
    background-color: #0d0e12;
}

#carouselModal .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden !important;
}

#carouselModal .carousel-item {
    text-align: center;
    background-color: #0d0e12;
}

.modal-img-preview {
    max-height: 48vh !important;
    width: 100% !important;
    object-fit: contain !important;
    display: block;
    margin: 0 auto;
    background-color: #0d0e12; 
}

#carouselModal .carousel-indicators {
    margin-bottom: 0.5rem;
}

#carouselModal .carousel-indicators button {
    background-color: var(--color-oro);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0.4;
    border: none;
}

#carouselModal .carousel-indicators button.active {
    opacity: 1;
    background-color: var(--color-oro-brillante);
    box-shadow: 0 0 8px var(--color-oro-brillante);
}

/* ==========================================================================
   LOADER PREMIUM
   ========================================================================== */
#loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #10121a 0%, #050609 100%);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease;
}

#loader-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-card {
    background: rgba(20, 22, 30, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(197, 160, 89, 0.3);
    padding: 35px 40px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(197, 160, 89, 0.15);
    max-width: 320px;
    width: 85%;
}

.brand-ring-container {
    position: relative;
    width: 85px;
    height: 85px;
    margin: 0 auto 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(197, 160, 89, 0.15);
    border-top: 3px solid var(--color-oro-brillante, #e5c07b);
    border-radius: 50%;
    animation: spinRing 1.2s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

.loader-logo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--color-oro, #c5a059);
}

.brand-title {
    color: var(--color-oro, #c5a059);
    font-weight: 800;
    letter-spacing: 3px;
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.65rem;
    letter-spacing: 4px;
    font-weight: 600;
    margin-bottom: 25px;
}

.loader-bar-bg {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.loader-bar-fill {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--color-oro, #c5a059), transparent);
    position: absolute;
    animation: loadingBar 1.5s infinite ease-in-out;
}

@keyframes spinRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loadingBar {
    0% { left: -40%; }
    100% { left: 100%; }
}

/* RESPONSIVE AJUSTES */
@media (max-width: 767.98px) {
    .hero-section {
        padding-top: 5rem !important;
        padding-bottom: 3rem !important;
    }
    
    .logo-hero-compact {
        max-width: 220px !important; 
        margin-bottom: 0.5rem;
    }
    
    .navbar-custom {
        padding: 10px 0;
    }

    .img-wrapper {
        height: 300px; /* Altura adaptada para pantallas de celulares */
    }

    .modal-img-preview {
        max-height: 45vh !important; /* Mantiene la imagen centrada y sin desbordes */
    }
}