/* ========================================================== */
/* OPTIMA PURIFY - STYLES.CSS (Corregido y Modernizado)       */
/* ========================================================== */

/* Base de la página y Fondo Animado */
 body {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* CAMBIO CLAVE: Fondo transparente para que se vea el fondo animado fluido del index.html */
    background: transparent;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: #f0f0f0; /* Color de texto base para compatibilidad con el fondo oscuro del index.html */
}

/* ❌ Fondo animado eliminado de aquí (reemplazado por el estilo fluido en index.html) */
body::before {
    content: none;
}
@keyframes gradientShift {
    /* Anulado */
}

* {
    box-sizing: border-box;
}

/* Header (Barra de Navegación con color) */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000; /* Asegurar que el header esté por encima de otros elementos */
    padding: 1rem 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap; /* Permitir que los elementos se envuelvan en pantallas pequeñas */
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    background: none;
    -webkit-text-fill-color: white;
    background-clip: unset;
    display: flex;
    align-items: center;
    white-space: nowrap;
    z-index: 1001; /* Asegurar que el logo esté por encima del menú en móviles */
}

.logo-img {
    height: 30px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    z-index: 999; /* Asegurar que el menú esté por debajo del logo pero por encima del contenido */
}

.nav-link {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    position: relative;
    padding: 0.5rem 0; /* Añadir un poco de padding para que sea más fácil de hacer clic */
}

.nav-link:hover {
    color: #ffd700;
    border-bottom: 2px solid #ffd700;
}

.nav-link::after {
    display: none;
}

