/* ==========================================
   Senura Enterprises - All Products Page Styles
   Matching Home.css Design Tokens & Palette
   ========================================== */

.products-page-wrapper {
    background-color: var(--home-bg, #fafbfe);
    padding: 24px 0 60px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--home-text-dark, #231648);
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--home-text-muted, #6e7284);
    margin-bottom: 20px;
}

.breadcrumb-nav a {
    color: var(--home-text-muted, #6e7284);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.breadcrumb-nav a:hover {
    color: var(--home-primary, #ffbb00);
}

.breadcrumb-separator {
    font-size: 10px;
    color: #c0c4d8;
}

.breadcrumb-nav .active-page {
    color: var(--home-text-dark, #231648);
    font-weight: 700;
}

/* Page Title Banner */
.products-header-banner {
    margin-bottom: 20px;
}

.title-with-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--home-text-dark, #231648);
    margin: 0;
    letter-spacing: -0.5px;
}

.clear-cat-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 187, 0, 0.15);
    color: var(--home-text-dark, #231648);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.clear-cat-badge-btn:hover {
    background-color: var(--home-primary, #ffbb00);
    color: var(--home-text-dark, #231648);
}

.page-subtitle {
    font-size: 14px;
    color: var(--home-text-desc, #5d637e);
    max-width: 680px;
    line-height: 1.6;
    margin: 0;
}

/* Mobile Quick Category Scroll Pills Bar */
.mobile-cat-scroll-wrapper {
    margin-bottom: 20px;
    width: 100%;
    overflow: hidden;
}

.mobile-cat-pills-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.mobile-cat-pills-bar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.cat-pill {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: #ffffff;
    border: 1px solid var(--home-border-sidebar, #eaedf2);
    color: var(--home-text-dark, #231648);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(35, 22, 72, 0.03);
    flex-shrink: 0;
}

.cat-pill:hover {
    border-color: var(--home-primary, #ffbb00);
    color: var(--home-text-dark, #231648);
}

.cat-pill.active {
    background-color: var(--home-text-dark, #231648);
    color: #ffffff;
    border-color: var(--home-text-dark, #231648);
}

.cat-pill.active .pill-count {
    color: var(--home-primary, #ffbb00);
}

.pill-count {
    font-size: 11px;
    color: var(--home-text-muted, #6e7284);
    font-weight: 600;
}

/* Toolbar Controls Bar */
.products-toolbar-bar {
    background-color: #ffffff;
    border: 1px solid var(--home-border-sidebar, #eaedf2);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(35, 22, 72, 0.02);
}

.toolbar-left-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
}

.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--home-text-dark, #231648);
    border: 1px solid var(--home-text-dark, #231648);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
    background-color: #322163;
    color: var(--home-primary, #ffbb00);
}

.active-filter-dot {
    width: 8px;
    height: 8px;
    background-color: var(--home-primary, #ffbb00);
    border-radius: 50%;
    display: inline-block;
}

.found-count {
    font-size: 13px;
    font-weight: 800;
    color: var(--home-text-dark, #231648);
}

/* Products Layout Container */
.products-layout-container {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

/* Filter Sidebar */
.filter-sidebar {
    width: 270px;
    flex-shrink: 0;
    background-color: #ffffff;
    border: 1px solid var(--home-border-sidebar, #eaedf2);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 18px rgba(35, 22, 72, 0.03);
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    z-index: 10;
    transition: transform 0.3s ease, left 0.3s ease;
}

.filter-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--home-border-sidebar, #eaedf2);
}

.filter-sidebar-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--home-text-dark, #231648);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.close-filter-btn {
    background: none;
    border: none;
    color: var(--home-text-muted, #6e7284);
    font-size: 18px;
    cursor: pointer;
    display: none; /* Visible on mobile drawer */
    padding: 4px;
}

.filter-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.filter-group-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--home-text-dark, #231648);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0;
}

.reset-filter-link {
    font-size: 11px;
    font-weight: 700;
    color: #ef4444;
    text-decoration: none;
}

.reset-filter-link:hover {
    text-decoration: underline;
}

/* Category Filter Links List */
.filter-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--home-text-desc, #5d637e);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cat-link:hover {
    background-color: var(--home-hover-bg, #f7f8fd);
    color: var(--home-text-dark, #231648);
}

.cat-link.active {
    background-color: var(--home-text-dark, #231648);
    color: #ffffff;
    font-weight: 700;
}

.cat-link.active .count {
    color: var(--home-primary, #ffbb00);
}

.cat-link .count {
    font-size: 11px;
    color: var(--home-text-muted, #6e7284);
}

/* Products Display Area */
.products-display-area {
    flex: 1;
    min-width: 0;
}

/* Products Grid Dynamic Column Layouts */
.products-grid {
    display: grid;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 40px;
}

.products-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* No Products Found State */
.no-products-box {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px dashed var(--home-border-container, #e2e8f5);
    border-radius: 16px;
    margin: 20px 0;
}

.no-products-icon {
    font-size: 44px;
    color: #a0a5b8;
    margin-bottom: 14px;
    display: block;
}

.no-products-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--home-text-dark, #231648);
    margin-bottom: 16px;
}

.no-products-reset-btn {
    display: inline-block;
    padding: 10px 24px;
    background-color: var(--home-text-dark, #231648);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.no-products-reset-btn:hover {
    background-color: var(--home-primary, #ffbb00);
    color: var(--home-text-dark, #231648);
}

/* Pagination Bar */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
}

.page-num {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: #ffffff;
    border: 1px solid var(--home-border-sidebar, #eaedf2);
    color: var(--home-text-dark, #231648);
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-num:hover,
.page-num.active {
    background-color: var(--home-text-dark, #231648);
    color: #ffffff;
    border-color: var(--home-text-dark, #231648);
}

/* Mobile Filter Drawer Overlay */
.filter-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(35, 22, 72, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.filter-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   MOBILE & TABLET RESPONSIVE BREAKPOINTS
   ========================================== */

@media (min-width: 993px) {
    .filter-toggle-btn {
        display: none; /* Hide toggle button on desktop when sidebar is visible */
    }
}

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

@media (max-width: 992px) {
    .products-layout-container {
        position: relative;
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        max-height: 100vh;
        z-index: 1000;
        overflow-y: auto;
        border-radius: 0 16px 16px 0;
        box-shadow: 10px 0 30px rgba(35, 22, 72, 0.2);
    }

    .filter-sidebar.open {
        left: 0;
    }

    .close-filter-btn {
        display: block;
    }

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

@media (max-width: 576px) {
    .products-page-wrapper {
        padding: 16px 0 40px;
    }

    .page-title {
        font-size: 24px;
    }

    .products-header-banner {
        margin-bottom: 14px;
    }

    .products-toolbar-bar {
        padding: 10px 14px;
        margin-bottom: 16px;
    }

    .filter-toggle-btn {
        font-size: 12px;
        padding: 7px 14px;
    }

    .found-count {
        font-size: 12px;
    }

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

    /* Product card adjustments on mobile */
    .product-card {
        padding: 10px;
    }

    .product-image-box {
        height: 140px;
    }

    .product-title {
        font-size: 13px;
        height: 36px;
        line-height: 1.35;
    }

    .product-category {
        font-size: 9px;
    }

    .product-card .current-price {
        font-size: 13px;
    }

    .product-card-footer {
        gap: 6px;
    }

    .add-cart-btn {
        font-size: 10px;
        padding: 8px 10px;
    }

    .quick-action-btn {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .products-grid.cols-4 {
        grid-template-columns: 1fr;
    }
}
