/* Container principal */
.jmc-models-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    /* IMPORTANTE PARA SWIPER */
}

/* Card base */
.jmc-card-inner {
    padding: 56px 21px 24px 21px;
    text-align: center;
    background: #FFF;
    box-shadow: 0 0 8px 0 rgba(209, 209, 209, 0.50);
}

.jmc-card-image img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.jmc-card-title {
    margin: 14px 0 10px;
    font-size: 18px;
    font-weight: 600;
}

.jmc-card-button {
    display: flex;
    padding: 14px 16px;
    background: #E30614;
    justify-content: center;
    text-align: center;
    width: 100%;
    color: #fff;
    text-decoration: none;
    margin-top: 24px;
    font-size: 16px;
    font-weight: 700;
    box-sizing: border-box;
}

.jmc-card-button:hover {
    color: #FFF;
    opacity: 0.8;
}

/* ===========================================================
   DESKTOP (GRID) — Swiper DESACTIVADO aquí
   =========================================================== */
@media (min-width: 1024px) {

    /* Reemplazamos el slider por grid */
    .jmc-models-swiper {
        overflow: visible !important;
    }

    .jmc-models-swiper .swiper-wrapper {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr);
        gap: 32px;
    }

    /* Swiper debe ignorar estos elementos en desktop */
    .jmc-models-swiper .swiper-slide {
        width: auto !important;
        margin: 0 !important;
    }

    .swiper-pagination,
    .swiper-button-prev,
    .swiper-button-next {
        display: none !important;
    }
}

/* ===========================================================
   MOBILE (SLIDER)
   =========================================================== */
@media (max-width: 1023px) {

    .jmc-models-swiper .swiper-wrapper {
        display: flex !important;
        /* PARA SLIDER */
    }

    .jmc-models-wrapper {
        overflow: hidden !important;
        position: relative;
        padding-bottom: 50px;
    }

    /* Asegurar que cada slide sea correcto */
    .swiper-slide {
        flex-shrink: 0;
    }

    /* Card con margen lateral para mobile - solo 1 visible centrado */
    .jmc-models-swiper {
        margin-left: 40px;
        margin-right: 40px;
        overflow: hidden !important;
    }

    /* Ocultar cards parciales de los costados */
    /* Todos visibles por defecto */
    .jmc-models-swiper .swiper-slide {
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    /* Si quieres puedes resaltar el activo */
    .jmc-models-swiper .swiper-slide-active {
        opacity: 1;
        transform: scale(1);
        /* opcional */
    }


    /* Ocultar flechas cuando solo hay 1 item */
    .jmc-models-wrapper.single-item .swiper-button-prev,
    .jmc-models-wrapper.single-item .swiper-button-next,
    .jmc-models-wrapper.single-item .swiper-pagination {
        display: none !important;
    }

    /* Sin padding-bottom cuando solo hay 1 item (no es slider) */
    .jmc-models-wrapper.single-item {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    /* === Paginación estilo barras (como CategoryList) === */
    .jmc-models-wrapper .swiper-pagination {
        display: flex !important;
        justify-content: center;
        gap: 6px;
        bottom: 10px;
        position: absolute;
        width: 100%;
    }

    .jmc-models-wrapper .swiper-pagination-bullet {
        width: 40px;
        height: 3px;
        border-radius: 10px;
        background: #ccc;
        opacity: 1;
    }

    .jmc-models-wrapper .swiper-pagination-bullet-active {
        background: #E30614;
        width: 40px;
    }

    /* === Flechas a los costados del card === */
    .jmc-models-wrapper .swiper-button-prev,
    .jmc-models-wrapper .swiper-button-next {
        display: flex !important;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        height: 32px;
        background-color: transparent;
        z-index: 10;
    }

    .jmc-models-wrapper .swiper-button-prev {
        left: 0;
    }

    .jmc-models-wrapper .swiper-button-next {
        right: 0;
    }

    .jmc-models-wrapper .swiper-button-prev::after,
    .jmc-models-wrapper .swiper-button-next::after {
        font-size: 18px;
        color: #E30614;
        font-weight: bold;
    }
}

.jmc-card-image {
    height: 170px;
    display: flex;
    align-items: center;
}