/**
 * Featured products slider styles for [trafic_featured_products]
 * Source: <style id="trafic-featured-products-css">
 * Condition: is_front_page() || is_page()
 */

/* ===== Featured Products Slider ===== */
.tfp-slider-wrap {
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}
.tfp-swiper {
    overflow: hidden;
}
.tfp-swiper .swiper-wrapper {
    overflow: visible !important;
    max-width: none !important;
}
.tfp-swiper .swiper-wrapper {
    align-items: stretch;
}
.tfp-swiper .swiper-slide {
    height: auto;
    overflow: visible !important;
    max-width: none !important;
}

/* Navigation arrows */
.tfp-nav-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 36px;
}
.tfp-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    transition: opacity 0.2s;
    line-height: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.tfp-nav svg {
    width: 44px;
    height: 44px;
    display: block;
}
.tfp-nav:hover { opacity: 1; box-shadow: inset 0 0 0 2px #2B4678; background-color: transparent !important; }
.tfp-nav.swiper-button-disabled { opacity: 0.3; cursor: default; pointer-events: none; }
.tfp-nav:hover .tfp-bg { fill: #F8F8F8; }
.tfp-nav:hover .tfp-ic { fill: #2B4678; }

/* === Card wrapper === */
.tfp-card-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

/* === Card === */
.tfp-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 16px;
    border-radius: 42px;
    outline: 1.6px solid #DCDCDC;
    outline-offset: -1.6px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    transition: box-shadow 0.2s;
    gap: 16px;
    overflow: hidden;
}
.tfp-card-wrap:hover .tfp-card {
    box-shadow: 0 4px 20px rgba(43, 70, 120, 0.10);
}

/* Action button */
.tfp-action-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 2;
    width: 50px;
    height: 50px;
    border: none;
    background: none !important;
    padding: 0 !important;
    cursor: pointer;
    line-height: 0;
    border-radius: 50% !important;
    transition: opacity 0.2s, transform 0.15s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tfp-action-btn svg {
    width: 50px;
    height: 50px;
}
.tfp-action-btn:hover { box-shadow: inset 0 0 0 2px #2B4678; background-color: transparent !important; border-radius: 50% !important; }
.tfp-action-btn:hover .tfp-bg { fill: #F8F8F8; }
.tfp-action-btn:hover .tfp-ic { fill: #2B4678; }
.tfp-action-btn.added::after {
    content: '\2713';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #34E015;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    border-radius: 50%;
    animation: tfp-added-fade 1.5s ease forwards;
}
@keyframes tfp-added-fade {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Card image zone */
.tfp-card-image {
    position: relative;
    width: 100%;
    min-height: 213px;
    max-height: 213px;
    height: 213px;
    background: #F1F1F1;
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tfp-card-image img {
    max-width: 85%;
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* Badges on image */
.tfp-badge-options {
    position: absolute;
    top: 10px;
    left: 10px;
    height: 24px;
    padding: 3px 12px;
    background: #F8F8F8;
    border-radius: 30px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    line-height: 18px;
    color: #2B4678;
    white-space: nowrap;
}
.tfp-badge-new {
    position: absolute;
    top: 10px;
    left: 10px;
    height: 24px;
    padding: 3px 12px;
    background: #F7CA39;
    border-radius: 30px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    line-height: 18px;
    color: #242526;
    white-space: nowrap;
}

/* Content below image */
.tfp-card-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    flex: 1;
    min-height: 0;
}
.tfp-card-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}
.tfp-card-title {
    margin: 0;
    color: #2B4678;
    font-size: 20px;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 700;
    line-height: 26px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.tfp-card-refs {
    opacity: 0.6;
    color: #515151;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 22.4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Price pill */
.tfp-price-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 145px;
    height: 35px;
    padding: 0 16px;
    background: #F7CA39;
    border-radius: 30px;
}
.tfp-price-pill .tfp-price-amount,
.tfp-price-pill .tfp-price-amount .woocommerce-Price-amount {
    color: #2B4678;
    font-size: 26px;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 700;
    line-height: 28.6px;
}
.tfp-price-pill .tfp-price-amount .woocommerce-Price-currencySymbol {
    font-size: 20px;
}
.tfp-price-pill .tfp-price-ht {
    color: #2B4678;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 22.4px;
    margin-left: 4px;
}

/* Bottom row */
.tfp-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: auto;
}

/* "Sur devis" pill */
.tfp-devis-pill {
    display: inline-flex;
    align-items: center;
    height: 35px;
    min-width: 145px;
    justify-content: center;
    padding: 0 16px;
    background: #F7CA39;
    border-radius: 30px;
    color: #2B4678;
    font-size: 16px;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 700;
    line-height: 28.6px;
    white-space: nowrap;
}

/* Placeholder */
.tfp-cart-btn-placeholder,
.tfp-contact-placeholder {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.tfp-card-bottom--devis {
    margin-top: auto;
}

/* Card slides fill height */
.tfp-swiper .swiper-slide {
    height: auto;
    display: flex;
}

/* Devis popup (shared with product-grid) */
.tpg-devis-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.tpg-devis-overlay.active {
    display: flex;
}
.tpg-devis-modal {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    max-width: 640px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.tpg-devis-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: #F1F1F1;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #242526;
    transition: background 0.2s;
}
.tpg-devis-close:hover {
    background: #ddd;
}
.tpg-devis-modal h3 {
    margin: 0 0 8px 0;
    color: #2B4678;
    font-size: 24px;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 700;
}
.tpg-devis-product {
    color: #515151;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    margin-bottom: 16px;
}
@media (max-width: 600px) {
    .tpg-devis-modal {
        padding: 24px 16px;
        border-radius: 16px;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .tfp-slider-wrap { padding: 0 16px; }
    .tfp-card-wrap { height: auto; min-height: 380px; }
}
@media (max-width: 768px) {
    .tfp-card-image { height: 180px; min-height: 180px; max-height: 180px; }
    .tfp-card-wrap { min-height: 350px; }
    .tfp-card { border-radius: 32px; }
    .tfp-card-title { font-size: 18px; line-height: 24px; }
    .tfp-price-pill .tfp-price-amount,
    .tfp-price-pill .tfp-price-amount .woocommerce-Price-amount { font-size: 22px; }
}
@media (max-width: 600px) {
    .tfp-nav-group { display: flex; justify-content: center; }
    .tfp-card-wrap { min-height: 340px; }
    .tfp-card { padding: 12px; border-radius: 28px; }
    .tfp-card-image { height: 160px; min-height: 160px; max-height: 160px; border-radius: 24px; }
    .tfp-action-btn { width: 44px; height: 44px; bottom: 12px; right: 12px; }
    .tfp-action-btn svg { width: 44px; height: 44px; }
    .tfp-cart-btn-placeholder, .tfp-contact-placeholder { width: 44px; height: 44px; }
}