/* Yorug' mavzu — asosiy */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f5f7;
  --card: #ffffff;
  --text: #0e1726;
  --muted: #5d6676;
  --line: #e6e8ec;
  --accent: #c9a45c;
  --accent-strong: #a8833a;
  --accent-soft: rgba(201, 164, 92, 0.14);
  --navy: #0b1a33;
}
/* Qorong'i mavzu */
:root[data-theme="dark"] {
  --bg: #0b1a33;
  --bg-soft: #0f2140;
  --card: #12264a;
  --text: #f3efe6;
  --muted: #a9b3c6;
  --line: #22385e;
  --accent-strong: #e3c27e;
  --accent-soft: rgba(201, 164, 92, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color .3s, color .3s;
}
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
svg { flex-shrink: 0; }

/* ---------- Yuqori qora panel ---------- */
.topbar { background: #0e1117; color: #fff; font-size: 14px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 40px; }
.topbar nav { display: flex; gap: 24px; }
.topbar a { color: rgba(255, 255, 255, 0.85); text-decoration: none; font-weight: 600; transition: color .2s; }
.topbar a:hover { color: var(--accent); }
.topbar-phone { display: inline-flex; align-items: center; gap: 8px; color: #fff !important; font-weight: 700 !important; }
.topbar-phone svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------- Asosiy header ---------- */
.mainbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); border-bottom: 1px solid var(--line);
  transition: box-shadow .3s, background-color .3s;
}
.mainbar.scrolled { box-shadow: 0 6px 24px rgba(10, 20, 40, 0.08); }
.mainbar .wrap { display: flex; align-items: center; gap: 20px; height: 80px; }

.logo { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); text-decoration: none; white-space: nowrap; }
.logo span { color: var(--accent); }

.catalog-menu { position: relative; }
.catalog-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 26px;
  border: none; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700;
  background: linear-gradient(135deg, #e3c27e, #b8904a); color: #14130f;
  transition: filter .2s;
}
.catalog-btn:hover { filter: brightness(1.05); }
.catalog-btn svg { width: 20px; height: 20px; }
.catalog-dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 280px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(10, 20, 40, 0.14); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.catalog-dropdown.open { opacity: 1; visibility: visible; transform: none; }
.catalog-dropdown a {
  display: block; padding: 11px 14px; border-radius: 9px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px;
}
.catalog-dropdown a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.catalog-dropdown a.all { color: var(--accent-strong); border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; margin-top: 4px; }

.search { flex: 1; position: relative; min-width: 0; }
.search input {
  width: 100%; height: 48px; padding: 0 52px 0 22px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--bg-soft); color: var(--text); font: inherit; font-size: 15px;
  outline: none; transition: border-color .2s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--accent); }
.search button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: none; background: none; cursor: pointer; color: var(--muted);
  display: grid; place-items: center;
}
.search button svg { width: 20px; height: 20px; }

.header-actions { display: flex; gap: 6px; }
.action {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 68px; padding: 4px 6px; border: none; background: none; cursor: pointer;
  color: var(--text); text-decoration: none; font: inherit; font-size: 12px; font-weight: 500;
  transition: color .2s;
}
.action svg { width: 22px; height: 22px; }
.action:hover { color: var(--accent-strong); }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

