/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Hide Leaflet Routing Machine sidebar */
.leaflet-routing-container {
    display: none !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

header h1 a {
    color: white;
    text-decoration: none;
}

header .subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

header.compact {
    padding: 1rem 0;
}

header.compact .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header.compact h1 {
    font-size: 1.5rem;
    margin: 0;
}

/* Navigation Menu */
.main-nav {
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-nav .container {
    display: flex;
    gap: 0;
    padding: 0;
}

.main-nav .nav-link {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
}

.main-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.main-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    border-bottom-color: white;
    font-weight: 600;
}

@media (max-width: 768px) {
    .main-nav .container {
        flex-wrap: wrap;
    }
    
    .main-nav .nav-link {
        flex: 1 1 50%;
        justify-content: center;
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* Main Content */
main {
    padding: 2rem 0;
}

/* Search Section */
.search-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.search-section h2 {
    margin-bottom: 1.5rem;
    color: #667eea;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Features Section */
.info-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-section h2 {
    margin-bottom: 1.5rem;
    color: #667eea;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature {
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.feature p {
    color: #666;
}

/* =============================================
   MAP PAGE - RESPONSIVE LAYOUT
   IMPLEMENTED JANUARY 2026
   ============================================= 
   
   ARCHITECTURAL DECISIONS:
   
   1. FLEXBOX DYNAMIC LAYOUT
      - Desktop (>=1024px): flex-direction: row
        → Map + Sidebar side-by-side (75% + 25%)
      - Mobile (<=1023px): sidebar becomes fixed bottom sheet
        → Map 100%, Sidebar hidden until needed
   
   2. WHY TRANSFORM INSTEAD OF DISPLAY?
      - transform: translateY() uses GPU acceleration
      - Better performance + smooth animations
      - No DOM reflow/repaint
      - Enables 60fps animations
   
   3. SINGLE HTML STRUCTURE
      - No duplication (✅ mobile-first approach)
      - CSS handles all layout changes
      - JS handles state (open/close)
      - Same HTML works at any size
   
   4. BREAKPOINTS
      - 1024px: Desktop → Sidebar always visible
      - 768px: Mobile → Bottom sheet behavior
      - Smooth transitions in between (Tablet)
   
   5. ANIMATION STRATEGY
      - 300ms cubic-bezier for natural movement
      - Bottom sheet slides from bottom
      - Border-radius 16px for iOS-like feel
      - Shadow elevation for depth
   
   6. ACCESSIBILITY
      - aria-label on FAB, close button
      - Semantic HTML (aside for sidebar)
      - Keyboard navigable (tab order preserved)
      - No display: none (uses visibility: hidden)
   
   ============================================= */

/* =============================================
   MAP PAGE - RESPONSIVE LAYOUT
   ============================================= */

body.map-page {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    position: relative;
    z-index: 50 !important;
}

/* Main map container using Flexbox */
.map-container {
    display: flex;
    flex-direction: row; /* Desktop: row layout */
    flex: 1; /* Toma el espacio restante después del header */
    gap: 0;
    position: relative;
    overflow: hidden;
}

/* Map content - takes remaining space on desktop, full width on mobile */
.map-content {
    flex: 1;
    height: 100%;
    width: 100%;
    position: relative;
    z-index: 1;
}

#map {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* =============================================
   SIDEBAR - DEFAULT (DESKTOP >=1024px)
   ============================================= */
.sidebar {
    width: 380px;
    background: white;
    overflow-y: auto;
    border-left: 1px solid #ddd;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: none;
}

.sidebar-header {
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 2px solid #667eea;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
}

.sidebar-header p {
    margin: 0.2rem 0 0 0;
    color: white;
}

.sidebar-close-btn {
    display: none; /* Hidden on desktop */
}

/* Close button for mobile */
.sidebar-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.5rem;
    transition: opacity 0.2s;
}

.sidebar-close-btn:hover {
    opacity: 0.8;
}

.stations-list {
    padding: 0;
}

.station-item {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.2s, border-left 0.2s;
    border-left: 4px solid transparent;
}

.station-item:hover {
    background: #f0f4ff;
    border-left-color: #667eea;
}

.station-item.active {
    background: #e8edfb;
    border-left-color: #667eea;
}

.sidebar-header h2 {
    margin-bottom: 0.5rem;
    color: #667eea;
}

.legend {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.marker.cheap {
    background: #10b981;
}

.marker.average {
    background: #f59e0b;
}

.marker.expensive {
    background: #ef4444;
}

.fuel-selector select {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    background: rgba(255,255,255,0.9);
    font-size: 1rem;
    cursor: pointer;
}

/* Station List */
.station-list {
    padding: 0;
}

.station-item {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.2s;
}

.station-item:hover {
    background: #f9f9f9;
}

.station-item.active {
    background: #e8edfb;
    border-left-color: #667eea;
}

.station-brand {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
}

.station-price {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.station-price.cheap {
    color: #10b981;
}

.station-price.average {
    color: #f59e0b;
}

.station-price.expensive {
    color: #ef4444;
}

.station-address {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.2rem;
}

.station-locality {
    font-size: 0.85rem;
    color: #999;
}

/* =============================================
   FLOATING ACTION BUTTON (FAB) - MOBILE ONLY
   ============================================= */
.fab-open-sidebar {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 105;
}

.fab-open-sidebar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.fab-open-sidebar:active {
    transform: scale(0.95);
}

/* =============================================
   RESPONSIVE MEDIA QUERIES
   ============================================= */

/* Tablet & Small Devices (768px - 1023px) */
@media (max-width: 1023px) {
    .map-container {
        flex-direction: column;
    }
    
    .map-content {
        flex: 1;
        min-height: 0;
    }
    
    .sidebar {
        width: 100%;
        height: 45vh;
        border-left: none;
        border-top: 1px solid #ddd;
        position: fixed;
        top: 88px;
        left: 0;
        right: 0;
        transform: translateY(calc(100vh - 88px));
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 9999 !important;
    }
    
    /* Sidebar open state */
    .sidebar.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .sidebar-close-btn {
        display: block;
    }
    
    .fab-open-sidebar {
        display: block;
    }
}

/* Mobile Devices (max-width 768px) */
@media (max-width: 768px) {
    .map-container {
        height: calc(100vh - 100px);
    }
    
    .map-content {
        width: 100%;
        height: 100%;
    }
    
    #map {
        width: 100%;
        height: 100%;
    }
    
    .sidebar {
        width: 100%;
        height: 50vh;
        max-height: calc(100vh - 88px);
        border-left: none;
        border-top: 2px solid #ddd;
        position: fixed;
        top: 88px;
        left: 0;
        right: 0;
        transform: translateY(calc(100vh - 88px));
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease;
        z-index: 9999 !important;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    }
    
    /* Sidebar open state - bottom sheet behavior */
    .sidebar.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .sidebar-header {
        border-radius: 16px 16px 0 0;
        position: relative;
    }
    
    .sidebar-close-btn {
        display: block;
    }
    
    .fab-open-sidebar {
        display: block;
        bottom: 1.5rem;
        right: 1.5rem;
        width: 56px;
        height: 56px;
    }
    
    .station-item {
        padding: 0.75rem;
    }
    
    .station-brand {
        font-size: 0.95rem;
    }
    
    .station-price {
        font-size: 1.25rem;
    }
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #999;
}

/* Legal Page */
.legal-page {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 900px;
}

.legal-page h1 {
    color: #667eea;
    margin-bottom: 2rem;
}

.legal-page h2 {
    color: #764ba2;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-page section {
    margin-bottom: 2rem;
}

.legal-page ul {
    margin-left: 2rem;
    margin-top: 1rem;
}

.legal-page li {
    margin-bottom: 0.5rem;
}

.legal-page a {
    color: #667eea;
    text-decoration: none;
}

.legal-page a:hover {
    text-decoration: underline;
}

.back-link {
    margin-top: 2rem;
    text-align: center;
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

footer a {
    color: #667eea;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .map-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 40vh;
        border-left: none;
        border-top: 1px solid #ddd;
    }
    
    #map {
        height: 60vh;
    }
    
    header.compact .container {
        flex-direction: column;
        text-align: center;
    }
    
    header.compact .fuel-selector {
        margin-top: 1rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    z-index: 200 !important;
}

.leaflet-popup-content {
    margin: 1rem;
    min-width: 200px;
}

.popup-brand {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.popup-price {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.popup-address {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.popup-locality {
    font-size: 0.85rem;
    color: #999;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
}

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

.modal-close {
    color: #999;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.modal-close:hover,
.modal-close:focus {
    color: #333;
}

#modalHeader {
    margin-bottom: 1rem;
}

#modalHeader h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

#modalHeader p {
    color: #666;
    font-size: 0.95rem;
}

#modalStats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #667eea;
}

#priceChart {
    max-height: 300px;
}

/* Station Detail Page */
.station-detail-page {
    padding: 2rem 0;
    max-width: 1200px;
}

.back-nav {
    margin-bottom: 1.5rem;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #4b5563;
}

.station-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.station-card h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.station-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.detail-item {
    padding: 0.8rem;
    background: #f9f9f9;
    border-radius: 6px;
}

.detail-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.detail-value {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.chart-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-controls {
    margin-bottom: 2rem;
}

.chart-controls h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
}

.fuel-type-selector {
    margin-bottom: 1rem;
}

.fuel-type-selector label {
    display: inline-block;
    margin-right: 0.5rem;
    font-weight: 600;
    color: #555;
}

.fuel-type-selector select {
    padding: 0.6rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s;
}

.fuel-type-selector select:focus {
    outline: none;
    border-color: #667eea;
}

.time-range-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.time-range-selector label {
    font-weight: 600;
    color: #555;
    margin-right: 0.5rem;
}

.range-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid #e0e0e0;
    background: white;
    color: #555;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.range-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.range-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.chart-container {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.price-table {
    max-height: 300px;
    overflow-y: auto;
}

.price-table table {
    width: 100%;
    border-collapse: collapse;
}

.price-table th {
    background: #f9f9f9;
    padding: 0.8rem;
    text-align: left;
    font-weight: 600;
    color: #555;
    position: sticky;
    top: 0;
}

.price-table td {
    padding: 0.8rem;
    border-bottom: 1px solid #e0e0e0;
}

.price-table tr:hover {
    background: #f9f9f9;
}

.price-up {
    color: #ef4444;
}

.price-down {
    color: #10b981;
}

.price-stable {
    color: #6b7280;
}
/* Google Maps Button */
.btn-maps {
    display: inline-block;
    margin-left: 1rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
}

.btn-maps:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    .btn-maps {
        display: block;
        margin-left: 0;
        margin-top: 0.5rem;
        text-align: center;
    }
}
/* Brands Comparison Page */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.brand-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    border-left: 4px solid #667eea;
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.brand-card.cheap {
    border-left-color: #10b981;
}

.brand-card.average {
    border-left-color: #f59e0b;
}

.brand-card.expensive {
    border-left-color: #ef4444;
}

.brand-rank {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #667eea;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.brand-header {
    margin-bottom: 1rem;
}

.brand-name {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.brand-category {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-price-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.brand-avg-price {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.brand-diff {
    font-size: 0.9rem;
    font-weight: 600;
}

.brand-diff.cheaper {
    color: #10b981;
}

.brand-diff.expensive {
    color: #ef4444;
}

.brand-rating {
    font-size: 1.5rem;
    color: #f59e0b;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.brand-stats {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.brand-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.brand-stat:last-child {
    border-bottom: none;
}

.brand-stat .stat-label {
    color: #666;
    font-size: 0.9rem;
}

.brand-stat .stat-value {
    font-weight: 600;
    color: #333;
}

.btn-view-stations {
    width: 100%;
    margin-top: 0.5rem;
}

/* Advanced Filters */
.filters-section {
    border-bottom: 2px solid #667eea;
    background: white;
}

.filters-toggle {
    width: 100%;
    padding: 0.75rem;
    background: #f9f9f9;
    border: none;
    cursor: pointer;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.filters-toggle:hover {
    background: #f0f0f0;
}

#filterToggleIcon {
    color: #667eea;
    font-size: 0.8rem;
}

.filters-content {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #667eea;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-range input {
    flex: 1;
}

.price-range span {
    color: #999;
    font-weight: bold;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.filter-stats {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.filter-stats strong {
    color: #667eea;
}

/* Price Slider Styles */
.price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

#priceSlider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #4CAF50 0%, #FFC107 50%, #f44336 100%);
    outline: none;
    opacity: 0.9;
    -webkit-transition: .2s;
    transition: opacity .2s;
    cursor: pointer;
}

#priceSlider:hover {
    opacity: 1;
}

#priceSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#priceSlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#priceHistogram {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 0.5rem;
    background: white;
}
