/* Conteneur image : ratio fixe + rognage de ce qui dépasse */
.deal-card .rbt-card-img {
    position: relative;
    aspect-ratio: 4 / 3; /* change en 1 / 1 si tu veux du carré */
    overflow: hidden;
}

.deal-card .rbt-card-img > a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Les deux images (principale + survol) */
.deal-card .rbt-card-img img.rbt-prd-img,
.deal-card .rbt-card-img img.rbt-hover-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover; /* remplit et rogne ; utilise "contain" pour tout voir sans rognage */
    object-position: center;
}

.countdown-card .rbt-card-img {
    position: relative;
    aspect-ratio: 4 / 3; /* 1 / 1 pour du carré */
    overflow: hidden;
}

.countdown-card .rbt-card-img > a {
    display: block;
    width: 100%;
    height: 100%;
}

.countdown-card .rbt-card-img img.rbt-prd-img,
.countdown-card .rbt-card-img img.rbt-hover-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover; /* ou "contain" pour ne pas rogner le produit */
    object-position: center;
}

/* ===== Sidebar filtres ===== */
.shop-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.filter-widget {
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}
.filter-widget:last-child {
    border-bottom: 0;
}

.filter-widget-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: #111;
}

/* Type (liens) */
.filter-type-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.filter-type-list li a {
    display: block;
    padding: 6px 0;
    color: #444;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s;
}
.filter-type-list li a:hover,
.filter-type-list li a.active {
    color: #e63946;
    font-weight: 600;
}

/* Checkboxes */
.filter-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    position: relative;
    user-select: none;
}
.filter-checkbox-child {
    padding-left: 18px;
    font-size: 13px;
    color: #666;
}

.filter-checkbox input {
    display: none;
}

.filter-checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}
.filter-checkbox input:checked + .checkmark {
    background: #111;
    border-color: #111;
}
.filter-checkbox input:checked + .checkmark::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.filter-checkbox .label-text {
    flex: 1;
}
.filter-checkbox .count {
    font-size: 12px;
    color: #999;
    background: #f5f5f5;
    padding: 1px 7px;
    border-radius: 10px;
}

/* ===== Range prix ===== */
.price-range-wrapper {
    position: relative;
    height: 36px;
    margin: 8px 0;
}
.price-slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    transform: translateY(-50%);
}
.price-slider-fill {
    position: absolute;
    height: 100%;
    background: #111;
    border-radius: 2px;
}
.price-range-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
.price-range-input::-webkit-slider-thumb {
    pointer-events: all;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #111;
    cursor: pointer;
    -webkit-appearance: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.price-range-input::-moz-range-thumb {
    pointer-events: all;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #111;
    cursor: pointer;
}
.price-range-values {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #111;
}

/* ===== Cartes produits ===== */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.product-thumb {
    display: block;
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f7f7f7;
}
.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.product-card:hover .product-thumb img {
    transform: scale(1.05);
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}
.badge-primary {
    background: #111;
    color: #fff;
}
.badge-sale {
    background: #e63946;
    color: #fff;
}

.product-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.product-cats {
    display: flex;
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}
.product-cats a {
    color: inherit;
    text-decoration: none;
}
.product-cats a:hover {
    color: #e63946;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}
.product-title a {
    color: #111;
    text-decoration: none;
}
.product-title a:hover {
    color: #e63946;
}

.product-specs {
    font-size: 12px;
    color: #777;
    margin: 0;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #777;
}
.product-meta .stock.in {
    color: #2a9d8f;
}
.product-meta .stock.out {
    color: #e63946;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
}
.product-price del {
    color: #999;
    font-size: 13px;
}
.product-price strong {
    font-size: 18px;
    color: #111;
}

.btn-shop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #111;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-shop:hover {
    background: #e63946;
    color: #fff;
}

/* ===== Spinner overlay ===== */
#products-container.loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s;
}
#products-container.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #111;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    z-index: 10;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Chips filtres actifs */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f1f1;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    color: #333;
}
.filter-chip button {
    background: none;
    border: 0;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}
.filter-chip button:hover {
    color: #e63946;
}

/* panier */

#header-cart-count:empty,
#header-cart-count[data-count="0"] {
    display: none;
}

