/* ==========================================================================
   Filter Panel
   ========================================================================== */

.vane-filter-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s 0.3s;
    /* delay visibility change until after slide animation */
}

.vane-filter-panel--open {
    pointer-events: auto;
    visibility: visible;
    transition: visibility 0s 0s;
    /* no delay when opening */
}

/* Overlay */
.vane-filter-panel__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

.vane-filter-panel--open .vane-filter-panel__overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Panel Content - slides from RIGHT */
.vane-filter-panel__content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: var(--vane-white) !important;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.vane-filter-panel--open .vane-filter-panel__content {
    transform: translateX(0);
}

/* Header */
.vane-filter-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.vane-filter-panel__title {
    font-family: var(--vane-font-primary);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    margin: 0;
    color: var(--vane-black);
}

.vane-filter-panel__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.vane-filter-panel__close svg {
    width: 24px;
    height: 24px;
    stroke: var(--vane-black);
}

/* Body - scrollable */
.vane-filter-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* Filter Section */
.vane-filter-section {
    margin-bottom: 40px;
}

.vane-filter-section:last-child {
    margin-bottom: 0;
}

.vane-filter-section__title {
    font-family: var(--vane-font-primary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--vane-black);
    margin: 0 0 20px;
}

/* Color Buttons */
.vane-filter-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vane-filter-color {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    font-family: var(--vane-font-primary);
    font-size: 13px;
    font-weight: 500;
    color: var(--vane-black);
    background-color: transparent;
    border: 1.5px solid var(--vane-black);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vane-filter-color[hidden],
.vane-filter-size[hidden] {
    display: none !important;
}

.vane-filter-color:hover,
.vane-filter-color:focus,
.vane-filter-color:active {
    background-color: rgba(0, 0, 0, 0.08) !important;
    color: var(--vane-black) !important;
}

.vane-filter-color--selected,
.vane-filter-color--selected:hover,
.vane-filter-color--selected:focus,
.vane-filter-color--selected:active {
    background-color: var(--vane-black) !important;
    color: var(--vane-white) !important;
}

/* Category Buttons */
.vane-filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vane-filter-category {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    font-family: var(--vane-font-primary);
    font-size: 13px;
    font-weight: 500;
    color: var(--vane-black);
    background-color: transparent;
    border: 1.5px solid var(--vane-black);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vane-filter-category:hover {
    background-color: rgba(0, 0, 0, 0.08) !important;
    color: var(--vane-black) !important;
}

.vane-filter-category:focus,
.vane-filter-category:active {
    background-color: transparent !important;
    color: var(--vane-black) !important;
}

/* Selected state */
.vane-filter-category--selected,
.vane-filter-category--selected:hover,
.vane-filter-category--selected:focus,
.vane-filter-category--selected:active {
    background-color: var(--vane-black) !important;
    color: var(--vane-white) !important;
}

/* Size Buttons */
.vane-filter-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vane-filter-size {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    font-family: var(--vane-font-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--vane-black);
    background-color: transparent;
    border: 1.5px solid var(--vane-black);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vane-filter-size:hover {
    background-color: rgba(0, 0, 0, 0.08) !important;
    color: var(--vane-black) !important;
}

.vane-filter-size:focus,
.vane-filter-size:active {
    background-color: transparent !important;
    color: var(--vane-black) !important;
}

/* Selected state - inverted (needs !important to override global focus reset) */
.vane-filter-size--selected,
.vane-filter-size--selected:hover,
.vane-filter-size--selected:focus,
.vane-filter-size--selected:active {
    background-color: var(--vane-black) !important;
    color: var(--vane-white) !important;
}

/* Footer with buttons */
.vane-filter-panel__footer {
    display: flex;
    gap: 15px;
    padding: 20px 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.vane-filter-panel__clear {
    flex: 1;
    padding: 14px 20px;
    font-family: var(--vane-font-primary);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--vane-black);
    background-color: transparent;
    border: 1px solid var(--vane-black);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vane-filter-panel__clear:hover {
    background-color: rgba(0, 0, 0, 0.08) !important;
    color: var(--vane-black) !important;
}

.vane-filter-panel__clear:focus,
.vane-filter-panel__clear:active {
    background-color: transparent !important;
    color: var(--vane-black) !important;
}

.vane-filter-panel__apply {
    flex: 2;
    padding: 14px 20px;
    font-family: var(--vane-font-primary);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--vane-white);
    background-color: var(--vane-black);
    border: 1px solid var(--vane-black);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vane-filter-panel__apply:hover,
.vane-filter-panel__apply:focus,
.vane-filter-panel__apply:active {
    background-color: var(--vane-black) !important;
    color: var(--vane-white) !important;
    opacity: 0.85;
}

/* Body scroll lock */
body.vane-filter-open {
    overflow: hidden;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .vane-filter-panel__content {
        max-width: 100%;
    }

    .vane-filter-panel__header {
        padding: 20px;
    }

    .vane-filter-panel__body {
        padding: 25px 20px;
    }

    .vane-filter-panel__footer {
        padding: 15px 20px;
    }
}
