.search-hero,
#search-hero {
    position: relative;
    overflow: hidden;
    padding: 92px 0 68px;
    background-image:
        linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.62)),
        url("https://images.unsplash.com/photo-1560518883-ce09059eeffa?q=80&w=2070&auto=format&fit=crop");
    background-size: cover;
    background-position: center;
}

#search-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 106, 0, 0.25), transparent 55%);
}

#search-hero .container {
    position: relative;
    z-index: 1;
}

#search-hero .hero-title {
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

#search-hero .hero-subtitle {
    max-width: 760px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
}

.search-form-container {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-width: 980px;
    margin: 0 auto;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: stretch;
}

.search-field {
    flex: 1 1 260px;
    min-width: 0;
    position: relative;
}

.search-field .input-group {
    height: 50px;
}

.search-field .input-group-text {
    background: var(--surface);
    border: 1px solid var(--border);
    border-right: none;
    color: var(--muted);
    font-size: 16px;
    width: 45px;
    justify-content: center;
    border-radius: 12px 0 0 12px;
}

.search-field .form-control {
    height: 50px;
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 12px 12px 0;
    padding: 0 15px;
    font-size: 16px;
    background: var(--surface);
    transition: all 0.2s ease;
}

.search-field .form-control:focus {
    border-color: rgba(255, 106, 0, 0.5);
    background: #fff;
    box-shadow: none;
}

.search-field .form-control:focus + .input-group-text,
.search-field .input-group:focus-within .input-group-text {
    border-color: rgba(255, 106, 0, 0.5);
    background: #fff;
}

.search-field .form-control::placeholder {
    color: var(--muted);
    font-size: 15px;
}

.amenities-dropdown {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    width: 1%;
    display: block;
}

.amenities-dropdown summary {
    list-style: none;
    cursor: pointer;
    font-size: 15px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 12px 12px 0;
    background: var(--surface);
    padding: 8px 12px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
}

.amenities-dropdown summary::-webkit-details-marker {
    display: none;
}

.amenities-dropdown summary::after {
    content: "▾";
    color: var(--muted);
    margin-left: 8px;
}

.amenities-dropdown[open] summary::after {
    content: "▴";
}

.amenities-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 5;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
    display: grid;
    gap: 6px;
    box-shadow: var(--shadow);
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
}

.amenity-item input {
    margin: 0;
}

.search-properties-btn {
    background: rgba(255, 106, 0, 0.12);
    border: 1px solid rgba(255, 106, 0, 0.35);
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 0;
    transition: all 0.2s ease;
    color: var(--brand);
    text-transform: none;
    letter-spacing: 0.3px;
}

.search-properties-btn:hover {
    background: rgba(255, 106, 0, 0.18);
    border-color: rgba(255, 106, 0, 0.6);
    box-shadow: 0 8px 18px rgba(255, 106, 0, 0.18);
}

.search-field--actions {
    display: flex;
    align-items: stretch;
    flex: 0 1 260px;
    margin-left: auto;
}

.advanced-toggle {
    width: 100%;
    height: 50px;
    border-radius: 12px;
    border-color: var(--border) !important;
    color: var(--text) !important;
    background: var(--surface) !important;
    font-weight: 600;
}

.advanced-toggle:hover {
    border-color: rgba(255, 106, 0, 0.45) !important;
    color: var(--brand) !important;
    background: rgba(255, 106, 0, 0.08) !important;
}

.advanced-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}

.search-submit-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.search-submit-row .search-properties-btn {
    flex: 1 1 280px;
    margin: 0;
}

.search-clear-btn {
    height: 50px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 0 18px;
}

.actions-bar {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.listing-list-item {
    border: 1px solid var(--border);
    border-radius: 18px;
    margin-bottom: 1rem;
    padding: 1.25rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    background: var(--bg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.listing-list-content {
    z-index: 1;
}

.listing-list-media {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.listing-list-image,
.listing-list-placeholder {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.listing-list-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.listing-list-placeholder .listing-label {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.listing-list-media .listing-badges {
    top: 14px;
    left: 14px;
    z-index: 4;
}

.listing-list-media .ui-tag {
    bottom: 14px;
    left: 14px;
    z-index: 4;
}

.listing-list-media .ui-price-pill {
    bottom: 14px;
    right: 14px;
    font-size: 0.95rem;
    padding: 7px 14px;
    z-index: 4;
}

.listing-list-wishlist {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
}

.listing-list-overlay {
    z-index: 3;
}

.listing-list-title {
    color: var(--text);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.listing-list-title:hover {
    color: var(--brand);
}

.listing-list-meta {
    gap: 0.75rem 1rem;
}

.listing-list-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    line-height: 1.2;
}

.listing-list-meta__item i {
    flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
    .listing-list-item:hover {
        box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
        transform: translateY(-4px);
    }

    .listing-list-item:hover .listing-list-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .listing-list-item:hover .listing-list-image {
        transform: scale(1.04);
    }
}

@media (max-width: 768px) {
    #search-hero {
        padding: 72px 0 48px;
    }

    .search-field {
        flex: 1 1 100%;
    }

    .search-field--actions {
        flex: 1 1 100%;
        margin-left: 0;
    }

    .search-submit-row .search-properties-btn,
    .search-clear-btn {
        width: 100%;
        flex: 1 1 100%;
    }

    .search-form-container {
        padding: 20px;
    }

    .listing-list-item {
        padding: 0.8rem;
    }

    .listing-list-content {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.6rem;
        align-items: stretch !important;
    }

    .listing-list-media {
        height: 100%;
        min-height: 170px;
        border-radius: 12px;
    }

    .listing-list-image,
    .listing-list-placeholder {
        height: 100%;
        min-height: 170px;
    }

    .listing-list-title {
        font-size: 1.02rem;
        margin-bottom: 0.3rem;
    }

    .listing-list-meta {
        gap: 0.45rem 0.65rem;
    }

    .listing-list-meta__item {
        font-size: 0.76rem;
    }

    .listing-list-media .ui-price-pill {
        font-size: 0.82rem;
        padding: 6px 10px;
        right: 10px;
        bottom: 10px;
    }

    .listing-list-media .ui-tag {
        display: none;
    }

    .listing-list-media .listing-badges {
        top: 10px;
        left: 10px;
        gap: 5px;
    }

    .listing-list-media .listing-badges .ui-badge {
        padding: 0.24rem 0.48rem;
        font-size: 0.68rem;
    }
}
