@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

/* CSS Variables */
:root {
    /* John Deere Colors */
    --jd-green: #367C2B;
    --jd-yellow: #FFDE00;
    --jd-dark-green: #1E3A1A;
    --jd-light-green: #4A9D3E;

    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

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


/* Global Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.back-button-header {
    position: absolute;
    left: 2rem;
    top: 2rem;
    /* Align with top padding */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid var(--jd-green);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--jd-green);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.back-button-header:hover {
    background: var(--jd-green);
    color: var(--white);
}

.back-button-header svg {
    width: 20px;
    height: 20px;
}


.back-button-header.hidden {
    display: none;
}

.home-button-header {
    position: absolute;
    left: 9rem;
    /* Positioned to the right of the back button (approx 144px) */
    top: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid var(--jd-green);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--jd-green);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.home-button-header:hover {
    background: var(--jd-green);
    color: var(--white);
}

.home-button-header svg {
    width: 20px;
    height: 20px;
}

.home-button-header.hidden {
    display: none;
}


/* Header */
.header {
    background: var(--white);
    padding: 1rem 3rem;
    /* Reduced top/bottom padding to keep it tighter */
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    /* Stack logo and search */
    align-items: center;
    justify-content: center;
    border-bottom: 3px solid var(--jd-green);
    gap: 1rem;
    /* Space between logo and search */
}


.header-logo {
    height: 70px;
    /* Reduced from 120px */
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.header-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header-subtitle {
    font-size: 1rem;
    color: var(--white);
    opacity: 0.95;
    margin: 0.25rem 0 0 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Main Container */
.main-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 100px);
}

/* Screen Management */
.screen {
    display: none;
    animation: fadeIn var(--transition-base);
}

.screen.active {
    display: block;
}

/* Screen Title */
.screen-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2rem;
    text-align: center;
}

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.back-button:hover {
    background: var(--gray-50);
    border-color: var(--jd-green);
    color: var(--jd-green);
    transform: translateX(-4px);
}

.back-button svg {
    width: 20px;
    height: 20px;
}

/* Condition Cards */
.condition-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.condition-card {
    background: var(--white);
    border: 3px solid var(--gray-200);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    min-height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.condition-card:hover {
    transform: translateY(-8px);
    border-color: var(--jd-green);
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(54, 124, 43, 0.1);
}

.condition-card:active {
    transform: translateY(-4px);
}

.condition-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all var(--transition-base);
}

.new-icon {
    background: linear-gradient(135deg, var(--jd-yellow) 0%, #FFE84D 100%);
    color: var(--jd-dark-green);
}

.used-icon {
    background: linear-gradient(135deg, var(--jd-green) 0%, var(--jd-light-green) 100%);
    color: var(--white);
}

.condition-card:hover .condition-icon {
    transform: scale(1.1) rotate(5deg);
}

.condition-icon svg {
    width: 50px;
    height: 50px;
    stroke-width: 2.5;
}

.condition-card h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

.item-count {
    font-size: 1.25rem;
    color: var(--gray-600);
    font-weight: 500;
}


/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    /* Reduced min width */
    gap: 1.5rem;
    /* Reduced gap */
    max-width: 1600px;
    margin: 0 auto;
    justify-content: center;
}

.category-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 20px;
    /* Slightly reduced radius */
    padding: 1.5rem 1rem;
    /* Compact padding */
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    min-height: 140px;
    /* Significantly reduced min-height */
    /* max-height: 20vh; Removed max-height constraint to let flux work */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    /* Reduced gap */
}



.category-card:hover {
    transform: translateY(-6px);
    border-color: var(--jd-green);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
}

.category-card h3 {
    font-size: 1.4rem;
    /* Reduced from 1.75 */
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.category-count {
    display: inline-block;
    padding: 0.4rem 1rem;
    /* Reduced padding */
    background: var(--jd-green);
    color: var(--white);
    border-radius: 20px;
    font-size: 1rem;
    /* Reduced size */
    font-weight: 700;
}

/* Subcategory List */
.subcategory-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    justify-content: center;
}

.subcategory-item {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 85px;
    max-height: 12vh;
}

.subcategory-item:hover {
    border-color: var(--jd-green);
    background: var(--gray-50);
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
}

.subcategory-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
}

.subcategory-count {
    padding: 0.5rem 1.2rem;
    background: var(--jd-yellow);
    color: var(--jd-dark-green);
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 700;
}

/* Results Container */
.results-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}


/* Filters Sidebar */
.filters-sidebar {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 130px;
    /* Header height + spacing */
    height: calc(100vh - 140px);
    /* Fill remaining height */
    overflow-y: auto;
    /* Enable internal scrolling */
    scrollbar-width: thin;
    /* Firefox */
}


.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.filters-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--jd-dark-green);
}

