/* Page Boutique Aglaé Crée - Styles Unifiés Complets */

/* ========================================
   MASQUAGE ÉLÉMENTS WOOCOMMERCE PAR DÉFAUT
   ======================================== */
.woocommerce-products-header,
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering,
.woocommerce-breadcrumb,
.page-title,
.woocommerce-products-header__title {
    display: none !important;
}

/* Sauf dans nos contrôles personnalisés */
.aglae-shop-controls .woocommerce-result-count,
.aglae-shop-controls .woocommerce-ordering {
    display: block !important;
}

/* ========================================
   SECTION HERO BOUTIQUE
   ======================================== */
.shop-hero-section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.shop-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.shop-hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.shop-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Texte Hero */
.shop-hero-text {
    padding-right: 2rem;
}

.shop-hero-badge {
    display: inline-block;
    background: var(--bg-btn, #4a90e2);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

.shop-hero-title {
    margin-bottom: 1.5rem;
}

.shop-hero-subtitle {
    display: block;
    font-family: inherit;
    font-size: 1.2rem;
    color: #8a7a6b;
    margin-bottom: 0.5rem;
    font-weight: normal;
}

.shop-hero-product-title {
    display: block;
    font-family: 'Capitolium', serif;
    font-size: 3rem;
    color: var(--bg-marron, #6b5b4d);
    font-weight: normal;
    line-height: 1.1;
}

.shop-hero-description {
    font-size: 1.1rem;
    color: #8a7a6b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.shop-hero-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bg-marron, #6b5b4d);
    margin-bottom: 2rem;
}

.shop-hero-price del {
    color: #999;
    font-weight: normal;
    margin-right: 0.5rem;
}

.shop-hero-price ins {
    text-decoration: none;
    color: var(--bg-btn, #4a90e2);
}

/* Boutons Hero */
.shop-hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.shop-hero-actions form {
    margin-bottom: 0;
}

.shop-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 3rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.shop-hero-btn-primary {
    background: var(--bg-btn, #4a90e2);
    color: white;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.3);
}

.shop-hero-btn-primary:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(74, 144, 226, 0.4);
}

.shop-hero-btn-secondary {
    background: transparent;
    color: var(--bg-marron, #6b5b4d);
    border: 2px solid var(--bg-marron, #6b5b4d);
}

.shop-hero-btn-secondary:hover {
    background: var(--bg-marron, #6b5b4d);
    color: white;
    transform: translateY(-2px);
}

.shop-hero-btn svg {
    transition: transform 0.3s ease;
}

.shop-hero-btn:hover svg {
    transform: translateX(3px);
}

/* Features Hero */
.shop-hero-features {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.shop-hero-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bg-marron, #6b5b4d);
    font-size: 0.9rem;
}

.shop-hero-feature svg {
    color: var(--bg-btn, #4a90e2);
}

/* Image Hero */
.shop-hero-image {
    position: relative;
}

.shop-hero-image-wrapper {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(107, 91, 77, 0.15);
    transform: perspective(1000px) rotateY(-3deg);
    transition: transform 0.5s ease;
}

.shop-hero-image-wrapper:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.shop-hero-product-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
    min-height: 400px;
    object-fit: cover;
}

.shop-hero-product-image-placeholder {
    width: 100%;
    height: 400px;
    background: var(--bg-decli3, #e8e3dd);
    border-radius: 0.5rem;
}

.shop-hero-image-wrapper:hover .shop-hero-product-image {
    transform: scale(1.05);
}

.shop-hero-image-accent {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(74, 144, 226, 0.1);
    z-index: -1;
}

/* ========================================
   SECTION TITRE BOUTIQUE
   ======================================== */
.shop-title-section {
    background: white;
    padding: 4rem 0 2rem;
    text-align: center;
}

.shop-title-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.shop-main-title {
    font-family: 'Capitolium', serif;
    font-size: 2.5rem;
    color: var(--bg-marron, #6b5b4d);
    margin-bottom: 1rem;
    font-weight: normal;
    position: relative;
}

.shop-main-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--bg-btn, #4a90e2);
}

.shop-main-subtitle {
    font-size: 1.1rem;
    color: #8a7a6b;
    margin: 0;
}

/* ========================================
   SECTION PRODUITS
   ======================================== */
.shop-products-section {
    background: white;
    padding: 2rem 0 4rem;
}

.shop-products-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}
.shop-products-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.shop-sidebar {
    flex: 0 0 250px;
    max-width: 250px;
    border-right: solid 1px #e8e3dd;
}
.shop-sidebar .yith-wcan-reset-filters {
    background-color: var(--bg-btn, #4a90e2);
    border-radius: 0.375rem;
    color: white;
}

.shop-products-main {
    flex: 1 1 0%;
}

/* Mobile - empiler */
@media (max-width: 768px) {
    .shop-products-layout {
        flex-direction: column;
    }

    .shop-sidebar {
        max-width: 100%;
        border-bottom:  solid 1px #e8e3dd;
        border-right: none;
    }
}

/* ========================================
   GRILLE DE PRODUITS - DESIGN UNIFIÉ PAGE D'ACCUEIL/BOUTIQUE
   ======================================== */

/* Grille principale - Compatible avec toutes les pages */
.products-grid,
.products-grid.aglae-products-grid,
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    justify-items: center;
    width: 100%;
    margin: 0 !important;
    list-style: none !important;
    padding: 0 !important;
}

/* Cartes produits - Design unifié pour toutes les pages */
.product-card,
.aglae-product-card,
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    display: flex;
    flex-direction: column;
    width: 80%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: white;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.product-card:hover,
.aglae-product-card:hover,
.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Liens produits */
.product-link,
.product-image-link,
.woocommerce ul.products li.product a,
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Conteneur d'image */
.product-image-container,
.product-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 1;
}

/* Images produits */
.product-image,
.woocommerce ul.products li.product img,
.woocommerce ul.products li.product .attachment-woocommerce_thumbnail {
    background-color: var(--bg-decli2);
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
    margin: 0 !important;
}

.product-card:hover .product-image,
.aglae-product-card:hover .product-image,
.woocommerce ul.products li.product:hover img,
.woocommerce ul.products li.product:hover .attachment-woocommerce_thumbnail {
    transform: scale(1.05);
}

/* Badges de promotion */
.product-badge,
.product-badge--sale,
.woocommerce ul.products li.product .onsale {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
    background-color: #e53e3e !important;
    color: white !important;
    margin: 0 !important;
}

/* Informations produit */
.product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

/* Titres produits */
.product-title,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2 {
    font-size: 1rem !important;
    font-weight: 500 !important;
    margin: 0 !important;
    transition: color 0.3s ease;
    line-height: 1.4;
    padding: 0 !important;
    color: inherit !important;
}

.product-card:hover .product-title,
.aglae-product-card:hover .product-title,
.woocommerce ul.products li.product:hover .woocommerce-loop-product__title,
.woocommerce ul.products li.product:hover h2 {
    color: var(--bg-marron, #8b4513) !important;
}

/* Prix produits */
.product-price,
.woocommerce ul.products li.product .price {
    font-weight: 600 !important;
    color: var(--bg-marron, #8b4513) !important;
    margin: 0.25rem 0 0 0 !important;
    padding: 0 !important;
    font-size: 1rem !important;
}

.product-price del,
.woocommerce ul.products li.product .price del {
    color: #888 !important;
    font-weight: normal !important;
    margin-right: 0.5rem !important;
}

.product-price ins,
.woocommerce ul.products li.product .price ins {
    text-decoration: none !important;
}

/* ========================================
   BOUTONS D'AJOUT AU PANIER - POSITION IDENTIQUE PAGE D'ACCUEIL
   ======================================== */

/* Conteneur des actions - Position en bas à droite */
.product-actions,
.woocommerce ul.products li.product .button {
    position: absolute !important;
    bottom: 15px !important;
    right: 15px !important;
    z-index: 10 !important;
    transition: all 0.3s ease;
    opacity: 0;
    margin: 0 !important;
}

.product-card:hover .product-actions,
.aglae-product-card:hover .product-actions,
.woocommerce ul.products li.product:hover .button {
    opacity: 1;
    transform: translateY(-5px);
}

/* Style du bouton - Identique à la page d'accueil */
.add-to-cart-icon,
.add-to-cart-button,
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background-color: var(--bg-marron, #8b4513) !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    border: none !important;
    text-indent: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 !important;
    font-size: 0 !important; /* Masquer le texte */
    text-decoration: none !important;
    cursor: pointer !important;
}

.add-to-cart-icon:hover,
.add-to-cart-button:hover,
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover {
    background-color: var(--bg-marron-dark, #6b3410) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2) !important;
    animation: pulse 1s infinite;
}

.add-to-cart-icon:active,
.add-to-cart-button:active,
.woocommerce ul.products li.product .button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* ========================================
   ICÔNE DU PANIER - IDENTIQUE PAGE D'ACCUEIL
   ======================================== */

/* Icône avec SVG intégré */
.cart-icon {
    display: block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z'%3E%3C/path%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    margin: 0 auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Icône pour les boutons WooCommerce par défaut */
.woocommerce ul.products li.product .button::before,
.woocommerce ul.products li.product .add_to_cart_button::before {
    content: "" !important;
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z'%3E%3C/path%3E%3C/svg%3E") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

/* ========================================
   ANIMATIONS ET EFFETS
   ======================================== */

/* Animation de succès d'ajout au panier */
.add-to-cart-icon.added::before,
.add-to-cart-button.added::before,
.woocommerce ul.products li.product .button.added::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(16, 185, 129, 0.8) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: fadeIn 0.3s ease forwards !important;
    z-index: 1 !important;
}

.add-to-cart-icon.added::after,
.add-to-cart-button.added::after,
.woocommerce ul.products li.product .button.added::after {
    content: "✓" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: bold !important;
    z-index: 2 !important;
    margin: 0 !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .shop-hero-content {
        gap: 3rem;
    }
    
    .shop-hero-product-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .shop-hero-section {
        padding: 4rem 0;
    }
    
    .shop-hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .shop-hero-text {
        padding-right: 0;
    }
    
    .shop-hero-product-title {
        font-size: 2rem;
    }
    
    .shop-hero-actions {
        justify-content: center;
    }
    
    .shop-hero-features {
        justify-content: center;
    }
    
    .shop-main-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .shop-hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .shop-hero-btn {
        width: 100%;
        justify-content: center;
    }
    
    .shop-hero-features {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================
   NETTOYAGE ET CORRECTIONS WOOCOMMERCE
   ======================================== */

/* Supprimer les styles par défaut qui peuvent interférer */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}

.woocommerce ul.products li.product .star-rating {
    margin: 0.5rem 0 !important;
}

/* Forcer la cohérence des espacements */
.woocommerce ul.products li.product * {
    box-sizing: border-box;
}

/* Style pour le message de debug (à supprimer en production) */
.admin-debug-message {
    background: #ffeb3b;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0.5rem;
    color: #333;
    text-align: center;
}