/**
 * FDLM - Styles pour les onglets produits avec slider
 * Shortcode: [fdlm_product_tabs]
 * Couleurs: #142451 (bleu), #F0B9F0 (rose), #F2E2D0 (crème)
 */

/* ============================================
   CONTENEUR PRINCIPAL
   ============================================ */

.fdlm-product-tabs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    overflow: hidden;
}

/* ============================================
   NAVIGATION DES ONGLETS
   ============================================ */

.fdlm-tabs-nav {
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    margin-bottom: 40px;
    
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: #FFFFFF rgba(20, 36, 81, 0.1);
    padding-bottom: 10px;
}

/* Scrollbar stylisée pour Webkit (Chrome, Safari, Edge) */
.fdlm-tabs-nav::-webkit-scrollbar {
    height: 6px;
}

.fdlm-tabs-nav::-webkit-scrollbar-track {
    background: rgba(20, 36, 81, 0.1);
    border-radius: 3px;
}

.fdlm-tabs-nav::-webkit-scrollbar-thumb {
    background: #142451;
    border-radius: 3px;
}

.fdlm-tabs-nav::-webkit-scrollbar-thumb:hover {
    background: white;
}

.fdlm-tab-btn {
    padding: 16px 24px;
    border: none;
    background: transparent;
    color: #142451;
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Decoy';
    flex-shrink: 0;
}

.fdlm-tab-btn::after {
    content: none;
}

.fdlm-tab-btn:hover {
    color: #FFFFFF!important;
}

.fdlm-tab-btn.active {
    color: #FFFFFF!important;
    font-weight: 700;
}

/* Séparateur entre onglets (sauf le premier) */
.fdlm-tab-btn:not(:first-child)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background: white;
}

/* ============================================
   CONTENU DES ONGLETS
   ============================================ */

.fdlm-tabs-content {
    position: relative;
}

.fdlm-tab-panel {
    display: none;
    animation: fdlm-fadeIn 0.4s ease;
}

.fdlm-tab-panel.active {
    display: block;
}

@keyframes fdlm-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   SLIDER WRAPPER
   ============================================ */

.fdlm-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.fdlm-slider-track {
    flex: 1;
    overflow: hidden;
    padding-top: 30px;
    padding-left: 25px;
    margin-left: -25px;
}

.fdlm-slider-inner {
    display: flex;
    gap: 24px;
    transition: transform 0.4s ease;
}

/* ============================================
   FLECHES DE NAVIGATION
   ============================================ */

