/* ==========================================
   EASYPARA CATEGORY PAGE STYLES
   Professional Design Matching Brands Page
   ========================================== */

/* ==========================================
   CATEGORY HEADER SECTION
   ========================================== */

.category-hero,
.category-header {
    background: linear-gradient(135deg, #1a5f4f 0%, #145246 50%, #0d3d33 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {

    .category-hero,
    .category-header {
        padding: 2rem 0 !important;
    }
}

.category-hero::before,
.category-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.category-hero::after,
.category-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.category-hero-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    text-align: center;
    position: relative;
    z-index: 1;
    text-align: left;
}

.category-hero-text {
    max-width: 640px;
}

.section-header.compact {
    margin-bottom: 1.75rem;
    text-align: left;
}

.section-header.compact .section-title {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
}

.section-header.compact .section-subtitle {
    margin: 0;
    color: rgba(15, 23, 42, 0.65);
    font-size: 0.95rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
    list-style: none;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: white;
}

.breadcrumb-item.active {
    color: white;
    font-weight: 600;
}

.category-hero .section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

@media (max-width: 768px) {
    .category-hero .section-title {
        font-size: 2rem !important;
    }
}

.category-hero .section-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 0;
    max-width: 700px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================
   CATEGORY STATS
   ========================================== */

.category-stats {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.category-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white !important;
    font-weight: 600;
    font-size: 0.9rem;
}

.category-stats .stat-item:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.category-stats .stat-item i {
    font-size: 1.5rem;
    color: #ffa500;
}

/* ==========================================
   SUBCATEGORIES SECTION
   ========================================== */

.category-subcategories,
.subcategories-section {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-light);
    --section-bg: #ffffff;
}

.category-subcategories .section-header,
.subcategories-header {
    margin-bottom: 1.5rem;
}

.category-subcategories .section-title,
.subcategories-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.category-subcategories .section-title i,
.subcategories-title i {
    color: var(--primary-teal);
    font-size: 1.2rem;
}

.subcategories-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-teal) var(--light-gray);
    position: relative;
}

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

.subcategories-scroll::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 3px;
}

.subcategories-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-teal);
    border-radius: 3px;
}

.subcategory-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.subcategory-chip i {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.subcategory-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 79, 0.15);
    border-color: var(--primary-teal);
    color: var(--primary-teal);
    text-decoration: none;
}

.subcategory-chip:hover i {
    color: var(--primary-teal);
}

.subcategory-chip.active {
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-dark));
    border-color: var(--primary-teal);
    color: white;
    box-shadow: 0 4px 12px rgba(26, 95, 79, 0.25);
}

.subcategory-chip.active i {
    color: white;
}

.chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: var(--light-gray);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.subcategory-chip:hover .chip-count {
    background: rgba(26, 95, 79, 0.1);
    color: var(--primary-teal);
}

.subcategory-chip:focus-visible {
    outline: 3px solid var(--primary-teal);
    outline-offset: 3px;
}

.filter-toggle-btn:focus-visible,
.sort-select:focus-visible,
.product-btn:focus-visible {
    outline: 3px solid var(--primary-teal);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(26, 95, 79, 0.15);
}

.subcategory-chip.active .chip-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.subcategories-scroll::before,
.subcategories-scroll::after {
    content: '';
    position: sticky;
    top: 0;
    width: 40px;
    flex: 0 0 40px;
    pointer-events: none;
    z-index: 2;
}

