/* Filtro Expansivo - Componente Padrão do Site */
.expandable-filter {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.filter-toggle-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.filter-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.filter-toggle-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.filter-toggle-btn.expanded i {
    transform: rotate(180deg);
}

.filter-panel {
    position: absolute;
    top: 70px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.filter-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.filter-panel-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: between;
    align-items: center;
}

.filter-panel-title {
    font-weight: 700;
    font-size: 18px;
    color: #2d3748;
    margin: 0;
}

.filter-clear-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-clear-btn:hover {
    background: #f3f4f6;
    color: #ef4444;
}

.filter-panel-body {
    padding: 20px 25px;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group-title {
    font-weight: 600;
    font-size: 16px;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group-title i {
    color: #6b7280;
    font-size: 14px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.filter-option:hover {
    background: #f3f4f6;
}

.filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #4f46e5;
    cursor: pointer;
}

.filter-option-label {
    flex: 1;
    color: #4b5563;
    cursor: pointer;
}

.filter-option-count {
    color: #9ca3af;
    font-size: 12px;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Price Range */
.price-range-container {
    padding: 15px 0;
}

.price-inputs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.price-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.price-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.price-range-slider {
    margin: 15px 0;
}

.price-range-slider input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

.price-range-slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.price-range-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    border: none;
}

/* Cores */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: #9ca3af;
}

.color-option.selected {
    border-color: #4f46e5;
    border-width: 3px;
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Sizes */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.size-option {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

.size-option:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.size-option.selected {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

/* Apply Filters Button */
.filter-apply-btn {
    width: 100%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 20px;
}

.filter-apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Active Filters Display */
.active-filters {
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.active-filters-title {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.active-filter-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.active-filter-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.active-filter-remove:hover {
    color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .expandable-filter {
        top: 15px;
        right: 15px;
    }
    
    .filter-panel {
        width: 300px;
        right: -10px;
    }
    
    .filter-toggle-btn {
        padding: 12px 16px;
        font-size: 13px;
        min-width: 110px;
    }
}

@media (max-width: 480px) {
    .filter-panel {
        width: calc(100vw - 40px);
        right: -10px;
        left: 10px;
    }
    
    .filter-toggle-btn {
        padding: 10px 14px;
        font-size: 12px;
        min-width: 100px;
    }
}

/* Animation for filter count badge */
.filter-count-badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Scrollbar customization for filter panel */
.filter-panel::-webkit-scrollbar {
    width: 4px;
}

.filter-panel::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

.filter-panel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.filter-panel::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