/* ---------- Hero slayder ---------- */
.hero { position: relative; height: clamp(480px, 62vh, 620px); overflow: hidden; background: #0e1117; }
.slide {
  position: absolute; inset: 0; display: flex; align-items: center;
  opacity: 0; visibility: hidden; transition: opacity .8s, visibility .8s;
}
.slide.active { opacity: 1; visibility: visible; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 7s ease-out; }
.slide.active img { transform: scale(1); }
.slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8, 12, 20, 0.88) 0%, rgba(8, 12, 20, 0.7) 40%, rgba(8, 12, 20, 0.35) 100%);
}
.slide-content { position: relative; z-index: 1; width: 100%; color: #fff; }
/* Yozuv kontent chegarasidan 120px chaproqda, lekin strelkaga tegmaydi */
.slide-content.wrap { max-width: none; padding-left: max(84px, calc((100% - 1280px) / 2 + 32px - 120px)); }
.slide-content > * { max-width: 620px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px); font-size: 14px; font-weight: 600; margin-bottom: 22px;
}
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-size: clamp(30px, 3.6vw, 48px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 18px; }
.hero p { font-size: clamp(16px, 1.3vw, 19px); color: rgba(255, 255, 255, 0.85); font-weight: 500; }
.slide-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.4);
  transition: background-color .2s;
}
.slider-arrow:hover { background: rgba(255, 255, 255, 0.2); }
.slider-arrow svg { width: 20px; height: 20px; }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }
.slider-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; gap: 8px; }
.slider-dots button {
  width: 28px; height: 4px; border: none; border-radius: 2px; cursor: pointer;
  background: rgba(255, 255, 255, 0.4); transition: width .3s, background-color .3s;
}
.slider-dots button.active { width: 44px; background: var(--accent); }

