:root {
  --bg: #08060d; --bg-2: #0e0b15; --surface: #14101d; --surface-2: #1c1728; --border: #2b2438;
  --cream: #f4f1fa; --cream-dim: #c1bbd0; --muted: #8a82a0;
  --accent: #a78bfa; --accent-ink: #0a0a0a; --ok: #7bd88f; --warn: #ffb020; --bad: #ff6b5e; --radius: 16px;
  --serif: "Bricolage Grotesque", system-ui, sans-serif; --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--cream); font-family: var(--sans);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
   min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(8, 6, 13, .88);  border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; padding-block: 8px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 60px; width: auto; }
.header-search { flex: 1; max-width: 460px; margin-left: auto; position: relative; }
.header-search input {
  width: 100%; padding: 10px 14px 10px 40px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
.header-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(167, 139, 250, .15); }
.header-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.nav-link { text-decoration: none; color: var(--cream-dim); font-size: 14px; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.nav-link:hover { color: var(--cream); background: var(--surface); }

/* ---------- hero ---------- */
.hero { padding: 48px 0 28px; text-align: center; }
.hero h1 { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: clamp(32px, 5vw, 52px); margin: 0 0 10px; letter-spacing: -.01em; }
.hero p { margin: 0 auto; max-width: 620px; color: var(--cream-dim); }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 8px 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.chip {
  border: 1px solid var(--border); background: transparent; color: var(--cream-dim); padding: 7px 14px;
  border-radius: 999px; cursor: pointer; font-size: 14px; transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--cream); }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.select, .input, .textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; outline: none; width: 100%;
}
.select:focus, .input:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(167, 139, 250, .15); }
.filters .select { width: auto; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--cream-dim); cursor: pointer; user-select: none; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.count { color: var(--muted); font-size: 14px; margin-bottom: 14px; }

/* ---------- grid / card ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; padding-bottom: 60px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 14px 30px rgba(0, 0, 0, .35); }
.card .thumb { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .thumb img { transform: scale(1.04); }
.ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--border); background: linear-gradient(160deg, var(--surface-2), var(--bg-2)); }
.ph svg { width: 42%; height: auto; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .meta { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.card h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.price-row { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; gap: 8px; }
.price { font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--accent); }
.old { color: var(--muted); text-decoration: line-through; font-size: 14px; }
.badge {
  position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(8, 6, 13, .85); border: 1px solid var(--border); 
}
.badge.reserved { color: var(--warn); }
.badge.sold { color: var(--bad); }
.card.is-sold { opacity: .6; }
.sale-tag { position: absolute; top: 10px; right: 10px; background: var(--accent); color: var(--accent-ink); padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.empty { text-align: center; padding: 70px 20px; color: var(--muted); grid-column: 1 / -1; }

/* ---------- detail ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--cream-dim); margin: 24px 0 16px; font-size: 14px; }
.back:hover { color: var(--cream); }
.detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; padding-bottom: 70px; }
.gallery .main { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: rgba(8, 6, 13, .75); cursor: pointer; display: grid; place-items: center; font-size: 20px;
}
.gallery .nav:hover { background: var(--accent); color: var(--accent-ink); }
.gallery .prev { left: 12px; } .gallery .next { right: 12px; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs button { width: 74px; height: 92px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: var(--surface-2); opacity: .65; }
.thumbs button.active { border-color: var(--accent); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info h1 { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 6px; line-height: 1.2; }
.info .cat { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.info .price-row { padding: 14px 0; }
.info .price { font-size: 34px; }
.status-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--border); }
.status-pill.available { color: var(--ok); } .status-pill.reserved { color: var(--warn); } .status-pill.sold { color: var(--bad); }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 16px 0; }
.spec { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.spec b { display: block; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.desc { white-space: pre-wrap; color: var(--cream-dim); margin: 14px 0 20px; }
.section-title { font-family: var(--serif); font-size: 18px; margin: 24px 0 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 13px; font-size: 14px; }
.muted { color: var(--muted); font-size: 14px; }
.contact-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-top: 24px; }
.contact-box h3 { margin: 0 0 4px; font-family: var(--serif); }
.contact-list { display: grid; gap: 8px; margin-top: 12px; }
.contact-btn {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-2); text-decoration: none; transition: all .15s;
}
.contact-btn:hover { border-color: var(--accent); background: var(--surface-2); }
.contact-btn .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.contact-btn small { display: block; color: var(--muted); font-size: 12px; line-height: 1.2; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); text-decoration: none; transition: all .15s;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 12px; font-size: 14px; }

/* ---------- footer ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); padding: 26px 0; color: var(--muted); font-size: 14px; text-align: center; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--accent); color: var(--accent-ink);
  padding: 10px 18px; border-radius: 10px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 820px) {
  .detail { grid-template-columns: 1fr; gap: 24px; }
  .site-header .wrap { flex-wrap: wrap; }
  .header-search { order: 3; max-width: none; flex-basis: 100%; margin: 0 0 8px; }
  .logo img { height: 50px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card .body { padding: 10px 12px 12px; }
  .card h3 { font-size: 14px; }
  .price { font-size: 18px; }
}
