/* =======================================
    ESTILOS BASE Y VARIABLES (Dorado y Negro)
    ======================================= */

:root {
    --color-primary: #d4af37; /* Dorado principal */
    --color-secondary: #0a0a0a; /* Negro profundo */
    --color-dark-grey: #1a1a1a;
    --color-light-grey: #f5f5f5;
    --color-white: #fff;
    --color-text-light: #ccc; 
    --transition-speed: 0.5s; 
    --color-primary-rgb: 212, 175, 55; /* RGB para sombras */
    --color-whatsapp: #25D366; /* Verde WhatsApp */
    --color-whatsapp-dark: #128C7E;
}

/* Base global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden; 
}

html {
    scroll-behavior: smooth; /* ¡Mantener! Es la clave para el botón "Volver Arriba" */
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(180deg, var(--color-secondary) 0%, #1c1c1c 100%);
    color: var(--color-light-grey);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------ */
/* --- MEJORA 1: ACCESIBILIDAD (Focus States) --- */
/* Asegura que los usuarios que navegan por teclado tengan un indicador claro y de marca */
a:focus,
button:focus,
input:focus,
select:focus,
.nav-btn-design:focus,
.control-btn:focus {
    /* Fondo claro para alto contraste */
    outline: 2px solid var(--color-light-grey); 
    outline-offset: 3px;
    border-radius: 5px;
}

/* Mejora el enfoque de los botones principales con color dorado */
.btn:focus,
.btn-primary-confirm:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 8px;
}
/* ------------------------------------------------ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Loader --- */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out; 
    overflow: hidden; 
}
.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}
.logo-animation {
    width: 120px; 
    height: 120px;
    object-fit: contain;
    animation: pulse 1.5s infinite alternate; 
}
@keyframes pulse {
    from { transform: scale(0.9); opacity: 0.8; }
    to { transform: scale(1.1); opacity: 1; }
}


/* --- Navbar --- */
.navbar {
    background-color: rgba(10, 10, 10, 0.95);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease;
}

/* ------------------------------------------------ */
/* --- MEJORA 2: Navbar (Frosted Glass en Scroll) --- */
.navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.8); /* Ligeramente más transparente */
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7); 
}
/* ------------------------------------------------ */

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.navbar .logo img {
    max-height: 70px; 
    transition: transform 0.3s ease;
}

/* Estilos de la lista de enlaces (Escritorio) */
.nav-links {
    list-style: none;
    display: none; 
    align-items: center;
    gap: 2rem;
    margin: 0; 
    padding: 0;
}
.nav-links a {
    color: var(--color-light-grey);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 5px 0;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.nav-links a:hover {
    color: var(--color-primary);
}

/* Botón de Carrito con diseño premium */
.nav-btn-design {
    background: var(--color-primary);
    color: var(--color-secondary); 
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--color-primary-rgb), 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}
.nav-btn-design:hover {
    background: var(--color-white);
    color: var(--color-secondary);
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.7);
    transform: scale(1.05);
}
.nav-btn-design i {
    font-size: 1.2rem;
}

/* Animación de feedback de carrito */
.cart-feedback {
    animation: cartBounce 0.5s ease;
}
@keyframes cartBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(5deg); color: #00ff62; }
    100% { transform: scale(1); }
}

@media (min-width: 992px) {
    .menu-toggle {
        display: none;
    }
    .nav-links {
        display: flex; 
    }
    .nav-links li:last-child {
        margin-left: 1rem; 
    }
}


/* --- Encabezado (Header) - Video de fondo --- */
header {
    height: 100vh;
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: var(--color-white);
    opacity: 0;
    transition: opacity 1s ease-out;
}
#header-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0; 
    transform: translate(-50%, -50%);
    object-fit: cover;
}
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); 
    z-index: 1;
}

/* Contenedor del botón */
.btn-wrapper {
    z-index: 2;
    width: fit-content;      
    margin: 0 auto; 
    
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlide 1s forwards;
    animation-delay: 0.6s; 
}

/* Estilo del botón "Explora la colección" */
header a.btn {
    background: var(--color-primary);
    color: var(--color-secondary);
    border: 2px solid var(--color-primary);
    padding: 15px 35px; 
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 50px; 
    box-shadow: 0 4px 15px rgba(var(--color-primary-rgb), 0.5);
    transition: all 0.3s ease;
    
    display: block; 
    width: auto; 
    margin: 0; 
}
header a.btn:hover {
    background: var(--color-white);
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(var(--color-primary-rgb), 0.7);
}

