:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-muted: #f0eee8;
  --ink: #171a1f;
  --ink-muted: #5b6370;
  --line: #e2dfd7;
  --accent: #182230;
  --accent-warm: #b45309;
  --accent-warm-bg: #fef3c7;
  --accent-warm-line: #f59e0b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(24, 34, 48, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.container {
  width: min(1140px, 100% - 32px);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 245, 241, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  text-decoration: none;
}

.brand-domain {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-tag {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.925rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: #253347;
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.btn-outline:hover {
  border-color: #c8c3b8;
  background: var(--surface-muted);
}

/* Main */
main {
  padding: 28px 0 56px;
}

.promo-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-warm-bg);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #78350f;
  font-size: 0.94rem;
  margin-bottom: 20px;
}

.promo-pill {
  flex-shrink: 0;
  background: var(--accent-warm);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.listing-header {
  margin-bottom: 22px;
}

.listing-title {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.listing-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.lot-tag {
  background: var(--surface-muted);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.84rem;
  font-weight: 600;
}

/* Hero Grid: Gallery + Price Card */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Gallery */
.gallery-card {
  padding: 12px;
}

.gallery-stage {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #11151b;
  aspect-ratio: 4 / 3;
}

.gallery-main-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(24, 34, 48, 0.72);
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.gallery-nav:hover {
  background: rgba(24, 34, 48, 0.92);
}

.gallery-nav.prev {
  left: 12px;
}

.gallery-nav.next {
  right: 12px;
}

.gallery-counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(24, 34, 48, 0.78);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.thumb-btn {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-muted);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.thumb-btn:hover,
.thumb-btn.is-active {
  opacity: 1;
}

.thumb-btn.is-active {
  border-color: var(--accent);
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Price & Quick Summary Card */
.summary-card {
  padding: 24px;
}

.price-block {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.price-main {
  font-size: clamp(1.75rem, 2.6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.price-main span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.price-sub {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.price-regular {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #78350f;
  background: var(--accent-warm-bg);
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-block;
}

.quick-facts {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.quick-facts li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.quick-facts li span:first-child {
  color: var(--ink-muted);
}

.quick-facts li strong {
  text-align: right;
  font-weight: 600;
}

.summary-cta {
  display: grid;
  gap: 10px;
}

.summary-cta .btn {
  width: 100%;
  padding: 12px 18px;
}

.metro-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.metro-box-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin: 0 0 10px;
}

.metro-list {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
}

.metro-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.metro-walk {
  color: var(--ink-muted);
}

/* Details sections */
.details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.section-card {
  padding: 24px;
}

.section-title {
  margin: 0 0 16px;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
}

.description-text p {
  margin: 0 0 12px;
}

.highlights-list {
  margin: 14px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.suitable-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-chip {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.88rem;
}

.specs-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.spec-row {
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.spec-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.spec-row dt {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.spec-row dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Contacts section */
.contacts-section {
  padding: 28px;
  scroll-margin-top: 84px;
}

.contacts-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.owner-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin: 0 0 4px;
}

.owner-name {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.phone-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.phone-link {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.phone-link:hover {
  text-decoration: underline;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.qr-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.qr-frame {
  flex-shrink: 0;
  width: 132px;
  height: 132px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-info {
  min-width: 0;
}

.qr-info h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.qr-info p {
  margin: 0 0 12px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

/* Multi-listing grid (for future listings in listings.json) */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.catalog-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.catalog-card-body {
  padding: 18px;
  display: grid;
  gap: 8px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 32px;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
}

/* Lightbox */
.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 16, 22, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  object-fit: contain;
}

.lightbox-caption {
  color: #e5e7eb;
  font-size: 0.92rem;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-nav.prev {
  left: 16px;
}

.lightbox-nav.next {
  right: 16px;
}

@media (max-width: 920px) {
  .hero-grid,
  .details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .qr-grid {
    grid-template-columns: 1fr;
  }

  .qr-card {
    padding: 14px;
  }

  .qr-frame {
    width: 112px;
    height: 112px;
  }

  .brand-tag {
    display: none;
  }
}