.subcategories-scroll::before {
    left: 0;
    background: linear-gradient(90deg, var(--section-bg, #ffffff) 0%, rgba(255, 255, 255, 0) 100%);
}

.subcategories-scroll::after {
    right: 0;
    margin-left: auto;
    background: linear-gradient(270deg, var(--section-bg, #ffffff) 0%, rgba(255, 255, 255, 0) 100%);
}

/* ==========================================
   PRODUCTS SECTION
   ========================================== */

.category-products,
.products-section {
    padding: 2rem 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.results-info {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-select {
    padding: 10px 16px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    background: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-select:hover {
    border-color: var(--primary-teal);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 4px rgba(26, 95, 79, 0.1);
}

/* ==========================================
   RELATED CATEGORIES SECTION
   ========================================= */

.related-categories {
    background: var(--light-gray);
    padding: 4rem 0;
    margin-top: 3rem;
}

.related-categories h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 800;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

/* Enhanced Category Card */
.category-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.category-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 28px rgba(26, 95, 79, 0.15);
    text-decoration: none;
    color: inherit;
    border-color: var(--primary-teal);
}

.category-icon {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.category-icon img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-light);
    padding: 8px;
    background: white;
}

.category-card:hover .category-icon {
    transform: scale(1.15) rotate(5deg);
}

.category-card:hover .category-icon img {
    border-color: var(--primary-teal);
}

/* Category Placeholder Circle */

.category-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Add inner padding to content inside Autres catégories cards */
.category-card .category-info {
    padding: 0.5rem 0.75rem;
}

.category-info h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

.category-info span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.category-placeholder-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1a5f4f, #4a9b8e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.5rem;
    text-align: center;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-info {
    flex: 1;
    text-align: left;
}

.category-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.category-info span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==========================================
   EMPTY STATE
   ========================================== */

.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    max-width: 600px;
    margin: 3rem auto;
}

.empty-state-icon {
    font-size: 5rem;
    color: var(--medium-gray);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.empty-state .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #1a5f4f, #145246);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(26, 95, 79, 0.2);
}

.empty-state .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 95, 79, 0.3);
    color: white;
}

/* ==========================================
   PAGINATION
   ========================================== */

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
}

.pagination {
    display: flex;
    gap: 8px;
}

.page-link {
    padding: 10px 16px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.2s ease;
    background: white;
}

.page-link:hover {
    background: var(--primary-teal);
    color: white;
    border-color: var(--primary-teal);
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #1a5f4f, #145246);
    color: white;
    border-color: #1a5f4f;
    box-shadow: 0 2px 8px rgba(26, 95, 79, 0.2);
}

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

/* Mobile */
@media (max-width: 768px) {
    .category-header {
        padding: 3rem 0;
    }

    .category-title h1 {
        font-size: 2rem;
    }

    .category-description {
        font-size: 1rem;
    }

    .category-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .category-stats .stat-item {
        justify-content: center;
        padding: 12px 20px;
    }

    .products-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category-card {
        padding: 1.5rem;
    }

    .category-icon img,
    .category-placeholder-circle {
        width: 70px;
        height: 70px;
    }

    .related-categories h2 {
        font-size: 2rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================
   ENHANCED FILTERS BAR
   ========================================== */

.category-toolbar,
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    flex-wrap: wrap;
    gap: 1rem;
}

.toolbar-left,
.filters-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    flex: 1;
}

.toolbar-right,
.filters-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
    position: relative;
}

.filter-toggle-btn:hover,
.filter-toggle-btn.active {
    background: var(--primary-teal);
    color: white;
    border-color: var(--primary-teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 79, 0.2);
}

.filter-toggle-btn i {
    font-size: 1.1rem;
}

.filter-count {
    display: inline-block;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Active Filters Chips */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--primary-teal);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: #145246;
    transform: scale(1.05);
}

.filter-chip i {
    font-size: 0.85rem;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--light-gray);
    padding: 4px;
    border-radius: 10px;
}

.view-btn {
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-size: 1rem;
}

.view-btn:hover {
    color: var(--primary-teal);
}

.view-btn.active {
    background: white;
    color: var(--primary-teal);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ==========================================
   FILTERS PANEL (Collapsible)
   ========================================== */

.filters-panel {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2rem;
}

.filters-panel.open {
    max-height: none;
    overflow: visible;
}

.category-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr;
    gap: 2rem;
    align-items: flex-start;
}

