.swiper.my-product-swiper {
    padding-left: 20px;
    padding-right: 20px;
}

.my-product-swiper .swiper-wrapper {
    padding: 0 0 20px 0;
    margin-bottom: 40px;
}

.my-product-swiper .swiper-wrapper .swiper-slide {
    height: auto;
    padding: 4px;
}

.my-product-swiper .swiper-wrapper .swiper-pagination {
    bottom: 0;
}

.my-product-swiper .product-card {
    text-align: center;
    padding: 15px;
    border: 0 solid #eee;
    border-radius: 8px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    box-shadow: 0px 1px 4px #ddd;
}

.my-product-swiper .product-card .box__img {
    height: 200px;
    margin-bottom: 20px;
}

.my-product-swiper .product-card img {
    width: auto;
    height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto 0;
}

.my-product-swiper .product-card h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    min-height: 48px;
}

.my-product-swiper .product-card .desc {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.my-product-swiper .product-card .min-price {
    font-weight: bold;
    margin-top: auto;
    margin-bottom: 10px;
    color: #000000;
}

.my-product-swiper .product-card .btn.scopri-offerta {
    margin-top: 10px;
    display: inline-block;
    color: #FFFFFF;
    background-color: #FD3D15;
    border-radius: 0px;
    padding: 4px 20px;
    text-decoration: none;
    font-weight: 500;
}

/* ACF block output */
.my-product-swiper .acf-flex-block {
    margin-top: 10px;
    font-size: 0.9em;
    color: #555;
}

/* Swiper navigation */
.my-product-swiper .swiper-button-next,
.my-product-swiper .swiper-button-prev {
    color: #000 !important;
    /* colore nero */
    width: 30px;
    height: 30px;
    font-size: 20px !important;
    background: none !important;
}

.my-product-swiper .swiper-button-next::after,
.my-product-swiper .swiper-button-prev::after {
    color: #000 !important;
    font-size: 20px !important;
    font-weight: bold;
    display: inline-block;

}

.my-product-swiper .swiper-button-prev {
    left: -8px;
}

.my-product-swiper .swiper-button-next {
    right: -8px;
}

.my-product-swiper .swiper-button-next svg,
.my-product-swiper .swiper-button-prev svg {
    display: none !important;
}

/* Swiper pagination */
.my-product-swiper .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
}

.my-product-swiper .swiper-pagination-bullet-active {
    background: #ff3e16;
}

/* ==========================================
   ACF TERMS DISPLAY STYLES
   ========================================== */

.acf-terms-display-container {
    padding: 20px 0;
    position: relative;
}

/* ==========================================
   GRID LAYOUT
   ========================================== */

