/*
 Theme Name:   Booklovers Child Theme
 Theme URI:    http://booklovers.ancorathemes.com
 Description:  Booklovers Child Theme
 Author:       AncoraThemes
 Author URI:   http://ancorathemes.com
 Template:     booklovers
 Version:      1.0
 Tags:         flexible-header, custom-background, custom-colors, custom-header, custom-menu, featured-image-header, featured-images, full-width-template, microformats, post-formats, theme-options, threaded-comments, translation-ready
 Text Domain:  booklovers
*/


/* =Theme customization starts here
------------------------------------------------------------ */

/* ========================================
   CONFIGURATION POLICE BRANDONTEXT
   ======================================== */

/* BrandonText Thin */
@font-face {
    font-family: 'BrandonText';
    src: url('fonts/HVD Fonts - BrandonText-Thin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

/* BrandonText Thin Italic */
@font-face {
    font-family: 'BrandonText';
    src: url('fonts/HVD Fonts - BrandonText-ThinItalic.otf') format('opentype');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}

/* BrandonText Regular */
@font-face {
    font-family: 'BrandonText';
    src: url('fonts/BrandonText-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* BrandonText Regular Italic */
@font-face {
    font-family: 'BrandonText';
    src: url('fonts/HVD Fonts - BrandonText-RegularItalic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* BrandonText Medium */
@font-face {
    font-family: 'BrandonText';
    src: url('fonts/HVD Fonts - BrandonText-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* BrandonText Medium Italic */
@font-face {
    font-family: 'BrandonText';
    src: url('fonts/HVD Fonts - BrandonText-MediumItalic.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

/* BrandonText Bold */
@font-face {
    font-family: 'BrandonText';
    src: url('fonts/HVD Fonts - BrandonText-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* BrandonText Black */
@font-face {
    font-family: 'BrandonText';
    src: url('fonts/HVD Fonts - BrandonText-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   APPLICATION DE LA POLICE SUR TOUT LE SITE
   ======================================== */

/* Application sur TOUTES les balises du site */
* {
    font-family: 'BrandonText', Arial, sans-serif !important;
}

/* Application globale sur body et html */
body,
html {
    font-family: 'BrandonText', Arial, sans-serif !important;
    font-weight: 400 !important;
}

/* Application sur tous les titres */
h1,
h1 * {
    font-family: 'BrandonText', Arial, sans-serif !important;
    font-weight: 700 !important;
}

h2,
h2 * {
    font-family: 'BrandonText', Arial, sans-serif !important;
    font-weight: 500 !important;
}

h3,
h3 * {
    font-family: 'BrandonText', Arial, sans-serif !important;
    font-weight: 500 !important;
}

h4,
h5,
h6 {
    font-family: 'BrandonText', Arial, sans-serif !important;
    font-weight: 400 !important;
}

/* Override pour les éléments du thème Booklovers */
.post-title,
.entry-title,
.widget-title,
.page-title {
    font-family: 'BrandonText', Arial, sans-serif !important;
}

/* Application sur les éléments de navigation */
.main-menu,
.nav-menu,
.menu {
    font-family: 'BrandonText', Arial, sans-serif !important;
}

/* Application sur les boutons */
button,
.button,
input[type="submit"],
input[type="button"] {
    font-family: 'BrandonText', Arial, sans-serif !important;
}

/* Application sur tous les liens */
a {
    font-family: 'BrandonText', Arial, sans-serif !important;
}

/* Classes utilitaires pour les différentes variantes */
.brandon-thin {
    font-family: 'BrandonText', Arial, sans-serif;
    font-weight: 100;
}

.brandon-regular {
    font-family: 'BrandonText', Arial, sans-serif;
    font-weight: 400;
}

.brandon-medium {
    font-family: 'BrandonText', Arial, sans-serif;
    font-weight: 500;
}

.brandon-bold {
    font-family: 'BrandonText', Arial, sans-serif;
    font-weight: 700;
}

.brandon-black {
    font-family: 'BrandonText', Arial, sans-serif;
    font-weight: 900;
}

/* ========================================
   GESTION DES PRIX PRODUITS
   ======================================== */

/* Cacher le prix principal des produits à variations (tous les conteneurs possibles) */
.single-product.product-type-variable .summary .price,
.single-product.product-type-variable .product-info .price,
.single-product.product-type-variable .summary>.price,
.single-product.product-type-variable p.price {
    display: none !important;
    visibility: hidden !important;
}

/* Règle globale : Cacher TOUS les .price sauf ceux dans .woocommerce-variation-price */
.single-product.product-type-variable .summary .price:not(.woocommerce-variation-price .price),
.single-product.product-type-variable .price:not(.woocommerce-variation-price *) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Cibler spécifiquement les plages de prix (range) avec plusieurs montants */
.single-product.product-type-variable p.price,
.single-product.product-type-variable .summary p.price,
.single-product.product-type-variable .product-info p.price {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
}

/* 3. Désactiver le zoom curseur du slider (Swiper) */
.swiper-zoom-container {
    cursor: default !important;
    pointer-events: none !important;
}

/* ========================================
   FIX MOBILE REDUCTION BADGE
   ======================================== */
@media (max-width: 768px) {

    /* Force the badge to overlay the image */
    .woocommerce span.onsale,
    .woocommerce-product-gallery .onsale {
        position: absolute !important;
        top: 10px !important;
        left: 10px !important;
        right: auto !important;
        bottom: auto !important;
        z-index: 100 !important;
        margin: 0 !important;
        transform: none !important;
    }

    /* Ensure container is relative for positioning */
    .woocommerce-product-gallery {
        position: relative !important;
        overflow: visible !important;
        /* Allow badge to be seen if on edge */
    }
}

/* Exception: NE PAS cacher le prix de variation sélectionnée */
.single-product.product-type-variable .woocommerce-variation-price,
.single-product.product-type-variable .woocommerce-variation-price .price,
.single-product.product-type-variable .woocommerce-variation-price p.price {
    display: block !important;
    visibility: visible !important;
}

/* Forcer l'affichage de tous les éléments dans le prix de variation */
.single-product .woocommerce-variation-price * {
    display: inline !important;
    visibility: visible !important;
}

/* Produits simples : le prix reste visible normalement */
.single-product:not(.product-type-variable) .price {
    display: block !important;
    visibility: visible !important;
}

/* ========================================
   ZOOM PRODUIT - FOND BLANC PHOTOSWIPE
   ======================================== */

/* Forcer le fond blanc pour la lightbox PhotoSwipe */
.pswp__bg {
    background-color: #ffffff !important;
}

/* Ajuster la couleur des éléments de l'interface pour le fond blanc */
.pswp__button,
.pswp__button--arrow--left:before,
.pswp__button--arrow--right:before {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.pswp__top-bar {
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.pswp__caption {
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.pswp__caption__center {
    color: #000000 !important;
}

/* Compteur d'images en noir pour le fond blanc */
.pswp__counter {
    color: #000000 !important;
}

/* Boutons de contrôle en couleur sombre pour contraste */
.pswp__button {
    color: #000000 !important;
}