/*
 Theme Name:   Jayeon Child
 Theme URI:    https://jayeon.fr
 Description:  Child Theme de Astra — Page produit WooCommerce style Erborian
 Author:       Lucie Schoeni
 Author URI:   https://jayeon.fr
 Template:     astra
 Version:      1.0.1
 Text Domain:  jayeon-child
*/

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    --jy-green:       #3d5a40;
    --jy-green-hover: #2e4530;
    --jy-green-light: #9AA598;
    --jy-green-text:  #536150;
    --jy-bg:          #F7FCF7;     
    --jy-bg-card:     #536150;  //f0efe9   
    --jy-text:        #536150;
    --jy-text-muted:  #9AA598;
    --jy-border:      #dedad4;
    --jy-radius:      12px;
    --jy-transition:  0.22s ease;
}

/* ============================================================
   FOND DE PAGE PRODUIT
   ============================================================ */
body.single-product {
    background: var(--jy-bg) !important;
}


/* ============================================================
   LAYOUT PRINCIPAL — 2 COLONNES
   ============================================================ */
.woocommerce div.product {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0;
    align-items: flex-start; /* LES DEUX COLONNES PARTENT DU HAUT */
}

/* ---- COLONNE IMAGE (gauche) ---- */
.woocommerce div.product .woocommerce-product-gallery {
    width: 52% !important;
    float: none !important;
    padding: 0 48px 0 0;
    margin: 0 !important;
    position: sticky;
    top: 24px;
    align-self: flex-start;
}

/* ---- COLONNE SUMMARY (droite) ---- */
.woocommerce div.product .summary.entry-summary {
    width: 48% !important;
    float: none !important;
    padding: 0 0 60px 48px;
    margin: 0 !important;
    border-left: 1px solid var(--jy-border);
    clear: none !important;
}

/* ============================================================
   GALERIE IMAGE
   ============================================================ */
.woocommerce-product-gallery__wrapper {
    background: #fff;
    border-radius: var(--jy-radius);
}

.woocommerce-product-gallery .flex-viewport {
    border-radius: var(--jy-radius);
    background: #f8f8f6;
    border: 1.5px solid var(--jy-border);
}

.woocommerce-product-gallery__image img {
    display: block;
    width: 100%;
}

/* Miniatures */
.woocommerce-product-gallery .flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    list-style: none;
    padding: 0;
}

.woocommerce-product-gallery .flex-control-thumbs li {
    width: 70px !important;
}

.woocommerce-product-gallery .flex-control-thumbs li img {
    border-radius: 4px;
    border: 1.5px solid transparent;
    cursor: pointer;
    opacity: 0.65;
    transition: border-color var(--jy-transition), opacity var(--jy-transition);
}

.woocommerce-product-gallery .flex-control-thumbs li img.flex-active,
.woocommerce-product-gallery .flex-control-thumbs li img:hover {
    border-color: var(--jy-green);
    opacity: 1;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.woocommerce-breadcrumb {
    font-size: 12px;
    color: var(--jy-text-muted);
    margin-bottom: 28px;
}

.woocommerce-breadcrumb a {
    color: var(--jy-text-muted);
    text-decoration: none;
}

/* ============================================================
   TITRE PRODUIT
   ============================================================ */
.woocommerce div.product .product_title.entry-title {
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 600;
    line-height: 1.25;
    color: var(--jy-text);
    margin: 0 0 6px !important;
    letter-spacing: -0.01em;
}

/* ============================================================
   MARQUE — sous le titre, texte plain muted
   ============================================================ */
.jayeon-brand-name {
    font-size: 13px;
    color: var(--jy-text-muted);
    margin: 0 0 16px !important;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* ============================================================
   PRIX
   ============================================================ */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    font-size: 22px !important;
    font-weight: 700;
    color: var(--jy-text) !important;
    margin: 0 0 6px !important;
    display: block;
}

.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
    font-size: 15px;
    font-weight: 400;
    color: var(--jy-text-muted) !important;
    opacity: 1;
    margin-right: 8px;
}

.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins {
    text-decoration: none;
    color: #c0392b;
}

/* ============================================================
   EN STOCK — texte plain sous le prix (comme Erborian)
   ============================================================ */
.jayeon-stock-text {
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 20px !important;
}

.jayeon-stock-text.in-stock {
    color: var(--jy-green-text);
}

