/**
 * Product Filter Styles - Flatsome Compatible (Compact - Checkbox Style)
 */

/* Filter Wrapper */
.wvft-filter-wrapper {
    display: block !important;
    margin: 0 0 20px 0;
    padding: 0;
    background: transparent;
    clear: both;
    width: 100%;
}

.wvft-filter-wrapper .filter-title {
    display: none;
}

/* Filter Container */
.filter-container {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    padding: 0;
    background: transparent;
    border: none;
}

/* Filter Button */
.filter-block {
    flex-shrink: 0;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ff9800;
    color: #fff;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s;
    border: none;
}

.filter-btn:hover {
    background: #f57c00;
    color: #fff;
}

.filter-btn i {
    font-size: 14px;
}

/* Brand Block */
.brand-block {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-block::before {
    display: none;
}

.brand-row {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.brand-item {
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.brand-item img {
    width: auto;
    height: 37px;
    max-width: 120px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 5px;
    background: #fff;
    transition: all 0.3s;
}

.brand-item:hover img {
    border-color: #ff9800;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.brand-item.active img {
    border-color: #ff9800;
    box-shadow: 0 0 0 2px #ff9800;
}

.brand-item.active::after {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #ff9800;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Sort Block */
.sort-block {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.sort-title {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    white-space: nowrap;
}

.sort-options {
    display: flex;
    gap: 15px;
    flex-wrap: nowrap;
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.sort-option input[type="checkbox"] {
    margin: 0 !important;
    width: 16px !important;
    height: 16px !important;
    cursor: pointer !important;
    opacity: 1 !important;
    position: relative !important;
    display: inline-block !important;
    visibility: visible !important;
    appearance: checkbox !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
}

.sort-option span {
    font-size: 13px;
    color: #333;
    cursor: pointer;
}

.sort-option:hover span {
    color: #ff9800;
}

.sort-option.active span {
    color: #ff9800;
    font-weight: 600;
}

/* Lightbox */
#filter-lightbox {
    max-width: 600px;
    margin: 20px auto;
    background: #fff;
    padding: 30px;
    border-radius: 0;
}

.lightbox-content .filter-title {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cat-parent {
    margin-bottom: 20px;
}

.cat-item {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-item li {
    margin: 0;
}

.filter-application {
    padding: 8px 16px;
    background: #f8f8f8;
    border: 2px solid #e8e8e8;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-application:hover {
    background: #fff;
    border-color: #ff9800;
}

.filter-application.active {
    background: #ff9800;
    color: #fff;
    border-color: #ff9800;
}

.lightbox-content .button {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
}

.lightbox-content .button.primary {
    background: #ff9800;
    color: #fff;
}

.lightbox-content .button:not(.primary) {
    background: #f8f8f8;
    color: #333;
}

/* Responsive */
@media (max-width: 992px) {
    .filter-container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .sort-block {
        flex-basis: 100%;
        margin-left: 0;
        margin-top: 10px;
    }

    .sort-options {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-block,
    .brand-block,
    .sort-block {
        width: 100%;
    }

    .brand-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .sort-block {
        flex-direction: column;
        align-items: flex-start;
    }

    .sort-options {
        flex-direction: column;
        width: 100%;
    }

    #filter-lightbox {
        max-width: 90%;
        padding: 20px;
    }
}

/* Magnific Popup Overrides */
.mfp-fade.mfp-bg {
    opacity: 0;
    transition: all 0.3s ease-out;
}

.mfp-fade.mfp-bg.mfp-ready {
    opacity: 0.8;
}

.mfp-fade.mfp-wrap .mfp-content {
    opacity: 0;
    transition: all 0.3s ease-out;
}

.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
    opacity: 1;
}

/* Close button styling */
.mfp-close {
    color: #222 !important;
    opacity: 1 !important;
}