
/* LAYOUT PRINCIPAL */

.ecommerce-category-page .category-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
    margin-top: 22px;
}

.ecommerce-category-page .category-layout:has(> .category-main:only-child) {
    grid-template-columns: minmax(0, 1fr);
}

.ecommerce-category-page .category-main {
    min-width: 0;
}

.ecommerce-category-page .category-main .section-card {
    margin: 0;
    width: 100%;
    min-width: 0;
}

/* SIDEBAR */

.store-sidebar {
    background: #fff;
    border: 1px solid #edf0f4;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .035);
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 17px;
    border-bottom: 1px solid #edf0f4;
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title i {
    color: #5fc48a;
    font-size: 16px;
}

.sidebar-title h3 {
    font-size: 16px;
    font-weight: 700;
    color: #182233;
    margin: 0;
}

.sidebar-close {
    display: none;
}

.sidebar-filter-group {
    padding: 21px 0;
    border-bottom: 1px solid #edf0f4;
}

.sidebar-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.sidebar-group-title h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.sidebar-group-title i {
    font-size: 13px;
    color: #94a3b8;
}

/* SUBCATEGORIAS */

.sidebar-category-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 38px;
    padding: 9px 11px;
    border-radius: 9px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: .2s;
}

.sidebar-category-item:hover {
    background: #f4f7fa;
    color: #182233;
    text-decoration: none;
}

.sidebar-category-item.active {
    background: #eaf8f0;
    color: #26965a;
    font-weight: 700;
}

.sidebar-category-item.active i {
    color: #39ad70;
    font-size: 12px;
}

.category-arrow {
    color: #cbd5e1;
    font-size: 11px;
}

/* MARCAS */

.sidebar-brand-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-brand-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 36px;
    padding: 7px 4px;
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    transition: .2s;
}

.sidebar-brand-item:hover {
    color: #182233;
    text-decoration: none;
}

.sidebar-brand-item.active {
    color: #182233;
    font-weight: 600;
}

.brand-checkbox {
    width: 17px;
    height: 17px;
    border: 1.5px solid #d5dce5;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff;
    transition: .2s;
}

.sidebar-brand-item.active .brand-checkbox {
    background: #5fc48a;
    border-color: #5fc48a;
    color: #fff;
}

.brand-checkbox i {
    font-size: 10px;
}

/* FILTROS ATIVOS */

.sidebar-active-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 0 0;
    font-size: 11px;
    color: #64748b;
}

.sidebar-active-filters i {
    color: #5fc48a;
}

.sidebar-active-filters a {
    color: #e05252;
    text-decoration: none;
    font-weight: 600;
}

.sidebar-footer {
    padding-top: 18px;
}

.sidebar-clear-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: .2s;
}

.sidebar-clear-button:hover {
    background: #f8fafc;
    color: #e05252;
    text-decoration: none;
}

/* CABEÇALHO DOS PRODUTOS */

.category-products-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.category-products-heading p {
    font-size: 13px;
    color: #94a3b8;
    margin: 6px 0 0;
}

.products-count {
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f4f6f9;
    padding: 8px 12px;
    border-radius: 20px;
}

/* TAGS DE FILTROS SELECIONADOS */

.selected-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.selected-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 11px;
    border-radius: 7px;
    background: #eaf8f0;
    color: #26965a;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.selected-filter-tag:hover {
    color: #1d804b;
    text-decoration: none;
}

.selected-filter-tag i {
    font-size: 10px;
}

.selected-filter-clear {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: none;
    margin-left: 5px;
}

.selected-filter-clear:hover {
    color: #e05252;
}

/* GRADE DE PRODUTOS */

.ecommerce-category-page .products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.ecommerce-category-page .product-card-premium {
    min-width: 0;
}

/* ESTADO VAZIO */

.category-empty-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    margin-top: 14px;
    border-radius: 9px;
    background: #5fc48a;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.category-empty-button:hover {
    background: #4bb378;
    color: #fff;
}

/* FILTROS MOBILE */

.filters-mobile-bar,
.filters-overlay {
    display: none;
}

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

@media (min-width: 1500px) {
    .ecommerce-category-page .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .ecommerce-category-page .category-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 16px;
    }

    .ecommerce-category-page .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .ecommerce-category-page .category-layout {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .ecommerce-category-page .category-main {
        width: 100%;
    }

    .filters-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
    }

    .filters-mobile-bar > span {
        color: #64748b;
        font-size: 12px;
        white-space: nowrap;
    }

    .filters-mobile-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 42px;
        padding: 0 16px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #fff;
        color: #182233;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
    }

    .filters-mobile-button i {
        color: #5fc48a;
    }

    .filter-active-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #5fc48a;
    }

    .store-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(330px, 88vw);
        height: 100dvh;
        z-index: 10002;
        border-radius: 0 18px 18px 0;
        padding: 22px;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform .25s ease;
        box-shadow: 10px 0 35px rgba(15, 23, 42, .12);
    }

    .store-sidebar.sidebar-open {
        transform: translateX(0);
    }

    .filters-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .45);
        z-index: 10001;
        opacity: 0;
        visibility: hidden;
        transition: .25s;
    }

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

    body.store-filters-open {
        overflow: hidden;
    }

    .sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border: none;
        border-radius: 8px;
        background: #f1f5f9;
        color: #475569;
        cursor: pointer;
    }

    .category-products-heading p {
        display: none;
    }

    .category-products-heading .products-count {
        display: none;
    }

    .ecommerce-category-page .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .selected-filters {
        margin-bottom: 16px;
    }
}

@media (max-width: 380px) {
    .ecommerce-category-page .products-grid {
        gap: 9px;
    }

    .ecommerce-category-page .category-main .section-card {
        padding: 14px;
    }
}