.jayeon-stock-text.out-of-stock {
    color: #c0392b;
}

/* Cacher le stock WooCommerce par défaut */
.woocommerce div.product .stock {
    display: none !important;
}

/* ============================================================
   FORMULAIRE PANIER
   ============================================================ */
.woocommerce div.product form.cart {
    display: flex !important;
    align-items: stretch;
    gap: 12px;
    margin: 0 0 14px !important;
}

/* Wrapper quantité */
.woocommerce div.product form.cart .quantity {
    display: flex !important;
    align-items: center;
    border: 1.5px solid var(--jy-border);
    border-radius: 50px; /* pilule comme Erborian */
    background: #fff;
    overflow: hidden;
    min-width: 108px;
    flex-shrink: 0;
}

.woocommerce div.product form.cart .quantity .qty {
    width: 36px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--jy-text);
    padding: 0;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: none;
}

.woocommerce div.product form.cart .quantity .qty::-webkit-inner-spin-button,
.woocommerce div.product form.cart .quantity .qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Boutons − et + injectés par JS */
.jayeon-qty-btn {
    width: 36px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: 20px;
    font-weight: 300;
    color: var(--jy-text);
    transition: background var(--jy-transition);
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
    user-select: none;
}

.jayeon-qty-btn:hover {
    background: var(--jy-bg-card);
}

.jayeon-qty-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Bouton Ajouter au panier */
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce div.product form.cart button[type="submit"] {
    flex: 1;
    background: #658A68 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important; /* pilule */
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    padding: 0 28px !important;
    height: 50px;
    cursor: pointer;
    transition: background var(--jy-transition), transform var(--jy-transition);
    box-shadow: none !important;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover,
.woocommerce div.product form.cart button[type="submit"]:hover {
    background: var(--jy-green-hover) !important;
    transform: translateY(-1px);
}

/* ============================================================
   ALMA — texte "payer en plusieurs fois"
   ============================================================ */
.jayeon-alma-text {
    font-size: 12.5px;
    color: var(--jy-text-muted);
    margin: 0 0 16px !important;
}

.jayeon-alma-text strong {
    color: #fa5022;
}

/* ============================================================
   DESCRIPTION COURTE — entre Alma et livraison
   ============================================================ */
.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 13.5px;
    line-height: 1.75;
    color: #555;
    margin: 0 0 18px !important;
    padding: 0 !important;
    border: none !important;
}

.woocommerce div.product .woocommerce-product-details__short-description p {
    margin: 0 0 10px;
}

.woocommerce div.product .woocommerce-product-details__short-description p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   LIVRAISON + ICÔNES PAIEMENT
   ============================================================ */
.jayeon-shipping-payment {
    margin-bottom: 28px;
}

.jayeon-delivery-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--jy-text);
    padding: 5px 0;
}

.jayeon-delivery-row svg {
    color: var(--jy-green);
    flex-shrink: 0;
}

/* Icônes paiement — discrètes, pas de style bouton */
.jayeon-pay-icons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 12px;
}

.jayeon-pay-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 0 6px;
    border: 0.5px solid #d0cdc7;
    border-radius: 3px;
    background: #fafaf8;
    min-width: 32px;
    opacity: 0.75;
    cursor: default;
    pointer-events: none; /* pas interactif */
}

.jayeon-pay-icon svg {
    display: block;
}

/* ============================================================
   WISHLIST
   ============================================================ */
.woocommerce div.product .yith-wcwl-add-to-wishlist {
    margin: 0 0 20px !important;
}
.yith-wcwl-add-to-wishlist-button.yith-wcwl-add-to-wishlist-button--anchor svg.yith-wcwl-icon-svg, .yith-wcwl-add-to-wishlist-button.yith-wcwl-add-to-wishlist-button--anchor img{
    max-width: 20px !important;
    width: 20px !important;
    height: 20px !important;
}

.yith-wcwl-add-to-wishlist-button.yith-wcwl-add-to-wishlist-button--icon-button:is(button) svg.yith-wcwl-add-to-wishlist-button-icon{
    width: 20px;
    height: 20px;
    margin-top: 10px;
}

.add_to_wishlist,
.yith-wcwl-add-button a {
    font-size: 12.5px !important;
    color: var(--jy-text-muted) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    transition: color var(--jy-transition);
    max-width: 20px !important;
    width: 20px !important;
}