.fdlm-slider-arrow {
    width: auto;
    height: auto;
    border: none;
    background: transparent;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.fdlm-slider-arrow:hover {
    opacity: 0.7;
    background-color: transparent;
}
[type=button]:focus, [type=button]:hover, [type=submit]:focus, [type=submit]:hover, button:focus, button:hover {
    background-color: transparent!important;
    color: #142451;
    text-decoration: none;
}
.fdlm-slider-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.fdlm-slider-arrow:disabled:hover {
    opacity: 0.3;
}

.fdlm-slider-arrow svg {
    width: 40px;
    height: 40px;
    stroke: #142451;
    transition: all 0.3s ease;
}

/* Icônes flèches personnalisées */
.fdlm-arrow-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Flèche gauche - retournée horizontalement */
.fdlm-arrow-icon-left {
    transform: scaleX(-1);
}

.fdlm-slider-arrow:hover .fdlm-arrow-icon {
    transform: scale(1.1);
}

.fdlm-slider-arrow:hover .fdlm-arrow-icon-left {
    transform: scaleX(-1) scale(1.1);
}

/* ============================================
   CARTE PRODUIT SLIDER - NOUVEAU DESIGN
   ============================================ */

.fdlm-slider-card {
    flex: 0 0 calc(33.333% - 16px);
    min-width: 280px;
    background: transparent;
    overflow: visible;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.fdlm-slider-card:hover {
    transform: none;
}

/* Image */
.fdlm-slider-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: visible;
}

.fdlm-slider-card-image a {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.fdlm-slider-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Zoom par défaut - seulement si pas dans le wrapper swap */
.fdlm-slider-card:hover .fdlm-slider-card-image img:not(.fdlm-primary-image):not(.fdlm-secondary-image) {
    transform: scale(1.05);
}

/* ============================================
   HOVER SWAP - Slider
   ============================================ */

.fdlm-slider-card-image .fdlm-image-swap-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
}

.fdlm-slider-card-image .fdlm-image-swap-wrapper .fdlm-primary-image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fdlm-slider-card-image .fdlm-image-swap-wrapper .fdlm-secondary-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Au hover : afficher la seconde image */
.fdlm-slider-card:hover .fdlm-image-swap-wrapper .fdlm-secondary-image {
    opacity: 1;
}

/* Zoom sur les deux images au hover */
.fdlm-slider-card:hover .fdlm-image-swap-wrapper .fdlm-primary-image,
.fdlm-slider-card:hover .fdlm-image-swap-wrapper .fdlm-secondary-image {
    transform: scale(1.05);
}

/* Badges / Étiquettes - En haut à gauche avec débordement */
.fdlm-slider-badges {
    position: absolute;
    top: -19px;
    left: -25px;
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 10;
}

.fdlm-badge-icon {
    width: 55px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    transition: transform 0.2s ease;
    display: block;
    margin-bottom: -18px;
}

.fdlm-badge-icon:last-child {
    margin-bottom: 0;
}

.fdlm-badge-icon:hover {
    transform: scale(1.1);
}

/* Wishlist - Bouton avec contour rouge */
.fdlm-slider-wishlist {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 5;
}

.fdlm-slider-wishlist button,
.fdlm-slider-wishlist .yith-wcwl-add-to-wishlist a,
.fdlm-slider-wishlist .yith-wcwl-add-to-wishlist-button,
.fdlm-slider-wishlist .tinvwl_add_to_wishlist_button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid #E53935;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.2);
    transition: all 0.25s ease;
    text-decoration: none;
}

.fdlm-slider-wishlist button:hover,
.fdlm-slider-wishlist .yith-wcwl-add-to-wishlist-button:hover {
    background: #E53935;
    transform: scale(1.1);
    border-color: #E53935;
}

/* Masquer le SVG YITH, afficher l'icône custom */
.fdlm-slider-wishlist .yith-wcwl-add-to-wishlist-button svg {
    display: none !important;
}

.fdlm-slider-wishlist .yith-wcwl-add-to-wishlist-button::before {
    content: '';
    display: block;
    width: 22px;
    height: 22px;
    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-slider-wishlist .yith-wcwl-add-to-wishlist-button:hover::before {
    filter: brightness(0) invert(1);
}

/* Fallback SVG natif (si pas YITH) */
.fdlm-slider-wishlist svg {
    width: 22px;
    height: 22px;
    stroke: #E53935;
    fill: none;
    transition: all 0.25s ease;
}

.fdlm-slider-wishlist button:hover svg {
    stroke: #fff;
    fill: #fff;
}

/* Masquer le label texte YITH */
.fdlm-slider-wishlist .yith-wcwl-add-to-wishlist-button__label {
    display: none !important;
}

/* YITH nouveau markup (block) */
.fdlm-slider-wishlist .yith-add-to-wishlist-button-block {
    margin: 0 !important;
    padding: 0 !important;
}

/* Coeur YITH rempli quand ajouté → fond rouge, coeur blanc */
.fdlm-slider-wishlist .yith-wcwl-add-to-wishlist-button--added {
    background: #E53935 !important;
    border-color: #E53935 !important;
}

.fdlm-slider-wishlist .yith-wcwl-add-to-wishlist-button--added::before {
    filter: brightness(0) invert(1);
}

/* Icône coeur personnalisée (fallback) */
.fdlm-slider-wishlist .fdlm-heart-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.2s ease;
}

.fdlm-slider-wishlist button:hover .fdlm-heart-icon {
    transform: scale(1.1);
}

/* ============================================
   INFOS PRODUIT
   ============================================ */

.fdlm-slider-card-info {
    padding: 18px 18px 10px;
}

.fdlm-slider-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.fdlm-slider-title a {
    color: #142451;
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: "Decoy";
}



.fdlm-slider-desc {
    margin: 0;
    font-size: 13px;
    color: #142451;
    line-height: 1.4;
}