.category-layout .filters-panel {
    max-height: none;
    overflow: visible;
    margin-bottom: 0;
    position: sticky;
    top: 120px;
}

.category-layout .filters-panel .filters-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.75rem;
}

.category-layout .category-results {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.filters-content {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* small vertical spacing between stacked filter cards */
.filters-content .filter-card+.filter-card {
    margin-top: 6px;
}

.filter-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(26, 95, 79, 0.12);
    box-shadow: 0 14px 32px rgba(20, 82, 70, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.filter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(20, 82, 70, 0.14);
}

.filter-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    background: linear-gradient(90deg, rgba(26, 95, 79, 0.08) 0%, rgba(26, 95, 79, 0.02) 100%);
    border: none;
    padding: 18px 20px;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s ease;
}

.filter-card__header:focus-visible {
    outline: 3px solid var(--primary-teal);
    outline-offset: -3px;
}

.filter-card__header-main {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
}

.filter-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(26, 95, 79, 0.12);
    color: var(--primary-teal);
    font-size: 1rem;
}

.filter-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.filter-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(26, 95, 79, 0.1);
    color: var(--primary-teal);
}

.filter-card__chevron {
    transition: transform 0.3s ease;
    color: rgba(26, 95, 79, 0.6);
}

.filter-card.is-open .filter-card__chevron {
    transform: rotate(-180deg);
}

.filter-card__body {
    overflow: hidden;
    max-height: 0;
    padding: 0 20px;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

.filter-card.is-open .filter-card__body {
    padding: 10px 20px 20px;
    max-height: 640px;
}

.filter-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.filter-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(26, 95, 79, 0.14);
    background: rgba(26, 95, 79, 0.04);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-checkbox:hover {
    border-color: rgba(26, 95, 79, 0.35);
    background: rgba(26, 95, 79, 0.08);
    box-shadow: 0 8px 16px rgba(20, 82, 70, 0.08);
}

.filter-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-checkbox__label {
    position: relative;
    padding-left: 32px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.filter-checkbox__label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid rgba(26, 95, 79, 0.35);
    background: white;
    transition: all 0.2s ease;
}

.filter-checkbox__label::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%) scale(0.6);
    color: var(--white);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.filter-checkbox input:checked+.filter-checkbox__label::before {
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-dark));
    border-color: var(--primary-teal);
    box-shadow: 0 6px 12px rgba(20, 82, 70, 0.25);
}

.filter-checkbox input:checked+.filter-checkbox__label::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.filter-checkbox input:focus-visible+.filter-checkbox__label::before {
    outline: 3px solid var(--accent-orange);
    outline-offset: 2px;
}

.filter-search {
    position: relative;
    margin-bottom: 4px;
}

.filter-search input {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: 1px solid rgba(26, 95, 79, 0.18);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-search input:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 4px rgba(26, 95, 79, 0.12);
}

.filter-search i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(26, 95, 79, 0.55);
}

.filter-options {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.filter-options::-webkit-scrollbar {
    width: 6px;
}

.filter-options::-webkit-scrollbar-thumb {
    background: rgba(26, 95, 79, 0.25);
    border-radius: 999px;
}

.filter-options::-webkit-scrollbar-track {
    background: rgba(26, 95, 79, 0.08);
    border-radius: 999px;
}

.price-range-slider {
    position: relative;
    height: 48px;
    margin: 4px 0 12px 0;
}

.price-range-slider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(26, 95, 79, 0.12);
    border-radius: 999px;
    transform: translateY(-50%);
}

/* Overlapping range inputs for min/max */
.price-range-slider input[type="range"] {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    margin: 0;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
    /* allow overlapping sliders */
    height: 6px;
}

.price-range-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: transparent;
}

.price-range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-teal);
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(26, 95, 79, 0.35);
    margin-top: -6px;
    /* centers thumb */
    pointer-events: auto;
    /* enable dragging */
    cursor: pointer;
}

.price-range-slider input[type="range"]::-moz-range-track {
    height: 6px;
    background: transparent;
}