.yith-wcwl-add-to-wishlist-button__label{
    color: #536150 !important;
    font-size: 14px !important;
}

.add_to_wishlist:hover,
.yith-wcwl-add-button a:hover {
    color: var(--jy-green) !important;
}

/* ============================================================
   MÉTAS PRODUIT — caché (marque déjà affichée au-dessus)
   ============================================================ */
.woocommerce div.product .product_meta {
    display: none !important;
}

/* ============================================================
   ACCORDÉONS
   ============================================================ */
.jayeon-accordions {
    border-top: 1px solid var(--jy-border);
    margin-top: 6px;
}

.jayeon-accordion {
    border-bottom: 1px solid var(--jy-border);
}

.jayeon-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 0;
    cursor: pointer;
    background: transparent;
    border: none;
    text-align: left;
   /* transition: color var(--jy-transition); */
}

.jayeon-accordion-header:hover {
  /*  color: var(--jy-green); */
}

.jayeon-accordion-title {
    font-size: 15px;
    font-weight: 500;
    color: inherit;
    letter-spacing: 0.01em;
    color: #536150;
}

.jayeon-accordion-icon {
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
    color: var(--jy-text-muted);
    //transition: transform var(--jy-transition), color var(--jy-transition);
    flex-shrink: 0;
}

.jayeon-accordion.is-open .jayeon-accordion-icon {
    transform: rotate(45deg);
    //color: var(--jy-green);
}

.jayeon-accordion-body {
    padding: 0 0 24px;
    font-size: 13.5px;
    line-height: 1.8;
    color: #536150;
    animation: jayeonFadeIn 0.2s ease;
}

.jayeon-accordion-body[hidden] {
    display: none;
}

@keyframes jayeonFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Tableau attributs WooCommerce dans l'accordéon */
.jayeon-accordion-body table.shop_attributes {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.jayeon-accordion-body table.shop_attributes th {
    text-align: left;
    font-weight: 600;
    //color: var(--jy-text);
    padding: 9px 16px 9px 0;
    width: 42%;
    vertical-align: top;
    border-bottom: 1px solid var(--jy-border);
}

.jayeon-accordion-body table.shop_attributes td {
    padding: 9px 0;
    color: var(--jy-text-muted);
    border-bottom: 1px solid var(--jy-border);
    vertical-align: top;
}

.jayeon-accordion-body table.shop_attributes tr:last-child th,
.jayeon-accordion-body table.shop_attributes tr:last-child td {
    border-bottom: none;
}

.jayeon-accordion-body p { margin: 0 0 10px; }
.jayeon-accordion-body p:last-child { margin-bottom: 0; }
.jayeon-accordion-body ul { padding-left: 18px; margin: 0; }
.jayeon-accordion-body ul li { margin-bottom: 5px; }

/* Valeur d'attribut dans accordéon */
.jayeon-attr-value {
    font-size: 13.5px;
    line-height: 1.75;
    color: #536150;
    margin: 0;
}

/* ============================================================
   CACHER LES ANCIENS TABS DU BAS DE PAGE
   ============================================================ */
.woocommerce-tabs.wc-tabs-wrapper,
.woocommerce-tabs {
    display: none !important;
}

/* ============================================================
   PRODUITS SIMILAIRES — style Erborian (photo 3)
   ============================================================ */
.woocommerce .related.products,
.woocommerce .up-sells.upsells.products {
    margin-top: 0;
    padding: 60px 0;
    background: var(--jy-bg);
    clear: both;
    width: 100%;
}

.woocommerce .related.products h2,
.woocommerce .up-sells.upsells.products h2 {
    text-align: center;
    font-size: 26px;
    font-weight: 500;
    color: var(--jy-text);
    letter-spacing: -0.01em;
    margin: 0 0 40px !important;
    border: none !important;
}

/* Grille 4 colonnes — sans cartes, style Erborian */
.woocommerce .related.products ul.products,
.woocommerce .up-sells.upsells.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Item produit — pas de carte, juste le contenu */
.woocommerce .related.products ul.products li.product,
.woocommerce .up-sells.upsells.products ul.products li.product {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    position: relative;
}

/* Lien */
.woocommerce .related.products ul.products li.product a.woocommerce-loop-product__link,
.woocommerce .up-sells.upsells.products ul.products li.product a.woocommerce-loop-product__link {
    display: block;
    padding: 0;
    text-decoration: none;
}

/* Image — fond clair, hover léger */
.woocommerce .related.products ul.products li.product img,
.woocommerce .up-sells.upsells.products ul.products li.product img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #f0efe9;
    display: block;
    //padding: 24px;
    border-radius: 12px;
    transition: opacity var(--jy-transition);
}