.cart-badge {
    background: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* Botón de Hamburguesa */
.menu-toggle {
    display: none; /* Por defecto oculto en pantallas grandes */
    font-size: 2rem;
    cursor: pointer;
    color: white;
    z-index: 1001;
}

/* Sección principal */
.main-content {
    margin-top: 100px;
    padding: 2rem;
}

/* Contenedor para el lema de inicio para mejorar contraste */
.intro-text-container {
    text-align: center;
    margin-bottom: 3rem;
    padding: 1rem;
    /* AJUSTE: Fondo oscuro semi-transparente para contraste */
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: white;
}
/* -------------------------------------------------------------------------- */

/* Hero section (Para que no se vea feo si no se usa) */
.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    background: transparent;
    color: white;
    margin-bottom: 3rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

/* Título */
.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: none;
    -webkit-text-fill-color: white;
    color: white;
    animation: none;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.hero-image-banner {
    width: 100%;
    max-width: 1200px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Estilos para la sección de Historia para mejorar contraste */
.history-section {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #003060, #001f3f);
    color: white;
    border-radius: 15px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.history-section h2 {
    color: #ffd700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.history-section p {
    color: #f0f0f0 !important;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
/* -------------------------------------------------------------------------- */

/* --- AJUSTE DE CARRUSEL --- */
.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 2rem auto;
    height: 450px; /* Mantener altura, ajustar si es necesario */
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
    color: white;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
}

.carousel-slide.active {
    opacity: 1;
}

.slide-content {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    max-width: 90%;
}

.slide-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.slide-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}
/* -------------------------- */


/* Tarjeta de distribuidor */
.distributor-card {
    background: linear-gradient(135deg, #2196F3, #21CBF3);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(33, 150, 243, 0.3);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.distributor-card:hover {
    transform: translateY(-5px);
}

.distributor-btn {
    background: white;
    color: #2196F3;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.distributor-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

/* Catálogo de productos */
.products-section {
    max-width: 1200px;
    margin: 0 auto;
}
.section-title 
{
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #21CBF3; /* AJUSTE DE COLOR */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}
.product-card {
    /* FONDO AJUSTADO a semi-transparente para la coherencia con el fondo de la sección */
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: #333; /* Texto oscuro sobre la tarjeta clara */
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.product-card.premium {
    background: linear-gradient(135deg, #1a1a1a, #333);
    color: white;
}

.product-card.premium::before {
    content: '✨ PREMIUM';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: black;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* --- AJUSTE IMAGEN DE PRODUCTO --- */
.product-image {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    border-radius: 10px;
    display: block;
    margin-bottom: 1rem;
    object-fit: contain;
}
/* ---------------------------------- */

.product-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.product-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-card.premium .product-description {
    color: #ccc;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2196F3;
    margin-bottom: 1rem;
}

.product-card.premium .product-price {
    color: #ffd700;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-primary {
    background: #2196F3;
    color: white;
}

.btn-primary:hover {
    background: #1976D2;
    transform: scale(1.05);
}

.btn-primary.loading {
    background: #0d47a1;
    cursor: wait;
    opacity: 0.8;
    transform: scale(0.98);
}

.btn-primary:active {
    transform: scale(0.98);
    background: #1976D2;
}

.btn-secondary {
    background: transparent;
    color: #2196F3;
    border: 2px solid #2196F3;
}

.btn-secondary:hover {
    background: #2196F3;
    color: white;
}

.product-card.premium .btn-secondary {
    color: #ffd700;
    border-color: #ffd700;
}

.product-card.premium .btn-secondary:hover {
    background: #ffd700;
    color: black;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    color: #333; /* Asegurar texto oscuro en el modal */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2196F3;
}

/* Carrito */
.cart-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    color: #333; /* Asegurar texto oscuro en carrito */
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-total {
    text-align: right;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1rem 0;
    color: #2196F3;
}

.payment-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.payment-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.stripe-btn {
    background: #635bff;
    color: white;
}

.paypal-btn {
    background: #0070ba;
    color: white;
}

.payment-btn:hover {
    transform: scale(1.05);
}

/* Páginas de productos y catálogo */
.products-page, .catalog-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 300;
    /* AJUSTE DE COLOR */
    color: white;
    margin-bottom: 3rem;
    letter-spacing: 2px;
}

/* Estructura de productos con sidebar */
.products-container {
    display: flex;
    gap: 2rem;
    min-height: 70vh;
}

.products-sidebar {
    width: 300px;
    /* AJUSTE DE FONDO para ser semi-transparente oscuro */
    background: rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    height: fit-content;
    position: sticky;
    top: 100px;
    color: white; /* Texto blanco en el sidebar oscuro */
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #21CBF3; /* Color de énfasis */
    margin-bottom: 1.5rem;
    text-align: center;
}

.product-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-list-item {
    margin-bottom: 0.5rem;
}

.product-button {
    width: 100%;
    /* AJUSTE DE BOTONES en sidebar */
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
}

.product-button:hover {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
    transform: translateX(5px);
}

.product-button.premium {
    background: linear-gradient(135deg, #1a1a1a, #333);
    color: #ffd700;
    border-color: #ffd700;
}

.product-button.premium:hover {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a1a1a;
}

.product-info {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-height: 80vh;
    overflow-y: auto;
    color: #333; /* Asegurar texto oscuro en el detalle */
    min-height: 600px; /* Aumentar tamaño vertical */
}

.product-detail {
    display: none;
}

.product-detail.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1;
transform: translateY(0); }
}

@keyframes electricEffect {
    0%, 100% {
        background-position: 0% 50%;
filter: brightness(1);
        text-shadow: 0 0 10px rgba(33, 150, 243, 0.3);
}
    50% {
        background-position: 100% 50%;
        filter: brightness(1.05);
text-shadow: 0 0 15px rgba(33, 150, 243, 0.4);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ========================================================== */
/* END OF PART 1 - CONTINUES BELOW                            */
/* ========================================================== */
/* ========================================================== */
/* OPTIMA PURIFY - STYLES.CSS (Corregido y Modernizado)       */
/* ========================================================== */

/* (Continuación de .product-detail) */

.product-detail h2 {
    color: #2196F3;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.product-detail.premium h2 {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-specs {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.spec-item:last-child {
    border-bottom: none;
}

.products-section-normal, .catalog-section-normal {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    color: #333;
}

.products-section-premium, .catalog-section-premium {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    padding: 3rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.products-section-premium::before, .catalog-section-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
}

.section-subtitle {
    font-size: 2rem;
    font-weight: 300;
    color: #2196F3;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 1px;
}

.section-subtitle-premium {
    font-size: 2rem;
    font-weight: 300;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 2px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.catalog-item {
    /* AJUSTE para que el fondo se vea bien sobre la sección premium */
    background: rgba(255, 255, 255, 0.05); 
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.catalog-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.catalog-section-normal .catalog-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #333;
}

.catalog-section-normal .catalog-item:hover {
    background: white;
    box-shadow: 0 15px 35px rgba(33, 150, 243, 0.2);
}

/* --- AJUSTE IMAGEN DE PRODUCTO EN CATÁLOGO --- */
.product-image-professional {
    width: 100%;
    height: 150px;
    background-color: #f0f0f0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    display: block; 
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* RUTAS CORREGIDAS A ABSOLUTAS: /images/... */
.product-image-professional.img-OP100 { background-image: url('/images/OP-100.png'); }
.product-image-professional.img-OP300 { background-image: url('/images/OP-300.png'); }
.product-image-professional.img-WC { background-image: url('/images/OP-WC.png'); }


.catalog-section-premium .product-image-professional {
    background: white; 
}

.catalog-section-premium .product-image-professional .product-icon {
    display: none;
}
/* ----------------------------------------------- */

/* --- VIDEO SECTION ARREGLO --- */
.video-section {
    max-width: 1000px;
    margin: 4rem auto;
    text-align: center;
    padding: 2rem;
    color: white; /* Asegurar texto visible */
}

.video-container {
    /* FONDO AJUSTADO a semi-transparente oscuro */
    background: rgba(0, 0, 0, 0.7); 
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.video-embed-container {
    position: relative;
    width: 100%;
    /* Proporción 16:9 (9/16 = 0.5625 = 56.25%) */
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-top: 1rem;
    border-radius: 10px;
}

.video-embed-container iframe,
.video-embed-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
/* ------------------------------- */

/* --- FOOTER --- */
.footer {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Ajuste para mejor distribución */
    gap: 1.5rem; /* Reducir el espacio entre columnas */
}

.footer-section h3 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-align: left; /* Alinear a la izquierda */
}

.footer-section p, .footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    display: block;
    transition: color 0.2s ease;
    text-align: left; /* Alinear a la izquierda */
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: flex-start; /* Alinear a la izquierda */
}

.social-link {
    background: #2196F3;
    color: white;
    padding: 0.8rem;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI Symbol', sans-serif;
}

.social-link[title="Facebook"] { background: #1877F2; }
.social-link[title="Instagram"] {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: white;
}
.social-link[title="Twitter"] { background: #1DA1F2; }
.social-link[title="WhatsApp"] { background: #25D366; }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #444;
    color: #888;
}

/* Responsive (Optimizado para móviles) */
@media (max-width: 768px) {

    .menu-toggle {
        display: block; /* Mostrar el botón de hamburguesa en móviles */
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 0;
    }

    .nav-menu {
        display: none; /* Ocultar el menú por defecto en móviles */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(33, 150, 243, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        z-index: 999;
        transition: transform 0.3s ease-in-out;
        transform: translateY(-100%);
    }

    .nav-menu.open {
        display: flex; /* Mostrar el menú cuando se le añade la clase 'open' */
        transform: translateY(0);
    }

    .nav-menu .nav-link {
        padding: 0.5rem 0;
        width: 80%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-menu .nav-link:last-child {
        border-bottom: none;
    }

    .nav-container {
        flex-direction: column;
    }
    .nav-menu {
        width: 100%;
        justify-content: space-around;
        gap: 0.5rem;
    }
    .header {
        padding: 1rem;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .products-container {
        flex-direction: column;
    }
    .products-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 2rem;
    }
    .product-info {
        padding: 1.5rem;
    }
    .footer-content {
       text-align: center;
        grid-template-columns: 1fr;
    }
    .distributor-card {
        padding: 1.5rem;
    }
    .product-actions {
        flex-direction: column;
    }
    .btn {
        margin-top: 0.5rem;
    }

    .floating-assistant {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

/* ========================================================== */

function startCarousel() {
    const slides = document.querySelectorAll('.carousel-slide');
    // console.log('Carousel slides found:', slides.length); // Eliminado
    if (slides.length <= 1) return; // No hace nada si solo hay una diapositiva

    setInterval(() => {
        slides[currentSlide].classList.remove('active');
        currentSlide = (currentSlide + 1) % slides.length;
        slides[currentSlide].classList.add('active');
    }, 4000);
}