header h1 {
    font-family: 'Anton', sans-serif;
    font-size: 5rem;
    margin-bottom: 1rem;
    z-index: 2;
    text-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.8);
    color: var(--color-primary);
}
header p {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    z-index: 2;
}

.animated-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlide 1s forwards;
}
@keyframes fadeInSlide {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- Secciones generales con Efecto de Scroll --- */
section {
    padding: 6rem 0;
    width: 100%;
    background: var(--color-dark-grey);
    border-bottom: 1px solid #2a2a2a;
    position: relative;
    overflow: hidden;
    
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

section.visible-section {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    margin-bottom: 4rem;
    color: var(--color-primary);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: 3px;
}


/* --- Productos y Estilos de Carrito --- */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3.5rem;
}

.product {
    background: var(--color-secondary); 
    border: 1px solid #333;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ------------------------------------------------ */
/* --- MEJORA 3: Detalle de Producto (Borde de Brillo en Hover) --- */
.product:hover {
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(var(--color-primary-rgb), 0.5); 
    border: 1px solid var(--color-primary); /* Añadido el borde de brillo */
}
/* ------------------------------------------------ */

.product-carousel {
    width: 100%;
    height: 380px; 
    overflow: hidden;
    position: relative;
}

.product-carousel .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-carousel .swiper-button-next,
.product-carousel .swiper-button-prev {
    color: var(--color-white);
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 0.5rem;
    border-radius: 5px;
    opacity: 0; 
    transition: opacity 0.3s ease;
}

.product:hover .swiper-button-next,
.product:hover .swiper-button-prev {
    opacity: 1; 
}

.product-carousel .swiper-pagination-bullet-active {
    background: var(--color-primary);
}

.product-info {
    padding: 1.8rem; 
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem; 
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    letter-spacing: 1px;
}

.product-info > p { 
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
    max-height: 4.5em; 
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price-meta {
    display: block; 
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #2a2a2a;
}

.price-tag {
    font-weight: bold;
    font-size: 1.6rem; 
    color: var(--color-white);
    margin: 0;
}

/* Contenedor de Acciones (Botones) */
.product-actions {
    display: flex;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}

/* Estilo general de botón (Base para todos los 'btn') */
.btn {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--color-primary); 
    flex-grow: 1; 
    text-transform: uppercase;
}

/* Botón Añadir al Carrito (Primario) */
.add-to-cart-btn {
    background: var(--color-primary);
    color: var(--color-secondary);
    box-shadow: 0 4px 10px rgba(var(--color-primary-rgb), 0.3);
}
.add-to-cart-btn:hover {
    background: var(--color-white);
    border-color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(var(--color-primary-rgb), 0.5);
}

/* Botón Cazala Ya (WhatsApp) */
.btn-whatsapp {
    background: transparent; 
    color: var(--color-whatsapp); 
    border-color: var(--color-whatsapp); 
}
.btn-whatsapp:hover {
    background: var(--color-whatsapp);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}

.add-to-cart-btn i, .btn-whatsapp i {
    margin-right: 5px;
}

/* Estilo para producto Agotado */
.product.sold-out {
    opacity: 0.6;
    pointer-events: none; 
    filter: grayscale(80%);
}
.product.sold-out::after {
    content: 'AGOTADO';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    font-weight: bold;
    z-index: 10;
    letter-spacing: 2px;
}
.product.sold-out .add-to-cart-btn {
    background: #333;
    color: #999;
    border-color: #333;
    cursor: not-allowed;
    box-shadow: none;
}
.product.sold-out .add-to-cart-btn:hover {
    transform: none;
}


/* --- Sección Quiénes Somos --- */
#about {
    text-align: center;
}
#about a.btn {
    display: inline-block;
    width: fit-content;
    background: var(--color-secondary);
    color: var(--color-primary);
    border-color: var(--color-primary);
}
#about a.btn:hover {
    background: var(--color-primary);
    color: var(--color-secondary);
}


/* --- Sección Testimonios (CARRUSEL DE FOTOS) --- */
#testimonios {
    background: #101010; 
    padding: 6rem 0;
    text-align: center;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    font-style: italic;
}

.testimonials-carousel {
    max-width: 900px; 
    margin: 0 auto;
    padding-bottom: 3rem; 
}

