/**
 * Atelier 65 — Boutique CSS
 * Design cohérent avec la charte graphique du site
 * Palette : Or #C8B587 | Gris foncé #303030 | Blanc #FFFFFF | Texte #7A7A7A
 * Typos  : arsenica-variable (titres) | ASENINEV (corps)
 */

/* ================================================
   RESET & BASE
   ================================================ */
.a65-shop-wrapper {
    margin: 0;
    padding: 0;
    background-color: #FFFFFF;
    font-family: 'ASENINEV', sans-serif;
    letter-spacing: 1px;
    color: #303030;
}

.a65-shop-wrapper *,
.a65-shop-wrapper *::before,
.a65-shop-wrapper *::after {
    box-sizing: border-box;
}

/* ================================================
   HERO HEADER
   ================================================ */
.a65-shop-hero {
    background: #303030;
    padding: 70px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.a65-shop-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(200, 181, 135, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.a65-shop-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.a65-shop-hero-subtitle {
    display: inline-block;
    font-family: 'arsenica-variable', serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #C8B587;
    margin-bottom: 16px;
}

.a65-shop-hero-title {
    font-family: 'arsenica-variable', serif !important;
    font-weight: 600;
    font-size: 3rem;
    color: #FFFFFF;
    margin: 0 0 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.a65-shop-hero-desc {
    font-family: 'ASENINEV', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #b0b0b0;
    line-height: 1.7;
    letter-spacing: 1.5px;
    margin: 0;
}

/* ================================================
   FILTRES
   ================================================ */
.a65-shop-filters {
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 30px 10px;
}

.a65-filters-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-end;
    padding-bottom: 24px;
    border-bottom: 1px solid #e8e4dd;
}

/* Recherche */
.a65-filter-search {
    position: relative;
    flex: 1 1 280px;
    min-width: 220px;
}

.a65-search-input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    border: 1px solid #d4cfc6;
    border-radius: 6px;
    font-family: 'ASENINEV', sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    color: #303030;
    background: #faf9f7;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.a65-search-input:focus {
    border-color: #C8B587;
    box-shadow: 0 0 0 3px rgba(200, 181, 135, 0.15);
}

.a65-search-input::placeholder {
    color: #b0aba0;
}

.a65-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #b0aba0;
    pointer-events: none;
}

/* Catégories */
.a65-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.a65-filter-label {
    font-family: 'arsenica-variable', serif;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #303030;
}

.a65-filter-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.a65-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid #d4cfc6;
    border-radius: 30px;
    background: transparent;
    color: #303030;
    font-family: 'ASENINEV', sans-serif;
    font-size: 12px;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.a65-cat-btn:hover {
    border-color: #C8B587;
    color: #C8B587;
}

.a65-cat-btn.active {
    background: #303030;
    color: #C8B587;
    border-color: #303030;
}

.a65-cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(200, 181, 135, 0.15);
    font-size: 10px;
    color: #C8B587;
}

.a65-cat-btn.active .a65-cat-count {
    background: rgba(200, 181, 135, 0.25);
}

/* Tri */
.a65-filter-sort {
    margin-left: auto;
}

.a65-sort-select {
    padding: 10px 36px 10px 14px;
    border: 1px solid #d4cfc6;
    border-radius: 6px;
    font-family: 'ASENINEV', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    color: #303030;
    background: #faf9f7;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23303030' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.3s ease;
}

.a65-sort-select:focus {
    border-color: #C8B587;
}

/* Info résultats */
.a65-results-info {
    padding: 16px 0 0;
    font-family: 'ASENINEV', sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    color: #7A7A7A;
    text-transform: uppercase;
}

#a65-results-count {
    color: #C8B587;
    font-weight: 600;
}

/* ================================================
   GRILLE PRODUITS
   ================================================ */
.a65-shop-grid-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px 30px 60px;
    position: relative;
}

.a65-shop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    transition: opacity 0.3s ease;
}

.a65-shop-grid.a65-loading {
    opacity: 0.4;
    pointer-events: none;
}

/* ================================================
   CARTE PRODUIT
   ================================================ */
.a65-product-card {
    position: relative;
    background: #FFFFFF;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #edebe7;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    display: flex;
    flex-direction: column;
}

.a65-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(48, 48, 48, 0.1);
    border-color: #C8B587;
}

/* Badge featured */
.a65-badge-featured {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    padding: 5px 12px;
    background: #C8B587;
    color: #FFFFFF;
    font-family: 'arsenica-variable', serif;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(200, 181, 135, 0.3);
}

/* Featured card gold accent */
.a65-product-card.a65-featured {
    border-color: rgba(200, 181, 135, 0.4);
}

.a65-product-card.a65-featured:hover {
    border-color: #C8B587;
    box-shadow: 0 12px 40px rgba(200, 181, 135, 0.15);
}