.woocommerce .related.products ul.products li.product:hover img,
.woocommerce .up-sells.upsells.products ul.products li.product:hover img {
    opacity: 0.85;
}

/* Marque */
.jayeon-loop-brand {
    display: block;
    font-size: 14px;
    color: var(--jy-text-muted);
    font-weight: 400;
    margin: 12px 0 2px;
    padding: 0;
}

/* Titre */
.woocommerce .related.products ul.products li.product .woocommerce-loop-product__title,
.woocommerce .up-sells.upsells.products ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px;
    font-weight: 500;
    color: #536150;
    line-height: 1.4;
    margin: 0 0 6px !important;
    padding: 0 !important;
}

.woocommerce .related.products ul.products li.product .woocommerce-loop-product__title,
.woocommerce .up-sells.upsells.products ul.products li.product .woocommerce-loop-product__title {

    text-align: left !important;

}

/* Prix */
.woocommerce .related.products ul.products li.product .price,
.woocommerce .up-sells.upsells.products ul.products li.product .price {
    font-size: 13px !important;
    font-weight: 700;
    color: var(--jy-text) !important;
    display: block;
    padding: 0 !important;
    margin: 0 !important;
}

/* Cacher bouton panier */
.woocommerce .related.products ul.products li.product .button,
.woocommerce .up-sells.upsells.products ul.products li.product .button,
.woocommerce .related.products ul.products li.product .added_to_cart,
.woocommerce .up-sells.upsells.products ul.products li.product .added_to_cart {
    display: none !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .woocommerce div.product .woocommerce-product-gallery,
    .woocommerce div.product .summary.entry-summary {
        width: 100% !important;
        padding: 0 !important;
        border-left: none !important;
        position: relative;
        top: 0;
    }

    .woocommerce div.product .summary.entry-summary {
        margin-top: 28px !important;
        padding-top: 24px !important;
        border-top: 1px solid var(--jy-border) !important;
    }

    .woocommerce .related.products ul.products,
    .woocommerce .up-sells.upsells.products ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 520px) {
    .woocommerce div.product form.cart {
        flex-wrap: wrap;
    }

    .woocommerce div.product .product_title.entry-title {
        font-size: 20px;
    }

    .woocommerce .related.products ul.products,
    .woocommerce .up-sells.upsells.products ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .woocommerce .related.products ul.products li.product img,
    .woocommerce .up-sells.upsells.products ul.products li.product img {
        height: 150px;
    }

    button,
    .jayeon-accordion-header,
    .jayeon-accordion-header:hover,
    .jayeon-accordion-header:focus,
    .jayeon-accordion-header:active {
        background: transparent !important;
        background-color: transparent !important;
        color: none !important;
        box-shadow: none !important;
        outline: none !important;
    }
}

/* ============================================================
   PAGE BOUTIQUE — SIDEBAR ACCORDÉONS
   ============================================================ */

/* Reset widget par défaut */
.widget-area .widget {
    //border-bottom: 1px solid var(--jy-border);
    margin: 0 !important;
    padding: 0 !important;
}

.widget-area .widget:first-child {
    //border-top: 1px solid var(--jy-border);
}

/* Titre widget → header accordéon */
.widget-area .widget-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--jy-text) !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0 !important;
    margin: 0 !important;
    user-select: none;
    border: none !important;
    background: transparent !important;
    position: relative;
    transition: color var(--jy-transition);
}

.widget-area .widget-title:hover {
    color: var(--jy-green) !important;
}

/* Icône +/× */
.widget-area .widget-title::after {
    content: '+';
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    color: var(--jy-text-muted);
    transition: transform var(--jy-transition), color var(--jy-transition);
    flex-shrink: 0;
}

.widget-area .widget.is-open .widget-title::after {
    transform: rotate(45deg);
    color: var(--jy-green);
}

/* Contenu widget — wrap par JS */
.widget-area .jayeon-widget-body {
    padding-bottom: 18px;
    overflow: hidden;
}

