:root {
    --brand: #0f6e5c;
    --brand-dark: #0a4f42;
    --bg: #f7f7f5;
    --card-bg: #ffffff;
    --text: #23282b;
    --muted: #6b7280;
    --border: #e5e7eb;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.header {
    background: var(--brand-dark);
    color: #fff;
    padding: 22px 24px;
}

.header .brand {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.header .tagline {
    color: #cfe9e2;
    font-size: 0.92rem;
    margin-top: 2px;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

.search-form {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-top: 18px;
}

.search-form .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-form label {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}

.search-form select,
.search-form input[type="text"] {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.92rem;
    background: #fff;
    color: var(--text);
    min-width: 150px;
    font-family: inherit;
}

.search-form .btn-search {
    background: var(--brand);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.search-form .btn-search:hover { background: var(--brand-dark); }

.search-form .btn-clear {
    color: var(--muted);
    font-size: 0.88rem;
    padding: 10px 4px;
}

@media (max-width: 600px) {
    .search-form { flex-direction: column; align-items: stretch; }
    .search-form select,
    .search-form input[type="text"] { min-width: 0; width: 100%; }
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.card img.thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #eee;
}

.card-body { padding: 14px 16px 18px; }

.card-body h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.card-body .address {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.card-body .city {
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 10px;
}

.badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--muted);
}

.badges span { display: inline-flex; align-items: center; gap: 4px; }

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}

.subtitle { color: var(--muted); margin-top: 4px; }

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--brand);
    font-weight: 600;
}

.detail-header h1 {
    font-size: 1.7rem;
    margin: 0 0 6px;
}

.detail-header .meta {
    color: var(--muted);
    margin-bottom: 20px;
}

.gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 8px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 28px;
}

.gallery img.main-shot {
    width: 100%;
    height: 420px;
    object-fit: cover;
    cursor: pointer;
}

.gallery .side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
}

.gallery .side img {
    width: 100%;
    height: 206px;
    object-fit: cover;
    cursor: pointer;
}

.thumbstrip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 28px;
}

.thumbstrip img {
    height: 90px;
    width: 130px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.thumbstrip img:hover { border-color: var(--brand); }

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

.detail-section { margin-bottom: 26px; }
.detail-section h2 {
    font-size: 1.15rem;
    margin: 0 0 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}
.detail-section .text { color: #333; }
.detail-section .text p { margin: 0 0 10px; }

.facts-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    height: fit-content;
}

.facts-card ul { list-style: none; padding: 0; margin: 0; }
.facts-card li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}
.facts-card li:last-child { border-bottom: none; }
.facts-card .label { color: var(--muted); }

.map-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-top: 16px;
}
.map-wrap iframe { width: 100%; height: 260px; border: 0; display: block; }

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 60px 20px;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 100;
    align-items: center;
    justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
}
.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}
.lightbox .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 10px 18px;
    user-select: none;
}
.lightbox .prev { left: 10px; }
.lightbox .next { right: 10px; }

.footer {
    text-align: center;
    color: var(--muted);
    padding: 24px;
    font-size: 0.85rem;
}

@media (max-width: 760px) {
    .gallery { grid-template-columns: 1fr; }
    .gallery .side { grid-template-rows: 1fr 1fr; grid-auto-flow: column; }
    .detail-grid { grid-template-columns: 1fr; }
    .gallery img.main-shot { height: 240px; }
    .gallery .side img { height: 116px; }
}

@media (max-width: 480px) {
    .header { padding: 16px 16px; }
    .header .brand { font-size: 1.15rem; }
    .header .tagline { font-size: 0.82rem; }
    .container { padding: 18px 14px 40px; }
    .page-title { font-size: 1.3rem; }
    .detail-header h1 { font-size: 1.35rem; }
    .grid { grid-template-columns: 1fr; gap: 16px; }
    .card img.thumb { height: 180px; }
    .thumbstrip img { height: 72px; width: 104px; }
    .facts-card, .search-form { padding: 14px 16px; }
    .lightbox .nav { font-size: 1.8rem; padding: 8px 12px; }
    .lightbox .close { top: 12px; right: 16px; font-size: 1.6rem; }
    .map-wrap iframe { height: 200px; }
}
