/* ============================================================
   CATEGORY PAGE
============================================================ */

.category-container {
    width: min(1400px, 94%);
    margin: auto;
}


/* ============================================================
   BREADCRUMB
============================================================ */

.category-breadcrumb {
    background: #f0f6f1;
    border-bottom: 1px solid #e1e8e2;
    padding: 12px 0;
}

.category-breadcrumb .category-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.category-breadcrumb a {
    color: #087f23;
    font-weight: 600;
}

.category-breadcrumb i {
    color: #98a2b3;
    font-size: 9px;
}

.category-breadcrumb span {
    color: #667085;
}


/* ============================================================
   PAGE TITLE
============================================================ */

.category-page {
    background: #f7f9f8;
    min-height: 700px;
    padding: 40px 0 70px;
}

.category-page-title {
    text-align: center;
    margin-bottom: 40px;
}

.category-page-title > span {
    color: #087f23;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.category-page-title h1 {
    font-size: 36px;
    font-weight: 800;
    margin: 5px 0 8px;
    color: #172033;
}

.category-page-title p {
    color: #667085;
    font-size: 14px;
}


/* ============================================================
   MAIN LAYOUT
============================================================ */

.category-layout {
    display: grid;

    grid-template-columns:
        250px 1fr;

    gap: 30px;

    align-items: start;
}


/* ============================================================
   SIDEBAR
============================================================ */

.category-sidebar {
    background: #ffffff;

    border: 1px solid #e2e8e4;

    border-radius: 14px;

    overflow: hidden;

    position: sticky;

    top: 110px;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, .05);
}

.sidebar-title {
    background: #087f23;

    color: #ffffff;

    padding: 16px;

    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 15px;

    font-weight: 700;
}

.category-sidebar-list {
    padding: 8px;
}

.sidebar-category-btn {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 12px;

    border-radius: 8px;

    background: transparent;

    color: #344054;

    font-size: 13px;

    font-weight: 600;

    text-align: left;

    transition: .2s;
}

.sidebar-category-btn i {
    width: 22px;

    color: #087f23;

    text-align: center;
}

.sidebar-category-btn:hover {
    background: #eaf8ed;

    color: #087f23;
}

.sidebar-category-btn.active {
    background: #087f23;

    color: #ffffff;
}

.sidebar-category-btn.active i {
    color: #ffffff;
}


/* ============================================================
   SELECTED CATEGORY
============================================================ */

.selected-category {
    background:
        linear-gradient(
            135deg,
            #087f23,
            #16a63c
        );

    border-radius: 15px;

    padding: 25px;

    color: #ffffff;

    margin-bottom: 30px;

    position: relative;

    overflow: hidden;
}

.selected-category::after {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    border-radius: 50%;

    background: rgba(255,255,255,.08);

    right: -50px;
    top: -80px;
}

.selected-category-inner {
    position: relative;

    z-index: 2;

    display: flex;

    align-items: center;

    gap: 20px;
}

.selected-category-icon {
    width: 65px;
    height: 65px;

    border-radius: 12px;

    background: rgba(255,255,255,.15);

    display: flex;

    justify-content: center;

    align-items: center;

    font-size: 28px;
}

.selected-category h2 {
    font-size: 27px;

    margin-bottom: 4px;
}

.selected-category p {
    font-size: 12px;

    opacity: .9;
}


/* ============================================================
   SECTION HEADING
============================================================ */

.category-section-heading {
    display: flex;

    justify-content: space-between;

    align-items: end;

    margin-bottom: 18px;
}

.category-section-heading span {
    color: #087f23;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1.3px;
}

.category-section-heading h2 {
    font-size: 23px;

    margin-top: 2px;

    color: #172033;
}


/* ============================================================
   SUB CATEGORY GRID
============================================================ */

.sub-category-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;

    margin-bottom: 40px;
}

.sub-category-card {
    background: #ffffff;

    border: 1px solid #e1e8e2;

    border-radius: 12px;

    padding: 20px;

    display: flex;

    align-items: center;

    gap: 14px;

    transition: .3s;

    cursor: pointer;
}

.sub-category-card:hover {
    transform: translateY(-5px);

    border-color: #087f23;

    box-shadow:
        0 10px 25px rgba(0,0,0,.08);
}

.sub-category-icon {
    width: 48px;
    height: 48px;

    flex-shrink: 0;

    border-radius: 10px;

    background: #eaf8ed;

    color: #087f23;

    display: flex;

    justify-content: center;

    align-items: center;

    font-size: 20px;
}