.price-range-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-teal);
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(26, 95, 79, 0.35);
    pointer-events: auto;
    cursor: pointer;
}

/* Optional filled selection segment (set left/width via JS if needed) */
.price-range-slider .range-progress {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: linear-gradient(90deg, rgba(26, 95, 79, 0.45), rgba(26, 95, 79, 0.65));
    border-radius: 999px;
    pointer-events: none;
}

.price-inputs {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 6px;
}

.price-inputs input[type="number"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid rgba(26, 95, 79, 0.18);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    background: rgba(26, 95, 79, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.price-inputs input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 4px rgba(26, 95, 79, 0.12);
    background: white;
}

.price-inputs span {
    font-weight: 700;
    color: rgba(26, 95, 79, 0.7);
    align-self: center;
}

.filter-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.btn-clear-filters {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid rgba(26, 95, 79, 0.18);
    background: rgba(26, 95, 79, 0.06);
    color: var(--primary-teal);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-clear-filters:hover {
    background: rgba(26, 95, 79, 0.14);
    box-shadow: 0 10px 20px rgba(20, 82, 70, 0.12);
}

/* ==========================================
   ENHANCED PRODUCT CARDS & GRID
   ========================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 32px rgba(26, 95, 79, 0.15);
    border-color: var(--primary-teal);
}

.product-card.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Card Header */
.card-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 10;
    pointer-events: none;
}

.card-header>* {
    pointer-events: auto;
}

/* Discount Badge */
.discount-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    display: inline-block;
}

/* Special Badge (Made in France, etc.) */
.special-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Certification Badge */
.certification-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: white;
    color: var(--primary-teal);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--primary-teal);
    z-index: 10;
}

/* Ribbon (TOP) */
.ribbon {
    position: absolute;
    top: 15px;
    left: -8px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 6px 20px 6px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    z-index: 10;
    clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%);
}

.ribbon::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #b45309;
}

/* Stock Badge */
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 3;
    width: fit-content;
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.stock-badge.in-stock {
    background: rgba(34, 197, 94, 0.12);
    color: var(--primary-green);
    border-color: rgba(34, 197, 94, 0.25);
}

.stock-badge.low-stock {
    background: rgba(251, 191, 36, 0.15);
    color: #f59e0b;
    border-color: rgba(251, 191, 36, 0.35);
}

.stock-badge.out-of-stock {
    background: rgba(220, 53, 69, 0.12);
    color: var(--danger-red);
    border-color: rgba(220, 53, 69, 0.25);
}

/* Product Image Section */
.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--light-gray);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

/* Product Placeholder */
.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-teal-light));
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

/* Card Actions (Overlay Icons) */
.card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.product-card:hover .card-actions {
    opacity: 1;
    transform: translateX(0);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--primary-teal);
    color: white;
    transform: scale(1.1);
}

.icon-btn i {
    font-size: 1rem;
}

/* Product Info Section */
.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.product-content {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
}

.product-brand {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-teal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
    /* Fixed height for alignment */
}

.product-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3em;
    /* Limit height */
}

/* Product Tags */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0.75rem;
}

.product-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--light-gray);
    color: var(--text-secondary);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.product-tag:hover {
    background: var(--primary-teal);
    color: white;
    border-color: var(--primary-teal);
}

/* Product Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.rating-stars {
    display: flex;
    gap: 2px;
    color: #fbbf24;
    font-size: 0.9rem;
}

.rating-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Product Price */
.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-teal);
    line-height: 1.2;
}

.old-price {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    font-weight: 500;
    white-space: nowrap;
}

.save-badge {
    display: inline-block;
    padding: 4px 8px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Product Actions Button */
.product-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1a5f4f, #145246);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.product-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 95, 79, 0.3);
}

.product-btn i {
    font-size: 1.1rem;
}

/* List View */
.products-grid.list-view {
    grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 240px 1fr auto;
    gap: 2rem;
}

