
/**
 * =================================================================
 * RESET & SETUP DE BASE
 * ================================================================= */
.product.swiper-slide {
    list-style: none;
    height: auto;
    padding: 4px;
}

.product-card a {
    text-decoration: none;
    color: inherit;
}

/**
 * =================================================================
 * CARTE PRODUIT : STRUCTURE & LAYOUT
 * ================================================================= */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border-neutral);
    border-radius: var(--radius-main);
    transition: var(--transition-fast);
    overflow: hidden;
    position: relative;
    padding: 1rem 0.75rem;
}

/**
 * =================================================================
 * CONTENU DE LA CARTE : IMAGE, DÉTAILS, PIED DE CARTE
 * =================================================================
 */
/* --- Section Image --- */

/* Le lien <a> sert de cadre pour l'image */
.product-card__image-link {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.product-card__image-link img.wp-post-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-fast);
}

/* Le conteneur global reste la référence pour la position absolue */
.product-card__image-wrapper {
    position: relative;
}

/* Le style du logo en superposition ne change pas */
.product-brand-logo {
    position: absolute;
    bottom: 1px;
    left: 10px;
    max-height: 25px;
    max-width: 60px;
    width: auto;
    padding: 5px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 2;
}


.onsale {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    background-color: var(--primary-accent);
    color: var(--text-on-accent);
    padding: 0.25rem 0.75rem;
    border-radius: calc(var(--radius-button) / 2);
    font-size: 0.8em;
    font-weight: 600;
}

/* --- Section Détails (Titre, En stock, SKU) --- */
.product-card__details {
    padding: 0.5rem 0rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex-grow: 1;
}

.product-card__title {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.product-card__title a {
    color: var(--text-title);
    transition: color 0.2s ease;
}

/* --- Style pour l'indicateur de stock --- */
.stock-status-wrapper {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.stock-status {
    font-size: 0.8em;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
}

/* Style commun pour le rond de couleur */
.stock-status::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

/* --- Statut EN STOCK (vert) --- */
.stock-status.in-stock {
    color: #27693f;
    background-color: #e3f3e8;
}
.stock-status.in-stock::before {
    background-color: #35a45a;
}

/* --- Statut HORS STOCK (rouge) --- */
.stock-status.out-of-stock {
    color: #a94442;
    background-color: #f2dede;
}
.stock-status.out-of-stock::before {
    background-color: #d9534f;
}

.product-sku {
    font-size: 0.8em;
    color: #888;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.product-sku-wrapper {
    display: flex;
    align-items: center;
    min-height: 2.1em;
    margin-top: auto;
}

/* --- Section Pied de carte (Prix, Bouton) --- */
.product-card__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.price-wrapper {

}

.price {
    color: var(--text-standard);
    font-size: 0.95rem;
    font-weight: 600;
}

.single-product div.product .product-card .price {
    color: var(--text-standard);
    font-size: 0.95rem;
    font-weight: 600;
}

.single-product div.product .product-card .price * {
    color: inherit;
}

.product-card .button {
    width: 100%;
    padding: 0.6rem;
    border-radius: var(--radius-button);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;

    transition: all 0.2s ease-out;
}

.single-product div.product .product-card .button {
    width: 100%;
    padding: 0.6rem;
    border-radius: var(--radius-button);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;

    transition: all 0.2s ease-out;
}

/* --- Bouton Primaire (disponible) --- */
.product-card .button.add_to_cart_button {
    background-color: var(--primary-accent);
    color: var(--text-on-accent);
    border-color: var(--primary-accent);
    transition: all 0.2s ease-out;
}

.single-product div.product .product-card .button.add_to_cart_button {
    background-color: var(--primary-accent);
    color: var(--text-on-accent);
    border-color: var(--primary-accent);
    transition: all 0.2s ease-out;
}

/* --- Bouton Secondaire (indisponible / lien) --- */
.product-card a.button {
    background-color: var(--bg-main);
    color: var(--text-standard);
    border: 1px solid var(--border-neutral);
}

.single-product div.product .product-card a.button {
    background-color: var(--bg-main);
    color: var(--text-standard);
    border: 1px solid var(--border-neutral);
}

/**
 * =================================================================
 * INTERACTIVITÉ (ÉTATS :hover)
 * ================================================================= */


.product-card .button.add_to_cart_button:hover {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    filter: brightness(110%);
}

/* Au survol, il se remplit pour montrer l'interaction */
.product-card a.button:not(.add_to_cart_button):hover {
    background-color: #4A5568;
    color: var(--bg-secondary);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-floating);
}

.product-card:hover .product-card__image {
    transform: scale(1.05);
}

.product-card__title a:hover {
    color: var(--primary-accent);
}

/**
 * =================================================================
 * NAVIGATION SWIPER.JS
 * ================================================================= */
.swiper {
    padding-bottom: 10px !important; /* Pour que l'ombre ne soit pas coupée */
}

.swiper-slide {
    height: auto; /* Très important pour que les cartes s'égalisent */
}

/* Positionnement du wrapper (inchangé) */
.swiper-navigation-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
}
.swiper-container-wrapper {
    position: relative;
    padding-top: 50px;
}

