#a4w_popularproduct .featured-products {
    padding: 40px 20px;
    background-color: var(--light-bg, #FFF5FB);
}
.background-medium {
    background-color: var(--light-gray, #F5F5F5);
    width: 100% !important;
}
#a4w_popularproduct {
    padding: 0px 15px;
}

#a4w_popularproduct .container {
    max-width: var(--a4w-container-xxl-max-width, 1320px);
    margin: 0 auto;
    padding-bottom: 40px;
    width: min(calc(100% - var(--a4w-container-gutter, 2rem)), var(--a4w-container-xxl-max-width, 1320px)) !important;
}
#a4w_popularproduct .tab-pane .row {
    display: flex;
    justify-content: center;
}
#a4w_popularproduct .flex-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#a4w_popularproduct .flex-start {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#a4w_popularproduct .center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#a4w_popularproduct .products-section-title {
    font-size: var(--font-size-h2, 28.47px);
    font-weight: bold;
    margin-bottom: 20px;
    margin-top:30px;
    text-align: center;
    text-transform: math-auto;
}

/* En-tête de la sélection (2.3.0) — maquette Accueil, .f-shop-head / .f-link : titre à gauche,
   lien à droite aligné sur le bas du titre, passage sous le titre quand la place manque.
   Sans lien, l'en-tête garde la largeur du titre : le rendu d'avant ne bouge pas. */
#a4w_popularproduct .a4w-pp-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}

#a4w_popularproduct .a4w-pp-head--link {
    align-self: stretch;
}

/* Le lien s'aligne sur le bas de la boîte du titre : sa marge basse le décalerait. */
#a4w_popularproduct .a4w-pp-head--link .products-section-title {
    margin-bottom: 0;
    text-align: left;
}

#a4w_popularproduct .a4w-pp-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-top: 8px;
    font-weight: 600;
    color: var(--accent-ink-color, #1D191B);
    text-decoration: none;
}

#a4w_popularproduct .a4w-pp-link:hover,
#a4w_popularproduct .a4w-pp-link:focus {
    color: var(--accent-ink-color, #1D191B);
    text-decoration: none;
}

#a4w_popularproduct .a4w-pp-link:focus-visible {
    outline: 2px solid var(--accent-ink-color, #1D191B);
    outline-offset: 2px;
}

#a4w_popularproduct .a4w-pp-link__icon {
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    transition: var(--a4w-transition, transform 0.2s ease);
}

#a4w_popularproduct .a4w-pp-link:hover .a4w-pp-link__icon {
    transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
    #a4w_popularproduct .a4w-pp-link__icon {
        transition: none;
    }
}

#a4w_popularproduct .nav-tabs {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 50px;
    border-bottom: none;
    background: var(--primary-color, #593322);
    padding: 5px;
    border-radius: var(--border-radius-round, 30px);
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: fit-content;
    box-sizing: border-box;
}

#a4w_popularproduct .nav-tabs::-webkit-scrollbar {
    display: none;
}

#a4w_popularproduct .nav-tabs .nav-link {
    display: inline-block;
    padding: 10px 20px;
    font-size: var(--font-size-large, 18px);
    font-weight: bold;
    color: var(--text-color, #593322);
    border-radius: var(--border-radius-round, 30px);
    transition: all 0.3s;
    margin: 0 10px;
    user-select: none;
    cursor: grab;
    background: var(--primary-color, #593322);
}

#a4w_popularproduct .nav-tabs .nav-link:hover,
#a4w_popularproduct .nav-tabs .nav-link:focus {
    border-color: transparent;
    color: var(--dark-color, #000000);
}

#a4w_popularproduct .nav-tabs .nav-link.active {
    background-color: var(--background-color, #FFFFFF);
    color: var(--text-color, #593322);
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    cursor: grabbing;
}

#a4w_popularproduct .product-card {
    min-width: 220px;
    max-width: 220px;
    margin: 0 10px;
    padding: 20px;
    background-color: var(--background-color, #FFFFFF);
    border-radius: 15px;
    box-shadow: var(--box-shadow, 0 4px 10px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s;
}

#a4w_popularproduct .product-card:hover {
    transform: translateY(-10px);
}

#a4w_popularproduct .product-card img {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 15px;
}

#a4w_popularproduct .product-price {
    font-size: var(--font-size-price, 32px);
    color: var(--text-color, #593322);
    font-weight: bold;
}

#a4w_popularproduct .product-old-price {
    font-size: var(--font-size-small, 13px);
    color: var(--medium-gray, #666666);
    text-decoration: line-through;
    margin-left: 10px;
}

#a4w_popularproduct .btn-view-product {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid var(--btn-secondary-color, #593322);
    border-radius: var(--border-radius-round, 30px);
    color: var(--btn-secondary-color, #593322);
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 15px;
    position: relative;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

#a4w_popularproduct .btn-view-product:hover {
    background-color: var(--btn-primary-bg, #593322);
    color: var(--btn-primary-color, white);
    transform: translateX(15px);
}

#a4w_popularproduct .all-product-link {
    display: block;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 40px;
    color: var(--text-color, #593322);
    font-weight: bold;
    border: 1px solid var(--text-color, #593322);
    text-transform: uppercase;
    border-radius: 5px;
    padding: 15px 20px;
}

#a4w_popularproduct .product-miniature .product-description {
    display: flex;
    flex-direction: column;
    padding: 17px 15px;
}

#a4w_popularproduct .product-miniature .product-title a {
    font-weight: 400;
    font-size: var(--font-size-large, 18px);
    line-height: 21.78px;
    color: var(--text-color, #593322);
    height: 90px;
}

#a4w_popularproduct .swiper-button-next, #a4w_popularproduct .swiper-button-prev {
    top: var(--swiper-navigation-top-offset, 52.5%);
}

#a4w_popularproduct .product-miniature .product-title {
    text-align: left;
}