.testimonial-slide {
    background: var(--color-secondary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 500px; 
}

.testimonial-img {
    width: 100%;
    height: 400px; 
    object-fit: contain; 
    background-color: var(--color-secondary); 
    display: block;
}

.testimonial-caption {
    padding: 1rem 1.5rem;
    text-align: left;
    background-color: var(--color-dark-grey);
    flex-grow: 1;
}

.testimonial-caption p {
    font-style: italic;
    font-size: 1rem;
    color: var(--color-light-grey);
    margin-bottom: 0.5rem;
}

.testimonial-author-name {
    display: block;
    font-weight: bold;
    color: var(--color-primary);
    font-size: 0.9rem;
    text-align: right;
}

/* Estilos de navegación del carrusel */
.testimonial-pagination .swiper-pagination-bullet-active {
    background: var(--color-primary);
}

.testimonial-prev, .testimonial-next {
    color: var(--color-primary) !important;
    background-color: rgba(0, 0, 0, 0.6);
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.testimonial-prev:hover, .testimonial-next:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.testimonial-prev::after, .testimonial-next::after {
    font-size: 1rem !important;
}

@media (max-width: 768px) {
    .testimonial-slide {
        min-height: 450px;
    }
    .testimonial-img {
        height: 350px; 
    }
}


/* --- Sección Envíos y Entregas --- */
#envios {
    background: var(--color-dark-grey);
    text-align: center;
}

.shipping-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.shipping-item {
    background-color: #2a2a2a;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease; 
    border: 2px solid transparent;
}

.shipping-item:hover {
    transform: translateY(-15px);
    background-color: #333;
    box-shadow: 0 20px 40px rgba(var(--color-primary-rgb), 0.3);
    border-color: var(--color-primary);
}

.icon-large {
    font-size: 3.5rem; 
    color: var(--color-primary); 
    margin-bottom: 1rem;
}

.bounce-icon {
    animation: none; 
    transition: color 0.3s ease;
}
.shipping-item:hover .bounce-icon {
    animation: bounce 0.8s ease-out;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px) scale(1.05); }
}

/* --- Sección Políticas --- */
#politicas {
    background: var(--color-secondary);
}
.policies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.policy-card {
    background-color: #1a1a1a;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    text-align: center; 
}
.policy-card h3 {
    font-family: 'Bebas Neue', sans-serif;
    color: var(--color-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
.policy-card p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 0;
}


/* --- Sección Contacto --- */
#contacto {
    text-align: center;
    background: var(--color-dark-grey);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

.contact-details {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    min-width: 250px;
    text-align: left;
}
.contact-item i {
    color: var(--color-primary);
    font-size: 1.5rem; 
}

.contact-item a {
    color: var(--color-light-grey);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* --- Footer --- */
footer {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
    text-align: center;
    padding: 2.5rem 0;
    border-top: 1px solid var(--color-primary); 
}

footer .socials {
    margin-bottom: 1.5rem;
}

footer .socials a {
    color: var(--color-light-grey);
    font-size: 1.8rem;
    margin: 0 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
    text-decoration: none; 
}

footer .socials a:hover {
    color: var(--color-primary);
    transform: scale(1.2);
}

.footer-links {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.footer-links a {
    color: var(--color-light-grey);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}
.footer-links a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}
.footer-links span {
    color: #444; 
}

footer p {
    font-size: 0.9rem;
    color: var(--color-text-light); 
    margin: 0;
}


/* =======================================
    MEJORAS UX/CONVERSIÓN
    ======================================= */

/* --- CAMBIO 1: Botón de WhatsApp Fijo (Conversión) --- */
#whatsapp-fixed-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--color-whatsapp); 
    color: var(--color-white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.6);
    z-index: 1500;
    transition: transform 0.3s ease, background 0.3s ease;
}
#whatsapp-fixed-btn:hover {
    background: var(--color-whatsapp-dark); 
    transform: scale(1.1) rotate(5deg);
}
/* --- FIN CAMBIO 1 --- */

/* --- NUEVO: Botón Volver Arriba --- */
#back-to-top {
    position: fixed;
    bottom: 90px; /* Separado del botón de WhatsApp */
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(var(--color-primary-rgb), 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 1000; 
}

#back-to-top:hover {
    background-color: var(--color-white);
    transform: translateY(-2px);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
/* --- FIN BOTÓN VOLVER ARRIBA --- */

