/**
 * FDLM - Styles des cartes produit personnalisées
 * Couleurs: #142451 (bleu), #F0B9F0 (rose), #F2E2D0 (crème)
 */

/* ============================================
   RESET WooCommerce par défaut
   ============================================ */

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    margin: 0;
    padding: 0;
    float: none;
    width: 100%;
    clear: none;
}

.woocommerce ul.products li.product .woocommerce-loop-product__link,
.woocommerce ul.products li.product .woocommerce-loop-category__link {
    display: block;
}

/* Masquer les éléments WooCommerce par défaut */
.woocommerce ul.products li.product .onsale,
.woocommerce ul.products li.product .star-rating,
.woocommerce ul.products li.product .button.add_to_cart_button,
.woocommerce ul.products li.product .added_to_cart {
    display: none !important;
}

/* ============================================
   GRILLE DES PRODUITS
   ============================================ */

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0;
    margin: 0;
    list-style: none;
}

@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ============================================
   CARTE PRODUIT
   ============================================ */

.fdlm-product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(20, 36, 81, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.fdlm-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(20, 36, 81, 0.15);
}

.fdlm-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ============================================
   ZONE IMAGE
   ============================================ */

.fdlm-card-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #F2E2D0;
}

.fdlm-card-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.fdlm-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.fdlm-product-card:hover .fdlm-card-image {
    transform: scale(1.05);
}

/* ============================================
   HOVER SWAP - Seconde image au survol
   ============================================ */

.fdlm-image-swap-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.fdlm-image-swap-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Image principale */
.fdlm-primary-image {
    position: relative;
    z-index: 1;
}

/* Image secondaire (hover) */
.fdlm-secondary-image {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    opacity: 0;
}

/* Au hover : afficher la seconde image */
.fdlm-product-image-wrapper:hover .fdlm-secondary-image,
.woocommerce ul.products li.product:hover .fdlm-secondary-image,
.product:hover .fdlm-secondary-image {
    opacity: 1;
}

/* Léger zoom sur les deux images au hover */
.fdlm-product-image-wrapper:hover .fdlm-image-swap-wrapper img,
.woocommerce ul.products li.product:hover .fdlm-image-swap-wrapper img,
.product:hover .fdlm-image-swap-wrapper img {
    transform: scale(1.05);
}

/* Pas de transition si pas de seconde image */
.fdlm-image-swap-wrapper:not(.has-secondary) .fdlm-primary-image {
    transition: transform 0.4s ease;
}

/* ============================================
   BADGES
   ============================================ */

.fdlm-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 5;
}

.fdlm-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    color: #fff;
    background: #142451;
    white-space: nowrap;
}

.fdlm-badge-sale {
    background: #E53935;
}

.fdlm-badge-outofstock {
    background: #9E9E9E;
}

.fdlm-badge-nouveau {
    background: #F0B9F0;
    color: #142451;
}

.fdlm-badge-bestseller {
    background: #142451;
}

.fdlm-badge-bio {
    background: #4CAF50;
}

/* ============================================
   BOUTON WISHLIST
   ============================================ */

.fdlm-wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
}

.fdlm-wishlist-btn button,
.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist,
.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist-button,
.fdlm-wishlist-btn .tinvwl_add_to_wishlist_button {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid #E53935;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.15);
    text-decoration: none;
}

.fdlm-wishlist-btn button:hover,
.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist:hover,
.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist-button:hover,
.fdlm-wishlist-btn .tinvwl_add_to_wishlist_button:hover {
    background: #E53935;
    transform: scale(1.1);
    border-color: #E53935;
}

.fdlm-wishlist-btn svg {
    width: 18px;
    height: 18px;
    stroke: #E53935;
    fill: none;
}

.fdlm-wishlist-placeholder:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   CONTENU DE LA CARTE
   ============================================ */

.fdlm-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* Titre */
.fdlm-card-title-link {
    text-decoration: none;
    color: inherit;
}

.fdlm-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #142451;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.fdlm-card-title-link:hover .fdlm-card-title {
    color: #F0B9F0;
}

