/* static/css/product_filters.css */

/* Estilos para la sección de filtros */
.product-filters-section {
    transition: all 0.3s ease;
}

/* Animaciones para filtros móviles */
#mobileFilters {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para checkboxes personalizados */
.filter-checkbox {
    position: relative;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-checkbox:checked {
    background-color: hsl(142.1, 76.2%, 36.3%);
    border-color: hsl(142.1, 76.2%, 36.3%);
}

.filter-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Estilos para selects personalizados */
.sort-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
    cursor: pointer;
}

/* Inputs de precio */
.price-input {
    transition: all 0.2s;
}

.price-input:focus {
    outline: none;
    border-color: hsl(142.1, 76.2%, 36.3%);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.1);
}

/* Badges adicionales en productos */
.image-badge.category-badge {
    background-color: hsl(142.1, 76.2%, 36.3%) !important;
    color: white;
    font-weight: 600;
}

.image-badge.stock-badge-image {
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-label {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .sort-select {
        width: 100%;
        max-width: 100%;
    }
    
    .price-input {
        width: 100%;
    }
}

/* Dark mode support (opcional) */
@media (prefers-color-scheme: dark) {
    .product-filters-section {
        background-color: #1f2937;
        border-color: #374151;
    }
    
    .filter-label {
        background-color: #d1d5db;
        border-color: #4b5563;
        color: #374151;
    }
    
    .filter-label:hover {
        background-color: #d1d5db;
        border-color: #6b7280;
    }
    
    .sort-select,
    .price-input {
        background-color: #d1d5db;
        border-color: #4b5563;
        color: #374151;
    }
    
    .sort-select:focus,
    .price-input:focus {
        border-color: hsl(142.1, 76.2%, 36.3%);
        box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
    }
}