/*************************************************
 * Edenea - Sticky Product Summary
 *************************************************/

/* =========================================
   0) Layout global fiches produits
   - On supprime la sidebar + sa ligne de séparation
   - On élargit la zone de contenu
   ========================================= */

/* Cacher la sidebar sur les fiches produit */
.single-product.et_right_sidebar #sidebar {
    display: none !important;
}

/* Supprimer la ligne verticale de séparation Divi */
.single-product.et_right_sidebar #main-content .container:before {
    display: none !important;
}

/* Le contenu prend toute la largeur */
.single-product.et_right_sidebar #left-area {
    width: 100% !important;
    float: none !important;
    border-right: none !important;
}

/* Contenir dans une largeur raisonnable */
.single-product #left-area .et_pb_section,
.single-product #left-area .et_pb_row {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   1) DESKTOP : réserver 2/3 / 1/3
   - Description longue ≈ 2/3
   - Couloir à droite pour le sticky ≈ 1/3
   ========================================= */
@media (min-width: 981px) {

    /* Bloc onglets + description WooCommerce (et donc blog / avis / produits associés
       qui font partie du même ensemble) */
    .single-product .woocommerce-tabs {
        /* Zone texte = 100% - 420px de couloir pour le sticky */
        max-width: calc(100% - 420px);
        margin-right: 420px;
    }

    .single-product .woocommerce-tabs,
    .single-product .woocommerce-tabs .panel {
        box-sizing: border-box;
    }

   /* Zone blog : la faire entrer dans le 2/3 aussi */
    .single-product .wc-blog-zone,
    .single-product .wc-blog-zone__title {
        max-width: calc(100% - 420px);
        margin-right: 420px;
        box-sizing: border-box;
    }
   /* Zone upsell : "Vous aimerez aussi" etc. dans le 2/3 */
    .single-product .up-sells.upsells.products,
    .single-product .up-sells,
    .single-product .upsells {
        max-width: calc(100% - 420px);
        margin-right: 420px;
        box-sizing: border-box;
    }
   /* Avis Garantis : wrapper global dans la colonne 2/3 */
    .single-product #ag-s {
        max-width: calc(100% - 420px);
        margin-right: 420px;
        box-sizing: border-box;
    }

    /* À l’intérieur, le widget peut occuper toute la largeur de son conteneur réduit */
    .single-product #agWidgetMain {
        max-width: 100%;
        margin-right: 0;
        box-sizing: border-box;
    }
   /* Produits similaires : bloc "Related products" dans le 2/3 */
    .single-product .related.products,
    .single-product .related {
        max-width: calc(100% - 420px);
        margin-right: 420px;
        box-sizing: border-box;
    }
  /* Zone "Bought together" / bundles : woobt-wrap dans le 2/3 */
    .single-product .woobt-wrap,
    .single-product .woobt-layout-default,
    .single-product .woobt-wrap-responsive {
        max-width: calc(100% - 420px);
        margin-right: 420px;
        box-sizing: border-box;
    }
}

/* =========================================
   2) MOBILE : bloc panier (qty + bouton) sticky en bas
   ========================================= */
@media (max-width: 980px) {

    .single-product form.cart.edenea-mobile-cart-fixed {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        background: #ffffff;
        padding: 8px 12px;
        box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
        margin: 0;
    }

    .single-product form.cart.edenea-mobile-cart-fixed .quantity,
    .single-product form.cart.edenea-mobile-cart-fixed .single_add_to_cart_button {
        margin-bottom: 0;
    }
}

/* =========================================
   Description courte compactée en mode sticky
   ========================================= */
@media (min-width: 981px) {

    /* Description courte compactée uniquement quand la classe est présente */
    .single-product .summary.edenea-short-collapsed .woocommerce-product-details__short-description {
        display: -webkit-box;
        -webkit-line-clamp: 4;          /* nombre de lignes visibles */
        -webkit-box-orient: vertical;
        overflow: hidden;
        position: relative;
    }

    .single-product .summary.edenea-short-collapsed .woocommerce-product-details__short-description::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 40px;
        background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
        pointer-events: none;
    }

    /* Lien "Lire plus / Lire moins" toujours visible sur desktop */
    .single-product .summary .edenea-more-link {
        font-size: 13px;
        color: #183963;
        text-decoration: underline;
        cursor: pointer;
        margin-top: 6px;
        display: inline-block;
    }
}


