/* ── ICT WooCommerce Carousel – Frontend ─────────────────────────────────────
 *
 * Styles de carte extraits de :
 *   shopire/assets/css/themes.css   → variables CSS + base bouton
 *   shopire/assets/css/woo-styles.css → product-single, product-img,
 *                                       product-action, boutons WC
 *
 * Tout est scopé sous .ict-woo-carousel-wrap pour éviter les conflits.
 * Les variables CSS du thème actif s'appliquent en cascade ; les valeurs
 * ci-dessous servent de fallback quand le thème n'est pas Shopire.
 * ─────────────────────────────────────────────────────────────────────────── */

/* ════════════════════════════════════════════════════════════════════════════
   1. Variables CSS (fallback – écrasées par le thème si Shopire est actif)
   ════════════════════════════════════════════════════════════════════════════ */
.ict-woo-carousel-wrap {
    --wf-main-rgb:        254, 67, 34;          /* couleur principale thème    */
    --wf-main-color:      #ADA1CD;
    --wf-secondary-color: #000;
    --wf-text-color:      #334770;
}

/* ════════════════════════════════════════════════════════════════════════════
   2. Wrapper & titre de section
   ════════════════════════════════════════════════════════════════════════════ */
.ict-woo-carousel-wrap {
    width: 100%;
    position: relative;
}

.ict-wc-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--wf-secondary-color, #000);
}

/* ════════════════════════════════════════════════════════════════════════════
   3. Réinitialisation de la grille WC à l'intérieur du carousel
      (woo-styles.css l.476 : ul.products.owl-carousel li.product)
   ════════════════════════════════════════════════════════════════════════════ */
.ict-woo-carousel-wrap ul.products.owl-carousel {
    display: block !important;
    padding: 0;
    margin: 0;
    list-style: none;
}

.ict-woo-carousel-wrap ul.products.owl-carousel li.product {
    float:          none    !important;
    width:          100%    !important;
    margin:         0 0 15px 0 !important; /* marge basse ; l'espacement latéral est géré par owl margin option */
    display:        flex    !important;
    flex-direction: column;
}