/* --- CAMBIO 2: Contenedor de Notificaciones (Toast) (UX) --- */
#toast-container {
    position: fixed;
    top: 100px; /* Debajo de la navbar */
    right: 20px;
    z-index: 2500;
    pointer-events: none; /* Permite hacer clic a través de él */
}

.toast {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    
    /* Animación de entrada y salida */
    animation: toastIn 0.5s ease-out, toastOut 0.5s ease-in 2.5s forwards;
}

.toast.error {
    background-color: #e74c3c;
    color: var(--color-white);
}

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    to { transform: translateX(100%); opacity: 0; }
}

.toast i {
    font-size: 1.2rem;
}
/* --- FIN CAMBIO 2 --- */


/* =======================================
    MODALES (Carrito y Tallas)
    ======================================= */

.cart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.cart-modal-content {
    background: var(--color-dark-grey);
    padding: 2.5rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    border: 2px solid var(--color-primary);
    transform: translateY(0);
    animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cart-modal-content h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.cart-items-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #333;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

/* ------------------------------------------------ */
/* --- MEJORA 4: Barras de Desplazamiento Personalizadas (Carrito y Tabla de Tallas) --- */
/* Estilos para navegadores basados en WebKit (Chrome, Edge, Safari) */
.cart-items-list::-webkit-scrollbar,
#size-guide-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px; 
}

.cart-items-list::-webkit-scrollbar-track,
#size-guide-table-container::-webkit-scrollbar-track {
    background: var(--color-secondary);
}

.cart-items-list::-webkit-scrollbar-thumb,
#size-guide-table-container::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 20px;
    border: 2px solid var(--color-dark-grey);
}
/* ------------------------------------------------ */


/* --- ESTILOS DE GESTIÓN DE CARRITO --- */

.cart-item {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr auto; 
    gap: 10px;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px dashed #333;
    font-size: 1rem;
}
.cart-item:last-child {
    border-bottom: none;
}

.item-title-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.item-title {
    font-weight: 700;
    color: var(--color-light-grey);
}
.item-size {
    font-size: 0.9rem;
    color: var(--color-primary);
    font-style: italic;
}

.item-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.control-btn {
    background: #333;
    color: var(--color-white);
    border: 1px solid #555;
    width: 25px;
    height: 25px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: bold;
    line-height: 1;
}
.control-btn:hover {
    background: #555;
}

.remove-btn {
    background: none;
    border: none;
    color: #ff5555;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
    padding: 5px;
}
.remove-btn:hover {
    color: #ff0000;
}
.item-quantity {
    text-align: center;
    color: var(--color-primary);
}
.item-price {
    text-align: right;
    font-weight: 700;
    color: var(--color-white);
}

/* --- ESTILOS DE MODAL DE TALLAS --- */
/* Contenedor del modal de tallas con transición */
.size-modal-content {
    max-width: 400px;
    padding: 2.5rem;
    text-align: center;
    transition: max-width 0.3s ease, width 0.3s ease;
}

.size-modal-content h3 {
    margin-bottom: 1rem;
}

/* Vista de Selección de Talla */
#size-selection-view {
    /* No requiere estilos extra, usa los del .size-modal-content */
}

.size-selection-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
    font-size: 1.1rem;
    color: var(--color-light-grey);
}
.size-select-dropdown {
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid var(--color-primary);
    background-color: var(--color-secondary);
    color: var(--color-white);
    font-size: 1rem;
    appearance: none; 
    cursor: pointer;
}

/* Link para ver la guía */
.size-guide-link {
    font-size: 0.9rem;
    margin-top: 10px;
}
.size-guide-link a {
    color: var(--color-primary);
    text-decoration: underline;
    cursor: pointer;
}

/* Vista de Guía de Tallas (Tabla) */
#size-guide-view {
    /* El contenido dinámico es visible si el JS lo muestra */
}

.modal-subtitle {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--color-light-grey);
    margin-bottom: 1.5rem;
    text-align: center;
}

#size-guide-table-container {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: auto; 
    margin: 1rem 0 2rem;
    border: 1px solid var(--color-primary);
    border-radius: 10px;
}

#size-guide-table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: auto;
}

#size-guide-table-container th, 
#size-guide-table-container td {
    padding: 12px 10px;
    text-align: center;
    border: 1px solid #333;
}

#size-guide-table-container th {
    background-color: var(--color-dark-grey);
    color: var(--color-primary);
    font-weight: 700;
    position: sticky; /* Fija la cabecera al hacer scroll */
    top: 0;
    z-index: 1;
}