.sub-category-card h3 {
    font-size: 14px;

    margin-bottom: 3px;
}

.sub-category-card span {
    color: #667085;

    font-size: 11px;
}


/* ============================================================
   TYPE GRID
============================================================ */

.types-section {
    margin-bottom: 40px;
}

.type-grid {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}

.type-chip {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    background: #ffffff;

    border: 1px solid #dce5df;

    color: #344054;

    padding: 10px 15px;

    border-radius: 30px;

    font-size: 12px;

    font-weight: 600;

    transition: .2s;
}

.type-chip:hover {
    background: #087f23;

    border-color: #087f23;

    color: #ffffff;
}

.type-chip i {
    color: #087f23;
}

.type-chip:hover i {
    color: #ffffff;
}


/* ============================================================
   QUICK PRODUCTS
============================================================ */

.quick-products-section {
    margin-top: 20px;
}

.quick-products-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;
}

.mini-product-card {
    background: #ffffff;

    border: 1px solid #e3e8e5;

    border-radius: 12px;

    padding: 12px;

    display: flex;

    gap: 12px;

    transition: .3s;
}

.mini-product-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 8px 22px rgba(0,0,0,.08);
}

.mini-product-image {
    width: 90px;
    height: 90px;

    flex-shrink: 0;

    background: #f4f7f5;

    border-radius: 8px;

    overflow: hidden;
}

.mini-product-image img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    padding: 8px;
}

.mini-product-info {
    min-width: 0;
}

.mini-product-info small {
    color: #087f23;

    font-size: 9px;

    font-weight: 700;
}

.mini-product-info h3 {
    font-size: 12px;

    margin: 3px 0;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.mini-product-info p {
    color: #667085;

    font-size: 9px;

    margin-bottom: 5px;
}

.mini-price {
    color: #172033;

    font-size: 14px;

    font-weight: 800;
}

.mini-product-link {
    display: inline-block;

    margin-top: 5px;

    color: #087f23;

    font-size: 10px;

    font-weight: 700;
}


/* ============================================================
   EMPTY STATE
============================================================ */

.category-empty {
    text-align: center;

    padding: 60px 20px;

    background: #ffffff;

    border-radius: 12px;

    border: 1px solid #e2e8e4;
}

.category-empty i {
    font-size: 45px;

    color: #087f23;

    margin-bottom: 12px;
}

.category-empty h3 {
    margin-bottom: 5px;
}

.category-empty p {
    color: #667085;

    font-size: 13px;
}


/* ============================================================
   DARK MODE
============================================================ */

body.dark-mode .category-page {
    background: #101512;
}

body.dark-mode .category-page-title h1,
body.dark-mode .category-section-heading h2 {
    color: #ffffff;
}

body.dark-mode .category-page-title p {
    color: #b8c1cc;
}

body.dark-mode .category-sidebar,
body.dark-mode .sub-category-card,
body.dark-mode .type-chip,
body.dark-mode .mini-product-card,
body.dark-mode .category-empty {
    background: #18201b;

    border-color: #2d3931;
}

body.dark-mode .sidebar-category-btn,
body.dark-mode .sub-category-card h3,
body.dark-mode .type-chip,
body.dark-mode .mini-product-info h3,
body.dark-mode .mini-price {
    color: #ffffff;
}

body.dark-mode .sub-category-card span,
body.dark-mode .mini-product-info p {
    color: #b8c1cc;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 1000px) {

    .category-layout {
        grid-template-columns: 200px 1fr;
    }

    .sub-category-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .quick-products-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 750px) {

    .category-layout {
        grid-template-columns: 1fr;
    }

    .category-sidebar {
        position: static;
    }

    .category-sidebar-list {
        display: grid;

        grid-template-columns:
            repeat(2, 1fr);

        gap: 5px;
    }

    .selected-category {
        padding: 20px;
    }

    .sub-category-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 500px) {

    .category-page {
        padding: 25px 0 50px;
    }

    .category-page-title h1 {
        font-size: 27px;
    }

    .category-page-title p {
        font-size: 12px;
    }

    .category-sidebar-list {
        grid-template-columns: 1fr;
    }

    .selected-category-inner {
        gap: 12px;
    }

    .selected-category-icon {
        width: 50px;
        height: 50px;

        font-size: 20px;
    }

    .selected-category h2 {
        font-size: 21px;
    }

    .quick-products-grid {
        grid-template-columns: 1fr;
    }

}