/* ============================================
   ZONE D'ACTION - NOUVEAU DESIGN MAQUETTE
   Layout: Gauche (2 lignes) + Droite (prix)
   ============================================ */

.fdlm-slider-card-actions {
    padding: 0 16px 16px;
    margin-top: auto;
    background: transparent;
}

/* Wrapper principal : gauche + droite */
.fdlm-slider-actions-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0;
}

/* Colonne gauche : variation/quantité + bouton */
.fdlm-slider-actions-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Ligne variation + quantité */
.fdlm-slider-variation-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
}

/* Select variation - Bordure bleu foncé sans arrondi */
.fdlm-slider-variation-select {
    flex: 1;
    padding: 8px 10px;
    height: 40px;
    border: 1px solid #142451;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    color: #142451;
    background: transparent;
    cursor: pointer;
    min-width: 0;
    transition: all 0.2s ease;
}

.fdlm-slider-variation-select:focus {
    outline: none;
    background: transparent;
}

/* Poids pour produit simple */
.fdlm-slider-weight {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #142451;
    padding: 10px 12px;
    border: 2px solid #142451;
    border-radius: 0;
    background: transparent;
}

/* Quantité - Plus compact pour laisser place aux variations */
.fdlm-slider-qty {
    display: flex;
    align-items: center;
    background: transparent;
    border: 1px solid #142451;
    border-radius: 0;
    overflow: hidden;
    color: #142451;
    flex-shrink: 0;
}

.fdlm-slider-qty-btn {
    width: 26px;
    height: 36px;
    border: none;
    background: transparent;
    color: #142451;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.fdlm-slider-qty input[type=number] {
    border: 0px !important;
}
.fdlm-slider-qty-btn:hover {
    background: rgba(20, 36, 81, 0.1);
}

.fdlm-slider-qty-input {
    width: 24px;
    height: 36px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #142451;
    -moz-appearance: textfield;
    padding: 0!important;
}

.fdlm-slider-qty-input::-webkit-outer-spin-button,
.fdlm-slider-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Quantité pleine largeur (produit simple) */
.fdlm-slider-qty-full {
    flex: 1;
    justify-content: center;
}

.fdlm-slider-qty-full .fdlm-slider-qty-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
}

.fdlm-slider-qty-full .fdlm-slider-qty-input {
    width: 50px;
    height: 40px;
    font-size: 16px;
}

/* Ligne bouton */
.fdlm-slider-buy-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    margin-top: 5px;
}

/* Bouton ajouter au panier - Style "Au panier!" sans arrondi */
.fdlm-slider-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 4px 16px;
    border: none;
    border-radius: 0;
    background: #142451;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: 100%;
}

.fdlm-slider-add-btn:hover {
    background: #C67969!important;
    color: white!important;
}

.fdlm-slider-add-btn svg {
    width: 40px;
    height: 34px;
    flex-shrink: 0;
    position: relative;
    top: -5px;
}

.fdlm-slider-add-btn.adding {
    background: #888;
    pointer-events: none;
}

.fdlm-slider-add-btn.added {
    background: #28a745;
}

/* Prix - Colonne droite (hauteur totale des 2 lignes) */
.fdlm-slider-price {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding: 12px 14px;
    min-width: 85px;
    background: transparent;
    border: 1px solid #1e3a6d;
    margin-left: 5px;
}

.fdlm-price-old {
    font-size: 18px;
    font-weight: 700;
    color: #142451;
    text-decoration: line-through;
    line-height: 1.2;
    margin-bottom: 2px;
}

.fdlm-price-current {
    font-size: 18px;
    font-weight: 700;
    color: #142451;
    line-height: 1.2;
}

.fdlm-price-old + .fdlm-price-current,
.fdlm-price-old + .fdlm-price-current .fdlm-price-ttc {
    color: #E53935;
    font-weight: 700;
}

.fdlm-price-current del {
    font-size: 10px;
    color: #142451;
    opacity: 0.6;
    font-weight: 400;
    display: block;
    text-decoration: line-through;
}

.fdlm-price-current ins {
    text-decoration: none;
}

/* TTC label */
.fdlm-price-ttc {
    font-size: 9px;
    font-weight: 500;
    color: #142451;
    text-transform: uppercase;
    vertical-align: super;
    margin-left: 2px;
}