.products-grid.list-view .product-image {
    aspect-ratio: 1;
    width: 240px;
}

.products-grid.list-view .product-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.products-grid.list-view .product-actions {
    display: flex;
    align-items: center;
    padding: 1.5rem;
}

.products-grid.list-view .product-btn {
    width: auto;
    padding: 14px 28px;
}

/* ==========================================
   RESPONSIVE - FILTERS & PRODUCTS
   ========================================== */

@media (max-width: 992px) {
    .category-hero-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-stats {
        justify-content: flex-start;
        width: 100%;
    }

    .category-layout {
        display: block;
    }

    .category-layout .filters-panel {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 100% !important;
        height: 100vh !important;
        background: #fff !important;
        z-index: 3000 !important;
        margin: 0 !important;
        max-height: none !important;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .category-layout .filters-panel.open {
        left: 0 !important;
    }

    .filters-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        background: var(--white);
        border-bottom: 1px solid var(--border-light);
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .filters-header h3 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 800;
        color: var(--text-primary);
    }

    .filters-close {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        background: #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        cursor: pointer;
    }

    .category-layout .filters-panel .filters-content {
        flex: 1 !important;
        overflow-y: auto !important;
        padding: 20px !important;
        gap: 1.25rem !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .filter-actions-sticky {
        padding: 16px 20px;
        background: var(--white);
        border-top: 1px solid var(--border-light);
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: sticky;
        bottom: 0;
        z-index: 10;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    }

    .btn-apply-filters {
        width: 100%;
        padding: 14px;
        background: linear-gradient(135deg, #1a5f4f, #145246);
        color: white;
        border: none;
        border-radius: 12px;
        font-weight: 700;
        font-size: 1rem;
    }

    .btn-clear-filters-mini {
        width: 100%;
        padding: 10px;
        background: transparent;
        color: var(--text-secondary);
        border: 1.5px solid var(--border-light);
        border-radius: 12px;
        font-weight: 600;
        font-size: 0.9rem;

        @media (max-width: 768px) {

            /* Subcategories responsive */
            .category-subcategories,
            .subcategories-section {
                padding: 1.5rem 0;
            }

            .category-subcategories .section-title,
            .subcategories-title {
                font-size: 1.1rem;
            }

            .subcategory-chip {
                padding: 10px 16px;
                font-size: 0.85rem;
            }

            .chip-count {
                min-width: 20px;
                height: 20px;
                font-size: 0.7rem;
            }

            /* Filters and products */
            .category-toolbar,
            .filters-bar {
                flex-direction: column;
                align-items: stretch;
            }

            .toolbar-left,
            .filters-left {
                flex-direction: column;
                align-items: stretch;
                gap: 1rem;
            }

            .toolbar-right,
            .filters-right {
                justify-content: space-between;
            }

            .filters-content {
                grid-template-columns: 1fr;
                padding: 1.5rem;
            }

            .products-grid {
                gap: 1.5rem;
            }

            .products-grid.list-view .product-card {
                grid-template-columns: 1fr;
            }

            .products-grid.list-view .product-image {
                width: 100%;
            }

            /* Badge positioning for mobile */
            .card-header {
                padding: 8px;
            }

            .discount-badge,
            .special-badge {
                padding: 4px 8px;
                font-size: 0.7rem;
            }

            .certification-badge {
                width: 40px;
                height: 40px;
                font-size: 0.6rem;
            }

            .ribbon {
                font-size: 0.65rem;
                padding: 4px 16px 4px 8px;
            }

            .stock-badge {
                padding: 4px 8px;
                font-size: 0.65rem;
            }

            .product-tags {
                gap: 4px;
            }

            .product-tag {
                font-size: 0.7rem;
                padding: 3px 8px;
            }

            .current-price {
                font-size: 1.2rem;
            }

            .old-price {
                font-size: 0.9rem;
            }
        }

        @media (min-width: 769px) and (max-width: 1024px) {
            .products-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (min-width: 1025px) {

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