/* Hauteur égale sur toutes les cartes */
.ict-woo-carousel-wrap ul.products li.product .product-single {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ict-woo-carousel-wrap ul.products li.product .product-content-outer {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ════════════════════════════════════════════════════════════════════════════
   4. Carte produit – .product-single
      (woo-styles.css l.522)
   ════════════════════════════════════════════════════════════════════════════ */
.ict-woo-carousel-wrap .product-single {
    background-color: #ffffff;
    border: 1px solid rgba(189, 189, 189, 0.4);
    border-radius: 12px;
    position: relative;
    z-index: 0;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}

/* .ict-woo-carousel-wrap .product-single:hover,
.ict-woo-carousel-wrap .product-single:focus-within {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
    transform: translateY(-3px);
} */

/* ════════════════════════════════════════════════════════════════════════════
   5. Zone image – .product-img
      (woo-styles.css l.574, l.615)
   ════════════════════════════════════════════════════════════════════════════ */
.ict-woo-carousel-wrap .product-img {
    position: relative;
    overflow: hidden;
    text-align: center;
}

.ict-woo-carousel-wrap ul.products li.product .product-single .product-img {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ict-woo-carousel-wrap ul.products li.product .product-single .product-img > a {
    width: 100%;
}

/* Image hover zoom (woo-styles.css l.603) */
.ict-woo-carousel-wrap ul.products li.product .product-img a img {
    margin-bottom: 0;
    transition: all 0.5s ease;
}


/* Image object-fit (woo-styles.css l.627) */
.ict-woo-carousel-wrap ul.products li.product .product-single .product-img img {
    object-fit: cover;
    height: 100%;
}

/* Bouton quick-view (woo-styles.css l.632) */
.ict-woo-carousel-wrap ul.products li.product .product-single .product-img .button.quickview-trigger {
    position: absolute;
    top: 15px;
    right: 15px;
    transform: translateX(50%);
    margin: 0;
    white-space: nowrap;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    opacity: 0;
    visibility: hidden;
    padding: 0;
    z-index: 1;
    background: var(--wf-secondary-color, #000);
    color: var(--wf-secondary-color, #000);
}

.ict-woo-carousel-wrap ul.products li.product .product-single .product-img .button.quickview-trigger::after {
    content: "\f06e";
    font-family: "Font Awesome 6 Free";
    position: absolute;
    font-size: 1.6rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: 900;
}

.ict-woo-carousel-wrap ul.products li.product .product-single:hover .product-img .button.quickview-trigger,
.ict-woo-carousel-wrap ul.products li.product .product-single:focus-within .product-img .button.quickview-trigger {
    opacity: 1;
    visibility: visible;
    transform: translateX(0%);
}

/* ════════════════════════════════════════════════════════════════════════════
   6. Contenu texte – .product-content / .product-content-outer
      (woo-styles.css l.668, l.672)
   ════════════════════════════════════════════════════════════════════════════ */
.ict-woo-carousel-wrap ul.products li.product .product-single .product-content {
    padding: 15px 12px 16px;
    line-height: 1.25;
}

.ict-woo-carousel-wrap ul.products li.product .product-single .product-content-outer {
    text-align: center;
    position: relative;
    z-index: 0;
}

/* Lien produit (woo-styles.css l.584) */
.ict-woo-carousel-wrap .product-single .product-content a {
    color: var(--wf-secondary-color, #000);
    text-decoration: none;
}

.ict-woo-carousel-wrap .product-single .product-content a:hover,
.ict-woo-carousel-wrap .product-single .product-content a:focus {
    color: var(--wf-main-color);
}

/* Titre h3 (woo-styles.css l.692) */
.ict-woo-carousel-wrap ul.products li.product .product-single h3 {
    font-size: 16px;
    padding: 0;
    margin-bottom: 7px;
    font-weight: 600;
    color: var(--wf-secondary-color, #000);
}

/* Prix (woo-styles.css l.704) */
.ict-woo-carousel-wrap ul.products li.product div.price {
    font-size: 15px;
    line-height: 1.2;
    color: var(--wf-main-color);
}

.ict-woo-carousel-wrap .woocommerce-Price-amount.amount,
.ict-woo-carousel-wrap ins .woocommerce-Price-amount.amount bdi {
    color: var(--wf-main-color);
}

/* Étoiles de notation (woo-styles.css l.679) */
.ict-woo-carousel-wrap .woocommerce .star-rating span::before,
.ict-woo-carousel-wrap .woocommerce .star-rating::before {
    color: #ffb919;
}

/* Badge solde / promo (woo-styles.css l.1163) */
.ict-woo-carousel-wrap .product .sale-ribbon,
.ict-woo-carousel-wrap .woocommerce span.onsale {
    position: absolute;
    top: 15px;
    left: 15px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    padding: 0 10px;
    line-height: 24px;
    display: inline-block;
    border-radius: 6px;
    color: #fff;
    background: var(--wf-main-color);
    z-index: 1;
}

/* ════════════════════════════════════════════════════════════════════════════
   7. Barre d'actions – .product-action
      (woo-styles.css l.710)
   ════════════════════════════════════════════════════════════════════════════ */
.ict-woo-carousel-wrap .product-action {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    padding: 0;
    transition: all 0.4s ease-in-out;
    border-top: 1px solid rgba(189, 189, 189, 0.4);
    margin: 0;
    height: max-content;
    text-align: center;
    z-index: 0;
}

.ict-woo-carousel-wrap .woocommerce .product-action > * {
    flex: auto;
}

/* ════════════════════════════════════════════════════════════════════════════
   8. Boutons WooCommerce
      (themes.css l.223 base + woo-styles.css l.58 + woo-styles.css l.1065)
   ════════════════════════════════════════════════════════════════════════════ */

/* Base (themes.css l.223) */
.ict-woo-carousel-wrap .woocommerce a.button,
.ict-woo-carousel-wrap .woocommerce button.button,
.ict-woo-carousel-wrap .woocommerce input.button {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 1.1rem 2rem;
    line-height: 1.067;
    text-align: center;
    letter-spacing: 0.03rem;
    border-width: 0.1rem;
    border-style: solid;
    border-color: transparent;
    border-radius: 0;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    white-space: normal;
    text-transform: initial;
    font-family: inherit;
    text-decoration: none;
    position: relative;
    z-index: 0;
    color: #fff;
    transition: all 0.2s ease-in-out;
}

/* Couleur principale (woo-styles.css l.1065) */
.ict-woo-carousel-wrap .woocommerce a.button,
.ict-woo-carousel-wrap .woocommerce button.button,
.ict-woo-carousel-wrap .woocommerce input.button,
.ict-woo-carousel-wrap .woocommerce a.button.alt,
.ict-woo-carousel-wrap .woocommerce button.button.alt {
    color: #fff;
    background-color: var(--wf-main-color);
}

.ict-woo-carousel-wrap .woocommerce a.button:hover,
.ict-woo-carousel-wrap .woocommerce a.button:focus,
.ict-woo-carousel-wrap .woocommerce button.button:hover,
.ict-woo-carousel-wrap .woocommerce button.button:focus,
.ict-woo-carousel-wrap .woocommerce input.button:hover,
.ict-woo-carousel-wrap .woocommerce input.button:focus {
    color: #fff;
    background-color: rgba(var(--wf-main-rgb), 0.85);
    transition: all 0.2s ease-in-out;
}

/* Bouton full-width dans la barre action */
.ict-woo-carousel-wrap ul.products li.product .product-action .button,
.ict-woo-carousel-wrap ul.products li.product .product-action a.button {
    display:    block   !important;
    width:      100%    !important;
    box-sizing: border-box;
    text-align: center;
}

/* Bouton "Add to cart" (woo-styles.css l.729) */
.ict-woo-carousel-wrap ul.products li.product .product-action .button.add_to_cart_button {
    background-color: #ffffff;
    color: #303030;
}

.ict-woo-carousel-wrap ul.products li.product .product-action .button.add_to_cart_button:hover,
.ict-woo-carousel-wrap ul.products li.product .product-action .button.add_to_cart_button:focus {
    background-color: #303030;
    color: #fff;
}

/* Masque le bouton "added" (woo-styles.css l.735) */
.ict-woo-carousel-wrap ul.products li.product .product-action .button.add_to_cart_button.added {
    display: none !important;
}

/* Lien "View cart" après ajout (woo-styles.css l.782) */
.ict-woo-carousel-wrap ul.products li.product a.wc-forward {
    margin-top: 0;
    margin-left: 5px;
    font-weight: 600;
    display: inline-block;
    padding: 0 16px;
    line-height: 35px;
    border-radius: 3px;
    white-space: nowrap;
    background-color: var(--wf-secondary-color, #000);
    color: #ffffff;
    text-decoration: none;
}

/* ════════════════════════════════════════════════════════════════════════════
   9. Prévention FOUC – masque les items avant l'init d'Owl Carousel
      Owl ajoute .owl-loaded dès qu'il est prêt ; tant que cette classe est
      absente les <li> restent cachés, évitant l'affichage en liste longue
      lors d'un rechargement, vidage de cache ou connexion lente.
   ════════════════════════════════════════════════════════════════════════════ */
.ict-woo-carousel-wrap ul.products.owl-carousel:not(.owl-loaded) {
    overflow: hidden;
}

.ict-woo-carousel-wrap ul.products.owl-carousel:not(.owl-loaded) > li.product {
    display: none !important;
}

/* ════════════════════════════════════════════════════════════════════════════
   10. Owl Carousel – navigation & dots
   ════════════════════════════════════════════════════════════════════════════ */
.ict-woo-carousel-wrap .owl-nav {
    margin: 0;
}

.ict-woo-carousel-wrap .owl-nav button.owl-prev,
.ict-woo-carousel-wrap .owl-nav button.owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.92) !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    z-index: 10;
    margin-top: -24px; /* compense la pagination en bas */
}

.ict-woo-carousel-wrap .owl-nav button.owl-prev { left:  -18px; }
.ict-woo-carousel-wrap .owl-nav button.owl-next { right: -18px; }

.ict-woo-carousel-wrap .owl-nav button:hover {
    background: #fff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.ict-owl-prev,
.ict-owl-next {
    font-size: 16px;
    font-weight: 700;
    color: var(--wf-main-color);
    line-height: 1;
}

.ict-woo-carousel-wrap .owl-dots {
    display: block !important;
    text-align: center;
}

.ict-woo-carousel-wrap .owl-dot {
    display: inline-block !important;
}

.ict-woo-carousel-wrap .owl-dot span {
    display: block !important;
    background: rgba(189, 189, 189, 0.5) !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    margin: 4px !important;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ict-woo-carousel-wrap .owl-dot.active span,
.ict-woo-carousel-wrap .owl-dot:hover span {
    background: var(--wf-main-color) !important;
}

/* ════════════════════════════════════════════════════════════════════════════
   11. État vide
   ════════════════════════════════════════════════════════════════════════════ */
.ict-wc-no-products {
    text-align: center;
    color: #777;
    padding: 2rem 0;
}
