body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.bloque-header-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: -10px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0px;
    background-color: #144A4A;
    color: white;
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    font: bold 20px 'Calibri', sans-serif;
    cursor: pointer;
}

nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
}

nav a:hover {
    background-color: #555;
    border-radius: 5px;
}

@media (max-width: 768px) {  /* cuando es tablet o celular */
    .accesos img {
        max-height: 70%;
    }

    nav a {
        font-size: 70%;
    }
}

.accesos {
    display: flex;
    gap: 15px;
    margin-right: 5px;
}

.accesos img {
    height: 40px;
    width: auto;
    cursor: pointer;
}

.accesos img:hover{
    background-color: #555;
    border-radius: 5px;
}

/*Ajustar la barra de navegación para pantallas de menor tamaño*/
@media (max-width: 768px) {
    header {
        flex-wrap: wrap;
    }

    .logo {
        flex-basis: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    nav {
        flex-basis: 100%;
        justify-content: center;
        margin-left: 10px;
    }

    nav a {
        padding: 10px 5px;
        /* font-size: 14px; */
    }

    .accesos {
        flex-basis: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .accesos img {
        height: 35px;
    }
}

/*MAIN---------------------------------------------------------------*/

main {
    padding: 0px;
    background-color: #f4f4f4;
    min-height: 70vh;
    margin: 0 auto;
    width: 100%;
}

main h1 {
    font-size: 28px;
}

.texto {
    font-size: 18px;
}

main li {
    font: bold 20px sans-serif;
    margin-top: 0px;
    margin-bottom: -10px;
}

.seccionProductos {
    background-color: #fff;
}

.seccionProductos > *:not(.carousel-container) {
    padding: 10px 30px 20px 30px;
    border-radius: 10px;
}

#subdivisionProductos {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    /*grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));*/
    gap: 30px;
    /*margin-left: 45px;*/
}

/*Ajustar los productos para pantallas de menor tamaño*/
@media (max-width: 800px) {
    #subdivisionProductos {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .producto h3 {
        font-size: 15px;
    }

    .producto p {
        font-size: 13px;
    }
}

.producto {
    background: white;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 300px;
}

.producto:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    /*z-index: 5;*/
}

.producto img {
    max-width: 100%;
    max-height: 150px; /*220*/
    border-radius: 5px;
    margin-bottom: 5px;
}

.producto h3, .producto p {
    margin-top: 5px;
    margin-bottom: 5px;
}

.producto button {
    background-color: #144A4A;
    color: #fff;
    font-size: 16px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 6px;
}

.producto button:hover {
    background-color: #e68900;
    transform: scale(1.02);
}

/*CARRUSEL---------------------------------------------------------------*/

.carousel-container {
    width: 100%;
    max-height: 450px;
    overflow: hidden;
    position: relative;
    margin: auto;
    /*border-radius: 12px;*/
    transition: height 0.3s ease;
    margin-bottom: 25px;
}

.carousel-slide {
    display: flex;
    transition: transform 0.8s ease-in-out;
    width: 100%;
}

.carousel-item {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.carousel-item img,
.carousel-item video {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.6);
    border: none;
    padding: 10px 16px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 10%;
    z-index: 10;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/*BARRA CATEGORIAS---------------------------------------------------------------*/

.barra-categorias {
    z-index: 999;
    background-color: #d8f3f3;
    display: flex;
    overflow-x: auto;
    /*padding: 12px 20px;*/
    padding: 0px 0px;
    gap: 16px;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    scroll-behavior: smooth;
    align-items: center;

    background-image: 
        linear-gradient(rgba(255,255,255,0.3), rgba(255,255,255,0.3)), 
        url('../img/temas/hojas.png');
    background-size: cover;         /* La imagen cubre todo el div sin perder proporción */
    background-position: center;    /* Centrada */
    background-repeat: no-repeat;   /* No se repite */
}

.barra-categorias a {
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    color: #333;
    background-color: transparent;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.barra-categorias a:hover,
.barra-categorias a.activa {
    background-color: #f05c44;
    color: white;
}

.bloque-categoria {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 8px;
    text-align: center;
    margin-bottom: 0px;
}

.bloque-categoria img {
    width: 35px;
    height: 30px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0px;
    margin-top: 0px;
}

.bloque-categoria a {
    text-decoration: none;
    color: inherit;
    font-size: 10px;

    display: block;
    max-width: 100px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
}