/* Prix */
.fdlm-card-price {
    font-size: 16px;
    font-weight: 700;
    color: #142451;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fdlm-price-strikethrough {
    font-size: 13px;
    font-weight: 400;
    color: #9E9E9E;
    text-decoration: line-through;
}

.fdlm-price-sale {
    color: #E53935;
}

.fdlm-price-range {
    font-size: 14px;
}

/* Poids */
.fdlm-card-weight {
    font-size: 12px;
    color: #666;
}

.fdlm-weight-value {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   ZONE D'ACTIONS
   ============================================ */

.fdlm-card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================================
   SELECTEUR DE VARIATIONS
   ============================================ */

.fdlm-variations-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fdlm-variation-select {
    position: relative;
}

.fdlm-select-variation {
    width: 100%;
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #142451;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    /* 28/10 : chevron fait main */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath transform='translate(6.50 7.29) scale(1.5714)' d='M1.45,1.1L1.45,1.22C1.23,1 1.2,0.84 1,0.69C0.8,0.54 0.85,0.76 0.71,0.3L0.7,0.35C0.65,0.359 0.6,0.359 0.55,0.35L0.45,0.19L0.45,0.12C0.41,0.11 0.35,0.21 0.3,0.09C0.3,0.18 0.23,0.09 0.21,0.09C0.147,0.045 0.076,0.015 0,0C0.042,0.13 0.072,0.264 0.09,0.4C0.03,0.33 0.09,0.4 0.09,0.4C0.11,0.46 0.07,0.5 0.08,0.53C0.09,0.56 0.08,0.53 0.13,0.58C0.23,0.56 0.26,0.86 0.29,0.9C0.32,0.94 0.39,1 0.41,1C0.43,1 0.41,1.08 0.41,1.14C0.41,1.2 0.41,1.14 0.46,1.14L0.46,1.24C0.46,1.24 0.46,1.42 0.59,1.38C0.72,1.34 0.59,1.5 0.59,1.53L0.59,1.47C0.59,1.46 0.59,1.47 0.59,1.47C0.59,1.47 0.64,1.79 0.72,1.74C0.78,1.74 0.83,1.65 0.88,1.66C0.93,1.67 1,1.91 1,2L1.11,1.83L1.11,2.1C1.11,2.27 1.2,2.1 1.2,2.21L1.2,2.3C1.21,2.356 1.21,2.414 1.2,2.47C1.226,2.448 1.264,2.448 1.29,2.47C1.29,2.54 1.39,2.55 1.39,2.68L1.46,2.68L1.46,2.77L1.41,2.77L1.22,2.51C1.22,2.51 1.31,2.61 1.32,2.64C1.33,2.67 1.32,2.74 1.25,2.73L1.32,2.73C1.406,2.838 1.465,2.965 1.49,3.1C1.515,3.235 1.56,3.1 1.49,3.18C1.553,3.282 1.581,3.401 1.57,3.52L1.64,3.52L1.64,3.59L1.7,3.59C1.7,3.59 1.76,3.59 1.75,3.68C1.75,3.76 1.8,3.68 1.81,3.74C1.82,3.8 1.9,3.74 1.92,3.74L1.86,3.83C1.86,3.93 1.94,3.89 2.01,4C2.01,4.071 1.951,4.13 1.88,4.13L1.94,4.13C1.87,4.13 1.99,4.13 2.01,4.19C2.03,4.25 2.17,4.12 2.19,4.19C2.25,4.206 2.294,4.258 2.3,4.32L2.35,4.32L2.41,4.39C2.438,4.424 2.461,4.461 2.48,4.5C2.48,4.65 2.6,4.64 2.71,4.78L2.61,4.78C2.61,4.87 2.68,4.78 2.71,4.83C2.81,4.83 2.71,4.92 2.77,4.99L2.77,4.9L2.77,4.99C2.793,5.013 2.805,5.043 2.805,5.075C2.805,5.107 2.793,5.137 2.77,5.16L2.85,5.16L2.85,5.24C2.93,5.24 2.85,5.24 2.97,5.33C3.09,5.42 2.97,5.33 2.97,5.39L3.12,5.39L3,5.5L3,5.41C3.1,5.41 3.09,5.51 3.15,5.52C3.24,5.57 3.23,5.62 3.27,5.7C3.31,5.78 3.27,5.61 3.27,5.62L3.27,5.71C3.27,5.74 3.34,5.64 3.39,5.71C3.44,5.78 3.39,5.71 3.44,5.71L3.44,5.8L3.44,5.74C3.44,5.81 3.51,5.74 3.51,5.83L3.68,5.63L3.68,5.71C3.68,5.58 3.8,5.6 3.77,5.49C3.74,5.38 4,5.36 4,5.52C4.15,5.34 4.16,5.15 4.36,4.98C4.56,4.81 4.57,4.8 4.64,4.72L4.85,4.21C5.04,4.21 4.98,3.91 5.11,3.82C5.23,3.82 5.2,3.63 5.33,3.57C5.46,3.51 5.33,3.48 5.43,3.57C5.48,3.57 5.43,3.47 5.52,3.46L5.4,3.46C5.4,3.15 5.66,3.16 5.66,2.87C5.66,2.94 5.66,2.8 5.73,2.87C5.8,2.94 5.73,2.75 5.73,2.69L5.79,2.62C5.86,2.72 5.79,2.51 5.79,2.62C5.98,2.45 6.06,2.14 6.26,1.96C6.31,1.91 6.33,1.82 6.4,1.8C6.47,1.78 6.4,1.66 6.4,1.64C6.4,1.62 6.51,1.58 6.49,1.64C6.47,1.7 6.49,1.47 6.56,1.42C6.63,1.37 6.64,1.16 6.73,1.22C6.93,0.88 6.89,0.71 7,0.63C6.964,0.503 6.917,0.379 6.86,0.26L6.51,0.16C6.397,0.17 6.283,0.17 6.17,0.16C6.096,0.322 6.013,0.479 5.92,0.63L5.55,0.94C5.317,1.258 5.107,1.592 4.92,1.94L4.92,2.06C4.68,2.19 4.67,2.52 4.45,2.69L4.51,2.69C4.51,2.75 4.44,2.69 4.42,2.69C4.26,2.98 4.12,3.29 4,3.51C3.955,3.681 3.888,3.846 3.8,4L3.67,4.17L3.6,4.25L3.54,4.25C3.48,4.25 3.54,4.38 3.54,4.39L3.54,4.33L3.12,3.78C2.923,3.505 2.749,3.214 2.6,2.91C2.52,2.58 2.18,2.34 2.06,1.98C1.932,1.641 1.722,1.339 1.45,1.1ZM0.57,0.27C0.57,0.27 0.58,0.25 0.57,0.27ZM0.99,1.98L0.96,2.02L0.99,1.98ZM0.39,1.25C0.39,1.25 0.41,1.25 0.39,1.25ZM0.06,0.42C0.06,0.42 0.06,0.44 0.06,0.42Z' fill='%23142451'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.2s ease;
}

.fdlm-select-variation:hover,
.fdlm-select-variation:focus {
    border-color: #142451;
    outline: none;
}

.fdlm-variation-price {
    font-size: 14px;
    font-weight: 600;
    color: #142451;
    text-align: center;
    padding: 4px 0;
}

/* ============================================
   SELECTEUR DE QUANTITE
   ============================================ */

.fdlm-quantity-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.fdlm-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #142451;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fdlm-qty-btn:hover {
    background: #e0e0e0;
}