#size-guide-table-container td {
    color: var(--color-text-light);
    background-color: var(--color-secondary);
}

#size-guide-table-container tbody tr:nth-child(even) td {
    background-color: #0d0d0d;
}

/* Botón de confirmación en modal de tallas */
.btn-primary-confirm {
    background: var(--color-primary);
    color: var(--color-secondary);
    border: 2px solid var(--color-primary);
    padding: 12px 20px;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex-grow: 1;
    text-transform: uppercase;
}
.btn-primary-confirm:hover {
    background: var(--color-white);
    transform: translateY(-2px);
}
/* --- FIN ESTILOS MODAL TALLAS --- */


.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1rem 0;
    border-top: 2px solid var(--color-primary);
    margin-bottom: 1rem;
}
.total-price {
    color: var(--color-primary);
}

.modal-info {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* Botones del modal */
.btn-secondary {
    background: #333;
    color: var(--color-light-grey);
    border-color: #333;
    flex-grow: 1;
}
.btn-secondary:hover {
    background: #555;
    border-color: #555;
}

.btn-warning {
    background: #b50909; 
    color: var(--color-white);
    border-color: #b50909;
    flex-grow: 1;
}
.btn-warning:hover {
    background: #e30a0a;
    border-color: #e30a0a;
}

.btn-whatsapp-confirm {
    background: var(--color-whatsapp);
    color: var(--color-white);
    border-color: var(--color-whatsapp);
    font-weight: 700;
    flex-grow: 2; 
    text-transform: uppercase;
}
.btn-whatsapp-confirm:hover {
    background: var(--color-whatsapp-dark);
    border-color: var(--color-whatsapp-dark);
}

/* =======================================
    MEDIA QUERIES (Responsividad)
    ======================================= */

@media (max-width: 992px) {
    /* Navbar móvil */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--color-primary);
        font-size: 1.5rem;
        cursor: pointer;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        background-color: var(--color-dark-grey);
        position: absolute;
        top: 100%;
        left: 0;
        padding-bottom: 1rem;
        transition: all 0.3s ease;
        gap: 0; 
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links li {
        margin: 0.5rem 0;
        width: 100%;
    }
    .nav-links li a, .nav-links li button {
        display: block; 
        padding: 10px 0;
        width: 100%;
    }
    .nav-links li:last-child {
        margin-left: 0; 
    }
    .nav-btn-design {
        width: 90%;
        justify-content: center;
        margin: 0 auto; 
    }
}

@media (max-width: 768px) {
    
    .container {
        padding: 0 1rem;
    }
    h2 {
        font-size: 3rem;
        margin-bottom: 3rem;
    }
    header h1 {
        font-size: 3.5rem; 
    }
    
    .product-carousel {
        height: 300px; 
    }
    .products {
        grid-template-columns: 1fr; 
    }
    .product-actions {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column; 
    }
    .btn-whatsapp-confirm {
        flex-grow: 1;
    }

    /* Footer Responsive */
    footer .socials a {
        font-size: 1.5rem;
        margin: 0 0.8rem;
    }
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .footer-links span {
        display: none; 
    }
    
    /* Responsive del Carrito */
    .cart-item {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "title remove"
            "controls price";
        text-align: center;
        padding-bottom: 1.5rem;
        position: relative;
    }
    .item-title-group {
        grid-area: title;
        text-align: left;
    }
    .item-controls {
        grid-area: controls;
        justify-content: flex-start;
    }
    .item-price {
        grid-area: price;
        text-align: right;
        font-size: 1.2rem;
    }
    .remove-btn {
        grid-area: remove;
        position: static;
        text-align: right;
    }
    
    .cart-total {
        font-size: 1.2rem;
    }
    
    /* WhatsApp Fijo Móvil */
    #whatsapp-fixed-btn {
        width: 50px;
        height: 50px;
        font-size: 1.7rem;
        bottom: 15px;
        right: 15px;
    }
    
    /* Botón Volver Arriba Móvil */
    #back-to-top {
        bottom: 75px; /* Ajustado para el tamaño del WhatsApp */
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Toast Móvil */
    #toast-container {
        top: auto; 
        bottom: 70px; /* Ajustado para estar encima de los botones fijos */
        right: 15px;
        left: 15px;
    }
    .toast {
        min-width: auto;
    }
}