.acf-terms-grid {
    display: grid;
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* Grid Layout - Desktop */
.acf-terms-grid.grid-desktop-1 {
    grid-template-columns: 1fr;
}

.acf-terms-grid.grid-desktop-2 {
    grid-template-columns: repeat(2, 1fr);
}

.acf-terms-grid.grid-desktop-3 {
    grid-template-columns: repeat(3, 1fr);
}

.acf-terms-grid.grid-desktop-4 {
    grid-template-columns: repeat(4, 1fr);
}

.acf-terms-grid.grid-desktop-5 {
    grid-template-columns: repeat(5, 1fr);
}

.acf-terms-grid.grid-desktop-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Grid Layout - Tablet */
@media (max-width: 1024px) {
    .acf-terms-grid.grid-tablet-1 {
        grid-template-columns: 1fr !important;
    }

    .acf-terms-grid.grid-tablet-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .acf-terms-grid.grid-tablet-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .acf-terms-grid.grid-tablet-4 {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Grid Layout - Mobile */
@media (max-width: 768px) {
    .acf-terms-grid.grid-mobile-1 {
        grid-template-columns: 1fr !important;
    }

    .acf-terms-grid.grid-mobile-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ==========================================
   GRID CENTERED (righe incomplete centrate)
   ========================================== */

.acf-terms-grid--center {
    --gap: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gap);
}

.acf-terms-grid--center .term-item {
    width: calc((100% - (var(--cols, 1) - 1) * var(--gap)) / var(--cols, 1));
}

/* Numero colonne per breakpoint (riusa le classi grid-*-N già emesse) */
.acf-terms-grid--center.grid-desktop-1 { --cols: 1; }
.acf-terms-grid--center.grid-desktop-2 { --cols: 2; }
.acf-terms-grid--center.grid-desktop-3 { --cols: 3; }
.acf-terms-grid--center.grid-desktop-4 { --cols: 4; }
.acf-terms-grid--center.grid-desktop-5 { --cols: 5; }
.acf-terms-grid--center.grid-desktop-6 { --cols: 6; }

@media (max-width: 1024px) {
    .acf-terms-grid--center.grid-tablet-1 { --cols: 1; }
    .acf-terms-grid--center.grid-tablet-2 { --cols: 2; }
    .acf-terms-grid--center.grid-tablet-3 { --cols: 3; }
    .acf-terms-grid--center.grid-tablet-4 { --cols: 4; }
}

@media (max-width: 768px) {
    .acf-terms-grid--center { --gap: 15px; }
    .acf-terms-grid--center.grid-mobile-1 { --cols: 1; }
    .acf-terms-grid--center.grid-mobile-2 { --cols: 2; }
}

/* ==========================================
   SLIDER LAYOUT
   ========================================== */

.acf-terms-slider {
    padding: 50px 0;
    position: relative;
}

.acf-terms-slider .swiper-wrapper {
    padding-bottom: 60px;
}

.acf-terms-slider .swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
}

/* Slider Navigation */
.acf-terms-slider .swiper-button-next,
.acf-terms-slider .swiper-button-prev {
    color: #333 !important;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.acf-terms-slider .swiper-button-next:hover,
.acf-terms-slider .swiper-button-prev:hover {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.acf-terms-slider .swiper-button-next::after,
.acf-terms-slider .swiper-button-prev::after {
    font-size: 16px !important;
    font-weight: bold;
}

.acf-terms-slider .swiper-button-prev {
    left: 10px;
}

.acf-terms-slider .swiper-button-next {
    right: 10px;
}

/* Slider Pagination */
.acf-terms-slider .swiper-pagination {
    bottom: 0 !important;
}

.acf-terms-slider .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
    width: 8px;
    height: 8px;
    margin: 0 6px;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.acf-terms-slider .swiper-pagination-bullet-active {
    background: #000000;
    transform: scale(1.4);
}

/* ==========================================
   TERM ITEM STYLES (COMMON)
   ========================================== */

.term-item {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}
.term-item a.term-link {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
}

.term-card {
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1 1 auto;
    width: 100%;
    min-height: 280px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}


.term-image {
    width: 90%;
    aspect-ratio: 4 / 3;
    margin: 5% auto 32px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.term-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.term-card:hover .term-image img {
    transform: scale(1.1);
}

.term-card .term-title {
    margin: 0;
    color: #333;
    text-transform: uppercase;
    transition: color 0.3s ease;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.term-card:hover .term-title {}

.term-card .term-description {
    margin: 0;
    padding: 0 10px;
    color: #888;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 400;
    text-align: center;
}

.term-card .term-description p {
    margin: 0 0 0.5em;
}

.term-card .term-description p:last-child {
    margin-bottom: 0;
}

/* ==========================================
   ROUND IMAGE VARIANT
   ========================================== */

.term-image--round {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
}

.term-image--round img {
    border-radius: 50%;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
    .term-image--round {
        width: 100px;
        height: 100px;
        aspect-ratio: unset;
    }

    .acf-terms-display-container {
        padding: 15px 0;
    }

    .acf-terms-grid {
        gap: 15px;
    }

    .acf-terms-slider {
        padding: 0 20px 40px 20px;
    }

    .acf-terms-slider .swiper-button-next,
    .acf-terms-slider .swiper-button-prev {
        width: 35px;
        height: 35px;
        margin-top: -17px;
    }

    .acf-terms-slider .swiper-button-next::after,
    .acf-terms-slider .swiper-button-prev::after {
        font-size: 14px !important;
    }

    .acf-terms-slider .swiper-button-prev {
        left: 5px;
    }

    .acf-terms-slider .swiper-button-next {
        right: 5px;
    }

    .term-card {
        padding: 15px;
        min-height: 240px;
    }

    .term-title {
        font-size: 1rem;
    }

    .term-card .term-description {
        font-size: 0.875rem;
    }
}
@media (max-width: 480px) {
    .acf-terms-slider {
        padding: 0 30px 40px 30px;
    }

    .term-card {
        min-height: unset;
    }

    .term-title {
        font-size: 0.95rem;
    }

    .term-card .term-description {
        font-size: 0.85rem;
        padding: 0 5px;
    }
}