/* ---------- Afzalliklar ---------- */
.benefits { border-bottom: 1px solid var(--line); }
.benefits .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.benefit { display: flex; gap: 16px; align-items: flex-start; }
.benefit svg { width: 36px; height: 36px; color: var(--accent); }
.benefit b { display: block; font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.benefit span { font-size: 14px; color: var(--muted); line-height: 1.45; }

/* ---------- Tugmalar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 32px; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: 16px;
  transition: filter .2s, transform .2s;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #e3c27e, #b8904a); color: #14130f; }
.btn-light { background: #fff; color: #0e1117; }
.btn-outline { border: 1.5px solid var(--accent); color: var(--accent-strong); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Umumiy bo'limlar ---------- */
.block { padding: 80px 0; scroll-margin-top: 80px; }
.block.soft { background: var(--bg-soft); }
.block.dark { background: #0e1117; color: #fff; }
.block-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 36px; }
.block-head h2 { font-size: clamp(26px, 2.8vw, 40px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.block-head p { color: var(--muted); margin-top: 8px; font-size: 16px; }
.block.dark .block-head p { color: rgba(255, 255, 255, 0.7); }
.more { color: var(--accent-strong); font-weight: 700; text-decoration: none; white-space: nowrap; font-size: 15px; }
.more:hover { text-decoration: underline; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  color: var(--text); text-decoration: none;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
a.card:hover, .card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 14px 34px rgba(10, 20, 40, 0.09); }
.card .media { border: none; border-radius: 0; }
.card .media.empty::after { border: none; }
.card-body { padding: 20px 22px 24px; }
.card h3 { font-size: 18px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.card p { font-size: 15px; color: var(--muted); margin-bottom: 14px; }
.link { color: var(--accent-strong); font-weight: 700; font-size: 14px; text-decoration: none; }
.city { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* ---------- Rasm joylari ---------- */
.media {
  position: relative; overflow: hidden; border-radius: 16px;
  background: var(--bg-soft); border: 1px solid var(--line); aspect-ratio: 4 / 3;
}
.media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.card:hover .media img { transform: scale(1.04); }
.media.empty img { display: none; }
.media.empty::after {
  content: "Rasm"; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  border: 1px dashed var(--line); border-radius: inherit;
}

/* ---------- Katalog kategoriyalari ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.cat-card {
  position: relative; display: block; padding: 20px; min-height: 200px; border-radius: 18px;
  background: var(--bg-soft); border: 1px solid transparent; color: var(--text); text-decoration: none; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.cat-card > svg {
  width: 44px; height: 44px; padding: 10px; border-radius: 12px;
  background: var(--card); color: var(--accent-strong); margin-bottom: 14px;
}
.cat-card .media {
  position: absolute; top: 14px; right: 14px; width: 46%; aspect-ratio: 1; border: none; background: transparent;
}
.cat-card .media img { object-fit: contain; }
.cat-card .media.empty::after { content: ""; border: none; }
.cat-card h3 { position: relative; font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; max-width: 60%; }
.cat-card p { position: relative; font-size: 13px; color: var(--muted); line-height: 1.5; }

.quick { margin-top: 36px; }
.quick-title { display: block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Tayyor yechimlar ---------- */
.solution .pill {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  padding: 4px 12px; border-radius: 999px; background: var(--accent); color: #14130f; font-size: 12px; font-weight: 700;
}
.solution .card-body { display: flex; flex-direction: column; gap: 6px; }
.solution h3 { margin-bottom: 4px; }

/* ---------- Raqamlar ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 28px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); }
.stat b { display: block; font-size: clamp(32px, 3.4vw, 48px); font-weight: 800; color: #e3c27e; line-height: 1.1; margin-bottom: 10px; }
.stat span { font-size: 15px; color: rgba(255, 255, 255, 0.72); }
.btn-sm { height: 46px; padding: 0 24px; font-size: 15px; }

/* ---------- Brendlar ---------- */
.brands { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.brand {
  height: 96px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  display: grid; place-items: center; padding: 18px; position: relative;
}
.brand img { max-width: 100%; max-height: 100%; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .2s, opacity .2s; }
.brand:hover img { filter: none; opacity: 1; }
.brand.empty img { display: none; }
.brand.empty::after { content: "Logotip"; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- CTA ---------- */
.cta-wrap { padding-top: 0; }
.cta {
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
  padding: clamp(28px, 4vw, 56px); border-radius: 24px; color: #fff;
  background:
    radial-gradient(circle at 85% 30%, rgba(227, 194, 126, 0.35), transparent 45%),
    linear-gradient(135deg, #0b1a33, #13284d);
}
.cta h2 { font-size: clamp(24px, 2.6vw, 36px); font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 12px; max-width: 640px; }
.cta p { color: rgba(255, 255, 255, 0.75); max-width: 560px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); }

/* ---------- Aloqa ---------- */
.contact-card { padding: 28px; }
.contact-card .label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: 10px; }
.contact-card b { display: block; font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.contact-card .muted { font-size: 14px; color: var(--muted); }

/* ---------- Footer ---------- */
footer { background: #0e1117; color: rgba(255, 255, 255, 0.72); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
footer .logo { color: #fff; display: inline-block; margin-bottom: 14px; }
footer p { max-width: 320px; line-height: 1.6; }
footer h4 { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.footer-grid a:not(.logo) { display: block; color: rgba(255, 255, 255, 0.72); text-decoration: none; margin-bottom: 9px; transition: color .2s; }
.footer-grid a:not(.logo):hover { color: #e3c27e; }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a {
  display: grid !important; place-items: center; width: 40px; height: 40px; margin: 0 !important; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.socials svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 22px; padding-bottom: 22px; font-size: 13px; }

/* ---------- Planshet ---------- */
@media (max-width: 1080px) {
  .action span { display: none; }
  .action { min-width: 40px; }
  .topbar nav { gap: 16px; }
  .benefits .wrap { grid-template-columns: repeat(2, 1fr); }
  .cat-grid, .grid-4, .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .brands { grid-template-columns: repeat(3, 1fr); }
  .cta { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Telefon ---------- */
@media (max-width: 760px) {
  .topbar nav { display: none; }
  .topbar .wrap { justify-content: center; }

  .mainbar .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; gap: 12px; }
  .logo { font-size: 20px; }
  .mainbar .logo { flex: 1 1 calc(100% - 170px); min-width: 0; }
  .header-actions { order: 2; gap: 2px; }
  .action { min-width: 36px; padding: 4px; }
  .badge-n { right: -2px; }
  .catalog-menu { order: 3; }
  .catalog-dropdown { min-width: min(280px, calc(100vw - 32px)); }
  .catalog-btn { height: 44px; padding: 0 18px; font-size: 15px; }
  .search { order: 4; flex-basis: 0; }
  .search input { height: 44px; font-size: 14px; }

  .hero { height: 540px; }
  .slide::after { background: linear-gradient(0deg, rgba(8, 12, 20, 0.92) 0%, rgba(8, 12, 20, 0.6) 100%); }
  .slide-content { align-self: flex-end; padding-bottom: 64px; }
  .slide-content.wrap { padding-left: clamp(16px, 3vw, 32px); }
  .slider-arrow { display: none; }
  .btn { height: 50px; padding: 0 24px; font-size: 15px; }

  .benefits .wrap { grid-template-columns: 1fr; gap: 20px; padding-top: 28px; padding-bottom: 28px; }

  .block { padding: 56px 0; }
  .block-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .cat-grid { gap: 12px; }
  .cat-card { min-height: 180px; padding: 16px; }
  .stats { gap: 12px; }
  .stat { padding: 20px; }
  .brands { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Header hisoblagichlari ---------- */
.action { position: relative; }
.badge-n {
  position: absolute; top: -2px; right: 14px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #e0483e; color: #fff; font-style: normal; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
.badge-n[hidden] { display: none; }

/* ---------- Mahsulot kartochkasi (do'kon) ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 20px; }
.product { display: flex; flex-direction: column; }
.product:hover { transform: none; }
.product-media { position: relative; padding: 14px 14px 0; }
.product-media .media { border-radius: 12px; aspect-ratio: 1; background: #fff; border: none; }
:root[data-theme="dark"] .product-media .media { background: var(--bg-soft); }
.product-media .media img { object-fit: contain; }
.product-tools { position: absolute; top: 22px; right: 22px; z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.tool {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
  transition: color .2s, border-color .2s, background-color .2s;
}
.tool svg { width: 17px; height: 17px; }
.tool:hover { color: var(--accent-strong); border-color: var(--accent); }
.tool.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.tool.on svg { fill: currentColor; }
.tool[data-action="cmp"].on svg { fill: none; }
.product-body { flex: 1; display: flex; flex-direction: column; padding: 14px 16px 16px; }
.price { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 4px; }
.price small { font-size: 14px; font-weight: 600; color: var(--muted); }
.price.ask { font-size: 17px; color: var(--accent-strong); }
.product-cat { display: block; line-height: 1.4; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.product h3 { margin: 4px 0 8px; font-size: 16px; font-weight: 600; line-height: 1.35; }
.stock { font-size: 13px; font-weight: 600; color: #1f9d55; margin-bottom: 4px; }
.stock::before { content: "● "; }
.stock.order { color: var(--accent-strong); }
.buy { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }
.qty {
  display: flex; align-items: center; height: 42px; border: 1px solid var(--line); border-radius: 999px; flex-shrink: 0;
}
.qty button {
  width: 32px; height: 100%; border: none; background: none; cursor: pointer; color: var(--muted);
  font: inherit; font-size: 18px; line-height: 1;
}
.qty button:hover { color: var(--accent-strong); }
.qty span { min-width: 22px; text-align: center; font-weight: 700; font-size: 15px; }
.qty.small { height: 34px; display: inline-flex; margin-top: 6px; }
.qty.small button { width: 28px; }
.to-cart {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; transition: background-color .2s, border-color .2s, color .2s;
}
.to-cart svg { width: 18px; height: 18px; }
.to-cart:hover { background: var(--accent); border-color: var(--accent); color: #14130f; }

.popular-head { display: flex; justify-content: space-between; align-items: baseline; margin: 48px 0 20px; }
.popular-head h3 { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.chips a {
  font-size: 14px; font-weight: 600; text-decoration: none;
  padding: 8px 16px; border-radius: 999px; background: var(--card); color: var(--text); border: 1px solid var(--line);
  transition: border-color .2s, color .2s;
}
.chips a:hover { border-color: var(--accent); color: var(--accent-strong); }

/* ---------- Katalog sahifasi ---------- */
.shop-page { padding: 24px 0 80px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-strong); }
.crumbs b { color: var(--text); font-weight: 600; }
.shop-title { font-size: clamp(26px, 2.6vw, 36px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 24px; }
.shop { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; }
.shop-side { position: sticky; top: 100px; }
.side-head {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  border: none; background: none; cursor: pointer; padding: 0 4px 12px; color: var(--text);
  font: inherit; font-size: 16px; font-weight: 700;
}
.side-head svg { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
.shop-side.collapsed .side-head svg { transform: rotate(-90deg); }
.shop-side.collapsed .side-cats { display: none; }
.side-cats { display: flex; flex-direction: column; gap: 2px; }
.side-cats a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: background-color .2s, color .2s;
}
.side-cats a svg { width: 20px; height: 20px; color: var(--muted); }
.side-cats a span { flex: 1; line-height: 1.3; }
.side-cats a em { font-style: normal; font-size: 13px; color: var(--muted); }
.side-cats a:hover { background: var(--bg-soft); }
.side-cats a.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.side-cats a.active svg { color: var(--accent-strong); }
.subcats { display: flex; flex-direction: column; padding: 2px 0 6px; }
.subcats a { padding: 8px 12px 8px 44px; font-size: 14px; color: var(--muted); }
.subcats a.active { background: none; color: var(--accent-strong); }
.side-help { margin-top: 20px; padding: 20px; border-radius: 16px; background: var(--bg-soft); }
.side-help b { display: block; font-size: 15px; margin-bottom: 6px; }
.side-help p { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.shop-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px;
}
.sort { display: flex; align-items: center; gap: 8px; }
.sort select {
  height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 15px; cursor: pointer;
}
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); line-height: 1.7; }
.empty-state.wide { grid-column: 1 / -1; }
.empty-state a { color: var(--accent-strong); font-weight: 700; }
.empty-state svg { width: 16px; height: 16px; vertical-align: -3px; }

/* ---------- Savat paneli, taqqoslash oynasi ---------- */
body.locked { overflow: hidden; }
.overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(8, 12, 20, 0.5);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.overlay.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(440px, 100%);
  background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s ease;
  box-shadow: -10px 0 40px rgba(10, 20, 40, 0.15);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 20px; font-weight: 800; }
.close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--text); cursor: pointer; font-size: 22px; line-height: 1; }
.close:hover { border-color: var(--accent); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.cart-row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-row .media { width: 72px; flex-shrink: 0; aspect-ratio: 1; border-radius: 10px; }
.cart-row .media img { object-fit: contain; }
.cart-row .media.empty::after { content: ""; }
.cart-info { flex: 1; min-width: 0; }
.cart-info b { display: block; font-size: 15px; font-weight: 700; line-height: 1.3; }
.cart-info > span { font-size: 14px; color: var(--muted); }
.remove { border: none; background: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }
.remove:hover { color: #e0483e; }
.drawer-foot { padding: 18px 24px 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.drawer-foot[hidden] { display: none; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
.total b { font-size: 22px; font-weight: 800; }
.total-note, .order-hint { font-size: 13px; color: var(--muted); white-space: pre-line; }
.order-hint:empty, .total-note:empty { display: none; }
.drawer-foot input {
  height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font: inherit; font-size: 15px; outline: none;
}
.drawer-foot input:focus { border-color: var(--accent); }
.drawer-foot .btn { height: 50px; width: 100%; }

.modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; pointer-events: none;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-box {
  pointer-events: auto; width: min(960px, 100%); max-height: 90vh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 20px; overflow: hidden; box-shadow: 0 20px 60px rgba(10, 20, 40, 0.25);
}
.modal-body { overflow: auto; padding: 20px 24px 24px; }
.table-wrap { overflow-x: auto; }
.cmp-table { border-collapse: collapse; min-width: 100%; }
.cmp-table th, .cmp-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
.cmp-table th { color: var(--muted); font-weight: 600; white-space: nowrap; width: 120px; }
.cmp-table td { min-width: 180px; }
.cmp-table td .media { width: 120px; aspect-ratio: 1; margin-bottom: 8px; }
.cmp-table td .media img { object-fit: contain; }
.cmp-table td b { display: block; font-size: 15px; margin-bottom: 4px; }
.link-btn { border: none; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; padding: 0; }
.link-btn:hover { color: #e0483e; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 20px);
  padding: 12px 20px; border-radius: 12px; background: #0e1117; color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); opacity: 0; visibility: hidden;
  transition: opacity .25s, transform .25s, visibility .25s; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

@media (max-width: 1080px) {
  .badge-n { right: 2px; }
}
@media (max-width: 900px) {
  .shop { grid-template-columns: 1fr; gap: 16px; }
  .shop-side { position: static; }
  .side-head { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
  .side-cats { margin-top: 8px; }
  .side-help { display: none; }
}
@media (max-width: 760px) {
  .products, .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-media { padding: 8px 8px 0; }
  .product-tools { top: 14px; right: 14px; }
  .tool { width: 30px; height: 30px; }
  .product-body { padding: 10px 10px 12px; }
  .price { font-size: 17px; }
  .price.ask { font-size: 14px; }
  .product h3 { font-size: 14px; }
  .buy { flex-direction: column; gap: 6px; }
  .qty { height: 36px; justify-content: space-between; }
  .to-cart { height: 38px; font-size: 13px; }
  .shop-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .sort select { flex: 1; }
  .popular-head { margin-top: 36px; }
  .popular-head h3 { font-size: 20px; }
}

/* ---------- Xususiyatlar va batafsil oyna ---------- */
a.media { display: block; }
.product h3 a { color: inherit; text-decoration: none; }
.product h3 a:hover { color: var(--accent-strong); }
.mini-specs { list-style: none; font-size: 13px; color: var(--text); margin-bottom: 6px; }
.mini-specs li { line-height: 1.5; }
.mini-specs span { color: var(--muted); }

.detail-box { width: min(1000px, 100%); }
.detail-cat { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); }
.product.detail { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; border: none; background: none; }
.detail-media .media { aspect-ratio: 1; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
:root[data-theme="dark"] .detail-media .media { background: var(--bg-soft); }
.detail-media .media img { object-fit: contain; }
.detail-info h2 { font-size: clamp(20px, 2.2vw, 28px); font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 12px; }
.detail-info .price { font-size: 28px; }
.detail-desc { color: var(--muted); font-size: 15px; margin: 12px 0 4px; }
.detail-info .buy { max-width: 380px; margin-top: 8px; }
.product-tools.inline { position: static; flex-direction: row; align-items: center; gap: 8px; margin-top: 14px; }
.ask-link { margin-left: 6px; color: var(--accent-strong); font-size: 14px; font-weight: 700; text-decoration: none; }
.ask-link:hover { text-decoration: underline; }
.specs-title { font-size: 17px; font-weight: 800; margin: 24px 0 10px; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs th, .specs td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.specs th { width: 45%; color: var(--muted); font-weight: 500; padding-right: 12px; }
.specs td { font-weight: 600; }
.cat-count { position: relative; display: block; font-size: 13px; font-weight: 700; color: var(--accent-strong); margin-bottom: 4px; }

@media (max-width: 760px) {
  .product.detail { grid-template-columns: 1fr; gap: 16px; }
  .detail-media .media { max-width: 320px; margin: 0 auto; }
  .detail-info .buy { flex-direction: row; max-width: none; }
  .detail-info .qty { height: 42px; }
  .detail-info .to-cart { height: 42px; }
  .mini-specs { font-size: 12px; }
}

/* ---------- Chat tugmasi (Telegram'ga xabar) ---------- */
.chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 80; }
.chat-fab {
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  display: grid; place-items: center; color: #14130f;
  background: linear-gradient(135deg, #e3c27e, #b8904a);
  box-shadow: 0 10px 28px rgba(10, 20, 40, 0.28); transition: transform .2s;
}
.chat-fab:hover { transform: scale(1.06); }
.chat-fab svg { width: 28px; height: 28px; }
.chat-panel {
  position: absolute; right: 0; bottom: 76px; width: min(360px, calc(100vw - 32px));
  background: var(--bg); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(10, 20, 40, 0.22);
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.98); transform-origin: bottom right;
  transition: opacity .2s, transform .2s, visibility .2s;
}
.chat-panel.open { opacity: 1; visibility: visible; transform: none; }
.chat-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 18px 20px; color: #fff; background: linear-gradient(135deg, #0b1a33, #13284d);
}
.chat-head b { display: block; font-size: 17px; }
.chat-head span { font-size: 13px; color: rgba(255, 255, 255, 0.7); }
.chat-close { border: none; background: rgba(255, 255, 255, 0.12); color: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; cursor: pointer; line-height: 1; flex-shrink: 0; }
.chat-body { padding: 18px 20px 20px; }
.chat-tg {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px; border-radius: 12px;
  background: #229ed9; color: #fff; text-decoration: none; font-weight: 700; font-size: 15px;
}
.chat-tg:hover { filter: brightness(1.06); }
.chat-tg svg { width: 20px; height: 20px; }
.chat-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 13px; }
.chat-or::before, .chat-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.chat-form { display: flex; flex-direction: column; gap: 10px; }
.chat-form input, .chat-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); font: inherit; font-size: 15px; outline: none; resize: vertical;
}
.chat-form input:focus, .chat-form textarea:focus { border-color: var(--accent); }
.chat-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.chat-form .btn { height: 48px; width: 100%; }
.chat-form .btn:disabled { opacity: .6; cursor: wait; }
.chat-status { font-size: 13px; color: var(--muted); }
.chat-status:empty { display: none; }
.chat-status.ok { color: #1f9d55; font-weight: 600; }
.chat-status.err { color: #d13b31; }
.chat-status a { color: inherit; font-weight: 700; }
.toast { bottom: 96px; }
@media (max-width: 760px) {
  .chat-widget { right: 14px; bottom: 14px; }
  .chat-fab { width: 54px; height: 54px; }
  .chat-panel { bottom: 68px; }
}


/* ---------- Til almashtirgich (UZ | QQ | RU) ---------- */
.i18n-wait body { visibility: hidden; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.lang-switch { display: inline-flex; padding: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.lang-switch button {
  border: none; background: none; cursor: pointer; color: rgba(255, 255, 255, 0.75);
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px; transition: background-color .2s, color .2s;
}
.lang-switch button:hover { color: #fff; }
.lang-switch button.active { background: var(--accent); color: #14130f; }
@media (max-width: 760px) {
  .topbar .wrap { justify-content: space-between !important; }
  .topbar-right { width: 100%; justify-content: space-between; gap: 10px; }
  .topbar-phone { font-size: 13px; }
}

/* ---------- Telefon: ixcham hero ---------- */
@media (max-width: 760px) {
  .hero { height: auto; min-height: 0; aspect-ratio: auto; }
  .slide { position: absolute; }
  .hero { height: clamp(400px, 112vw, 470px); }
  .slide img, .slide.active img { transform: none; transition: none; }  /* telefonda kattalashish effekti yo'q */
  .slide-content { padding-bottom: 44px; }
  .badge { font-size: 12px; padding: 6px 12px; margin-bottom: 12px; }
  .hero h1 { font-size: 27px; line-height: 1.2; margin-bottom: 10px; }
  .hero p {
    font-size: 14.5px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  .slide-actions { margin-top: 18px; gap: 10px; }
  .slide-actions .btn { height: 44px; padding: 0 18px; font-size: 14px; }
  .slider-dots { bottom: 16px; }
}

/* ---------- Telefon: rasm tepada to'liq, matn ostida (barcha slaydlar bir xil) ---------- */
@media (max-width: 760px) {
  .hero { height: auto !important; background: #0e1117; }
  /* Slaydlar bir katakda ustma-ust: balandlik eng uzun slaydga teng, almashganda sakramaydi */
  .hero { display: grid; }
  .slide { position: relative; grid-area: 1 / 1; display: flex; flex-direction: column; align-items: stretch; }
  .slide-content { flex: 1; }
  .slide::after { display: none; }
  .slide img {
    position: relative; inset: auto; display: block; width: 100%; height: auto;
    aspect-ratio: 16 / 9; object-fit: cover; background: linear-gradient(180deg, #2a5aa8, #1b2c4f);
  }
  .slide img.fit-full { object-fit: contain; }   /* banner: yozuvi va bayroqlari kesilmasin */
  .slide-content {
    align-self: stretch; padding-top: 20px; padding-bottom: 46px;
    background: #0e1117;
  }
  .slider-dots { bottom: 18px; }
}

/* Xizmat kartochkalari: rasm joyi banner formatida (≈2,4:1) — banner kesilmaydi */
.service-card .media { aspect-ratio: 1946 / 808; }
.service-card .media img { object-fit: cover; object-position: center; }
