/* =========================================================
   TEMBASE PRODUCT ARCHIVE FILTER
   ========================================================= */

/* =========================
   BRAND MENU
   ========================= */

.tembase-brand-menu {
    margin-bottom: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tembase-brand-menu::-webkit-scrollbar {
    display: none;
}

.tembase-brand-menu .tembase-brand-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
}

.tembase-brand-menu .tembase-brand-list li {
    margin: 0;
    border-bottom: 1px solid #eeeeee;
    padding: 10px 30px;
    position: relative;
    white-space: nowrap;
}

.tembase-brand-menu .tembase-brand-list li a {
    text-decoration: none;
    color: #666;
    font-size: 15px;
    font-weight: 400;
}

.tembase-brand-menu .tembase-brand-list li.active a,
.tembase-brand-menu .tembase-brand-list li:hover a {
    color: #000;
}

.tembase-brand-menu .tembase-brand-list li.active::after,
.tembase-brand-menu .tembase-brand-list li:hover::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: #000;
}


/* =========================
   FILTER BAR
   ========================= */

.tembase-filter-container {
    width: 100%;
    position: relative;
    z-index: 99;
}

.tembase-filter-container .tembase-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0 20px;
    border-top: 1.5px solid #eee;
}

.tembase-filter-container .filter-left {
    display: flex;
    gap: 100px;
}

.tembase-filter-container .filter-left .trigger {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    text-transform: capitalize;
    font-weight: 600;
    transition: color 0.2s;
}

.tembase-filter-container .filter-left .trigger:hover {
    color: #000;
}

.tembase-filter-container .filter-right h2 {
    font-size: 80px;
    font-weight: 500;
    margin: 0;
    line-height: 1;
    color: #000;
    letter-spacing: -2px;
}


/* =========================
   CATEGORY PANEL
   LUÔN HIỂN THỊ
   ========================= */

.tembase-filter-container #cat-panel {
    display: block !important;
    background: transparent;
    padding: 20px 0;
    margin-top: 10px;
    position: relative;
}


/* Không cần tiêu đề "Categories" bên trong */
.tembase-filter-container #cat-panel .panel-header h4 {
    display: none;
}


/* Category panel header */
.tembase-filter-container #cat-panel .panel-header {
    display: none;
}


/* =========================
   FILTER / SORT PANEL
   ========================= */

.tembase-filter-container #filter-panel,
.tembase-filter-container #sort-panel {
    display: none;
    background: transparent;
    padding: 20px 0;
    margin-top: 10px;
    position: relative;
}

.tembase-filter-container .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.tembase-filter-container .panel-header h4 {
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 700;
    color: #333;
    letter-spacing: 1px;
}

.tembase-filter-container .close-panel {
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}


/* =========================
   CATEGORY GRID
   ========================= */

.tembase-filter-container .grid-layout {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.tembase-filter-container .cat-item label {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    border: 1px solid #a5a5a5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
    font-size: 13px;
    height: 100%;
    width: 100%;
    color: #555;
    box-sizing: border-box;
    min-height: 40px;
    justify-content: flex-start;
}

.tembase-filter-container .cat-item label:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.tembase-filter-container .cat-item .label {
    line-height: 1.2;
    flex: 1;
}

.tembase-filter-container .cat-item input[type="checkbox"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
}

.tembase-filter-container .cat-item .box {
    width: 16px;
    height: 16px;
    border: 1.5px solid #bbb;
    border-radius: 3px;
    margin-right: 10px;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}

.tembase-filter-container .cat-item input:checked + .box {
    background: #333;
    border-color: #333;
}

.tembase-filter-container .cat-item input:checked + .box::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


/* =========================
   ATTRIBUTE FILTER
   ========================= */

.tembase-filter-container .attributes-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.tembase-filter-container .attribute-group {
    flex: 1;
    min-width: 200px;
}

.tembase-filter-container .attribute-group h4,
.tembase-filter-container .attribute-group h5 {
    font-size: 15px;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.tembase-filter-container .attribute-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tembase-filter-container .attr-checkbox,
.tembase-filter-container .sort-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.tembase-filter-container .attr-checkbox input[type="checkbox"],
.tembase-filter-container .sort-item input[type="radio"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
}

.tembase-filter-container .attr-checkbox .box {
    width: 18px;
    height: 18px;
    border: 1.5px solid #aaa;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
    border-radius: 4px;
}

.tembase-filter-container .attr-checkbox input:checked + .box {
    background: #000;
    border-color: #000;
}

.tembase-filter-container .sort-item input:checked + .radio-box {
    border-color: #000;
}

.tembase-filter-container .sort-item input:checked + .radio-box::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tembase-filter-container .sort-item label .label {
    font-size: 13px;
    color: #555;
}


/* =========================
   SORT
   ========================= */

.tembase-filter-container .sort-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tembase-filter-container .radio-box {
    width: 16px;
    height: 16px;
    border: 1px solid #bbb;
    margin-right: 10px;
    position: relative;
    flex-shrink: 0;
    border-radius: 50%;
    background: #fff;
}


/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 992px) {

    .tembase-filter-container .grid-layout {
        grid-template-columns: repeat(3, 1fr);
    }

    .tembase-filter-container .filter-left {
        gap: 30px;
    }

    .tembase-filter-container .filter-right h2 {
        font-size: 40px;
    }
}

@media (max-width: 600px) {

    .tembase-filter-container .grid-layout {
        grid-template-columns: repeat(2, 1fr);
    }

    .tembase-filter-container .filter-left {
        gap: 20px;
    }

    .tembase-filter-container .filter-right h2 {
        font-size: 32px;
    }
}