/* Reset renforcé contre les styles de liste imposés par le thème */
.wct-wrapper ul.wct-tabs-list,
.wct-wrapper ul.wct-tabs-list li {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wct-wrapper {
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: stretch;
}

.wct-tabs-slot {
    flex: 0 0 220px;
    position: relative;
    overflow: hidden;
}

.wct-tabs-nav {
    width: 220px;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-radius: 0;
}

.wct-tabs-nav.wct-fixed {
    border-radius: 16px;
}

.wct-tabs-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

.wct-tabs-nav.wct-fixed.wct-fixed {
    position: fixed !important;
    z-index: 200 !important;
    top: 0;
    margin: 0 !important;
    max-width: none !important;
}

.wct-tabs-sentinel {
    height: 1px;
}

.wct-tab-link {
    display: block;
    padding: 10px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--cs-choco, #3B170D);
    background: #FFFFFF;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: normal;
}

.wct-tab-link:hover {
    background: color-mix(in srgb, var(--cs-orange, #EB6328) 15%, #FFFFFF);
}

.wct-tab-link.wct-active {
    background: var(--cs-orange, #EB6328);
    color: #FFFFFF;
}

.wct-content {
    flex: 1 1 auto;
    min-width: 0;
}

.wct-category-section {
    margin-bottom: 50px;
    scroll-margin-top: 20px;
}

.wct-wrapper.wct-wrapper h2.wct-category-title.wct-category-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    line-height: 1.3 !important;
    margin: 0 0 20px 0 !important;
    letter-spacing: normal !important;
    color: var(--cs-choco, #3B170D) !important;
}

.wct-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.wct-product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.wct-product-card a {
    text-decoration: none;
    color: inherit;
}

.wct-product-title {
    font-size: 15px;
    margin: 10px 0 5px;
}

.wct-product-price {
    display: block;
    font-weight: bold;
}

@media (max-width: 1024px) {
    .wct-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .wct-wrapper {
        flex-direction: column !important;
    }

    .wct-tabs-slot {
        width: 100%;
        flex: none;
    }

    .wct-wrapper .wct-tabs-nav {
        width: 100%;
        max-height: none !important;
        overflow: visible !important;
        background: #7D4B2E;
        border: none;
        border-radius: 0;
        padding: 8px;
    }

    .wct-wrapper .wct-tabs-nav.wct-fixed {
        border-radius: 999px;
    }

    .wct-wrapper .wct-back-to-menu {
        margin: 8px 12px;
    }

    .wct-wrapper .wct-tabs-scroll {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        max-height: 60px !important;
    }

    .wct-wrapper .wct-tabs-list {
        display: flex !important;
        flex-direction: row !important;
        white-space: nowrap;
        gap: 8px;
    }

    .wct-wrapper .wct-tab-link {
        flex: 0 0 auto;
        white-space: nowrap !important;
    }

    .wct-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .wct-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Grille de l'onglet "Tous" --- */
.wct-all-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.wct-category-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: 16px;
    overflow: hidden;
    border: none;
}

.wct-category-card-image-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    background: #FEF8F0;
}

.wct-category-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wct-category-card-title {
    padding: 10px 4px 0;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--cs-choco, #3B170D);
}

@media (max-width: 1024px) {
    .wct-all-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .wct-all-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Mode "écran d'accueil" pour l'onglet Tous --- */
.wct-has-menu-mode .wct-tabs-slot {
    display: none;
}

.wct-has-menu-mode .wct-content .wct-category-section:not(.wct-all-section) {
    display: none;
}

.wct-back-to-menu {
    display: none;
    flex: 0 0 auto;
    margin: 12px 12px 8px 12px;
    padding: 10px 18px;
    border: none;
    background: var(--cs-orange, #EB6328);
    color: #FFFFFF;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.wct-has-menu-mode.wct-browsing .wct-tabs-slot {
    display: block;
}

.wct-has-menu-mode.wct-browsing .wct-content .wct-category-section:not(.wct-all-section) {
    display: block;
}

.wct-has-menu-mode.wct-browsing .wct-all-section {
    display: none;
}

.wct-has-menu-mode.wct-browsing .wct-back-to-menu {
    display: inline-block;
}

/* =====================================================
   CHOCOLATE SARAYI - CARTES PRODUIT DANS WOO CATEGORIES TABS
   Adapté du CSS utilisé sur les autres pages du site
   (widget fazfood-products), pour garantir la même cohérence
   visuelle. Cible .wct-content au lieu de
   .elementor-widget-fazfood-products.
   ===================================================== */

.wct-wrapper {
    --cs-choco: #3B170D;
    --cs-orange: #EB6328;
    --cs-heart: rgba(59, 23, 13, 0.32);
    font-family: 'Poppins', sans-serif;
}

.wct-content,
.wct-content * {
    box-sizing: border-box;
}

/* --- Grille : nombre de colonnes par taille d'écran --- */
.wct-content .products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.wct-content .products li.product {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    float: none !important;
}

/* --- Carte produit --- */
.wct-content .product-block {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    overflow: hidden;
}

.wct-content .product-transition,
.wct-content .product-image {
    overflow: hidden;
}

.wct-content .product-image img {
    display: block;
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
}

/* --- Contenu de la carte --- */
.wct-content .product-caption {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 18px 18px 20px !important;
}

/* Titre + cœur */
.wct-content .product-caption-top {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 8px;
    align-items: flex-start;
    min-width: 0;
    margin-bottom: 18px !important;
}

.wct-content .woocommerce-loop-product__title {
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}

.wct-content .woocommerce-loop-product__title a {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;

    color: #222222 !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.16 !important;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    text-decoration: none !important;

    overflow: hidden;
    text-overflow: ellipsis;

    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
}

/* Wishlist : icône native conservée */
.wct-content .woosw-btn {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;

    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;

    color: var(--cs-heart) !important;
    line-height: 1 !important;
    font-size: 0 !important;
    text-indent: 0 !important;
    overflow: visible !important;
}

.wct-content .woosw-btn::before,
.wct-content .woosw-btn::after {
    font-size: 28px !important;
    line-height: 1 !important;
    text-indent: 0 !important;
    color: var(--cs-heart) !important;
}

.wct-content .woosw-btn.woosw-added::before,
.wct-content .woosw-btn.woosw-btn-added::before {
    color: var(--cs-choco) !important;
}

/* Prix + panier */
.wct-content .product-caption-bottom {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 8px;
    align-items: center;
    min-width: 0;
    margin-top: auto !important;
}

.wct-content .price {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.wct-content .short-description {
    display: none !important;
}

.wct-content .price,
.wct-content .price .amount,
.wct-content .price bdi,
.wct-content .price .woocommerce-Price-currencySymbol {
    color: var(--cs-choco) !important;
    font-size: 23px !important;
    font-weight: 800 !important;
    line-height: 1.05 !important;
    letter-spacing: -0.055em;
    white-space: nowrap !important;
}

/* Bouton panier : icône native conservée */
.wct-content .fazfood-add-to-cart {
    position: static !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;

    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;

    margin: 0 !important;
    transform: none !important;
}

.wct-content .fazfood-add-to-cart .button,
.wct-content .fazfood-add-to-cart .add_to_cart_button {
    display: flex !important;
    align-items: center;
    justify-content: center;

    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;

    padding: 0 !important;
    border-radius: 13px !important;
    background-color: var(--cs-orange) !important;
    border-color: var(--cs-orange) !important;

    overflow: hidden !important;
    white-space: nowrap !important;

    font-size: 0 !important;
    text-indent: -9999px !important;
}

.wct-content .fazfood-add-to-cart .button::before,
.wct-content .fazfood-add-to-cart .button::after {
    text-indent: 0 !important;
}

/* =====================================================
   RESPONSIVE — nombre de colonnes (spécifique au plugin)
   ===================================================== */

@media (max-width: 1024px) {
    .wct-content .products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 450px) {
    .wct-content .products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* =====================================================
   RESPONSIVE — affinage typographique (repris du CSS de
   référence utilisé sur les autres pages du site)
   ===================================================== */

@media (max-width: 1540px) {
    .wct-content .product-caption {
        padding: 17px 16px 18px !important;
    }
    .wct-content .product-caption-top {
        grid-template-columns: minmax(0, 1fr) 28px;
        gap: 7px;
        margin-bottom: 16px !important;
    }
    .wct-content .woocommerce-loop-product__title a {
        font-size: 19px !important;
        line-height: 1.15 !important;
        letter-spacing: -0.025em;
    }
    .wct-content .price,
    .wct-content .price .amount,
    .wct-content .price bdi,
    .wct-content .price .woocommerce-Price-currencySymbol {
        font-size: 22px !important;
        letter-spacing: -0.06em;
    }
    .wct-content .product-caption-bottom {
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 7px;
    }
    .wct-content .fazfood-add-to-cart,
    .wct-content .fazfood-add-to-cart .button,
    .wct-content .fazfood-add-to-cart .add_to_cart_button {
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
    }
}

@media (max-width: 1280px) {
    .wct-content .product-caption {
        padding: 16px 14px 17px !important;
    }
    .wct-content .woocommerce-loop-product__title a {
        font-size: 17px !important;
        line-height: 1.14 !important;
        letter-spacing: -0.03em;
    }
    .wct-content .woosw-btn {
        width: 26px !important;
        min-width: 26px !important;
        height: 26px !important;
        min-height: 26px !important;
    }
    .wct-content .price,
    .wct-content .price .amount,
    .wct-content .price bdi,
    .wct-content .price .woocommerce-Price-currencySymbol {
        font-size: 19px !important;
        letter-spacing: -0.065em;
    }
    .wct-content .product-caption-bottom {
        grid-template-columns: minmax(0, 1fr) 40px;
        gap: 6px;
    }
    .wct-content .fazfood-add-to-cart,
    .wct-content .fazfood-add-to-cart .button,
    .wct-content .fazfood-add-to-cart .add_to_cart_button {
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        border-radius: 11px !important;
    }
}

@media (max-width: 1024px) {
    .wct-content .product-caption {
        padding: 15px 13px 16px !important;
    }
    .wct-content .product-caption-top {
        grid-template-columns: minmax(0, 1fr) 26px;
        margin-bottom: 15px !important;
    }
    .wct-content .woocommerce-loop-product__title a {
        font-size: 18px !important;
        line-height: 1.14 !important;
    }
    .wct-content .price,
    .wct-content .price .amount,
    .wct-content .price bdi,
    .wct-content .price .woocommerce-Price-currencySymbol {
        font-size: 20px !important;
    }
}

@media (max-width: 767px) {
    .wct-content .product-caption {
        padding: 14px 11px 15px !important;
    }
    .wct-content .product-caption-top {
        grid-template-columns: minmax(0, 1fr) 24px;
        gap: 5px;
        margin-bottom: 13px !important;
    }
    .wct-content .woocommerce-loop-product__title a {
        font-size: 15px !important;
        line-height: 1.13 !important;
        letter-spacing: -0.035em;
    }
    .wct-content .woosw-btn {
        width: 24px !important;
        min-width: 24px !important;
        height: 24px !important;
        min-height: 24px !important;
    }
    .wct-content .product-caption-bottom {
        grid-template-columns: minmax(0, 1fr) 36px;
        gap: 5px;
    }
    .wct-content .price,
    .wct-content .price .amount,
    .wct-content .price bdi,
    .wct-content .price .woocommerce-Price-currencySymbol {
        font-size: 16px !important;
        letter-spacing: -0.08em;
    }
    .wct-content .fazfood-add-to-cart,
    .wct-content .fazfood-add-to-cart .button,
    .wct-content .fazfood-add-to-cart .add_to_cart_button {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
        border-radius: 10px !important;
    }
}

@media (max-width: 479px) {
    .wct-content .product-caption {
        padding: 12px 9px 14px !important;
    }
    .wct-content .product-caption-top {
        grid-template-columns: minmax(0, 1fr) 22px;
        gap: 4px;
        margin-bottom: 12px !important;
    }
    .wct-content .woocommerce-loop-product__title a {
        font-size: 13px !important;
        line-height: 1.12 !important;
        letter-spacing: -0.04em;
    }
    .wct-content .woosw-btn {
        width: 22px !important;
        min-width: 22px !important;
        height: 22px !important;
        min-height: 22px !important;
    }
    .wct-content .product-caption-bottom {
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: start;
    }
    .wct-content .price,
    .wct-content .price .amount,
    .wct-content .price bdi,
    .wct-content .price .woocommerce-Price-currencySymbol {
        font-size: 15px !important;
        letter-spacing: -0.075em;
    }
    .wct-content .fazfood-add-to-cart {
        justify-content: flex-start;
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
    }
    .wct-content .fazfood-add-to-cart .button,
    .wct-content .fazfood-add-to-cart .add_to_cart_button {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
        border-radius: 9px !important;
    }
}
