/* Shop By Sidebar - Woodmart child component */

.shop-by-sidebar {
    position: fixed;
    top: 0;
    left: -360px;
    width: 360px;
    height: 100vh;
    background: rgba(235, 235, 235, 0.5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-right: 1px solid rgba(0,0,0,0.08);
    z-index: 10001;
    padding: 28px 24px 24px;
    overflow-y: auto;
    transition: left 0.35s ease;
}

.shop-by-sidebar.active {
    left: 0;
}

.shop-by-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    color: #111 !important;
    opacity: 0.7 !important;
}

.shop-by-close:hover,
.shop-by-close:focus,
.shop-by-close:active {
    opacity: 0.7 !important;
    color: #111 !important;
    background: none !important;
}

.shop-by-title {
    margin: 6px 0 22px 4px;
    font-family: 'Balenciaga', sans-serif !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    letter-spacing: 0.4px;
    line-height: 1.4;
    text-transform: uppercase;
    color: #111;
}

.shop-by-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10000;
}

.shop-by-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.shop-by-sidebar::-webkit-scrollbar {
    width: 6px;
}

.shop-by-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
}

.shop-by-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-left: 6px;
}

.shop-by-item > a {
    display: block;
    font-family: 'Balenciaga', sans-serif !important;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.2px;
    line-height: 1.4;
    color: #313a3a !important;
    text-decoration: none;
    transition: opacity 0.2s ease;
    text-transform: uppercase !important;
}

.shop-by-item > a:hover {
    opacity: 0.65;
}

.shop-by-dropdown-title {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: 'Balenciaga', sans-serif !important;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.2px;
    line-height: 1.4;
    color: #313a3a !important;
    transition: opacity 0.2s ease;
    text-transform: uppercase !important;
}

.shop-by-dropdown-title:hover {
    opacity: 0.65;
}

.shop-by-dropdown-title span {
    text-transform: uppercase !important;
}

.shop-by-arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.shop-by-dropdown.open .shop-by-arrow {
    transform: rotate(-135deg);
}

.shop-by-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    padding-left: 12px;
}

/* A collapsed panel must also leave the keyboard and accessibility trees. */
.shop-by-dropdown-content[hidden] {
    display: none !important;
}

.shop-by-dropdown.open .shop-by-dropdown-content {
    max-height: 500px;
    overflow-y: auto;
    opacity: 1;
    padding-top: 8px;
}

.shop-by-dropdown-content::-webkit-scrollbar {
    width: 4px;
}

.shop-by-dropdown-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 2px;
}

.shop-by-dropdown-content a,
.shop-by-dropdown-content a *,
.shop-by-sidebar .shop-by-dropdown-content a {
    display: block;
    padding: 10px 0;
    font-family: 'Balenciaga', sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    letter-spacing: 0.2px !important;
    line-height: 1.4 !important;
    color: #313a3a !important;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.shop-by-dropdown-content a:hover {
    opacity: 0.65;
}

.shop-by-sidebar .shop-by-dropdown-content,
.shop-by-sidebar .shop-by-dropdown-content * {
    font-size: 18px !important;
    font-weight: 400 !important;
}

.shop-by-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
}

.shop-by-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.shop-by-swatch:hover {
    transform: scale(1.1);
}

@media (max-width: 480px) {
    .shop-by-sidebar {
        width: 85vw;
        left: -85vw;
    }

    .shop-by-sidebar.active {
        left: 0;
    }
}
