/* ═══════════════════════════════════════════════════════════════════
   Zamon Mulk — ommaviy sayt

   Palitra CRM bilan bir xil: sapfir (asosiy), navy (matn va quyi
   qism), oltin (urg'u).

   CRM qobig'idan mustaqil: bu yerda mijoz ko'radigan sahifa, shuning
   uchun o'z uslubi bor. Bootstrap yuklanmaydi — sahifa yengil bo'lishi
   kerak, mijoz mobil internetdan kiradi.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --brand: #2E4BC6;
  --brand-dark: #1F3596;
  --brand-soft: #E3E8FB;
  --gold: #E0A526;
  --gold-soft: #FBF1DC;
  --ink: #101A3F;
  --muted: #5B6482;
  --line: #E1E5F2;
  --bg: #F5F7FC;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 26, 63, .05), 0 10px 28px -12px rgba(16, 26, 63, .14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-inline: 20px;
}

/* ── Sarlavha ────────────────────────────────────────────────────── */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
  flex-wrap: wrap;
}
.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
}
.site-nav a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.site-nav a.active { background: var(--brand-soft); color: var(--brand-dark); }

/* ── Tugmalar ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(180deg, #3D5BE0, var(--brand)); color: #fff; box-shadow: 0 10px 22px -12px rgba(46, 75, 198, .9); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(700px 420px at 100% 0%, rgba(224, 165, 38, .28), transparent 60%),
    radial-gradient(700px 520px at 0% 100%, rgba(61, 91, 224, .55), transparent 60%),
    linear-gradient(160deg, var(--ink) 0%, #18255A 55%, var(--brand-dark) 100%);
  color: #fff;
  padding: 72px 0 92px;
}
.hero h1 {
  font-size: clamp(1.9rem, 5vw, 3.1rem);
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -.02em;
}
.hero p { font-size: 1.08rem; opacity: .92; margin: 0 0 28px; max-width: 46rem; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 36px; }
.hero-stats div strong { display: block; font-size: 1.7rem; line-height: 1.2; }
.hero-stats div span { opacity: .85; font-size: .92rem; }

/* ── Qidiruv paneli ──────────────────────────────────────────────── */
.search-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-top: -46px;
  position: relative;
  z-index: 5;
}
.search-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
}

label.fld { display: block; font-size: .84rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }

.control {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea.control { resize: vertical; }

/* ── Bo'limlar ───────────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section-head { margin-bottom: 28px; }
.section-head h2 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin: 0 0 6px;
  letter-spacing: -.01em;
}
.section-head p { color: var(--muted); margin: 0; }

/* ── Uy kartochkasi ──────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 34px rgba(15, 23, 42, .12); }

.card-media {
  aspect-ratio: 4 / 3;
  background: var(--brand-soft);
  position: relative;
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: var(--brand-dark); font-size: 2.4rem;
}
.card-tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(15, 23, 42, .82);
  color: #fff; padding: 5px 12px;
  border-radius: 999px; font-size: .78rem; font-weight: 600;
}
.card-id {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink); padding: 5px 10px;
  border-radius: 999px; font-size: .78rem; font-weight: 700;
}

.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-price { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.card-title { font-weight: 600; color: var(--ink); }
.card-title:hover { color: var(--brand); text-decoration: none; }
.card-addr { color: var(--muted); font-size: .9rem; }
.card-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  color: var(--muted); font-size: .88rem;
  border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto;
}

/* ── Afzalliklar ─────────────────────────────────────────────────── */
.features { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature {
  background: var(--card); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow);
}
.feature .ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-dark);
  display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 14px;
}
.feature h3 { margin: 0 0 6px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .94rem; }

/* ── Uy sahifasi ─────────────────────────────────────────────────── */
.detail-grid { display: grid; gap: 30px; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

.gallery-main {
  aspect-ratio: 16 / 10; border-radius: var(--radius);
  overflow: hidden; background: var(--brand-soft); box-shadow: var(--shadow);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs img {
  width: 84px; height: 64px; object-fit: cover;
  border-radius: 9px; cursor: pointer; border: 2px solid transparent;
}
.gallery-thumbs img:hover, .gallery-thumbs img.active { border-color: var(--brand); }

.panel {
  background: var(--card); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 20px; }
.panel h3 { margin: 0 0 14px; font-size: 1.05rem; }

.specs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.spec { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.spec span { display: block; color: var(--muted); font-size: .82rem; }
.spec strong { font-size: 1.02rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--brand-soft); color: var(--brand-dark);
  padding: 6px 13px; border-radius: 999px; font-size: .86rem; font-weight: 500;
}

.sticky { position: sticky; top: 88px; }

/* ── Formalar ────────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.errors { color: #b91c1c; font-size: .86rem; margin-top: 5px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Xabarlar ────────────────────────────────────────────────────── */
.flash { padding: 14px 18px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }

/* ── Savol-javob ─────────────────────────────────────────────────── */
.qa { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.qa details { border-bottom: 1px solid var(--line); }
.qa details:last-child { border-bottom: 0; }
.qa summary {
  padding: 18px 22px; cursor: pointer; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.qa details[open] summary::after { content: "−"; }
.qa .answer { padding: 0 22px 20px; color: var(--muted); }

/* ── Matnli sahifa ───────────────────────────────────────────────── */
.prose { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.prose h2 { margin-top: 30px; font-size: 1.25rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: #334155; }

/* ── Sahifalash ──────────────────────────────────────────────────── */
.pager { display: flex; gap: 10px; justify-content: center; margin-top: 34px; }

/* ── Bo'sh holat ─────────────────────────────────────────────────── */
.empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty .ico { font-size: 2.6rem; margin-bottom: 12px; }

/* ── Quyi qism ───────────────────────────────────────────────────── */
.site-foot { background: var(--ink); color: #C3CAE3; border-top: 4px solid var(--gold); margin-top: 72px; padding: 46px 0 30px; }
.site-foot a { color: #cbd5e1; }
.site-foot a:hover { color: #fff; }
.foot-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.foot-grid h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; }
.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 32px; padding-top: 20px;
  font-size: .86rem; color: #94a3b8;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
}

/* Sayt sarlavhasidagi logotip */
.brand-logo {
  height: 38px;
  width: auto;
}

/* ── Zamon Mulk urg'ulari ───────────────────────────────────────── */
.hero h1 { letter-spacing: -.02em; }
.hero .btn-ghost { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 700; }
.hero .btn-ghost:hover { background: #F0B83C; color: var(--ink); }
.hero-stats div strong { color: var(--gold); }
.section-head h2 { letter-spacing: -.015em; }
.section-head h2::after {
  content: ""; display: block; width: 44px; height: 4px; border-radius: 4px;
  margin-top: 10px; background: linear-gradient(90deg, var(--gold), var(--brand));
}
.feature .ico { background: var(--gold-soft); color: #9A6A08; }
.card-price { color: var(--brand); }
.site-nav a.active { background: var(--brand-soft); color: var(--brand); }