/* ---- Listes filtres (layered nav, catégories) ---- */
.widget-area .woocommerce-widget-layered-nav-list,
.widget-area .product-categories,
.widget-area ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.widget-area .woocommerce-widget-layered-nav-list li,
.widget-area .product-categories li,
.widget-area ul li {
    padding: 0 !important;
    margin: 0 !important;
}

.widget-area .woocommerce-widget-layered-nav-list li a,
.widget-area .product-categories li a,
.widget-area ul:not(.jayeon-sort-list) li a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--jy-text);
    text-decoration: none;
    padding: 5px 0;
    transition: color var(--jy-transition);
    line-height: 1.4;
}

.widget-area .woocommerce-widget-layered-nav-list li a:hover,
.widget-area .product-categories li a:hover {
    color: var(--jy-green);
}

/* Filtre actif */
.widget-area li.wc-layered-nav-term--selected > a,
.widget-area li.chosen > a,
.widget-area li.current-cat > a {
    color: var(--jy-green) !important;
    font-weight: 600;
}

.jayeon-check-mark {
    font-size: 10px;
    color: var(--jy-green);
    margin-right: 2px;
}

.jayeon-overlay-content .jayeon-check-mark {
    color: var(--jy-green);
}

/* Compteur dans les filtres */
.widget-area .woocommerce-widget-layered-nav__item-count,
.widget-area .count {
    font-size: 11px;
    color: var(--jy-text-muted);
    margin-left: auto;
}

/* Masquer le bouton WooCommerce "Voir plus" natif — remplacé par notre texte */
.widget-area .woocommerce-widget-layered-nav__button-toggle {
    display: none !important;
}

/* Lien Voir plus / Voir moins */
.jayeon-toggle-more {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--jy-text-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color var(--jy-transition);
}

.jayeon-toggle-more:hover {
    color: var(--jy-green);
    text-decoration-color: var(--jy-green);
}

/* Titre "Filtres" au-dessus des accordéons sidebar */
.jayeon-filters-heading-wrap {
    padding: 20px 0 8px;
}

.jayeon-filters-heading {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: var(--jy-text) !important;
    margin: 0 !important;
    padding: 0 0 12px !important;
    border-bottom: 1px solid var(--jy-border) !important;
}

/* Cases à cocher filtres */
.widget-area .woocommerce-widget-layered-nav-list__item a,
.jayeon-overlay-content .woocommerce-widget-layered-nav-list__item a {
    display: flex;
    align-items: center;
    gap: 0;
}

.jayeon-cb {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1.5px solid #c8c5be;
    border-radius: 3px;
    margin-right: 8px;
    background: #fff;
    transition: background var(--jy-transition), border-color var(--jy-transition);
    position: relative;
    top: 0;
}

.wc-layered-nav-term--selected .jayeon-cb {
    background: var(--jy-green);
    border-color: var(--jy-green);
}

.wc-layered-nav-term--selected .jayeon-cb::after {
    content: '';
    display: block;
    width: 9px;
    height: 5px;
    border-left: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

/* ---- Slider prix — double range avec champs de saisie ---- */
.jayeon-price-slider-wrap {
    padding: 6px 0 4px;
}

.jayeon-price-track-container {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.jayeon-price-track {
    display: none;
}

.jayeon-price-range {
    position: absolute;
    height: 2px;
    background: var(--jy-green);
    border-radius: 1px;
    pointer-events: none;
}

.jayeon-price-thumb {
    position: absolute;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
    border: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

/* Track natif entierement transparent — seul le .jayeon-price-range (vert) est visible */
.jayeon-price-thumb::-webkit-slider-runnable-track {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: 2px;
}

.jayeon-price-thumb::-moz-range-track {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: 2px;
}

.jayeon-price-thumb::-ms-track {
    background: transparent !important;
    border-color: transparent !important;
    color: transparent !important;
}

/* Poignees carrees comme dans la maquette */
.jayeon-price-thumb::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: var(--jy-green);
    border: none;
    cursor: pointer;
    pointer-events: all;
    transition: opacity 0.15s;
}

.jayeon-price-thumb::-webkit-slider-thumb:hover {
    opacity: 0.82;
}

.jayeon-price-thumb::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: var(--jy-green);
    border: none;
    cursor: pointer;
    pointer-events: all;
}

/* Champs de saisie en pilule */
.jayeon-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jayeon-price-input-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    border: 1px solid var(--jy-border);
    border-radius: 30px;
    padding: 7px 14px;
    gap: 5px;
    background: #fff;
    transition: border-color 0.15s;
}

