/**
 * Page catégorie marketplace — FasoYaar
 * Vert #0aa61f — pas de scroll horizontal
 */
:root {
    --fc-green: #0aa61f;
    --burkina-green: #0aa61f;
    --fc-green-dark: #00843d;
    --fc-bg: #f3f4f6;
    --fc-card: #ffffff;
    --fc-border: #e8e8e8;
    --fc-text: #1a1a1a;
    --fc-muted: #5c5c5c;
    --fc-radius: 14px;
    --fc-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Page produits / catégorie — pas de scroll horizontal, fond cohérent */
body.page-produits {
    background: #f8f9fa;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.category-page {
    max-width: 100%;
    overflow-x: clip;
    background: var(--fc-bg);
    padding-bottom: 2rem;
}

.category-page .products-container {
    padding: 12px 0 24px;
}

.category-page .container {
    max-width: 1320px;
}

.category-page .row.category-page-inner {
    margin-left: 0;
    margin-right: 0;
}

.category-page-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: flex-start;
}

/* ——— Sidebar ——— */
.category-sidebar {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 12px;
    margin-bottom: 1rem;
}

@media (min-width: 992px) {
    .category-sidebar {
        flex: 0 0 280px;
        max-width: 280px;
        position: sticky;
        top: 12px;
        align-self: flex-start;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        padding: 0 8px 0 12px;
    }
}

.fc-filter-panel {
    background: var(--fc-card);
    border-radius: var(--fc-radius);
    border: 1px solid var(--fc-border);
    box-shadow: var(--fc-shadow);
    margin-bottom: 12px;
    overflow: hidden;
}

.fc-filter-panel__head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(10, 166, 31, 0.08) 0%, #fff 100%);
    border: none;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--fc-text);
    cursor: pointer;
    text-align: left;
}

.fc-filter-panel__head i.fa-chevron-down {
    transition: transform 0.2s ease;
    color: var(--fc-green);
}

.fc-filter-panel__head.collapsed i.fa-chevron-down {
    transform: rotate(-90deg);
}

.fc-filter-panel__body {
    padding: 12px 14px 14px;
}

.fc-filter-panel__body.is-collapsed {
    display: none;
}

.fc-filter-panel__body .filter-option {
    margin-bottom: 8px;
}

.fc-filter-panel__body .filter-label {
    font-size: 0.88rem;
}

.fc-filter-select {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--fc-border);
    padding: 8px 10px;
    font-size: 0.88rem;
}

.btn-filter-apply {
    width: 100%;
    background: linear-gradient(135deg, var(--fc-green) 0%, var(--fc-green-dark) 100%);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    margin-top: 8px;
}

.btn-fc-filters-mobile {
    width: 100%;
    margin-bottom: 12px;
    font-weight: 700;
    border-radius: 10px;
}

/* ——— Main ——— */
.category-main {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 12px;
}

@media (min-width: 992px) {
    .category-main {
        padding: 0 12px 0 0;
    }
}

/* Header catégorie */
.category-header {
    background: var(--fc-card);
    border-radius: var(--fc-radius);
    border: 1px solid var(--fc-border);
    box-shadow: var(--fc-shadow);
    padding: 1rem 1.1rem 1.15rem;
    margin-bottom: 1rem;
}

.fc-breadcrumb {
    font-size: 0.8rem;
    margin-bottom: 0.65rem;
    line-height: 1.5;
    word-break: break-word;
}

.fc-breadcrumb a {
    color: var(--fc-green);
    text-decoration: none;
    font-weight: 600;
}

.fc-breadcrumb a:hover {
    text-decoration: underline;
}

.fc-breadcrumb__sep {
    color: #999;
    margin: 0 0.35rem;
}

.fc-breadcrumb__current {
    color: var(--fc-muted);
    font-weight: 600;
}

.category-header__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--fc-text);
    margin: 0 0 0.35rem 0;
    letter-spacing: 0.02em;
    line-height: 1.2;
    word-break: break-word;
    text-transform: uppercase;
}

.category-header__desc {
    font-size: 0.92rem;
    color: var(--fc-muted);
    margin: 0 0 0.5rem 0;
    line-height: 1.45;
}

.category-header__meta {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--fc-green-dark);
}

/* Promo bandeau */
.fc-promo-banner {
    display: block;
    background: linear-gradient(135deg, rgba(10, 166, 31, 0.12) 0%, #fff 50%);
    border: 1px solid rgba(10, 166, 31, 0.25);
    border-radius: var(--fc-radius);
    padding: 12px 14px;
    margin-bottom: 1rem;
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: var(--fc-shadow);
}

.fc-promo-banner:hover {
    border-color: var(--fc-green);
}

.fc-promo-banner__k {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fc-green);
}

.fc-promo-banner__t {
    font-weight: 800;
    font-size: 0.95rem;
}

/* Sous-catégories slider */
.subcategory-slider {
    margin-bottom: 1rem;
}

.subcategory-slider__title {
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--fc-text);
}

.fc-subcat-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.fc-subcat-scroll::-webkit-scrollbar {
    height: 6px;
}

.fc-subcat-scroll::-webkit-scrollbar-thumb {
    background: rgba(10, 166, 31, 0.35);
    border-radius: 4px;
}

.fc-subcat-card {
    flex: 0 0 108px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--fc-card);
    border: 1px solid var(--fc-border);
    border-radius: 12px;
    padding: 10px 8px;
    text-decoration: none !important;
    color: var(--fc-text) !important;
    box-shadow: var(--fc-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    min-width: 0;
}