/* Rupture de stock */
.fdlm-slider-outofstock {
    text-align: center;
    padding: 16px;
    background: rgba(20, 36, 81, 0.03);
    border-radius: 10px;
}

.fdlm-slider-outofstock span {
    display: block;
    color: #999;
    font-size: 13px;
    margin-bottom: 10px;
}

.fdlm-slider-view-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid #142451;
    border-radius: 10px;
    color: #142451;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.fdlm-slider-view-btn:hover {
    background: #142451;
    color: #fff;
}

/* ============================================
   FOOTER ONGLET (BOUTON DECOUVRIR)
   ============================================ */

.fdlm-tab-footer {
    text-align: center;
    margin-top: 40px;
}

.fdlm-discover-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #FDF0E3;
    color: #142451;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
}

.fdlm-discover-btn:hover {
    background: #142451;
    color: #fff;
}

/* Flèche personnalisée dans le bouton découvrir */
.fdlm-discover-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.fdlm-discover-btn:hover .fdlm-discover-arrow {
    transform: translateX(4px);
    filter: brightness(0) invert(1);
}

/* ============================================
   BESTSELLERS SLIDER (sans onglets)
   ============================================ */

.fdlm-bestsellers-slider {
    padding-top: 20px;
}

.fdlm-bestsellers-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #142451;
    margin: 0 0 30px;
    font-family: 'Decoy', sans-serif;
}

/* ============================================
   GRILLE BOUTIQUE (page archive/shop)
   ============================================ */

/* Reset du style WooCommerce par défaut */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 30px 0;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

/* Carte boutique - utilise le même style que slider */
.fdlm-shop-card {
    list-style: none;
}

.fdlm-shop-card .fdlm-slider-card {
    height: 100%;
    min-width: unset;
    flex: none;
}

/* Responsive grille boutique */
@media (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .fdlm-slider-card {
        flex: 0 0 calc(50% - 12px);
        min-width: 260px;
    }

    .fdlm-tabs-nav {
        gap: 0;
    }

    .fdlm-tab-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .fdlm-product-tabs {
        padding: 30px 15px;
    }

    .fdlm-tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-content: flex-start;
        padding-bottom: 10px;
    }

    .fdlm-tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .fdlm-tab-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .fdlm-tab-btn:not(:first-child)::before {
        display: none;
    }

    .fdlm-slider-wrapper {
        flex-direction: column;
        gap: 15px;
    }

    .fdlm-slider-arrow {
        display: none;
    }

    .fdlm-slider-inner {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        padding-bottom: 10px;
    }

    .fdlm-slider-inner::-webkit-scrollbar {
        display: none;
    }

    .fdlm-slider-card {
        flex: 0 0 85%;
        min-width: 260px;
        scroll-snap-align: start;
    }

    .fdlm-slider-actions-wrapper {
        flex-direction: column;
    }

    .fdlm-slider-variation-row {
        flex-wrap: wrap;
        padding: 0;
        gap: 6px;
    }

    .fdlm-slider-variation-select {
        flex: 1 1 auto;
        min-width: 80px;
        padding: 8px 10px;
    }

    .fdlm-slider-qty {
        min-width: auto;
    }

    .fdlm-slider-qty-btn {
        width: 32px;
        height: 36px;
    }

    .fdlm-slider-qty-input {
        width: 36px;
        height: 36px;
    }

    .fdlm-slider-buy-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
        padding: 0;
    }

    .fdlm-slider-price {
        width: 100%;
        align-items: center;
        padding: 10px;
        background: transparent!important;
    }

    .fdlm-slider-add-btn {
        padding: 4px 16px;
        font-size: 14px;
    }

    .fdlm-price-current {
        font-size: 18px;
    }

    .fdlm-discover-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .fdlm-slider-card {
        flex: 0 0 90%;
    }

    .fdlm-slider-title {
        font-size: 15px;
    }

    .fdlm-price-current {
        font-size: 16px;
    }

    .fdlm-slider-variation-row {
        padding: 8px 10px;
    }

    .fdlm-slider-add-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ============================================
   NO PRODUCTS MESSAGE
   ============================================ */

.fdlm-no-products {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 14px;
}