.jayeon-price-input-wrap:focus-within {
    border-color: var(--jy-green);
}

.jayeon-price-currency {
    font-size: 13px;
    color: var(--jy-text-muted);
    flex-shrink: 0;
}

.jayeon-price-input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100%;
    font-size: 13px;
    color: var(--jy-text);
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield;
}

.jayeon-price-input::-webkit-outer-spin-button,
.jayeon-price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.jayeon-price-separator {
    font-size: 11px;
    color: var(--jy-text-muted);
    white-space: nowrap;
    letter-spacing: 0.05em;
}

/* AJAX — état de chargement sur la grille produits */
.jayeon-ajax-loading {
    position: relative;
    min-height: 200px;
    pointer-events: none;
}

.jayeon-ajax-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(245, 245, 240, 0.75);
    z-index: 10;
    border-radius: 4px;
}

.jayeon-ajax-loading::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 50%;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    border: 2px solid var(--jy-border);
    border-top-color: var(--jy-green);
    border-radius: 50%;
    animation: jy-spin 0.7s linear infinite;
    z-index: 11;
}

@keyframes jy-spin {
    to { transform: rotate(360deg); }
}

/* ---- Prix (range slider WC natif — masqué) ---- */
.widget-area .price_slider_wrapper {
    padding-top: 8px;
}

.widget-area .price_slider_amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    font-size: 12px;
    color: var(--jy-text);
}

.widget-area .price_slider_amount .button {
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--jy-green) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 6px 16px !important;
    cursor: pointer;
    box-shadow: none !important;
}

/* ---- Widget tri (jayeon-sort-widget) ---- */
.widget-area .jayeon-sort-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.widget-area .jayeon-sort-list li {
    padding: 0 !important;
    margin: 0 !important;
}

.widget-area .jayeon-sort-list li a {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--jy-text);
    text-decoration: none;
    padding: 5px 0;
    transition: color var(--jy-transition);
}

.widget-area .jayeon-sort-list li.active a,
.widget-area .jayeon-sort-list li a:hover {
    color: var(--jy-green);
    font-weight: 600;
}

.widget-area .jayeon-sort-list li.active a::before {
    content: '•';
    margin-right: 6px;
    font-size: 14px;
}

/* ---- Heading "Filtres" (1er widget si c'est un texte) ---- */
.widget-area .jayeon-sort-widget:first-child {
    border-top: 1px solid var(--jy-border);
}

/* Barre resultats + tri — autoriser retour a la ligne pour les filtres actifs */
.woocommerce .woocommerce-products-header + *,
.woocommerce-page .woocommerce-ordering,
.ast-woocommerce-container .woocommerce-result-count,
.ast-woocommerce-container .woocommerce-ordering {
    /* pas de changement de layout ici */
}

.woocommerce .before-shop-loop,
.ast-woocommerce-container > .woocommerce-result-count,
.ast-woocommerce-container > form.woocommerce-ordering {
    /* garder le tri et resultats en ligne */
}

/* Conteneur direct qui englobe resultats + tri + filtres actifs */
.ast-woocommerce-container {
    flex-wrap: wrap !important;
}

/* ============================================================
   PAGE BOUTIQUE — FILTRES ACTIFS (chips supprimables)
   ============================================================ */
.jayeon-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 0 4px;
    margin-bottom: 8px;
    width: 100%;      /* pleine largeur dans un conteneur flex */
    clear: both;      /* passe sous les floats (result-count left + ordering right) */
    margin-top: 4px;
}