.clear-filters {
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.clear-filters:hover {
    background: var(--jd-green);
    color: var(--white);
}

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

.filter-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.year-range-display {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--jd-green);
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.year-slider-container {
    position: relative;
    height: 40px;
    margin-bottom: 1rem;
}


.year-slider {
    position: absolute;
    width: 100%;
    height: 8px;
    top: 16px;
    border-radius: 4px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
}

.year-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--jd-green);
    cursor: pointer;
    pointer-events: all;
    position: relative;
    z-index: 3;
    border: 3px solid var(--white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
}

.year-slider::-webkit-slider-thumb:hover {
    background: var(--jd-dark-green);
    transform: scale(1.15);
}

.year-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--jd-green);
    cursor: pointer;
    pointer-events: all;
    border: 3px solid var(--white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
}

.year-slider::-moz-range-thumb:hover {
    background: var(--jd-dark-green);
    transform: scale(1.15);
}

.year-slider-track {
    position: absolute;
    height: 8px;
    background: var(--jd-green);
    border-radius: 4px;
    top: 16px;
    pointer-events: none;
    z-index: 1;
}

.slider-rail {
    position: absolute;
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    top: 16px;
}

.price-display {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--jd-green);
}

.price-slider-container {
    position: relative;
    height: 40px;
    margin-bottom: 1rem;
}

.price-slider {
    position: absolute;
    width: 100%;
    height: 8px;
    top: 16px;
    border-radius: 4px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--jd-green);
    cursor: pointer;
    pointer-events: all;
    position: relative;
    z-index: 3;
    border: 3px solid var(--white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
}

.price-slider::-webkit-slider-thumb:hover {
    background: var(--jd-dark-green);
    transform: scale(1.15);
}

.price-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--jd-green);
    cursor: pointer;
    pointer-events: all;
    border: 3px solid var(--white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
}

.price-slider::-moz-range-thumb:hover {
    background: var(--jd-dark-green);
    transform: scale(1.15);
}

.price-slider-track {
    position: absolute;
    height: 8px;
    background: var(--jd-green);
    border-radius: 4px;
    top: 16px;
    pointer-events: none;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.price-input {
    padding: 0.5rem;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.price-input:focus {
    outline: none;
    border-color: var(--jd-green);
    box-shadow: 0 0 0 3px rgba(54, 124, 43, 0.1);
}

.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-select:focus {
    outline: none;
    border-color: var(--jd-green);
    box-shadow: 0 0 0 3px rgba(54, 124, 43, 0.1);
}

.filter-select[multiple] {
    min-height: 120px;
}

/* Checkbox Lists */
.checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 0.5rem;
    background: var(--white);
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checkbox-item:hover {
    background: var(--gray-50);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: var(--jd-green);
}

.checkbox-item label {
    flex: 1;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray-700);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-count {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 600;
}


/* Results Content */
.results-content {
    flex: 1;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--jd-dark-green);
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.results-count {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-600);
}

.sort-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sort-select:focus {
    outline: none;
    border-color: var(--jd-green);
}

/* Equipment Grid */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.equipment-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.equipment-card:hover {
    transform: translateY(-4px);
    border-color: var(--jd-green);
    box-shadow: var(--shadow-xl);
}

.equipment-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--gray-100);
}

.equipment-info {
    padding: 1.5rem;
}

.equipment-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--jd-green);
    margin-bottom: 0.75rem;
}

.equipment-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.equipment-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-900);
}

/* Detail View */
.detail-container {
    background: var(--white);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.detail-images {
    position: relative;
}

.detail-main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.detail-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
}

.detail-thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.detail-thumbnail:hover,
.detail-thumbnail.active {
    border-color: var(--jd-green);
}

.detail-info h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.detail-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--jd-green);
    margin-bottom: 2rem;
}

.detail-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.spec-item {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 12px;
}

.spec-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.spec-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.detail-description {
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 12px;
    margin-top: 2rem;
}

.detail-description h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.detail-description p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-700);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 4rem 2rem;
    font-size: 1.25rem;
    color: var(--gray-500);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }

    .subcategory-list {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    }
}

