@import 'style.css';
@import 'header.css';
@import 'footer.css';
@import 'item-product.css';

/* Loading overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.product-listing {
    position: relative;
}

.footer {
    margin-top: 0rem;
}

.footer-top {
    margin-top: 2rem;
}

.sidebar {
    background: #fff;
    border-radius: 13px;
    border: 2px solid #1b74e4;
    box-shadow: 0 2px 16px #e3f7fe5c;
    padding: 22px 0 24px 0;
    min-width: 255px;
}

.sidebar .category-title {
    font-size: 21px;
    font-weight: 700;
    color: #1b74e4;
    margin-left: 22px;
    margin-bottom: 14px;
    border-bottom: 2.3px solid #1b74e4;
    display: inline-block;
    padding-bottom: 3px;
}

.sidebar .nav-category {
    list-style: none;
    padding-left: 0;
    margin-bottom: 10px;
    padding: 10px;
}

.sidebar .nav-category .nav-item {
    margin-bottom: 2px;
    padding-bottom: 0;
    padding-top: 0;
}

.sidebar .nav-category .category-group-all-product i {
    margin-right: 10px;
}

.sidebar .category-link,
.sidebar .category-group {
    display: flex;
    padding: 9px 24px 9px 22px;
    border-radius: 11px;
    font-size: 16.5px;
    color: #16253f;
    background: none;
    font-weight: 500;
    transition: background 0.17s, color 0.14s;
    cursor: pointer;
    gap: 10px;
}

.sidebar .category-link {
    align-items: flex-start;
}

.sidebar .category-group {
    align-items: center;
}

.sidebar .category-link.active,
.sidebar .category-group.active {
    background: #1b74e4;
    color: #fff;
    font-weight: 600;
}

.sidebar .category-link.active a {
    color: #fff;
}

.sidebar .category-link:hover,
.sidebar .category-group:hover {
    background: #f4fcff;
    color: #1b74e4;
}

.sidebar .nav-subcategory {
    margin-left: 36px;
    border-left: 2px solid #e4f8ff;
    padding-left: 7px;
    margin-top: 10px;
}

.sidebar .nav-subcategory .nav-link {
    color: #383d45;
    font-size: 15.2px;
    padding: 7px 0 7px 9px;
    border-radius: 6px;
    display: block;
    margin-bottom: 2px;
    transition: background 0.16s, color 0.16s;
    cursor: pointer;
}

.nav--item-subcategory {
    padding: 15px;
}

.sidebar .nav-subcategory .nav-link.active {
    background: #def6ff;
    color: #1b74e4;
    font-weight: 600;
}

.sidebar .nav-group-toggle {
    margin-left: auto;
    color: #a6b8c6;
    font-size: 13.8px;
    rotate: 0deg;
    transition: rotate 0.2s;
    cursor: pointer;
}

.sidebar .category-group.collapsed .nav-group-toggle {
    rotate: -90deg;
}

.sidebar .category-spacer {
    height: 14px;
}

/* Product card grid */
.product-main-box {
    padding: 0 20px;
}

.product-main-box .product-grid {
    grid-template-columns: repeat(3, 1fr);
}

.product-toolbar {
    margin-top: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-toolbar .sort-label {
    font-size: 15.5px;
    color: #656e7e;
    margin-right: 6px;
    text-align: center;
    display: block;
}

.product-toolbar .form-select {
    min-width: 120px;
    border-radius: 10px;
    font-size: 15px;
    height: 37px;
    color: #1b74e4;
    border-color: #1b74e4;
}

.product-listing {
    margin-top: 4px;
}

.product-category-name {
    font-size: 26px;
    font-weight: 700;
    color: #1b74e4;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

.sub-product-category-name {
    font-weight: 500;
    color: #222;
    font-size: 16px;
}

.product-cat-sort-order {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Responsive */
@media (max-width:1000px) {
    .sidebar {
        min-width: unset;
    }
}

@media (max-width:768px) {
    .sidebar {
        padding-top: 10px;
        padding-bottom: 8px;
    }

    .product-card {
        padding: 11px;
    }

    .sidebar .nav-category .nav-item .category-group-all-product {
        align-items: start;
    }

    .product-cat-sort-order {
        display: grid;
        justify-content: space-around;
    }

    .section-product-content .product-grid .btn-group {
        display: grid;
    }

    .section-product-content .product-grid .btn-group button {
        width: 100%;
    }

    .product-main-box .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-category-name span {
        font-size: 24px;
    }
}