html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
}

.products-wrapper {
    display: flex;
    width: 1200px;
    margin: 40px auto;       
}

/* SIDEBAR */

aside {
    width: 30%;
}

.sidebar {
    margin-top: 20px;
    width: 350px;
    background: #f4f6f8;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-title {
    background: gray;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title span {
    color: #fff;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.sidebar-menu {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.menu-item > a {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    color: black;
    text-decoration: none;
    font-size: 20px;
    font-weight: 300;
    transition: max-height 0.5s ease;
    position: relative;
}

.menu-item > a:hover {
    background: #c0c0c0;
}

.menu-item.is-active > a {
    background: #fff0f0;
}

.menu-item.is-active > a::before {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 0 2px 2px 0;
}

.menu-item + .menu-item {
    border-top: 1px solid #e5e7eb;
}

.menu-toggle {
    display: none;
}

.menu-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px;
    color: black;
    font-size: 16px;
    font-weight: 400;
    margin: 0;
}

.menu-label:hover {
    background: #c0c0c0;
}

.menu-label .chevron {
    font-size: 11px;
    transition: transform 0.5s ease;
    color: gray;
    flex-shrink: 0;
}

.menu-toggle:checked + .menu-label .chevron {
    transform: rotate(180deg);
}

.menu-toggle:checked + .menu-label {
    background: #e5e7eb;
}

.sub-menu {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background: #f4f6f8;
    border-top: 1px solid #e5e7eb;
}

.menu-toggle:checked ~ .sub-menu {
    max-height: 1000px;
}

.sub-menu-item {
    border-bottom: 1px solid #e9ecef;
}

.sub-menu-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 10px 32px;
    color: black;
    font-size: 13px;
    font-weight: 600;
}

.sub-menu-label .chevron {
    font-size: 11px;
    transition: transform 0.5s ease;
    color: gray;
    flex-shrink: 0;
}

.sub-menu-label:hover {
    background: #eef0f3;
}

.sub-menu-toggle:checked + .sub-menu-label .chevron {
    transform: rotate(180deg);
}

.sub-sub-menu {
    list-style: none;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background: #fff;
    border-top: 1px solid #e9ecef;
}

.sub-menu-toggle:checked ~ .sub-sub-menu {
    max-height: 800px;
}

.sub-sub-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px 9px 44px;
    color: black;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
}

.sub-sub-menu li a:hover {
    background: #c0c0c0;
    padding-left: 48px;
}

.sub-sub-menu li a:hover::before {
    background: #eef0f3;
}

.menu-link > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: black;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
}

.menu-link > a:hover {
    background: #c0c0c0;
}

.menu-link > a i {
    color: #fff0f0;
    font-size: 15px;
    transition: color 0.5s ease;
    width: 18px;
    text-align: center;
}

.menu-label > .menu-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* PRODUCT-CARD */

main {
    width: 100%;
}

.product-card {
    background: #fff;
    padding: 16px;
    width: 100%;
    max-width: 300px;
    text-align: center;
    transition: opacity 0.3s ease;
    height: 320px;
}

.product-card:hover {
    opacity: 0.8;
}

.product-card img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
}

.product-card h3 {
    font-size: 14px;
    margin: 12px 0 8px;
}

.product-card p {
    font-size: 14px;
    color: #888;
}

/* Hiện bằng JS */
.product-section.active {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Mặc định hiện keyboard khi chưa click */
.product-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}