/* MYE Smart Filters */

.product-filter-block,
.product-sort-block,
.clear-filters-block {
    width: 100%;
    margin-bottom: 0;
}

.filter-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-option {
    border-bottom: 1px solid #f0f0f0;
}

.filter-option:last-child {
    border-bottom: 0;
}

.filter-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    color: #333;
    text-decoration: none;
    transition: all .2s ease;
}

.filter-link:hover,
.filter-option.active .filter-link {
    color: var(--mye-filter-active-color, #1976d2);
}

.filter-link:hover {
    padding-left: 8px;
}

.filter-option.active .filter-link {
    font-weight: 600;
}

.filter-checkbox {
    font-size: 18px;
    color: #666;
    flex-shrink: 0;
}

.filter-label {
    flex: 1;
    min-width: 0;
}

.filter-count {
    flex-shrink: 0;
    color: #999;
    font-size: 14px;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}

.filter-option.active .filter-count {
    background: var(--mye-filter-active-color, #1976d2);
    color: #fff;
}

.filter-show-more-container {
    padding: 12px 0;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.filter-show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s ease;
}

.filter-show-more-btn:hover {
    background: #f5f5f5;
    border-color: var(--mye-filter-active-color, #1976d2);
    color: var(--mye-filter-active-color, #1976d2);
}

.clear-filters-block {
    margin-top: 20px;
    text-align: center;
}

.clear-filters-btn,
.active-filter-clear-all {
    display: inline-flex;
    align-items: center;
    background: #000;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all .2s ease;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.clear-filters-btn:hover,
.active-filter-clear-all:hover {
    background: #e91e63;
    color: #fff !important;
    transform: translateY(-1px);
}

.active-filter-badge {
    background: #fff;
    color: #e91e63;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 8px;
}

.active-filters-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 20px;
}

.active-filters-title {
    font-weight: 700;
    font-size: 13px;
    color: #000;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.active-filters-vertical .active-filters-list {
    flex-direction: column;
    align-items: flex-start;
}

.active-filter-item {
    display: inline-flex;
    align-items: center;
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
    gap: 10px;
    transition: all .2s ease;
    max-width: 100%;
    min-height: 32px;
    box-sizing: border-box;
}

.active-filter-item:hover {
    background: #ebebeb;
    border-color: #000;
}

.active-filter-label {
    color: #333;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    line-height: 1.4;
}

.active-filter-label strong {
    color: #000;
    font-weight: 700;
    margin-right: 4px;
}

.active-filter-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #000;
    color: #fff !important;
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    transition: all .2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.active-filter-remove:hover {
    background: #e91e63;
    transform: scale(1.1);
    color: #fff !important;
}

.active-filter-orderby {
    border-color: #9c27b0;
    background: #f3e5f5;
}

.active-filter-orderby .active-filter-remove {
    background: #9c27b0;
}

.active-filter-item.removing {
    animation: myeFilterFadeOut .2s ease forwards;
}

@keyframes myeFilterFadeOut {
    to {
        opacity: 0;
        transform: scale(.85);
    }
}

.filters-loading {
    opacity: .6;
    pointer-events: none;
    position: relative;
}

.filters-loading::after {
    content: 'Actualizando filtros...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,.95);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    z-index: 3;
}

.mye-filter-debug {
    background: #1976d2;
    color: #fff;
    padding: 8px;
    margin-bottom: 10px;
    font-size: 12px;
}

@media (max-width: 768px) {
    .filter-link {
        padding: 10px 0;
        font-size: 14px;
    }

    .filter-count {
        font-size: 12px;
        padding: 2px 6px;
    }

    .active-filters-container {
        padding: 12px;
    }

    .active-filter-item {
        font-size: 12px;
        padding: 6px 10px;
    }

    .active-filter-remove {
        width: 18px;
        height: 18px;
        font-size: 16px;
    }
}
