:root {
  color-scheme: light;
  --ink: #172824;
  --muted: #52635e;
  --green: #163c35;
  --accent: #286654;
  --line: #d7e1dc;
  --pale: #f2f6f3;
  --white: #fff;
  font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #f8faf8;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button, input, select { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #3c8c75; outline-offset: 3px; }
h1, h2, p { margin: 0; }
.wrap { width: min(100% - 72px, 1264px); margin-inline: auto; }
.top { background: var(--white); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; min-height: 72px; }
.brand { color: var(--green); text-decoration: none; font-size: 1.4rem; font-weight: 850; letter-spacing: .16em; }
.eyebrow { font-size: .875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 17px; }
.plan-panel h2, .media-panel h2 { font-size: 1.5rem; letter-spacing: -.025em; }
label { display: block; font-size: .875rem; font-weight: 650; margin-bottom: 6px; }
input, select { width: 100%; min-height: 46px; border: 1px solid #b9c9c1; border-radius: 8px; padding: 10px 12px; background: var(--white); color: var(--ink); }
select { appearance: none; padding-right: 36px; background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 50% / 5px 5px no-repeat, linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 13px) 50% / 5px 5px no-repeat, var(--white); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid transparent; border-radius: 8px; padding: 8px 17px; background: var(--green); color: var(--white); font-weight: 650; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--accent); }
.catalog-header { background: var(--green); color: var(--white); padding-block: clamp(34px, 5vw, 68px); }
.catalog-header .eyebrow { color: #bfdbd0; margin-bottom: 9px; }
.catalog-header h1, .detail-heading h1 { font-size: clamp(2.4rem, 6vw, 4.65rem); line-height: 1.04; letter-spacing: -.06em; overflow-wrap: anywhere; }
.catalog { padding-block: 27px 60px; }
.filters { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(205px, 1fr) auto; gap: 14px; align-items: end; padding: 17px 19px; background: var(--white); border: 1px solid var(--line); border-radius: 13px; }
.count { margin: 23px 0 12px; color: var(--muted); font-size: .925rem; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.card-image, .hero-image { display: block; background: #dce8e2; overflow: hidden; }
.card-image { aspect-ratio: 1.62; }
.card-image img, .hero-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-image:focus-visible { outline-offset: -4px; }
.card-content { display: flex; flex: 1; flex-direction: column; align-items: start; padding: 17px 19px 15px; overflow-wrap: anywhere; }
.price { color: var(--green); font-size: clamp(1.35rem, 2.8vw, 1.8rem); line-height: 1.2; font-weight: 780; letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card h2 { margin-top: 6px; font-size: 1.18rem; line-height: 1.25; }
.card h2 a { text-decoration: none; }
.card h2 a:hover { text-decoration: underline; }
.address { color: var(--muted); margin-block: 6px 12px; }
.specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.specs span { padding: 3px 8px; background: var(--pale); border-radius: 6px; font-size: .875rem; }
.card-cadastral { display: flex; flex-wrap: wrap; column-gap: 8px; margin-bottom: 12px; font-size: .875rem; }
.card-cadastral span { color: var(--muted); }
.card-cadastral strong { font-weight: 650; font-variant-numeric: tabular-nums; }
.card-end { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; width: 100%; margin-top: auto; padding-top: 11px; border-top: 1px solid var(--line); font-size: .875rem; }
.card-end span { color: var(--muted); }
.card-end time { font-weight: 650; }
.empty { text-align: center; padding: 52px 18px; margin-top: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.empty p { margin: 7px 0 11px; color: var(--muted); }
.plain-link { color: var(--green); text-underline-offset: 3px; font-weight: 650; }
.detail { padding-block: 24px 60px; }
.detail-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; padding-block: 18px 22px; }
.detail-heading .address { margin-bottom: 0; }
.detail-heading .price { margin-block: 0 4px; }
.detail-grid { display: grid; gap: 22px; align-items: start; }
.detail-grid.has-plans { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.hero-image { border-radius: 14px; }
.hero-image img { height: auto; max-height: 600px; object-fit: contain; }
.plan-panel, .media-panel { padding: clamp(17px, 3vw, 26px); background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.characteristics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr)); gap: 0 24px; margin-bottom: 0; }
.characteristics-grid div { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 650; }
.media-panel { margin-top: 22px; }
.photo-grid, .plan-grid { display: grid; gap: 14px; margin-top: 16px; }
.photo-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.plan-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.photo, .plan-image { display: block; border-radius: 8px; overflow: hidden; background: var(--pale); }
.photo { aspect-ratio: 4 / 3; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.plan-item { display: grid; gap: 8px; align-content: start; }
.plan-image { padding: 10px; }
.plan-image img { display: block; max-width: 100%; max-height: 660px; margin: 0 auto; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .wrap { width: min(100% - 32px, 1264px); }
  .top-row { min-height: 60px; }
  .detail-grid.has-plans { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: minmax(0, 1fr) auto; }
  .filters > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 535px) { .grid { grid-template-columns: minmax(0, 1fr); } .card-content { padding: 15px; } }