#a4w_popularproduct .product-miniature .product-price-and-shipping {
    font-weight: 600;
    font-size: 20px;
    line-height: 48px;
    color: var(--text-color, #593322);
    display: flex;
    justify-content: center;
    align-items: baseline;
}

#a4w_popularproduct .product-flags {
    margin-left: 10px;
}

#a4w_popularproduct .product-miniature .product-flags li.product-flag {
    font-size: var(--font-size-small, 13px);
    border-radius: var(--border-radius-round, 30px);
}

#a4w_popularproduct .product-flags li.product-flag.discount,
#a4w_popularproduct .product-flags li.product-flag.discount-amount,
#a4w_popularproduct .product-flags li.product-flag.discount-percentage {
    background-color: var(--secondary-color, #FFE4ED);
}

#a4w_popularproduct .nav-tabs .nav-item {
    padding: 5px 0px;
}
#a4w_popularproduct .nav-tabs .nav-link.active {
    border-color: white;
}

#a4w_popularproduct .swiper-wrapper {
    box-sizing: inherit;
  }
#a4w_popularproduct  .product-slide {
    position: relative;
}
#a4w_popularproduct .swiper-wrapper.centered {
    justify-content: center;
}

/* Carousel Swiper */
.a4w-popularproduct-carousel-wrapper {
    position: relative;
    padding: 0 50px;
}

.a4w-popularproduct-swiper {
    overflow: hidden;
}

.a4w-popularproduct-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.a4w-popularproduct-swiper .swiper-slide .product-miniature {
    width: 100%;
}

.a4w-popularproduct-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.a4w-popularproduct-prev,
.a4w-popularproduct-next {
    width: 40px;
    height: 40px;
    background: var(--background-color, #fff);
    border: 1px solid var(--medium-gray, #ccc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.a4w-popularproduct-prev:hover,
.a4w-popularproduct-next:hover {
    background: var(--primary-color, #000);
    color: #fff;
    border-color: var(--primary-color, #000);
}

.a4w-popularproduct-prev .material-icons,
.a4w-popularproduct-next .material-icons {
    font-size: 24px;
}

/* Grille pour 4 produits ou moins */
.a4w-popularproduct-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.pt-25 {
    padding: 25px 0px;
}

@media (max-width: 991px) {
    .featured-products .products {
        justify-content: center;
    }
    #a4w_popularproduct .swiper-wrapper.centered {
        justify-content: unset;
    }
    
}

@media (max-width: 900px) {
    #a4w_popularproduct .nav-tabs {
        width: 100%;
        background: transparent !important;
    }
    .page-index .featured-products .product {
        min-width: 300px;
    }
    #a4w_popularproduct .nav-tabs .nav-link.active {
        background-color: var(--btn-primary-bg, #593322);
        color: var(--btn-primary-color, white);
    }
    #a4w_popularproduct .nav-tabs .nav-link {
        background: var(--light-gray, #F5F5F5);
    }
    #a4w_popularproduct .product-miniature .thumbnail-container {
        width: 210px;
    }
}

@media (max-width: 426px) {
    .page-index .featured-products .product {
        min-width: 100% !important;
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .page-index .featured-products .product-miniature {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .page-index .featured-products .thumbnail-container {
        width: 100% !important;
        max-width: 100%;
        padding: 0 !important;
    }

    #a4w_popularproduct .swiper-slide {
        width: 342px !important;
        max-width: 342px !important;
        flex-shrink: 0;
    }

    #a4w_popularproduct .product-miniature {
        width: 342px !important;
    }

    .a4w-popularproduct-carousel-wrapper {
        padding: 0 35px;
    }

    .a4w-popularproduct-prev,
    .a4w-popularproduct-next {
        width: 30px;
        height: 30px;
    }

    .a4w-popularproduct-prev .material-icons,
    .a4w-popularproduct-next .material-icons {
        font-size: 20px;
    }
}

@media only screen and (max-width: 578px) {
    .featured-products .featured-products-inner, .featured-products {
        width: 100% !important;
        max-width: 100vw !important;
    }
}
