/* Estilos generales */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    min-height: 100vh; /* Altura mínima de la ventana */
    display: flex;
    flex-direction: column;
}

main {
    flex: 1; /* El contenido principal ocupa el espacio restante */
    padding: 20px;
}

/* Encabezado */
header {
    text-align: center;
    padding: 10px;
    background-color: #0367ad;
    color: white;
    position: relative;
    }

.logo {
    position: absolute;
    top: 10px;
    right: 10px;
    max-width: 150px; /* Ajusta según necesites */
    height: auto;
    z-index: 1; /* Asegura que esté sobre el pseudo-elemento */
}

.logo img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
}

/* Navegación */
nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

nav button {
    flex: 1;
    max-width: 200px;
    background-color: #0f6096;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 15px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

nav button:hover {
    background-color: #b90101;
    transform: scale(1.05);
}

/* Secciones */
section {
    margin: 20px auto;
    display: none;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 800px;
}

section.visible {
    display: block;
}

/* Pie de página */
footer {
    position: relative;
    background-color: #0f6096;
    padding: 10px;
    text-align: center;
    color: white;
    margin-top: auto;
    width: 100%;
    /* Elimina el border-radius directo */
}

.footer-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links button {
    background-color: #0367ad;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.footer-links button:hover {
    background-color: #b90101;
    transform: scale(1.05);
}

/* WhatsApp Bubble */
.whatsapp-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 9999;
    transition: transform 0.3s ease-in-out;
}

.whatsapp-bubble img {
    width: 100%;
    height: auto;
}

.whatsapp-bubble:hover {
    transform: scale(1.5);
}

/* Productos */
.productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    justify-items: center;
}

.producto {
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.producto:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.producto img {
    max-width: 100%;
    border-radius: 10px;
    height: auto;
}

.banner-personalizable {
    background-color: #e6f7ff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Carrusel */
.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 15px;
    padding: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.carousel-slide {
    display: flex;
    transition: opacity 1s ease-in-out;
}

.slide {
    min-width: 100%;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    /* Agrega esta línea para la transición */
    transition: opacity 2s ease-in-out; /* Duración: 0.5 segundos */
}

.slide.active {
    opacity: 1;
    position: relative;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: auto; /* Ajusta automáticamente la altura */
    object-fit: contain; /* Muestra toda la imagen sin recortar */
    aspect-ratio: 16/9; /* Mantén una relación de aspecto consistente */
    border-radius: 15px;
}

.carousel-prev {
    left: 15px; /* Alineado a la izquierda */
}

.carousel-next {
    right: 15px; /* Alineado a la derecha */
}


.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: rgb(255, 255, 255);
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 24px;
    z-index: 5;
    transition: opacity 1s ease-in-out;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.indicator {
    width: 12px;
    height: 12px;
    background: rgba(136, 141, 232, 0.7);
    border-radius: 50%;
    cursor: pointer;
    transition: opacity 1s ease-in-out;
}

.indicator.active {
    background: #0f6096;
}

.banner-personalizable-carousel {
    text-align: center;
    background-color: #0f6096; /* Color similar al footer/nav */
    color: white;
    padding: 15px;
    border-radius: 15px;
    margin: 10px 20px; /* Margen consistente con el main */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.banner-personalizable-carousel p {
    margin: 0;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

/* Media Queries */
@media (max-width: 768px) {
    header {
        font-size: 14px;
        padding: 20px;
    }

    .logo {
        top: 5px;
        right: 5px;
        max-width: 100px;
    }

    nav button {
        flex: 1 1 100%;
        max-width: 100%;
    }

    footer {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    body {
        margin: 10px;
    }

    .whatsapp-bubble {
        width: 50px;
        height: 50px;
    }

    .whatsapp-bubble img {
        width: 80%;
    }

    nav {
        flex-direction: column;
    }

    .producto {
        padding: 10px;
    }
}