/* taklifnoma.link — asosiy sayt stillari (mobile-first) */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #2b2620;
  --muted: #8a7f70;
  --gold: #b8933d;
  --gold-dark: #96762c;
  --line: #eae3d7;
  --radius: 14px;
  --shadow: 0 2px 16px rgba(43, 38, 32, 0.07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem; font-weight: 700; text-decoration: none;
}
.logo span { color: var(--gold); }
.nav-cta {
  background: var(--gold); color: #fff; text-decoration: none;
  padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--gold-dark); }

/* ---- Tugmalar ---- */
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  border: none; cursor: pointer; font-family: inherit; font-size: 1rem;
  font-weight: 600; border-radius: 999px; padding: 14px 32px;
  transition: background 0.2s, transform 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-dark); }
.btn-outline {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Hero ---- */
.hero { text-align: center; padding: 72px 0 56px; }
.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.15; margin-bottom: 18px;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero p {
  color: var(--muted); font-size: 1.08rem; max-width: 560px;
  margin: 0 auto 30px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- Bo'limlar ---- */
.section { padding: 56px 0; }
.section-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  text-align: center; margin-bottom: 8px;
}
.section-sub { text-align: center; color: var(--muted); margin-bottom: 36px; }

/* ---- Shablonlar grid ---- */
.tpl-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.tpl-card {
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tpl-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(43,38,32,0.12); }
.tpl-thumb { aspect-ratio: 3 / 4; overflow: hidden; background: var(--line); }
.tpl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tpl-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tpl-body h3 { font-family: "Playfair Display", serif; font-size: 1.15rem; }
.tpl-body p { color: var(--muted); font-size: 0.88rem; flex: 1; }
.tpl-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.tpl-price { font-weight: 700; color: var(--gold-dark); }
.tpl-choose {
  background: var(--gold); color: #fff; text-decoration: none;
  padding: 8px 18px; border-radius: 999px; font-size: 0.88rem; font-weight: 600;
}
.tpl-choose:hover { background: var(--gold-dark); }

/* ---- Qanday ishlaydi ---- */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.step {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 20px; text-align: center;
}
.step-num {
  width: 40px; height: 40px; border-radius: 50%; background: var(--gold);
  color: #fff; font-weight: 700; display: flex; align-items: center;
  justify-content: center; margin: 0 auto 14px; font-size: 1.05rem;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.88rem; }

/* ---- Narx ---- */
.price-box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 520px; margin: 0 auto; padding: 36px 28px; text-align: center;
}
.price-box .amount {
  font-family: "Playfair Display", serif; font-size: 2.2rem; color: var(--gold-dark);
  margin: 6px 0 4px;
}
.price-box ul { list-style: none; margin: 20px 0 26px; text-align: left; }
.price-box li { padding: 7px 0 7px 30px; position: relative; color: var(--ink); font-size: 0.95rem; }
.price-box li::before { content: "✓"; position: absolute; left: 4px; color: var(--gold); font-weight: 700; }

/* ---- FAQ / izohlar ---- */
.faq { max-width: 680px; margin: 0 auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 12px; padding: 16px 20px;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin-top: 10px; font-size: 0.94rem; }

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

/* ---- Editor ---- */
.editor-layout { display: flex; flex-direction: column; min-height: calc(100vh - 60px); }
.editor-form { padding: 24px 20px 40px; }
.editor-form h1 { font-family: "Playfair Display", serif; font-size: 1.4rem; margin-bottom: 4px; }
.editor-hint { color: var(--muted); font-size: 0.9rem; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 10px; font-family: inherit; font-size: 1rem;
  background: var(--surface); color: var(--ink);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
}
.field textarea { min-height: 90px; resize: vertical; }
.field .hint { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.save-status { font-size: 0.82rem; color: var(--muted); min-height: 1.2em; margin-bottom: 12px; }
.editor-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.missing-list { color: #b0413e; font-size: 0.85rem; margin-top: 10px; }

.editor-preview {
  background: #e9e2d5; padding: 20px;
  display: flex; justify-content: center;
}
.preview-frame-wrap {
  width: 100%; max-width: 400px; height: 720px; max-height: 80vh;
  border-radius: 24px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  border: 6px solid #2b2620; background: #fff;
}
.preview-frame-wrap iframe { width: 100%; height: 100%; border: none; }

@media (min-width: 900px) {
  .editor-layout { flex-direction: row; }
  .editor-form { flex: 1; max-width: 480px; overflow-y: auto; height: calc(100vh - 60px); }
  .editor-preview { flex: 1; align-items: center; position: sticky; top: 60px; height: calc(100vh - 60px); }
}

/* ---- Pending / holat sahifasi ---- */
.status-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 560px; margin: 48px auto; padding: 36px 28px;
}
.status-card h1 { font-family: "Playfair Display", serif; font-size: 1.5rem; margin-bottom: 12px; }
.status-card p { color: var(--muted); margin-bottom: 12px; }
.status-card .link-box {
  background: var(--bg); border: 1.5px dashed var(--gold);
  border-radius: 10px; padding: 14px; text-align: center; font-weight: 700;
  margin: 18px 0; word-break: break-all;
}
.pay-details {
  background: var(--bg); border-radius: 10px; padding: 18px; margin: 18px 0;
}
.pay-details div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 0.95rem; flex-wrap: wrap; }
.pay-details dt { color: var(--muted); }
.pay-details dd { font-weight: 700; }
.badge {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700;
}
.badge-pending { background: #fdf0d5; color: #96762c; }
.badge-published { background: #e0f0e3; color: #2e7d43; }
