/* Enhanced Filter Controls - FORCED SINGLE LINE */
.filter-controls {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1.8rem; /* Reduced gap from 2.5rem to fit better */
    flex-wrap: nowrap !important; /* FIXED: Never wrap on desktop */
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow-x: auto; /* Allow horizontal scroll if needed on very small screens */
}

.filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px; /* Reduced from 200px to fit better */
    flex: 0 0 auto; /* Don't grow or shrink */
    position: relative;
}

.filter-group label {
    font-weight: 600;
    color: #722F37;
    font-size: 0.9rem; /* Slightly smaller to fit better */
    margin-bottom: 0.75rem;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.4rem; /* Reduced gap */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap; /* Prevent label wrapping */
}

.filter-group label i {
    color: #D4AF37;
    font-size: 1rem; /* Slightly smaller icon */
}

.filter-group select {
    width: 100%;
    min-width: 180px; /* Ensure minimum width */
    padding: 0.9rem 1rem; /* Reduced horizontal padding */
    border: 2px solid transparent;
    border-radius: 12px;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #D4AF37, #B83C3C) border-box;
    color: #722F37;
    font-size: 0.95rem; /* Slightly smaller font */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    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='%23722F37' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.7rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.filter-group select:focus {
    outline: none;
    border-color: #B83C3C;
    box-shadow: 0 0 0 3px rgba(184, 60, 60, 0.2);
    transform: translateY(-2px);
}

.filter-group select:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* RESPONSIVE: Only allow wrapping on mobile */
@media (max-width: 768px) {
    .filter-controls {
        flex-wrap: wrap !important; /* Allow wrapping on mobile */
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 1.5rem 1rem;
        border-radius: 15px;
        overflow-x: visible;
    }
    
    .filter-group {
        width: 100%;
        max-width: 280px;
        min-width: auto;
    }
    
    .filter-group select {
        font-size: 0.95rem;
        padding: 0.8rem 1rem;
        padding-right: 2.5rem;
        min-width: auto;
    }
}

/* Medium screens - keep single line but smaller */
@media (min-width: 769px) and (max-width: 1024px) {
    .filter-controls {
        gap: 1.5rem; /* Even smaller gap for medium screens */
        max-width: 900px;
    }
    
    .filter-group {
        min-width: 160px; /* Smaller on medium screens */
    }
    
    .filter-group select {
        min-width: 160px;
        font-size: 0.9rem;
        padding: 0.8rem 0.9rem;
        padding-right: 2.3rem;
    }
    
    .filter-group label {
        font-size: 0.85rem;
    }
}

/* Large screens - full size */
@media (min-width: 1025px) {
    .filter-controls {
        flex-wrap: nowrap !important; /* Absolutely no wrapping on large screens */
        gap: 2rem;
    }
}

/* Option styling */
.filter-group select option {
    padding: 0.5rem;
    background: white;
    color: #722F37;
}

.filter-group select option:first-child {
    font-style: italic;
    color: #666;
}

/* Animation for filter results */
.filter-controls.filtering {
    transform: scale(0.98);
    opacity: 0.8;
}

/* Loading state for filters */
.filter-controls.loading {
    pointer-events: none;
    opacity: 0.7;
}

.filter-controls.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #D4AF37;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}