/* ========================================
   PRODUITS.CSS - Page Produits uniquement
   ======================================== */

/* Filters Section */
.filters-section {
    padding: 50px 100px;
    max-width: 1512px;
    margin: 0 auto;
}

.divider {
    border: none;
    border-top: 1px solid rgba(25, 25, 25, 0.2);
    margin-bottom: 25px;
}

.filters-row {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
}

.filter-box {
    flex: 1;
    border: 1px solid rgba(25, 25, 25, 0.3);
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    position: relative;
    border-radius: 0;
    overflow: visible;
}

.filter-box:hover {
    border-color: var(--accent-yellow);
    background: rgba(253, 208, 110, 0.05);
}

.filter-box.search {
    flex: 3;
    padding: 14px 16px;
}

.filter-box.search input {
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dark);
    width: 100%;
    outline: none;
}

.filter-box.search input::placeholder {
    color: rgba(25, 25, 25, 0.5);
}

.filter-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

.filter-box.search .filter-icon {
    position: static;
    transform: none;
    margin-left: 10px;
}

/* ========================================
   FILTER TOPBAR (Trier / Filtrer) — style H&M
   ======================================== */
.filter-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.filter-topbar-count {
    font-size: 14px;
    color: var(--text-muted);
}

.filter-topbar-count strong {
    color: var(--text-dark);
}

.filter-topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.filter-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid rgba(25, 25, 25, 0.3);
    background: white;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.filter-trigger-btn:hover {
    border-color: var(--accent-yellow);
    background: rgba(253, 208, 110, 0.05);
}

.filter-icon-static {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.sort-wrapper {
    position: relative;
}

.sort-wrapper .sort-dropdown.open ~ .filter-trigger-btn .filter-icon-static,
.sort-wrapper:has(.sort-dropdown.open) .filter-icon-static {
    transform: rotate(180deg);
}

.sort-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: white;
    border: 1px solid rgba(25, 25, 25, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: none;
    flex-direction: column;
    z-index: 50;
}

.sort-dropdown.open {
    display: flex;
}

.sort-option {
    padding: 12px 16px;
    text-align: left;
    background: white;
    border: none;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-dark);
    cursor: pointer;
    transition: background 0.2s;
}

.sort-option:hover {
    background: rgba(253, 208, 110, 0.15);
}

.sort-option.active {
    font-weight: 700;
    background: rgba(253, 208, 110, 0.25);
}

.filter-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 50%;
    background: var(--accent-yellow);
    color: var(--text-dark);
    font-size: 11px;
    font-weight: 700;
}

/* Active filter chips */
.active-filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.active-filters-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: white;
    border: 1px solid rgba(25, 25, 25, 0.3);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chip:hover {
    border-color: #191919;
    background: rgba(25, 25, 25, 0.04);
}

.filter-chip i {
    font-size: 11px;
    color: var(--text-muted);
}

.clear-all-btn {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 8px 4px;
}

.clear-all-btn:hover {
    opacity: 0.6;
}

/* ========================================
   FILTER DRAWER — panneau latéral style H&M
   ======================================== */
.filter-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1200;
}

.filter-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.filter-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 90vw;
    background: white;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 1201;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
}

.filter-drawer.open {
    transform: translateX(0);
}

.filter-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(25, 25, 25, 0.15);
    flex-shrink: 0;
}

.filter-drawer-header h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 24px;
    font-weight: 400;
    color: var(--text-dark);
}

.filter-drawer-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-dark);
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

.filter-drawer-close:hover {
    opacity: 0.6;
}

.filter-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px;
}

.filter-accordion-section {
    border-bottom: 1px solid rgba(25, 25, 25, 0.12);
}

.filter-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
}

.filter-accordion-section .accordion-chevron {
    width: 18px;
    height: 18px;
    transition: transform 0.25s;
}

.filter-accordion-section.open .accordion-chevron {
    transform: rotate(180deg);
}

.filter-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-accordion-section.open .filter-accordion-content {
    max-height: 1000px;
    padding-bottom: 16px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
}

.filter-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.filter-checkbox-box {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 1px solid rgba(25, 25, 25, 0.4);
    background: white;
    position: relative;
    transition: all 0.2s;
}

.filter-checkbox-box.filter-radio-box {
    border-radius: 50%;
}

.filter-checkbox input:checked ~ .filter-checkbox-box {
    background: var(--text-dark);
    border-color: var(--text-dark);
}

.filter-checkbox input:checked ~ .filter-checkbox-box::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-checkbox input:checked ~ .filter-radio-box::after {
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 50%;
    background: white;
    transform: translate(-50%, -50%);
}

.filter-checkbox-label {
    flex: 1;
}

.filter-option-count {
    font-size: 12px;
    color: var(--text-muted);
}

.filter-drawer-footer {
    display: flex;
    gap: 12px;
    padding: 18px 24px;
    border-top: 1px solid rgba(25, 25, 25, 0.15);
    flex-shrink: 0;
}

.btn-reset,
.btn-apply {
    flex: 1;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--text-dark);
}

.btn-reset {
    background: white;
    color: var(--text-dark);
}

.btn-reset:hover {
    background: rgba(25, 25, 25, 0.05);
}

.btn-apply {
    background: var(--text-dark);
    color: white;
}

.btn-apply:hover {
    background: #333;
}

body.drawer-open {
    overflow: hidden;
}

