
.cs-componentes-container {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.cs-componentes-grid, .cs-subgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    justify-content: center;
}

.cs-componente-item, .cs-sub-item {
    text-align: center;
    cursor: pointer;
    margin: 0 auto;
}

.cs-componente-item img, .cs-sub-item img {
    max-width: 100%;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.cs-subcategorias {
    display: none;
    background-color: #F0F0F0;
    padding: 16px;
    border-radius: 16px;
    text-align: center;
}

.cs-componente-nombre, .cs-sub-nombre {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
}

.cs-componente-item.active .cs-componente-nombre {
    border-bottom: 2px solid #000;
    display: inline-block;
}

.cs-subtitulo-padre {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
}

/* Carrusel para móviles y tablets */
@media (max-width: 1024px) {
    .cs-componentes-grid {
        display: flex;
        overflow-x: auto;
        gap: 16px;
        scroll-snap-type: x mandatory;
        padding-bottom: 10px;
        justify-content: flex-start;
    }

    .cs-componente-item {
        min-width: 100px;
        scroll-snap-align: start;
    }
}

@media screen and (min-width: 769px) {
    .cs-subgrid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .cs-sub-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-width: 150px;
        flex: 1 1 45%;
    }

    .cs-sub-imagen {
        border-radius: 20px;
        max-width: 100%;
        height: auto;
    }

    .cs-componentes-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .cs-componente-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-width: 140px;
        flex: 1 1 45%;
    }

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

@media (max-width: 1024px) {
    .cs-componentes-grid {
        display: flex;
        overflow-x: auto;
        gap: 16px;
        scroll-snap-type: x mandatory;
        padding-bottom: 10px;
        justify-content: flex-start;
    }

    .cs-componente-item {
        min-width: 100px;
        scroll-snap-align: start;
    }
}

@media screen and (min-width: 769px) {
    .cs-subgrid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .cs-sub-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-width: 150px;
        flex: 1 1 45%;
    }

    .cs-sub-imagen {
        border-radius: 20px;
        max-width: 100%;
        height: auto;
    }

    .cs-componentes-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .cs-componente-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-width: 140px;
        flex: 1 1 45%;
    }

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