/* css pour la page shop_product */
/* ===== Actions produit ===== */
.product-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-cart {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #111;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, transform .1s;
}
.btn-cart:hover:not(:disabled) {
    background: #e63946;
    color: #fff;
}
.btn-cart:active:not(:disabled) {
    transform: scale(.98);
}
.btn-cart i { font-size: 14px; }

.btn-cart-variants {
    background: #f1f1f1;
    color: #111;
}
.btn-cart-variants:hover {
    background: #111 !important;
    color: #fff !important;
}

.btn-cart-disabled {
    background: #e5e5e5;
    color: #999;
    cursor: not-allowed;
}

.btn-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f5f5f5;
    color: #111;
    text-decoration: none;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.btn-detail:hover {
    background: #111;
    color: #fff;
}

/* ===== Wishlist flottant ===== */
.product-wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,.9);
    color: #111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-4px);
    transition: all .2s;
    z-index: 2;
}
.product-card:hover .product-wishlist-btn {
    opacity: 1;
    transform: translateY(0);
}
.product-wishlist-btn:hover,
.product-wishlist-btn.active {
    background: #e63946;
    color: #fff;
}
.product-wishlist-btn.active i::before {
    font-weight: 900; /* heart rempli */
}

/* ===== Spinner pendant l'ajout ===== */
.btn-cart.loading {
    pointer-events: none;
    opacity: .8;
}
.btn-cart.loading i::before {
    content: "\f110"; /* fa-spinner */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    animation: spin .7s linear infinite;
}

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

/* ===== Toast (si pas déjà présent) ===== */
#cart-toaster {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
#cart-toaster > * { pointer-events: auto; }


/* Loader drawer */
.cart-loading {
    opacity: .5;
    pointer-events: none;
    transition: opacity .2s;
    position: relative;
}
.cart-loading::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 28px; height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid rgba(0,0,0,.1);
    border-top-color: #111;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    z-index: 10;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Badge panier animation pop */
@keyframes rbtCartPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.4); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}
.rbt-cart-pop { animation: rbtCartPop .45s ease-out; }

/* Toast container */
#cart-toaster { pointer-events: none; }
#cart-toaster > * { pointer-events: auto; }
.cart-toast i { margin-right: 6px; }



/* ============================================
   VARIANTES PRODUIT (page détail)
============================================ */
.product-variants-wrapper {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #eee;
}

.variant-group { margin-bottom: 16px; }

.variant-label {
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}
.variant-label strong { font-weight: 700; }
.variant-selected { color: #666; margin-left: 4px; }

/* Couleurs */
.variant-color-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
}
.variant-color-list li { display: inline-block; }

.variant-color-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-radius: 50%;
    transition: border-color .2s, transform .15s;
    text-decoration: none;
}
.variant-color-btn:hover { transform: scale(1.08); }
.variant-color-list li.active .variant-color-btn {
    border-color: #111;
    padding: 2px;
}

.color-circle {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid #ddd;
}

/* Tailles */
.variant-size-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
}
.variant-size-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 42px;
    padding: 0 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #111;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.variant-size-btn:hover {
    border-color: #111;
}
.variant-size-list li.active .variant-size-btn {
    background: #111;
    border-color: #111;
    color: #fff;
}
.variant-size-list li.disabled .variant-size-btn {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
    text-decoration: line-through;
}

/* Stock */
.variant-stock-info {
    font-size: 14px;
}
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: #e6f7ed;
    color: #2a9d8f;
    font-weight: 600;
}
.stock-badge.out-of-stock {
    background: #fde8ea;
    color: #e63946;
}