/* Products Grid */
.products-section {
    padding: 0 100px 100px;
    max-width: 1512px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    margin-bottom: 50px;
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.product-card.reveal-left {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image-container {
    width: 100%;
    height: 364px;
    background: transparent;
    overflow: hidden;
    position: relative;
    border: none;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    padding: 0;
    transition: transform 0.3s;
    opacity: 0;
}

.product-image-container img.loaded {
    opacity: 1;
}

.product-card:hover .product-image-container img {
    transform: scale(1.05);
}

/* Styles spécifiques pour Kartell et Foscarini */
.product-image-container.special-supplier-product {
    background-color: #FFFFFF;
}

.product-image-container.special-supplier-product img {
    object-fit: contain;
    object-position: center center;
    padding: 20px;
}

/* BADGES PROMOTION / DESTOCKAGE */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    z-index: 10;
    border-radius: 0;
    color: #FFFFFF;
}

.product-badge.badge-promotion {
    background-color: #7DCB8F;
}

.product-badge.badge-destockage {
    background-color: #FF6B6B;
}

.badge-new {
    background: #47A9FF;
}

.badge-promo {
    background: #7DCB8F;
}

.badge-sale {
    background: #000000;
}

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.product-details h3 {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
}

.product-details p {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

/* PRIX NORMAUX ET PROMOS */
.product-price-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.product-price-old {
    font-size: 14px;
    font-weight: 500;
    color: #999;
    text-decoration: line-through;
}

.product-price-promo {
    background-color: var(--accent-yellow);
    padding: 4px 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    display: inline-block;
    width: fit-content;
}

.product-price.old-price {
    background: var(--accent-yellow);
    padding: 2px 6px;
    font-size: 12px;
}

/* Heart Icon */
.heart-icon {
    cursor: pointer;
    position: relative;
    z-index: 10;
    padding: 5px;
}

.heart-icon i {
    transition: all 0.3s ease;
    font-size: 18px;
}

.heart-icon i.favorite {
    color: red !important;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.heartbeat-animation {
    animation: heartbeat 0.6s ease-in-out;
}

/* See More Button */
.see-more-wrapper {
    text-align: center;
    margin-top: 50px;
}

.btn-primary .loading-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

.btn-primary.loading .loading-spinner {
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Floating Favoris Button */
.floating-favoris-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent-yellow);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.floating-favoris-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    background-color: #222;
}

.floating-favoris-btn i {
    font-size: 24px;
    color: red;
    transition: all 0.3s ease;
}

.floating-favoris-btn .favoris-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: red;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.floating-favoris-btn.showing-favoris {
    background-color: var(--accent-yellow);
    color: var(--text-dark);
}

/* Favoris Banner */
.favoris-banner {
    margin-bottom: 20px;
    padding: 15px 20px;
    background-color: var(--bg-cream);
    border-left: 5px solid var(--accent-yellow);
    border-radius: 5px;
    display: none;
}

.favoris-banner h3 {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: 600;
}

.favoris-banner p {
    font-size: 14px;
    color: var(--text-muted);
}

body.showing-favoris .favoris-banner {
    display: block;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 18px;
    grid-column: 1 / -1;
}

.search-suggest {
    margin-top: 18px;
    font-size: 15px;
    color: #555;
    line-height: 2;
}
.search-suggest-chip {
    background: #191919;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 14px;
    cursor: pointer;
    margin: 0 2px;
    transition: opacity .15s;
}
.search-suggest-chip:hover { opacity: .82; }

/* Arrive bientôt */
.no-results--soon {
    padding: 80px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.soon-badge {
    display: inline-block;
    background: #FDD06E;
    color: #191919;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: 5px 14px;
    border-radius: 30px;
    margin-bottom: 8px;
}
.soon-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    color: #191919;
    margin: 0;
    letter-spacing: -.01em;
}
.soon-desc {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #888;
    line-height: 1.7;
    margin: 0;
    max-width: 420px;
}
.soon-link {
    margin-top: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #191919;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity .2s;
}
.soon-link:hover { opacity: .55; }

/* Utility Classes */
.d-none {
    display: none !important;
}

/* ========================================
   RESPONSIVE - Page Produits
   ======================================== */

@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .filters-section,
    .products-section {
        padding-left: 40px;
        padding-right: 40px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .filters-row {
        flex-wrap: wrap;
    }

    .filter-box {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .filters-section,
    .products-section {
        padding: 40px 20px;
    }

    .product-image-container {
        height: 220px;
    }

    .filter-box {
        min-width: 100%;
    }

    .filter-topbar-actions {
        gap: 8px;
    }

    .filter-trigger-btn {
        padding: 9px 14px;
        font-size: 13px;
    }

    .filter-drawer {
        width: 100%;
        max-width: 100%;
    }

    .product-details h3 {
        font-size: 13px;
    }

    .product-details p {
        font-size: 11px;
    }

    .product-price,
    .product-price-promo {
        font-size: 13px;
    }
}

/* ── Petits mobiles (≤ 480px) ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 12px;
    }

    .filters-section,
    .products-section {
        padding: 28px 14px;
    }

    .product-image-container {
        height: 180px;
    }

    /* Nom + prix empilés (plus de mise en ligne serrée sur carte étroite) */
    .product-info {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .product-price-container {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 6px;
    }

    .product-details h3 {
        font-size: 13px;
        line-height: 1.25;
    }

    /* Barre de tri/filtre : reste sur une ligne, sans débordement */
    .filters-row,
    .filter-topbar-actions {
        flex-wrap: wrap;
    }

    .search-bar,
    .search-bar input {
        width: 100%;
    }
}

/* Très petits écrans (≤ 360px) : 1 colonne pour respirer */
@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-image-container {
        height: 240px;
    }
}