.fdlm-qty-btn:active {
    background: #d0d0d0;
}

.fdlm-qty-input {
    width: 50px;
    height: 36px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #142451;
    -moz-appearance: textfield;
}

.fdlm-qty-input::-webkit-outer-spin-button,
.fdlm-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fdlm-qty-input:focus {
    outline: none;
}

/* ============================================
   BOUTON AJOUTER AU PANIER
   ============================================ */

.fdlm-add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: #142451;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fdlm-add-to-cart-btn:hover {
    background: #1e3a6d;
    transform: translateY(-1px);
}

.fdlm-add-to-cart-btn:active {
    transform: translateY(0);
}

.fdlm-add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.fdlm-add-to-cart-btn.fdlm-adding {
    background: #666;
    pointer-events: none;
}

.fdlm-add-to-cart-btn.fdlm-added {
    background: #4CAF50;
}

.fdlm-add-to-cart-btn.fdlm-error {
    background: #E53935;
}

.fdlm-btn-icon {
    display: flex;
    align-items: center;
}

.fdlm-btn-icon svg {
    width: 18px;
    height: 18px;
}

/* Produit variable : désactivé sans variation sélectionnée */
.fdlm-add-variable:not([data-variation-id]),
.fdlm-add-variable[data-variation-id="0"] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   PRODUIT EN RUPTURE
   ============================================ */