.jayeon-active-filters-label {
    font-size: 12px;
    color: var(--jy-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.jayeon-active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 12px;
    background: var(--jy-green);
    color: #fff !important;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    text-decoration: none !important;
    transition: background var(--jy-transition);
    line-height: 1.4;
}

.jayeon-active-filter-tag:hover {
    background: var(--jy-green-hover);
    color: #fff !important;
}

.jayeon-tag-remove {
    font-size: 14px;
    line-height: 1;
    opacity: 0.8;
}

.jayeon-clear-filters {
    font-size: 12px;
    color: var(--jy-text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    margin-left: 4px;
    transition: color var(--jy-transition);
}

.jayeon-clear-filters:hover {
    color: var(--jy-green);
}

/* ============================================================
   PAGE BOUTIQUE — BARRE FILTRE MOBILE (masquée par défaut desktop)
   ============================================================ */
.jayeon-filter-bar {
    display: none; /* visible seulement via media query */
}

/* ============================================================
   PAGE BOUTIQUE — OVERLAY FILTRES MOBILE
   ============================================================ */
.jayeon-filter-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    visibility: hidden;
}

.jayeon-filter-overlay.is-open {
    pointer-events: all;
    visibility: visible;
}

.jayeon-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(42,42,42,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.jayeon-filter-overlay.is-open .jayeon-overlay-backdrop {
    opacity: 1;
}

.jayeon-overlay-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: var(--jy-bg);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
}

.jayeon-filter-overlay.is-open .jayeon-overlay-panel {
    transform: translateX(0);
}

.jayeon-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--jy-border);
    flex-shrink: 0;
    background: var(--jy-bg);
}

.jayeon-overlay-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--jy-text);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.jayeon-close-btn {
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 4px;
    color: var(--jy-text);
    display: flex;
    align-items: center;
}

.jayeon-overlay-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px;
    -webkit-overflow-scrolling: touch;
}

/* Widgets dans l'overlay */
.jayeon-overlay-content .widget {
    border-bottom: 1px solid var(--jy-border);
    margin: 0 !important;
    padding: 0 !important;
}

.jayeon-overlay-content .widget-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--jy-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    margin: 0;
    user-select: none;
}

.jayeon-overlay-content .widget-title::after {
    content: '+';
    font-size: 20px;
    font-weight: 300;
    color: var(--jy-text-muted);
    transition: transform var(--jy-transition), color var(--jy-transition);
}

.jayeon-overlay-content .widget.is-open .widget-title::after {
    transform: rotate(45deg);
    color: var(--jy-green);
}

.jayeon-overlay-content .jayeon-widget-body {
    padding-bottom: 18px;
}

.jayeon-overlay-content ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.jayeon-overlay-content ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--jy-text);
    text-decoration: none;
    padding: 5px 0;
}

.jayeon-overlay-content ul li a:hover,
.jayeon-overlay-content li.active a,
.jayeon-overlay-content li.wc-layered-nav-term--selected > a,
.jayeon-overlay-content li.chosen > a {
    color: var(--jy-green);
    font-weight: 600;
}

.jayeon-overlay-content .jayeon-sort-list li.active a::before {
    content: '•';
    margin-right: 6px;
}

.jayeon-overlay-content .jayeon-toggle-more {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--jy-text-muted);
    text-decoration: underline;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

.jayeon-overlay-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--jy-border);
    flex-shrink: 0;
    background: var(--jy-bg);
}

.jayeon-apply-btn {
    width: 100%;
    background: var(--jy-green);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 14px;
    cursor: pointer;
    transition: background var(--jy-transition);
}

.jayeon-apply-btn:hover {
    background: var(--jy-green-hover);
}

/* Body: no scroll quand overlay ouvert */
body.jayeon-no-scroll {
    overflow: hidden !important;
}

/* ============================================================
   PAGE BOUTIQUE — MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {

    /* Masquer la sidebar dans sa position normale */
    body.woocommerce-shop #secondary,
    body.tax-product_cat #secondary,
    body.tax-product_tag #secondary,
    body.woocommerce-archive #secondary,
    .archive.woocommerce #secondary {
        display: none !important;
    }

    /* Afficher la barre filtres mobile */
    .jayeon-filter-bar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: #fff;
        border-top: 1px solid var(--jy-border);
        border-bottom: 1px solid var(--jy-border);
        margin-bottom: 24px;
        position: sticky;
        top: 56px; /* sous le header mobile */
        z-index: 100;
    }

    .jayeon-filter-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        background: transparent;
        border: 1.5px solid var(--jy-border);
        border-radius: 4px;
        padding: 8px 16px;
        cursor: pointer;
        color: var(--jy-text);
        transition: border-color var(--jy-transition), color var(--jy-transition);
    }

    .jayeon-filter-btn:hover {
        border-color: var(--jy-green);
        color: var(--jy-green);
    }

    .jayeon-results-count {
        font-size: 12px;
        color: var(--jy-text-muted);
    }

    /* L'overlay est déjà défini plus haut (fonctionne sur tous les écrans)
       Mais on cache le panel sur desktop */
}