/* --- 1. On transforme les boutons en conteneurs Flex pour centrer le SVG --- */
.swiper-navigation-wrapper .swiper-button-next,
.swiper-navigation-wrapper .swiper-button-prev {
    position: static;
    transform: none;
    width: 38px;
    height: 38px;
    margin: 0;
    background-color: var(--bg-main);
    border: 1px solid var(--border-neutral);
    border-radius: 50%;
    box-shadow: var(--shadow-ui);
    transition: all 0.2s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- 2. LA CLÉ : On cache définitivement les anciennes icônes de Swiper --- */
.swiper-navigation-wrapper .swiper-button-next::after,
.swiper-navigation-wrapper .swiper-button-prev::after {
    display: none !important;
}

/* --- 3. On style notre SVG --- */
.swiper-navigation-wrapper .swiper-button-prev svg,
.swiper-navigation-wrapper .swiper-button-next svg {
    width: 1rem;  /* Ajustez la taille comme vous le souhaitez */
    height: 1rem;
    color: var(--text-standard); /* Couleur par défaut */
    transition: color 0.2s ease-out;
    fill: none !important;
}


/* --- 4. On gère le survol --- */
.swiper-navigation-wrapper .swiper-button-next:hover,
.swiper-navigation-wrapper .swiper-button-prev:hover {
    background-color: var(--primary-accent);
    border-color: var(--primary-accent);
}

/* La couleur du SVG change grâce à "currentColor" */
.swiper-navigation-wrapper .swiper-button-next:hover svg,
.swiper-navigation-wrapper .swiper-button-prev:hover svg {
    color: var(--text-on-accent); /* Couleur au survol */
}

/* --- On cache sur mobile --- */
@media (max-width: 767px) {
    .swiper-navigation-wrapper {
        display: none;
    }
    .swiper-container-wrapper {
        padding-top: 0;
    }
}

/**
 * =================================================================
 * STYLE POUR LES ONGLETS (SHORTCODE BESTSELLERS) - STYLE "BOUTON"
 * =================================================================
 */

/* --- Barre de navigation des onglets --- */
.tabs-nav {
    display: flex;
    flex-wrap: wrap; /* Permet aux onglets de passer à la ligne sur mobile */
    list-style: none;
    margin: 0 0 1.5rem 0;
    padding: 0;
    gap: 0.75rem; /* Espace entre chaque bouton-onglet */

    /* On supprime la bordure générale du bas */
    border-bottom: none;
}

/* --- Style de chaque lien d'onglet --- */
.tabs-nav a {
    display: inline-block;
    padding: 0.6rem 1.25rem; /* Padding pour créer la forme du bouton */
    color: var(--text-standard);
    background-color: var(--bg-secondary); /* Fond gris clair par défaut */
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    text-transform: capitalize !important;

    /* Bordure et coins arrondis */
    border: 1.5px solid var(--border-neutral);
    border-radius: var(--radius-button);

    transition: all 0.2s ease-out;
}

/* --- Au survol d'un onglet non-actif --- */
.tabs-nav a:not(.active):hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
}

/* --- Style de l'onglet ACTIF --- */
.tabs-nav a.active {
    color: var(--primary-accent);
    background-color: var(--bg-main); /* Fond blanc */
    border: 2px solid var(--primary-accent); /* Bordure orange plus épaisse */
    /* On ajuste le padding pour compenser la bordure plus épaisse et éviter un décalage */
    padding: calc(0.6rem - 1px) calc(1.25rem - 1px);
}


/* --- Contenu des onglets (inchangé) --- */
.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
}

