/* sotuv.sifatli.com — landing dizayni (mobil-birinchi) */

:root {
  --green: #16a34a;
  --green-dark: #15803d;
  --red: #dc2626;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f4f6f8;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .07);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  padding-bottom: 84px; /* sticky tugma uchun joy */
}

.wrap { width: 100%; max-width: 520px; margin: 0 auto; padding: 0 16px; }

/* ── Topbar ── */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar__row { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { font-weight: 800; color: var(--green-dark); letter-spacing: -.3px; }
.topbar__badge { font-size: 13px; color: var(--green); font-weight: 600; }

/* ── Mahsulot ── */
.product {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-top: 16px;
}
.product__media {
  position: relative;
  background: linear-gradient(135deg, #eef2f5, #e2e8f0);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}
.product__img { width: 100%; max-width: 280px; height: auto; }
.badge-discount {
  position: absolute; top: 12px; left: 12px;
  background: var(--red); color: #fff;
  font-weight: 700; font-size: 15px;
  padding: 6px 12px; border-radius: 999px;
}
.product__title { font-size: 22px; font-weight: 800; margin: 16px 0 8px; }

.price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.price__now { font-size: 28px; font-weight: 800; color: var(--green-dark); }
.price__old { font-size: 17px; color: var(--muted); text-decoration: line-through; }

/* Xavi'dan keladigan HTML tavsif */
.product__desc { color: #374151; margin-bottom: 4px; word-wrap: break-word; }
.product__desc p { margin: 0 0 10px; }
.product__desc img { max-width: 100%; height: auto; border-radius: 10px; margin: 8px 0; }
.product__desc ul, .product__desc ol { margin: 0 0 10px; padding-left: 20px; }
.product__desc li { margin-bottom: 6px; }
.product__desc h1, .product__desc h2, .product__desc h3 { font-size: 17px; margin: 12px 0 8px; }
.product__desc a { color: var(--green-dark); }
.product__desc iframe { max-width: 100%; }

.badge-oos {
  position: absolute; top: 12px; right: 12px;
  background: #6b7280; color: #fff;
  font-weight: 700; font-size: 14px;
  padding: 6px 12px; border-radius: 999px;
}

/* ── Zakaz formi ── */
.order {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  margin: 16px 0;
}
.order__title { font-size: 20px; font-weight: 800; }
.order__sub { color: var(--muted); font-size: 14px; margin: 6px 0 18px; }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: 14px; font-weight: 600; color: #374151; }
.field__input {
  width: 100%; font-size: 16px;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s;
}
.field__input:focus { border-color: var(--green); }
.field__input.is-error { border-color: var(--red); }
.field__hint { font-size: 13px; color: var(--red); min-height: 16px; }

.btn {
  width: 100%; border: 0; cursor: pointer;
  background: var(--green); color: #fff;
  font-size: 17px; font-weight: 700;
  padding: 15px 16px; border-radius: 10px;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--green-dark); }
.btn:active { transform: scale(.99); }
.btn:disabled { opacity: .6; cursor: default; }

.form__error {
  background: #fef2f2; color: var(--red);
  border: 1px solid #fecaca; border-radius: 10px;
  padding: 10px 12px; font-size: 14px; font-weight: 600;
}

.order__note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ── Reyting (sarlavha tagida) ── */
.rating { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.rating__stars { color: #f59e0b; letter-spacing: 1px; font-size: 16px; }
.rating__num { font-weight: 800; }
.rating__count { color: var(--muted); font-size: 14px; }

/* ── Shoshilinch banner (halol, raqamsiz) ── */
.urgency {
  background: #fff7ed; color: #c2410c;
  border: 1px solid #fed7aa; border-radius: 10px;
  padding: 10px 14px; font-weight: 700; font-size: 14px;
  text-align: center; margin-bottom: 14px;
}

/* ── Ishonch signallari ── */
.trust { list-style: none; display: grid; gap: 8px; margin-top: 14px; }
.trust li { font-size: 14px; color: #374151; }

/* ── Mijozlar sharhlari ── */
.reviews {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 16px; margin: 16px 0;
}
.reviews__title { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.review { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review:first-of-type { padding-top: 0; }
.review:last-child { border-bottom: 0; padding-bottom: 0; }
.review__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.review__avatar {
  width: 38px; height: 38px; flex: 0 0 38px;
  background: var(--green); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.review__meta { display: flex; flex-direction: column; }
.review__name { font-weight: 700; font-size: 14px; }
.review__stars { color: #f59e0b; font-size: 13px; letter-spacing: 1px; }
.review__text { color: #374151; font-size: 14px; }

/* ── Rahmat bloki ── */
.thanks { text-align: center; padding: 24px 8px; }
.thanks__icon {
  width: 64px; height: 64px; margin: 0 auto 14px;
  background: #dcfce7; color: var(--green-dark);
  border-radius: 50%; font-size: 34px;
  display: flex; align-items: center; justify-content: center;
}
.thanks__title { font-size: 20px; font-weight: 800; }
.thanks__text { color: #374151; margin-top: 6px; }
.thanks__hint { color: var(--muted); font-size: 12px; margin-top: 12px; }

/* ── Tugagan mahsulot ── */
.oos { text-align: center; padding: 8px 4px 4px; }
.oos__title { font-size: 19px; font-weight: 800; }
.oos__text { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ── Takliflar (boshqa mahsulotlar) ── */
.suggest { margin: 16px 0; }
.suggest__title { font-size: 18px; font-weight: 800; margin: 4px 4px 12px; }
.suggest__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.suggest__empty { color: var(--muted); padding: 8px; }

.sug-card {
  display: flex; flex-direction: column;
  background: var(--card); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden;
  text-decoration: none; color: var(--ink);
  transition: transform .08s;
}
.sug-card:active { transform: scale(.99); }
.sug-card__media { background: #eef2f5; aspect-ratio: 1 / 1; }
.sug-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sug-card__body { padding: 10px; display: grid; gap: 4px; }
.sug-card__title {
  font-size: 14px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sug-card__price { font-size: 15px; font-weight: 800; color: var(--green-dark); }

@media (min-width: 600px) {
  .suggest__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Footer ── */
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 0 28px; }

/* ── Sticky CTA (mobil) ── */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--green); color: #fff;
  text-align: center; text-decoration: none;
  font-weight: 700; font-size: 16px;
  padding: 16px; box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  z-index: 20;
}
.sticky-cta:active { background: var(--green-dark); }

/* Katta ekranlarda sticky tugma shart emas */
@media (min-width: 720px) {
  .sticky-cta { display: none; }
  body { padding-bottom: 24px; }
}

/* ═══ ADMIN PANEL ═══ */
body.admin { background: #eef1f4; padding-bottom: 24px; }

/* Topbar */
.admin-top { background: #1f2937; color: #fff; }
.admin-top__in {
  max-width: 1100px; margin: 0 auto; padding: 0 16px;
  height: 54px; display: flex; align-items: center; gap: 18px;
}
.admin-top .brand { color: #fff; font-weight: 800; }
.admin-nav { display: flex; gap: 14px; flex: 1; }
.admin-nav a { color: #cbd5e1; text-decoration: none; font-weight: 600; font-size: 15px; }
.admin-nav a.is-active, .admin-nav a:hover { color: #fff; }
.lnk { background: none; border: 0; color: #cbd5e1; cursor: pointer; font-size: 14px; }
.lnk:hover { color: #fff; }

.admin-main { max-width: 1100px; margin: 0 auto; padding: 18px 16px; }
.admin-h1 { font-size: 22px; font-weight: 800; margin-bottom: 14px; }

/* Flash */
.flash {
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 600;
}
.flash--err { background: #fef2f2; border-color: #fecaca; color: var(--red); }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tab {
  padding: 7px 14px; border-radius: 999px; text-decoration: none;
  background: #fff; color: #374151; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line);
}
.tab.is-active { background: var(--green); color: #fff; border-color: var(--green); }

/* Jadval */
.table-wrap { overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: #f8fafc; font-weight: 700; color: #475569; white-space: nowrap; }
.tbl code { background: #f1f5f9; padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.muted { color: var(--muted); }
.err { color: var(--red); }

/* Status badge */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.st-yangi      { background: #dbeafe; color: #1e40af; }
.st-yuborildi  { background: #dcfce7; color: var(--green-dark); }
.st-xato       { background: #fee2e2; color: var(--red); }
.st-oqimsiz    { background: #e5e7eb; color: #374151; }

/* Resend forma */
.resend { display: flex; gap: 6px; align-items: center; }
.resend input[type="text"] {
  width: 110px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
}
.resend button, .tbl button {
  background: var(--green); color: #fff; border: 0; cursor: pointer;
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 700;
}
.tbl button.danger { background: var(--red); }

/* Stream qo'shish forma */
.stream-form {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: #fff; padding: 14px; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.stream-form input {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px;
}
.btn-sm {
  background: var(--green); color: #fff; border: 0; cursor: pointer;
  padding: 9px 16px; border-radius: 8px; font-weight: 700;
}
.hint { color: var(--muted); font-size: 13px; margin-top: 14px; }

/* Login */
.login-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card {
  width: 100%; max-width: 340px; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow); padding: 24px; display: grid; gap: 12px;
}
.login-title { text-align: center; font-size: 22px; font-weight: 800; color: var(--green-dark); }
.login-card input { padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 16px; }
.login-card input:focus { outline: none; border-color: var(--green); }