.fc-subcat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(10, 166, 31, 0.12);
    border-color: rgba(10, 166, 31, 0.35);
}

.fc-subcat-card__emoji {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 6px;
}

.fc-subcat-card__label {
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Barre tri + vue */
.fc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: var(--fc-card);
    border: 1px solid var(--fc-border);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 1rem;
    box-shadow: var(--fc-shadow);
}

.fc-toolbar__sort {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.fc-toolbar__sort span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--fc-muted);
    margin-right: 4px;
}

.fc-toolbar__sort a {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid var(--fc-border);
    color: var(--fc-text) !important;
    text-decoration: none !important;
    background: #fafafa;
}

.fc-toolbar__sort a:hover,
.fc-toolbar__sort a.is-active {
    border-color: var(--fc-green);
    color: var(--fc-green-dark) !important;
    background: #f0fdf4;
}

.fc-toolbar__view {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.fc-view-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--fc-border);
    background: #fff;
    color: var(--fc-text);
    text-decoration: none !important;
}

.fc-view-btn.is-active {
    border-color: var(--fc-green);
    color: var(--fc-green);
    background: #f0fdf4;
}

/* Grille produits */
.category-products {
    margin-bottom: 1.5rem;
}

.fc-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (min-width: 768px) {
    .fc-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (min-width: 1200px) {
    .fc-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.fc-product-grid--list {
    grid-template-columns: 1fr;
}

.fc-product-grid--list .fc-pcard {
    flex-direction: row;
    align-items: stretch;
}

.fc-product-grid--list .fc-pcard__media {
    width: 120px;
    flex-shrink: 0;
    height: auto;
    min-height: 100px;
}

.fc-pcard {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--fc-card);
    border-radius: 12px;
    border: 1px solid var(--fc-border);
    box-shadow: var(--fc-shadow);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    min-width: 0;
}

.fc-pcard__link {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit !important;
    min-width: 0;
}

.fc-pcard--list-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
}

.fc-pcard--list-row .fc-pcard__link {
    flex-direction: row;
    flex: 1 1 100%;
}

@media (min-width: 576px) {
    .fc-pcard--list-row .fc-pcard__link {
        flex: 1 1 auto;
        width: auto;
    }

    .fc-pcard--list-row .fc-pcard__media {
        width: 140px;
        height: 140px;
        flex-shrink: 0;
    }

    .fc-pcard--list-row .fc-pcard__body {
        flex: 1;
        justify-content: center;
    }
}

.fc-pcard:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(10, 166, 31, 0.35);
    transform: translateY(-2px);
}

.fc-pcard__media {
    position: relative;
    height: 150px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 576px) {
    .fc-pcard__media {
        height: 170px;
    }
}

.fc-pcard__media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 8px;
}

.fc-pcard__badges {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    pointer-events: none;
}

.fc-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 6px;
    border-radius: 6px;
    line-height: 1;
}

.fc-badge--promo {
    background: #fef3c7;
    color: #b45309;
}

.fc-badge--stock {
    background: #fee2e2;
    color: #b91c1c;
}

.fc-pcard__body {
    padding: 10px 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fc-pcard__title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--fc-text);
    margin: 0 0 6px 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}

.fc-pcard__stars {
    font-size: 0.75rem;
    color: #f59e0b;
    margin-bottom: 6px;
}

.fc-pcard__stars .muted {
    color: var(--fc-muted);
    font-weight: 600;
}

.fc-pcard__price {
    margin-top: auto;
    font-size: 1rem;
    font-weight: 800;
    color: var(--fc-green);
}

.fc-pcard__price-old {
    font-size: 0.8rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 6px;
    font-weight: 600;
}

.fc-pcard__actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.fc-pcard__actions .btn {
    flex: 1;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    white-space: nowrap;
}

.fc-btn-quick {
    border-color: var(--fc-green) !important;
    color: var(--fc-green) !important;
}

.fc-btn-quick:hover {
    background: var(--fc-green) !important;
    color: #fff !important;
}

/* Sliders bonus */
.fc-section-carousel {
    margin-bottom: 1.25rem;
}

.fc-section-carousel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 2px;
}

.fc-section-carousel__head h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
    color: var(--fc-text);
}

.fc-hscroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.fc-hscroll .fc-pcard {
    flex: 0 0 160px;
    scroll-snap-align: start;
}

.fc-hscroll .fc-pcard__media {
    height: 130px;
}

.fc-pcard--compact .fc-pcard__media {
    height: 120px;
}

.fc-pcard--compact .fc-pcard__actions {
    padding: 0 8px 8px;
    flex-wrap: wrap;
}

/* Pagination */
.pagination-modern {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
    padding: 0 4px;
}

.pagination-modern a,
.pagination-modern span {
    padding: 8px 12px;
    background: var(--fc-card);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.pagination-modern a:hover {
    border-color: var(--fc-green);
    color: var(--fc-green);
}

.pagination-modern a.active {
    background: var(--fc-green);
    color: #fff;
    border-color: var(--fc-green);
}

/* Modal filtres mobile */
#fcFiltersModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* SEO block bas de page */
.categorie-seo-description {
    background: var(--fc-card);
    border-radius: var(--fc-radius);
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
    border: 1px solid var(--fc-border);
    box-shadow: var(--fc-shadow);
}

.categorie-seo-description h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.75rem 0;
}

.categorie-seo-description p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}