/**
 * =================================================================
 * STYLE POUR LES CARTES CATÉGORIES (SHORTCODE)
 * Basé sur le design system des cartes produits
 * =================================================================
 */

/* --- 1. SETUP DE BASE POUR LE SLIDER --- */
.category-swiper .swiper-slide {
    height: auto; /* Permet aux cartes d'avoir la même hauteur */
    padding: 4px; /* Petite marge pour l'ombre portée */
    list-style: none;
}

/* --- 2. STRUCTURE DE LA CARTE CATÉGORIE --- */
.category-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border-neutral);
    border-radius: var(--radius-main);
    transition: var(--transition-fast);
    overflow: hidden;
    position: relative;
    text-decoration: none; /* Assure que la carte entière n'est pas soulignée si elle est dans un lien */
}

/* --- 3. CONTENU DE LA CARTE (IMAGE & TITRE) --- */

/* Section Image */
.category-card__image-link {
    display: block;
    aspect-ratio: 1 / 1; /* Garantit un carré parfait, comme pour les produits */
    overflow: hidden;
}

.category-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 'cover' remplit l'espace, 'contain' montre toute l'image */
    transition: var(--transition-fast);
}

/* Section Détails (juste le titre) */
.category-card__details {
    padding: 1rem 0.75rem; /* Un peu plus de padding vertical pour centrer */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centre le titre verticalement */
    align-items: center; /* Centre le titre horizontalement */
    flex-grow: 1; /* Prend l'espace restant */
    text-align: center;
}

.category-card__title {
    font-size: 1rem; /* Un peu plus grand que le titre produit pour plus d'impact */
    font-weight: 600;
    margin: 0;
    color: var(--text-title);
    transition: color 0.2s ease;
}


/* --- 4. INTERACTIVITÉ (ÉTATS :hover) --- */

/* Effet sur la carte entière */
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-floating);
}

/* Effet de zoom sur l'image */
.category-card:hover .category-card__image {
    transform: scale(1.05);
}

/* Changement de couleur du titre */
.category-card:hover .category-card__title {
    color: var(--primary-accent);
}


/**
 * =================================================================
 * NAVIGATION SWIPER.JS POUR LE SLIDER CATÉGORIES
 * Réutilise la logique des flèches SVG personnalisées
 * =================================================================
 */

/* --- Conteneur global pour le slider ET sa navigation --- */
/* IMPORTANT : Vous devrez envelopper votre shortcode dans ce div */
.category-swiper-wrapper {
    position: relative;
    padding-top: 50px; /* Espace pour la navigation au-dessus */
}

/* --- Positionnement et style du wrapper des flèches --- */
/* C'est une copie directe de votre système existant */
.category-swiper-wrapper .swiper-navigation-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
}

/* --- Style des boutons (identique à celui des produits) --- */
.category-swiper-wrapper .swiper-button-next,
.category-swiper-wrapper .swiper-button-prev {
    position: static;
    transform: none;
    width: 38px;
    height: 38px;
    margin: 0;
    background-color: var(--bg-main);
    border: 1px solid var(--border-neutral);
    border-radius: 50%;
    box-shadow: var(--shadow-ui);
    transition: all 0.2s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

/* On cache les flèches Swiper par défaut */
.category-swiper-wrapper .swiper-button-next::after,
.category-swiper-wrapper .swiper-button-prev::after {
    display: none !important;
}

/* On style le SVG */
.category-swiper-wrapper .swiper-button-prev svg,
.category-swiper-wrapper .swiper-button-next svg {
    width: 1rem;
    height: 1rem;
    color: var(--text-standard);
    transition: color 0.2s ease-out;
}

/* Effets de survol sur les boutons */
.category-swiper-wrapper .swiper-button-next:hover,
.category-swiper-wrapper .swiper-button-prev:hover {
    background-color: var(--primary-accent);
    border-color: var(--primary-accent);
}

.category-swiper-wrapper .swiper-button-next:hover svg,
.category-swiper-wrapper .swiper-button-prev:hover svg {
    color: var(--text-on-accent);
}

/* --- On cache sur mobile, comme pour les produits --- */
@media (max-width: 767px) {
    .category-swiper-wrapper .swiper-navigation-wrapper {
        display: none;
    }
    .category-swiper-wrapper {
        padding-top: 0;
    }
}

.woocommerce-form-register{
    height: auto !important;
}