:root {
  --bg: #F4EFE6;
  --ink: #1B1712;
  --accent: #C2553A;
  --card: #FBF8F2;
  --ink-72: rgba(27, 23, 18, 0.72);
  --ink-66: rgba(27, 23, 18, 0.66);
  --ink-55: rgba(27, 23, 18, 0.55);
  --ink-50: rgba(27, 23, 18, 0.5);
  --line: rgba(27, 23, 18, 0.14);
  --line-soft: rgba(27, 23, 18, 0.12);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); }

body { color: var(--ink); font-family: var(--sans); }

a { color: var(--accent); text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--accent); color: var(--bg); }

.page { min-height: 100vh; padding: 0 clamp(16px, 4vw, 40px) 64px; }
.container { max-width: 1080px; margin: 0 auto; }

/* Header */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line);
}
.eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.lang-switch { display: flex; gap: 6px; }
.lang-btn {
  font-family: inherit; font-size: 12px; letter-spacing: 0.08em;
  padding: 7px 13px; border-radius: 3px; cursor: pointer;
  border: 1px solid rgba(27, 23, 18, 0.25); background: transparent; color: var(--ink);
}
.lang-btn.is-active { border-color: var(--ink); background: var(--ink); color: var(--bg); }

/* Hero */
.hero { padding: clamp(36px, 6vw, 64px) 0 clamp(28px, 4vw, 44px); }
.hero-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 5.6vw, 60px); line-height: 1.04;
  letter-spacing: -0.015em; margin: 0 0 18px; max-width: 22ch;
}
.hero-lede {
  font-size: clamp(16px, 1.7vw, 18px); line-height: 1.55;
  max-width: 52ch; margin: 0; color: var(--ink-72); text-wrap: pretty;
}
.hero-facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 28px; }
.fact { display: flex; flex-direction: column; gap: 2px; }
.fact-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-50); }
.fact-value { font-size: 16px; }

/* Items */
.items-header {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding: 16px 0 24px;
}
.section-title { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0; }
.section-title--big { font-size: 30px; }
.items-count { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-50); }

.grid {
  display: grid; gap: 20px; align-items: stretch;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
}

.card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line-soft); border-radius: 7px; padding: 14px; cursor: pointer;
}
.card.is-sold { opacity: 0.55; }

.card-media-wrap { position: relative; display: flex; flex-direction: column; gap: 6px; }
.media {
  position: relative; aspect-ratio: 4 / 3; border-radius: 5px;
  overflow: hidden; background: rgba(27, 23, 18, 0.05);
  touch-action: pan-y;
}
.media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  user-select: none; -webkit-user-drag: none;
}
.media-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: rgba(251, 248, 242, 0.88); color: var(--ink);
  font-size: 16px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.media-nav--prev { left: 8px; }
.media-nav--next { right: 8px; }
.media-dots {
  position: absolute; bottom: 2px; left: 0; right: 0; z-index: 1;
  display: flex; justify-content: center;
}
/* Тап-мишень точки крупнее её видимого кружка (::before) */
.dot {
  position: relative; width: 24px; height: 24px; padding: 0; border: 0;
  cursor: pointer; background: transparent;
}
.dot::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(251, 248, 242, 0.75);
}
.dot.is-active::before { background: var(--ink); }

.sold-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--ink); color: var(--bg);
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 2px;
}

.card-body { display: flex; flex-direction: column; gap: 5px; padding-top: 14px; }
.card-category { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.card-name { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.18; margin: 0; }
.card-note { font-size: 13px; line-height: 1.5; margin: 0; color: var(--ink-66); text-wrap: pretty; }
.card-cond { font-size: 12px; color: var(--ink-50); margin-top: 2px; }

.card-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.card-price { font-size: 15px; font-weight: 500; }
.card-cta {
  font-size: 13px; font-weight: 500; padding: 10px 14px; border-radius: 3px;
  white-space: nowrap; border: 1px solid var(--accent); color: var(--accent);
}
.card-cta.is-sold {
  border-color: rgba(27, 23, 18, 0.25); color: var(--ink-50); pointer-events: none;
}

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(27, 23, 18, 0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(12px, 4vh, 48px) clamp(12px, 4vw, 32px); overflow-y: auto;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  position: relative; width: 100%; max-width: 880px; background: var(--card);
  border-radius: 8px; padding: clamp(16px, 3vw, 28px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(18px, 3vw, 32px); cursor: default;
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(27, 23, 18, 0.2); background: rgba(251, 248, 242, 0.9);
  color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer;
}
.modal .media { border-radius: 6px; background: rgba(27, 23, 18, 0.06); }
.modal .media-nav { width: 34px; height: 34px; font-size: 18px; }
.modal .media-nav--prev { left: 10px; }
.modal .media-nav--next { right: 10px; }
.modal .media-dots { bottom: 4px; }
.modal .dot::before { width: 8px; height: 8px; background: rgba(251, 248, 242, 0.8); }
.modal .dot.is-active::before { background: var(--ink); }

.modal-info { display: flex; flex-direction: column; gap: 12px; }
.modal-name {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(24px, 3vw, 32px); line-height: 1.12; margin: 0;
}
.modal-paragraphs { display: flex; flex-direction: column; gap: 10px; }
.modal-paragraphs p {
  font-size: 15px; line-height: 1.6; margin: 0;
  color: rgba(27, 23, 18, 0.78); text-wrap: pretty;
}
.modal-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line);
}
.modal-price-block { display: flex; flex-direction: column; gap: 2px; }
.modal-price { font-size: 20px; font-weight: 600; }
.modal-cond { font-size: 12px; color: var(--ink-55); }

.btn-primary {
  display: inline-block; background: var(--accent); color: var(--bg);
  font-size: 15px; font-weight: 500; padding: 13px 20px; border-radius: 3px;
}

/* Hover-эффекты только там, где есть курсор — на таче :hover «залипает» после тапа */
@media (hover: hover) {
  a:hover { color: var(--ink); }
  .media-nav:hover { background: var(--card); }
  .card-cta:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .modal-close:hover { background: var(--ink); color: var(--card); }
  .btn-primary:hover { background: var(--ink); color: var(--bg); }
}

/* Крупнее стрелки карусели под палец */
@media (pointer: coarse) {
  .media-nav { width: 38px; height: 38px; font-size: 18px; }
  .modal .media-nav { width: 40px; height: 40px; }
}

/* Map */
.map-section {
  display: grid; gap: 28px; margin-top: 64px; padding-top: 28px;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.map-info { display: flex; flex-direction: column; gap: 14px; }
.map-body { font-size: 15px; line-height: 1.55; margin: 0; color: rgba(27, 23, 18, 0.7); max-width: 36ch; text-wrap: pretty; }
.map-info .btn-primary { align-self: flex-start; margin-top: 4px; }
.map-frame {
  min-height: 300px; border: 1px solid rgba(27, 23, 18, 0.18);
  border-radius: 6px; overflow: hidden; background: rgba(27, 23, 18, 0.05);
}
.map-frame iframe { width: 100%; height: 100%; min-height: 300px; border: 0; display: block; }

/* Footer */
.site-footer {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 16px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-55);
}

body.modal-open { overflow: hidden; }