.fdlm-out-of-stock-notice {
    text-align: center;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
    font-size: 13px;
}

.fdlm-view-product-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #142451;
    border-radius: 8px;
    background: transparent;
    color: #142451;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.fdlm-view-product-btn:hover {
    background: #142451;
    color: #fff;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fdlm-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fdlm-add-to-cart-btn.fdlm-added {
    animation: fdlm-pulse 0.3s ease;
}

/* ============================================
   STYLES YITH/TI WISHLIST OVERRIDE
   ============================================ */

.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist,
.fdlm-wishlist-btn .yith-add-to-wishlist-button-block {
    margin: 0 !important;
    padding: 0 !important;
}

.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist .yith-wcwl-add-button a,
.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a,
.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse a,
.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist-button {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border: 2px solid #E53935 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.9) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}

/* Masquer le SVG YITH, afficher l'icône custom */
.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist-button svg {
    display: none !important;
}

.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist-button::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background-image: url('../../../uploads/2025/11/boutique-de-la-memee-Favoris.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.25s ease;
}

.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist-button:hover::before {
    filter: brightness(0) invert(1);
}

.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist .yith-wcwl-add-button a span,
.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist a span,
.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist-button__label {
    display: none !important;
}

/* Coeur rempli quand ajouté → fond rouge, coeur blanc */
.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist-button--added {
    background: #E53935 !important;
    border-color: #E53935 !important;
}

.fdlm-wishlist-btn .yith-wcwl-add-to-wishlist-button--added::before {
    filter: brightness(0) invert(1);
}

/* TI Wishlist */
.fdlm-wishlist-btn .tinvwl_add_to_wishlist_button {
    min-width: auto !important;
    padding: 0 !important;
}

.fdlm-wishlist-btn .tinvwl_add_to_wishlist_button span {
    display: none !important;
}

/* ============================================
   RESPONSIVE AJUSTEMENTS
   ============================================ */

@media (max-width: 768px) {
    .fdlm-card-content {
        padding: 12px;
    }

    .fdlm-card-title {
        font-size: 14px;
    }

    .fdlm-card-price {
        font-size: 15px;
    }

    .fdlm-qty-btn {
        width: 32px;
        height: 32px;
    }

    .fdlm-qty-input {
        width: 40px;
        height: 32px;
    }

    .fdlm-add-to-cart-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .fdlm-badges {
        top: 8px;
        left: 8px;
    }

    .fdlm-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .fdlm-wishlist-btn {
        top: 8px;
        right: 8px;
    }

    .fdlm-wishlist-btn button {
        width: 32px;
        height: 32px;
    }
}

/* ============================================
   STYLES POUR ELEMENTOR PRO (Hooks WooCommerce)
   Ces styles ciblent les éléments injectés via hooks
   ============================================ */

/* Wrapper image avec position relative pour overlays */
.fdlm-product-image-wrapper {
    position: relative;
    overflow: hidden;
}

/* Badges overlay (via hook) */
.fdlm-badges-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

/* Wishlist overlay (via hook) */
.fdlm-wishlist-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.fdlm-wishlist-overlay button,
.fdlm-wishlist-overlay .yith-wcwl-add-to-wishlist,
.fdlm-wishlist-overlay .yith-wcwl-add-to-wishlist-button,
.fdlm-wishlist-overlay .tinvwl_add_to_wishlist_button {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid #E53935;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.15);
    text-decoration: none;
}

.fdlm-wishlist-overlay button:hover,
.fdlm-wishlist-overlay .yith-wcwl-add-to-wishlist-button:hover {
    background: #E53935;
    transform: scale(1.1);
    border-color: #E53935;
}

.fdlm-wishlist-overlay svg {
    width: 18px;
    height: 18px;
    stroke: #E53935;
    fill: none;
}

/* Masquer le SVG YITH, afficher l'icône custom */
.fdlm-wishlist-overlay .yith-wcwl-add-to-wishlist-button svg {
    display: none !important;
}

.fdlm-wishlist-overlay .yith-wcwl-add-to-wishlist-button::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background-image: url('../../../uploads/2025/11/boutique-de-la-memee-Favoris.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.25s ease;
}

.fdlm-wishlist-overlay .yith-wcwl-add-to-wishlist-button:hover::before {
    filter: brightness(0) invert(1);
}

.fdlm-wishlist-overlay .yith-wcwl-add-to-wishlist-button__label {
    display: none !important;
}

.fdlm-wishlist-overlay .yith-add-to-wishlist-button-block {
    margin: 0 !important;
    padding: 0 !important;
}

/* Coeur rempli quand ajouté → fond rouge, coeur blanc */
.fdlm-wishlist-overlay .yith-wcwl-add-to-wishlist-button--added {
    background: #E53935 !important;
    border-color: #E53935 !important;
}

.fdlm-wishlist-overlay .yith-wcwl-add-to-wishlist-button--added::before {
    filter: brightness(0) invert(1);
}

/* Poids produit (via hook) */
.fdlm-product-weight {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Wrapper bouton ajouter au panier (via hook) */
.fdlm-add-to-cart-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

/* Bouton lien variable */
.fdlm-add-variable-link {
    text-decoration: none;
}

/* ============================================
   ELEMENTOR PRODUCTS WIDGET OVERRIDES
   ============================================ */

/* Cibler les widgets Elementor Products */
.elementor-widget-woocommerce-products .product,
.elementor-widget-wc-products .product,
.elementor-widget-loop-grid .product,
.elementor-loop-item {
    position: relative;
}

/* Image wrapper dans Elementor */
.elementor-widget-woocommerce-products .fdlm-product-image-wrapper,
.elementor-widget-wc-products .fdlm-product-image-wrapper,
.elementor-widget-loop-grid .fdlm-product-image-wrapper {
    position: relative;
}

/* S'assurer que l'image Elementor a un conteneur relatif */
.elementor-widget-woocommerce-products .attachment-woocommerce_thumbnail,
.elementor-widget-wc-products .attachment-woocommerce_thumbnail {
    position: relative;
}

/* Masquer le badge WooCommerce par défaut dans Elementor */
.elementor-widget-woocommerce-products .onsale,
.elementor-widget-wc-products .onsale,
.elementor-widget-loop-grid .onsale {
    display: none !important;
}

/* Masquer le bouton ajouter au panier par défaut d'Elementor */
.elementor-widget-woocommerce-products .add_to_cart_button,
.elementor-widget-wc-products .add_to_cart_button,
.elementor-widget-loop-grid .add_to_cart_button,
.elementor-widget-woocommerce-products .added_to_cart,
.elementor-widget-wc-products .added_to_cart {
    display: none !important;
}

/* Fix pour que les overlays soient visibles */
.woocommerce-loop-product__link {
    position: relative;
    display: block;
}

/* ============================================
   WOOCOMMERCE ARCHIVE PAGE OVERRIDES
   ============================================ */

/* Appliquer position relative aux cartes WooCommerce */
.woocommerce ul.products li.product {
    position: relative;
}

.woocommerce ul.products li.product .woocommerce-loop-product__link {
    position: relative;
    display: block;
}

/* Masquer les éléments par défaut */
.woocommerce ul.products li.product > .onsale {
    display: none !important;
}

/* ============================================
   STYLES SPECIFIQUES ELEMENTOR LOOP BUILDER
   ============================================ */

/* Si tu utilises le Loop Builder d'Elementor Pro */
.e-loop-item .fdlm-product-image-wrapper {
    position: relative;
}

.e-loop-item .fdlm-badges-overlay,
.e-loop-item .fdlm-wishlist-overlay {
    pointer-events: auto;
}

/* Fix z-index pour les overlays dans Elementor */
.elementor-widget-woocommerce-products .fdlm-badges-overlay,
.elementor-widget-woocommerce-products .fdlm-wishlist-overlay {
    z-index: 20;
}

/* ============================================
   RESPONSIVE POUR ELEMENTOR
   ============================================ */

@media (max-width: 768px) {
    .fdlm-badges-overlay {
        top: 8px;
        left: 8px;
    }

    .fdlm-wishlist-overlay {
        top: 8px;
        right: 8px;
    }

    .fdlm-wishlist-overlay button {
        width: 32px;
        height: 32px;
    }

    .fdlm-add-to-cart-wrapper {
        gap: 8px;
    }
}

/* ==================== PACK / COFFRETS ==================== */

.fdlm-pack-products {
    margin: 30px 0;
}

/* Grille avec séparateurs + */
.fdlm-pack-grid {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.fdlm-pack-item {
    flex: 1;
    min-width: 0;
    background: #F2E2D0;
    text-align: center;
    display: flex;
    flex-direction: column;
}

/* Séparateur + entre les items */
.fdlm-pack-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    flex-shrink: 0;
}

.fdlm-pack-separator span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #142451;
    color: #C67969;
    font-family: 'Decoy', cursive;
    font-size: 35px;
    padding-bottom:7px;
    font-weight: 700;
    line-height: 1;
}

/* Image produit */
.fdlm-pack-item-image {
    display: block;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.fdlm-pack-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fdlm-pack-item:hover .fdlm-pack-item-image img {
    transform: scale(1.05);
}

/* Badge quantité */
.fdlm-pack-item-qty {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #142451;
    color: #F2E2D0;
    font-family: 'Decoy', cursive;
    font-size: 14px;
    font-weight: 700;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Infos sous l'image */
.fdlm-pack-item-info {
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.fdlm-pack-item-name {
    font-family: 'Decoy', cursive;
    font-size: 21px;
    font-weight: 700;
    color: #142451;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.fdlm-pack-item-variation {
    font-family: 'hoss-sharp', sans-serif;
    font-size: 13px;
    color: #142451;
    margin: 0 0 10px 0;
    font-weight: 400;
}

/* Bouton "Voir le produit" */
.fdlm-pack-item-link {
    display: inline-block;
    margin-top: auto;
    padding: 8px 20px;
    font-family: 'hoss-sharp', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #142451;
    border: 1px solid #142451;
    text-decoration: none;
    transition: all 0.2s ease;
}

.fdlm-pack-item-link:hover {
    background: #142451;
    color: #F2E2D0;
}

/* Pack responsive - tablette */
@media (max-width: 768px) {
    .fdlm-pack-grid {
        flex-wrap: wrap;
        gap: 15px;
    }

    .fdlm-pack-item {
        flex: 0 0 calc(50% - 20px);
    }

    .fdlm-pack-separator {
        font-size: 22px;
        padding: 0;
        flex: 0 0 auto;
    }
}

/* Pack responsive - mobile */
@media (max-width: 480px) {
    .fdlm-pack-grid {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .fdlm-pack-item {
        flex: 0 0 100%;
        width: 100%;
        max-width: 280px;
    }

    .fdlm-pack-separator {
        padding: 8px 0;
    }
}