/* Quantité */
.qty-selector {
    display: inline-flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    height: 48px;
}
.qty-selector .qty-btn {
    width: 44px;
    height: 100%;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s;
}
.qty-selector .qty-btn:hover { background: #f1f1f1; }
.qty-selector .qty-input {
    width: 60px;
    height: 100%;
    border: 0;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    outline: none;
    -moz-appearance: textfield;
}
.qty-selector .qty-input::-webkit-outer-spin-button,
.qty-selector .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Boutons achat */
.product-purchase-area .product-add-to-cart-btn {
    flex: 1;
    min-width: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
}
.product-purchase-area .rbt-btn-border {
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Spinner bouton pendant l'ajout */
.product-add-to-cart-btn.loading,
.ajax-add-to-cart.loading {
    pointer-events: none;
    opacity: .85;
}
.product-add-to-cart-btn.loading i,
.ajax-add-to-cart.loading i {
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Carte ===== */
.swiper-slide .rbt-product-banner-style-four .rbt-banner-inner {
    position: relative;
    overflow: hidden;
    min-height: 430px;
}

/* ===== Image : boîte en bas à droite, le vélo s'adapte dedans ===== */
.swiper-slide .rbt-product-banner-style-four .rbt-product-banner-img {
    position: absolute !important;
    top: auto !important;
    left: auto !important;
    right: 10px !important;
    bottom: 0 !important;
    width: 50% !important;
    height: 80% !important;
    margin: 0 !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: flex-end;
    justify-content: flex-end;
    transform: none !important;   /* bloque le zoom_in du thème */
    animation: none !important;
    opacity: 1 !important;
}
.swiper-slide .rbt-product-banner-style-four .rbt-product-banner-img a {
    display: flex !important;
    align-items: flex-end;
    justify-content: flex-end;
    width: 100% !important;
    height: 100% !important;
}
.swiper-slide .rbt-product-banner-style-four .rbt-product-banner-img img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    transform: none !important;
}

/* ===== Texte ===== */
.swiper-slide .rbt-product-banner-style-four .rbt-product-banner-content {
    position: relative !important;
    z-index: 5 !important;
    max-width: 52% !important;
    padding-left: 75px !important;
}
.swiper-slide .rbt-product-banner-style-four .rbt-banner-title-lg {
    font-size: clamp(20px, 2.1vw, 30px);
    line-height: 1.2;
}

/* ===== Prix ===== */
.swiper-slide .rbt-product-banner-style-four .rbt-pricing-part del {
    display: block;
}
.swiper-slide .rbt-product-banner-style-four .rbt-pricing-part .d-flex {
    flex-wrap: nowrap !important;
    gap: 10px;
}
.swiper-slide .rbt-product-banner-style-four .rbt-price-text,
.swiper-slide .rbt-product-banner-style-four .rbt-offer-badge {
    white-space: nowrap;
}
.swiper-slide .rbt-product-banner-style-four .rbt-price-text {
    font-size: clamp(20px, 1.9vw, 28px);
}
/* ============================================================
HEADER SEARCH — input + select + loader
============================================================ */

/* Conteneur input (position relative pour le placeholder animé) */
.header-search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

/* L'input lui-même — enlever la bordure par défaut */
.header-search-input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    padding-left: 8px;
    font-size: 14px;
    color: inherit;
    position: relative;
    z-index: 2;
}

.header-search-input:focus {
    outline: none;
}

/* Placeholder animé — superposé à l'input, désactivé au clic */
.header-search-placeholder {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
    color: #999;
    font-size: 14px;
    transition: opacity .2s;
}

/* Quand l'input a du texte → on masque le placeholder animé via JS (voir plus bas) */
.header-search-input-wrap.has-value .header-search-placeholder {
    opacity: 0;
}

/* ============================================================
BOUTON + SPINNER
============================================================ */
#header-search-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

#header-search-btn.loading {
    pointer-events: none;
    cursor: wait;
    background: #e5e5e5;
}

#header-search-btn .header-search-icon {
    transition: opacity .15s, transform .15s;
}

/* Loader : cercle tournant en CSS pur */
.header-search-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(0, 0, 0, .15);
    border-top-color: #111;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    opacity: 0;
    pointer-events: none;
}

#header-search-btn.loading .header-search-icon {
    opacity: 0;
    transform: scale(.6);
}

#header-search-btn.loading .header-search-spinner {
    opacity: 1;
}

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

/* ============================================================
ÉTAT "LOADING" GLOBAL — overlay léger sur la page
============================================================ */
body.search-loading {
    cursor: progress;
}

body.search-loading::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #2563eb, transparent);
    animation: searchBar 1s linear infinite;
    z-index: 9999;
}

@keyframes searchBar {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.uni-header-swc-one .search-by-category {
    min-width: 190px;
    position: relative;
    z-index: 5;
}

.uni-header-swc-one .search-by-category .form-select {
    background-color: transparent;
    cursor: pointer;
}

/* Le placeholder animé ne doit pas bloquer les clics */
.header-search-placeholder {
    pointer-events: none;
}