@media (max-width: 1024px) {
    .results-container {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: static;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.25rem;
    }

    .category-card {
        padding: 2.5rem 2rem;
        min-height: 180px;
    }

    .category-card h3 {
        font-size: 1.5rem;
    }

    .subcategory-list {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.25rem;
    }

    .subcategory-item {
        padding: 1.75rem 2rem;
        min-height: 75px;
    }

    .subcategory-name {
        font-size: 1.15rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem 1.5rem;
    }

    .header-logo {
        height: 45px;
    }

    .main-container {
        padding: 1.5rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-card {
        padding: 2rem 1.5rem;
        min-height: 150px;
        max-height: none;
    }

    .category-card h3 {
        font-size: 1.35rem;
    }

    .category-count {
        font-size: 1rem;
        padding: 0.5rem 1.25rem;
    }

    .subcategory-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .subcategory-item {
        padding: 1.5rem 1.75rem;
        min-height: 65px;
        max-height: none;
    }

    .subcategory-name {
        font-size: 1.1rem;
    }

    .subcategory-count {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
    }

    .equipment-grid {
        grid-template-columns: 1fr;
    }

    .screen-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.75rem 1rem;
    }

    .header-logo {
        height: 35px;
    }

    .main-container {
        padding: 1rem;
    }

    .category-card {
        padding: 1.5rem 1.25rem;
        min-height: 130px;
    }

    .category-card h3 {
        font-size: 1.2rem;
    }

    .category-count {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
    }

    .subcategory-item {
        padding: 1.25rem 1.5rem;
        min-height: 60px;
    }

    .subcategory-name {
        font-size: 1rem;
    }

    .subcategory-count {
        font-size: 0.85rem;
        padding: 0.35rem 0.85rem;
    }

    .screen-title {
        font-size: 1.5rem;
    }

    .back-button {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Screensaver Styles */
.screensaver-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    overflow: hidden;
}

.screensaver-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.screensaver-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.screensaver-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 10s ease-out;
}

.screensaver-image.active {
    opacity: 1;
    transform: scale(1.1);
    /* Subtle zoom effect */
}

.screensaver-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 4rem 3rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease-out 0.5s;
    /* Delay to slide in after image */
}

.screensaver-image.active~.screensaver-info {
    opacity: 1;
    transform: translateY(0);
}

.screensaver-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

#screensaver-price {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--jd-yellow);
}

.screensaver-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 2rem;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.screensaver-overlay:active .screensaver-hint {
    opacity: 0;
    /* Hide instantly on touch */
}

/* Pulse animation for touch hint if desired, or just fade it in after idle */
@keyframes pulse {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 0.3;
    }
}


/* Search Toggle & Overlay */
.search-toggle {
    position: absolute;
    right: 3rem;
    top: 2rem;
    /* Fixed top alignment to match logo (approx) */
    /* transform: translateY(-50%); Removed because top is fixed/absolute now relative to container top */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color var(--transition-fast);
}

.search-toggle:hover {
    background-color: var(--gray-100);
}

.search-icon-header {
    width: 32px;
    height: 32px;
    fill: var(--jd-green);
}


.search-overlay {
    background: transparent;
    width: 100%;
    z-index: 90;
    display: flex;
    justify-content: center;
    transform-origin: top;
    transition: all var(--transition-base);
    /* Animate height/opacity */

    /* In-flow now */
    position: static;
    margin-top: 0;
    padding: 0;
}

/* If header is sticky top:0 (height ~105px), search should probably be sticky top:105px */

.search-overlay.hidden {
    display: none;
}

.search-container {
    display: flex;
    max-width: 800px;
    width: 100%;
    background: white;
    /* Remove border-radius/shadow if it's integrated into the bar */
    border-radius: 12px;
    /* Rounded all corners */
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 100px;
    /* Fixed smaller height as requested */
}


.search-tabs {
    display: flex;
    flex-direction: column;
    width: 140px;
    /* Fixed width */
    background: var(--gray-400);
    height: 100%;
    /* Fill container height */
}

.search-tab {
    flex: 1;
    /* Equal height division */
    display: flex;
    /* Center content vertically */
    align-items: center;
    padding: 0.5rem 1rem;
    /* Reduced padding */
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: left;
    position: relative;
    background: #9CA3AF;
    color: var(--gray-900);
    transition: background-color var(--transition-fast);
    height: 50%;
    /* Explicitly force 50% */
}

.search-tab.active {
    background: var(--jd-yellow);
}

/* Arrow indicator for active tab */
.search-tab.active::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 10px solid var(--jd-yellow);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    z-index: 2;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    background: white;
    position: relative;
}

.search-input-icon {
    width: 24px;
    height: 24px;
    fill: var(--jd-light-green);
    /* Light green icon as per screenshot request/standard search icon style */
    margin-right: 1rem;
}

#search-input {
    flex: 1;
    border: none;
    font-size: 1.25rem;
    outline: none;
    color: var(--gray-700);
    padding: 1rem 0;
}

#search-input::placeholder {
    color: var(--gray-400);
}

.search-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.search-clear:hover {
    opacity: 1;
}

.search-clear svg {
    width: 20px;
    height: 20px;
    fill: var(--gray-500);
}

.search-clear.hidden {
    display: none;
}

/* Sidebar Scroll Fix */
/* Modifying existing .filters-sidebar class */
/* Note: Original was sticky top 120px. We need ensuring it handles internal overflow */