* {
    box-sizing: border-box;
}
.search-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.search-bar-wrapper {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 100;
}
.search-bar-inner {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}
.search-main-input {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    min-width: 280px;
}
.search-main-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
.search-main-input button {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
}
.search-filters-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.search-filters-row select,
.search-filters-row input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 130px;
}

.results-bar {
    background: #fafafa;

    padding: 0.75rem 0;
}
.results-count {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}
.view-toggle {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
}
.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.2s;
}
.view-toggle-btn:hover {
    background: #f5f5f5;
}
.view-toggle-btn.active {
    background: #111;
    color: #fff;
}

.search-content {
    position: relative;
}
.list-view {
    padding: 1rem 0;
}
.listings-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0 auto;
}

.listing-rich {
    display: flex;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}
.listing-rich:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.rich-gallery {
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.rich-slider {
    position: relative;
    width: 100%;
    height: 260px;
    background: #f0f0f0;
    overflow: hidden;
}
.rich-slide {
    display: none;
    width: 100%;
    height: 100%;
}
.rich-slide.active {
    display: block;
}
.rich-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.img-placeholder-rich {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 5;
}
.slider-arrow:hover {
    background: #fff;
}
.slider-prev {
    left: 10px;
}
.slider-next {
    right: 10px;
}
.slider-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 0.2rem 0.7rem;
    border-radius: 12px;
    font-size: 0.75rem;
    z-index: 5;
}
.rich-thumbs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #fff;
}
.rich-thumb {
    flex: 1;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.rich-thumb.active {
    opacity: 1;
    outline: 2px solid #111;
}
.rich-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rich-info {
    flex: 1;
    min-width: 0;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
}
.rich-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.rich-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: #111;
}
.rich-address {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 0.75rem;
}
.rich-fav {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.rich-fav:hover {
    border-color: #e2001a;
    color: #e2001a;
}
.rich-fav.active svg {
    fill: #e2001a;
    stroke: #e2001a;
}
.rich-description {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rich-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.rich-features,
.rich-pois {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.feat-chip {
    padding: 0.25rem 0.6rem;
    background: #f3f3f3;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #333;
}
.feat-more {
    background: #e0e0e0;
    font-weight: 600;
}
.poi-chip {
    padding: 0.25rem 0.6rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.72rem;
    color: #666;
}
.rich-owner {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    text-decoration: none;
    color: #666;
    font-size: 0.78rem;
    align-self: flex-start;
}
.rich-owner:hover .owner-name {
    color: #e2001a;
    text-decoration: underline;
}
.rich-owner img,
.owner-avatar-ph {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.owner-avatar-ph {
    background: #e2001a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.no-results {
    padding: 3rem 1rem;
    text-align: center;
    color: #999;
}
.map-view {
    height: calc(100vh - 200px); /* Viewport minus Such-/Toggle-Leiste */
    min-height: 400px;
}
#map {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .search-filters-row {
        width: 100%;
    }
    .search-filters-row select,
    .search-filters-row input {
        flex: 1;
        width: auto;
        min-width: 0;
        font-size: 0.85rem;
    }
    .listing-rich {
        flex-direction: column;
    }
    .rich-gallery {
        width: 100%;
    }
    .rich-slider {
        height: 220px;
    }
}
.list-view::-webkit-scrollbar {
    width: 8px;
}
.list-view::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
/* Schlanke Top-Leiste */
.search-topbar {
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 0.6rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.filter-open-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}
.filter-open-btn:hover {
    background: #f5f5f5;
}
.current-search {
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.9rem;
}
.current-search:hover {
    background: #f5f5f5;
}
.search-meta {
    color: #999;
    font-size: 0.8rem;
    margin-left: 0.4rem;
}
.active-filters {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.filter-chip {
    padding: 0.25rem 0.6rem;
    background: #111;
    color: #fff;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* Filter-Modal */
.filter-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}
.filter-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}
.filter-modal-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 90vw;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.2s ease;
}
@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}
.filter-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}
.filter-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}
.filter-close {
    border: none;
    background: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
}
.filter-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.4rem;
}
.filter-group .search-main-input {
    display: flex;
    gap: 0.5rem;
}
.filter-group .form-control,
.filter-group .form-select {
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
}
.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.price-inputs span {
    color: #999;
}
.filter-modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
}
.filter-modal-footer .btn {
    flex: 1;
}

@media (max-width: 768px) {
    .filter-modal-panel {
        width: 100%;
        max-width: 100%;
    }
    .current-search,
    .active-filters {
        display: none;
    } /* auf Mobil nur der Filter-Button */
}
.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    padding: 2rem 1rem;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.page-btn:hover:not(.disabled):not(.active) {
    background: #f5f5f5;
    border-color: #ccc;
}
.page-btn.active {
    background: #111;
    color: #fff;
    border-color: #111;
}
.page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}
.page-dots {
    padding: 0 0.3rem;
    color: #999;
}
.features-filter {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.feat-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}
.feat-check input {
    width: auto;
}
.feat-more-btn {
    background: none;
    border: none;
    color: #e2001a;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem 0;
    text-align: left;
}
.feat-more-btn:hover {
    text-decoration: underline;
}
#featuresMore {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
gmp-place-autocomplete {
    width: 100% !important;
    height: var(--field-h);
    box-sizing: border-box;
    color-scheme: light;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}
gmp-place-autocomplete:focus-within {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.no-results-alarm {
    max-width: 480px;
    margin: 3rem auto;
    padding: 2.5rem 2rem;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

.no-results-alarm .nra-icon {
    color: #e2001a;
    margin-bottom: 1rem;
}

.no-results-alarm h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: #111;
}

.no-results-alarm p {
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
    margin: 0 0 1.5rem;
}

.nra-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.nra-form input[type="email"] {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s;
}

.nra-form input[type="email"]:focus {
    border-color: #e2001a;
}

.nra-form button {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #111;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.nra-form button:hover {
    background: #e2001a;
}

.nra-hint {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.5rem;
}

.nra-msg {
    font-size: 0.95rem;
    margin: 0.75rem 0;
    padding: 0.5rem;
    border-radius: 6px;
}

.nra-msg:empty {
    display: none;
}

.nra-success {
    color: #155724;
    background: #d4edda;
}

.nra-error {
    color: #721c24;
    background: #f8d7da;
}

/* Mobil: E-Mail-Feld und Button untereinander */
@media (max-width: 520px) {
    .no-results-alarm {
        margin: 2rem 1rem;
        padding: 2rem 1.25rem;
    }
    .nra-form {
        flex-direction: column;
    }
    .nra-form button {
        width: 100%;
    }
}