/* Image */
.a65-product-link {
    text-decoration: none !important;
    color: inherit !important;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.a65-product-image {
    position: relative;
    overflow: hidden;
    background: #f8f7f5;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.a65-product-image .a65-product-img,
.a65-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.5s ease;
}

.a65-product-card:hover .a65-product-image img {
    transform: scale(1.06);
}

/* Overlay au hover */
.a65-product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(48, 48, 48, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.a65-product-card:hover .a65-product-overlay {
    opacity: 1;
}

.a65-quick-view {
    display: inline-block;
    padding: 10px 24px;
    border: 1px solid #C8B587;
    color: #C8B587;
    font-family: 'arsenica-variable', serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background 0.3s ease, color 0.3s ease;
}

.a65-product-card:hover .a65-quick-view:hover {
    background: #C8B587;
    color: #FFFFFF;
}

/* Info produit */
.a65-product-info {
    padding: 18px 18px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.a65-product-title {
    font-family: 'ASENINEV', sans-serif !important;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
    color: #303030;
    margin: 0 0 10px;
    letter-spacing: 0.8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.a65-product-price {
    font-family: 'arsenica-variable', serif;
    font-weight: 600;
    font-size: 16px;
    color: #303030;
    letter-spacing: 0.5px;
}

.a65-product-price del {
    color: #b0aba0;
    font-size: 13px;
    margin-right: 6px;
}

.a65-product-price ins {
    text-decoration: none;
    color: #CD4E4C;
}

/* Actions / Bouton */
.a65-product-actions {
    padding: 0 18px 18px;
}

.a65-btn-cart {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: center;
    font-family: 'ASENINEV', sans-serif !important;
    font-size: 11px !important;
    font-weight: 500;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-decoration: none !important;
    border: 1px solid #303030;
    border-radius: 6px;
    background: #303030;
    color: #FFFFFF !important;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.a65-btn-cart:hover {
    background: #C8B587;
    border-color: #C8B587;
    color: #FFFFFF !important;
}

.a65-btn-cart.a65-btn-details {
    background: transparent;
    color: #303030 !important;
    border-color: #d4cfc6;
}

.a65-btn-cart.a65-btn-details:hover {
    background: #303030;
    color: #FFFFFF !important;
    border-color: #303030;
}

/* Added to cart feedback */
.a65-btn-cart.added::after {
    content: ' ✓';
}

/* Out of stock */
.a65-product-card.a65-out-of-stock {
    opacity: 0.6;
}

.a65-product-card.a65-out-of-stock .a65-product-image::after {
    content: 'Rupture de stock';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(48, 48, 48, 0.85);
    color: #FFFFFF;
    padding: 8px 16px;
    font-family: 'ASENINEV', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 4;
}

/* No products */
.a65-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.a65-no-products p {
    font-family: 'arsenica-variable', serif;
    font-size: 18px;
    color: #7A7A7A;
    letter-spacing: 2px;
}

/* ================================================
   LOADER
   ================================================ */
.a65-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.a65-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #edebe7;
    border-top: 3px solid #C8B587;
    border-radius: 50%;
    animation: a65-spin 0.8s linear infinite;
}

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

/* ================================================
   RESPONSIVE
   ================================================ */

/* Tablette large */
@media (max-width: 1200px) {
    .a65-shop-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
}

/* Tablette */
@media (max-width: 900px) {
    .a65-shop-hero {
        padding: 50px 20px 45px;
    }

    .a65-shop-hero-title {
        font-size: 2.2rem;
    }

    .a65-shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .a65-filters-inner {
        gap: 16px;
    }

    .a65-filter-sort {
        margin-left: 0;
    }

    .a65-shop-filters {
        padding: 30px 20px 10px;
    }

    .a65-shop-grid-wrapper {
        padding: 20px 20px 50px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .a65-shop-hero {
        padding: 40px 16px 35px;
    }

    .a65-shop-hero-title {
        font-size: 1.8rem;
    }

    .a65-shop-hero-desc {
        font-size: 12px;
    }

    .a65-shop-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .a65-product-image {
        aspect-ratio: 1 / 1;
    }

    .a65-product-image .a65-product-img,
    .a65-product-image img {
        padding: 12px;
    }

    .a65-product-info {
        padding: 12px 12px 8px;
    }

    .a65-product-title {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }

    .a65-product-price {
        font-size: 14px;
    }

    .a65-product-actions {
        padding: 0 12px 12px;
    }

    .a65-btn-cart {
        padding: 10px 12px;
        font-size: 10px !important;
        letter-spacing: 1.5px;
    }

    .a65-badge-featured {
        font-size: 8px;
        padding: 4px 8px;
        letter-spacing: 1.5px;
    }

    .a65-filter-cats {
        gap: 6px;
    }

    .a65-cat-btn {
        padding: 6px 14px;
        font-size: 11px;
    }

    .a65-shop-filters {
        padding: 24px 16px 8px;
    }

    .a65-shop-grid-wrapper {
        padding: 16px 16px 40px;
    }

    .a65-product-overlay {
        display: none;
    }

    .a65-quick-view {
        display: none;
    }
}

/* Très petit écran */
@media (max-width: 380px) {
    .a65-shop-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ================================================
   MASQUER LE CONTENU WOOCOMMERCE PAR DÉFAUT
   (au cas où Elementor/WC injecte du contenu)
   ================================================ */
.woocommerce-products-header,
.woocommerce-result-count,
.woocommerce-ordering,
.woocommerce-pagination,
.woocommerce .woocommerce-breadcrumb {
    display: none !important;
}

/* ================================================
   FIX pour l'intégration Elementor header/footer
   ================================================ */
.a65-shop-wrapper {
    min-height: 60vh;
}

/* Transition smooth pour les cartes au scroll */
@media (prefers-reduced-motion: no-preference) {
    .a65-product-card {
        animation: a65-fadeInUp 0.5s ease both;
    }

    @keyframes a65-fadeInUp {
        from {
            opacity: 0;
            transform: translateY(16px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
