/* ================================================================
   AMU TEPLO — dizayn tizimi (amu-teplo-admin.html uslubida)
   ================================================================ */

/* ---------- Ranglar (kunduzgi rejim) ---------- */
:root {
    --bg: #FEFEFD;
    --surface: #FEFEFD;
    --off: #F4F3F0;
    --line: #E3E1DB;
    --line-strong: #CFCCC3;
    --ink: #191715;
    --muted: #8A867E;
    --red: #B3132B;
    --red-2: #8C0E22;
    --red-tint: #FBEAEB;
    --red-soft: #F0B4BD;
    --dark: #191715;          /* doim to'q bo'lib qoladigan bo'limlar */
    --on-dark: #FEFEFD;
    --btn-bg: #191715;
    --btn-fg: #FEFEFD;
    --shadow: 0 10px 30px rgba(25, 23, 21, 0.08);
    --gutter: 32px;
    --header-h: 72px;
    color-scheme: light;
}

/* ---------- Ranglar (tungi rejim) ---------- */
[data-theme="dark"] {
    --bg: #0F0E0D;
    --surface: #171513;
    --off: #131210;
    --line: #2A2724;
    --line-strong: #3B3733;
    --ink: #F1EFEA;
    --muted: #9A968E;
    --red: #D0243F;
    --red-2: #A81A31;
    --red-tint: #24110F;
    --dark: #080707;
    --on-dark: #F1EFEA;
    --btn-bg: #F1EFEA;
    --btn-fg: #191715;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
}

/* ---------- Asosiy ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Archivo', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color .3s ease, color .3s ease;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.1; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: 'JetBrains Mono', monospace; }
.display { font-family: 'Archivo Black', sans-serif; }
body.no-scroll { overflow: hidden; }

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transition: background-color .3s ease, border-color .3s ease;
}
.header-inner {
    max-width: 1180px; margin: 0 auto;
    padding: 14px var(--gutter);
    min-height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand-block { display: flex; flex-direction: column; line-height: 1.1; flex-shrink: 0; }
.company-name {
    font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 3px;
}
.brand-logo {
    font-family: 'Archivo Black', sans-serif; font-size: 24px; letter-spacing: 0.01em;
    display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.brand-logo .dot { width: 9px; height: 9px; background: var(--red); border-radius: 50%; display: inline-block; }

.main-nav { display: flex; gap: 30px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.main-nav a { opacity: 0.7; transition: opacity .2s, color .2s; }
.main-nav a:hover { opacity: 1; color: var(--red); }

.header-right { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; align-items: center; gap: 4px; font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.lang-switch a {
    padding: 5px 8px; border: 1px solid transparent; border-radius: 2px;
    color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; transition: color .2s, border-color .2s;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.active { color: var(--ink); border-color: var(--line-strong); font-weight: 600; }

.icon-btn {
    width: 34px; height: 34px; flex-shrink: 0;
    border: 1px solid var(--line-strong); border-radius: 50%;
    background: transparent; color: var(--ink);
    display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
    transition: border-color .2s, color .2s, background-color .2s;
}
.icon-btn:hover { border-color: var(--red); color: var(--red); }

.call-btn {
    background: var(--btn-bg); color: var(--btn-fg);
    padding: 11px 18px; border-radius: 2px;
    font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 8px; transition: background-color .2s, color .2s;
}
.call-btn:hover { background: var(--red); color: #fff; }

.burger { display: none; }

/* ================================================================
   HERO SLIDER
   ================================================================ */
.hero { position: relative; height: 560px; overflow: hidden; background: #161412; }
.slide {
    position: absolute; inset: 0; opacity: 0; visibility: hidden;
    display: flex; align-items: center;
    transition: opacity 1.1s ease, visibility 1.1s ease;
}
.slide.active { opacity: 1; visibility: visible; }
.slide-bg { position: absolute; inset: 0; background: linear-gradient(115deg, #161412 40%, #7A0E20 135%); }
.slide:nth-child(3n+2) .slide-bg { background: linear-gradient(115deg, #1c1815 40%, #9c1a2f 135%); }
.slide:nth-child(3n+3) .slide-bg { background: linear-gradient(115deg, #171512 40%, #6d0c1e 135%); }
.slide-content {
    position: relative; z-index: 2; width: 100%;
    max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter);
    color: #FEFEFD;
}
.slide-eyebrow {
    font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #F0B4BD;
    letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px;
}
.slide-title {
    font-family: 'Archivo Black', sans-serif; font-size: 52px; line-height: 1.02;
    max-width: 640px; margin-bottom: 20px;
}
.slide-sub { font-size: 16px; max-width: 460px; color: rgba(254,254,253,0.78); margin-bottom: 30px; line-height: 1.55; }
.slide-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-red, .btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 15px 26px; font-size: 13.5px; border-radius: 2px; letter-spacing: 0.02em;
    transition: background-color .2s, border-color .2s, color .2s;
}
.btn-red { background: var(--red); color: #fff; font-weight: 700; border: none; }
.btn-red:hover { background: var(--red-2); }
.btn-outline { border: 1px solid rgba(254,254,253,0.4); color: #FEFEFD; font-weight: 600; background: transparent; }
.btn-outline:hover { border-color: #FEFEFD; }
.rig-mark {
    position: absolute; right: 70px; top: 50%; transform: translateY(-50%); z-index: 1;
    width: 220px; height: 280px; border: 1.5px solid rgba(254,254,253,0.25); border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 72px; color: rgba(254,254,253,0.45);
}
.slide-dots {
    position: absolute; bottom: 26px; left: 0; right: 0; z-index: 3;
    display: flex; justify-content: center; gap: 10px;
}
.dot-btn { width: 26px; height: 3px; background: rgba(254,254,253,0.3); border: none; padding: 0; transition: background-color .3s; }
.dot-btn::before { content: ""; display: block; height: 20px; margin-top: -9px; } /* bosish maydonini kattalashtirish */
.dot-btn.active { background: var(--red); }

/* ================================================================
   ISHONCH CHIZIG'I
   ================================================================ */
.trust { border-bottom: 1px solid var(--line); }
.trust-inner {
    max-width: 1180px; margin: 0 auto; padding: 22px var(--gutter);
    display: grid; grid-template-columns: repeat(4, 1fr);
}
.trust-item { border-left: 1px solid var(--line); padding-left: 18px; }
.trust-item:first-child { border-left: none; padding-left: 0; }
.trust-num { font-family: 'Archivo Black', sans-serif; font-size: 26px; color: var(--red); line-height: 1.2; }
.trust-lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-top: 2px; }

/* ================================================================
   BO'LIMLAR
   ================================================================ */
.section { padding: 80px 0; }
.section-off { background: var(--surface); }
.sec-head {
    display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
    margin-bottom: 40px; padding-bottom: 22px; border-bottom: 1px solid var(--line);
}
.sec-head h2 { font-family: 'Archivo Black', sans-serif; font-size: 30px; }
.sec-note { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--muted); max-width: 280px; text-align: right; }
.tag {
    font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--red);
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px;
}

/* ---------- Biz haqimizda ---------- */
.about-lead { font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 760px; margin-bottom: 40px; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.about-card {
    border: 1px solid var(--line); background: var(--surface); padding: 28px;
    transition: border-color .2s, transform .2s;
}
.about-card:hover { border-color: var(--red); transform: translateY(-4px); }
.about-card .num { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); margin-bottom: 22px; display: flex; justify-content: space-between; align-items: center; }
.about-card .num i { font-size: 22px; color: var(--red); }
.about-card h3 { font-family: 'Archivo Black', sans-serif; font-size: 19px; margin-bottom: 10px; }
.about-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ---------- Kalkulyator ---------- */
.calc-box { background: var(--surface); border: 1px solid var(--line); display: grid; grid-template-columns: 0.9fr 1.1fr; }
.calc-left { padding: 44px; border-right: 1px solid var(--line); }
.calc-left h3 { font-family: 'Archivo Black', sans-serif; font-size: 24px; margin-bottom: 14px; }
.calc-left p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 28px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 8px; }
.field input, .field select {
    width: 100%; border: 1.5px solid var(--line-strong); padding: 12px 14px; border-radius: 2px;
    font-family: 'Archivo', sans-serif; font-size: 16px; background: var(--bg); color: var(--ink);
    -webkit-appearance: none; appearance: none;
}
.field select {
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
    background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--red); }
.calc-btn {
    width: 100%; background: var(--btn-bg); color: var(--btn-fg); padding: 15px; border: none; border-radius: 2px;
    font-weight: 700; font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.03em; transition: background-color .2s, color .2s;
}
.calc-btn:hover { background: var(--red); color: #fff; }
.calc-right { padding: 44px; display: flex; flex-direction: column; justify-content: center; background: var(--red-tint); }
.calc-placeholder { color: var(--muted); font-size: 14px; line-height: 1.6; }
#calc-result { display: none; }
#calc-result.show { display: block; }
.result-card { background: var(--surface); border: 1px solid var(--line); padding: 24px; display: grid; grid-template-columns: 110px 1fr; gap: 20px; align-items: start; }
.result-img { width: 110px; height: 110px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.result-img img { width: 100%; height: 100%; object-fit: contain; }
.result-card h4 { font-family: 'Archivo Black', sans-serif; font-size: 20px; margin-bottom: 6px; }
.result-model { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--muted); margin-bottom: 14px; text-transform: uppercase; }
.result-specs { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 16px; font-family: 'JetBrains Mono', monospace; }
.result-specs .num { font-size: 16px; font-weight: 700; color: var(--red); }
.result-specs .lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.result-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ---------- Katalog ---------- */
.cat-head {
    display: flex; align-items: center; gap: 12px; margin: 0 0 22px;
    font-family: 'JetBrains Mono', monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
}
.cat-head i { color: var(--red); }
.cat-head .count { color: var(--muted); margin-left: auto; }
.cat-group + .cat-group { margin-top: 56px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card {
    border: 1px solid var(--line); background: var(--surface);
    display: flex; flex-direction: column; min-width: 0;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-4px); box-shadow: var(--shadow); }
.card-link { display: flex; flex-direction: column; flex: 1; }
.card-img {
    aspect-ratio: 4 / 3; background: #fff; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    font-size: 38px; color: var(--line-strong);
}
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 20px; flex: 1; }
.card-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; overflow-wrap: anywhere; }
.card-body .model { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--muted); margin-bottom: 14px; text-transform: uppercase; }
.spec-row {
    display: flex; justify-content: space-between; gap: 10px;
    font-family: 'JetBrains Mono', monospace; font-size: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line);
}
.spec-row:last-child { border-bottom: none; }
.spec-row span:first-child { color: var(--muted); }
.spec-row span:last-child { font-weight: 700; text-align: right; }
.more-link { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--red); letter-spacing: 0.02em; }
.card-foot {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 14px 20px; border-top: 1px solid var(--line);
}
.price { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 14px; white-space: nowrap; }
.price small { font-weight: 500; color: var(--muted); font-size: 11px; }
.order-btn {
    background: var(--red); color: #fff; padding: 9px 16px; border: none; border-radius: 2px;
    font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em;
    white-space: nowrap; transition: background-color .2s;
}
.order-btn:hover { background: var(--red-2); }
.empty-note {
    grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; padding: 30px; text-align: center;
    border: 1px dashed var(--line-strong);
}

/* ---------- Manzil ---------- */
.map-box { display: grid; grid-template-columns: 0.9fr 1.1fr; border: 1px solid var(--line); background: var(--surface); }
.map-info { padding: 44px; border-right: 1px solid var(--line); }
.map-info h3 { font-family: 'Archivo Black', sans-serif; font-size: 24px; margin-bottom: 18px; }
.map-address { display: flex; gap: 12px; font-size: 15px; line-height: 1.6; margin-bottom: 18px; }
.map-address i { color: var(--red); margin-top: 5px; }
.map-info p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 26px; }
.map-frame { min-height: 380px; position: relative; background: #fff; }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ================================================================
   ALOQA (to'q bo'lim)
   ================================================================ */
.contact-sec { background: var(--dark); color: var(--on-dark); padding: 80px 0; }
.contact-box { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.contact-box h2 { font-family: 'Archivo Black', sans-serif; font-size: 30px; margin-bottom: 14px; }
.contact-box p { color: rgba(254,254,253,0.65); font-size: 14.5px; line-height: 1.6; margin-bottom: 24px; max-width: 440px; }
.contact-box .phone { font-family: 'JetBrains Mono', monospace; font-size: 24px; color: #F0B4BD; font-weight: 700; }
.contact-list { display: flex; flex-direction: column; }
.contact-row {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 4px; border-bottom: 1px solid rgba(254,254,253,0.15);
    transition: padding-left .2s, border-color .2s;
}
.contact-row:first-child { border-top: 1px solid rgba(254,254,253,0.15); }
.contact-row:hover { padding-left: 12px; border-bottom-color: var(--red); }
.contact-row .ic {
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
    border: 1px solid rgba(254,254,253,0.25);
    display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.contact-row .name { font-weight: 700; font-size: 14px; }
.contact-row .val { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: rgba(254,254,253,0.55); }
.contact-row .arr { margin-left: auto; color: rgba(254,254,253,0.4); font-size: 12px; }
.contact-row:hover .arr { color: var(--red-soft); }

/* ---------- Footer ---------- */
.site-footer { padding: 30px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); }
.social-mini { display: flex; gap: 10px; }
.social-mini a {
    width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--ink);
    transition: border-color .2s, color .2s;
}
.social-mini a:hover { border-color: var(--red); color: var(--red); }

/* ================================================================
   MAHSULOT SAHIFASI
   ================================================================ */
.crumbs {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 28px;
}
.crumbs a:hover { color: var(--red); }
.crumbs .cur { color: var(--ink); overflow-wrap: anywhere; }
.detail-box { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); background: var(--surface); }
.detail-img {
    background: #fff; border-right: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center; padding: 32px; min-height: 420px;
    font-size: 64px; color: var(--line-strong);
}
.detail-img img { max-height: 520px; width: 100%; object-fit: contain; }
.detail-info { padding: 44px; display: flex; flex-direction: column; }
.detail-info h1 { font-family: 'Archivo Black', sans-serif; font-size: 34px; margin-bottom: 26px; overflow-wrap: anywhere; }
.detail-specs { margin-bottom: 26px; }
.detail-specs .spec-row { font-size: 13px; padding: 11px 0; }
.detail-price { padding: 22px; background: var(--red-tint); border: 1px solid var(--line); margin-bottom: 22px; }
.detail-price .lbl { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--red); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.detail-price .val { font-family: 'Archivo Black', sans-serif; font-size: 30px; color: var(--red); line-height: 1.2; }
.detail-price .val small { font-family: 'Archivo', sans-serif; font-weight: 600; font-size: 15px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-actions > * { flex: 1 1 180px; }
.btn-dark {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 15px 26px; font-size: 13.5px; font-weight: 700; border-radius: 2px; letter-spacing: 0.02em;
    background: var(--btn-bg); color: var(--btn-fg); border: none; transition: background-color .2s, color .2s;
}
.btn-dark:hover { background: var(--red); color: #fff; }
.detail-block { margin-top: 56px; }
.detail-desc { font-size: 15.5px; line-height: 1.75; color: var(--ink); max-width: 820px; }
.detail-desc p + p { margin-top: 12px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ================================================================
   MODAL
   ================================================================ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 300; padding: 24px;
    background: rgba(20,18,16,0.65); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
    position: relative; width: 100%; max-width: 400px;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 34px;
    animation: modalIn .25s ease; max-height: calc(100vh - 48px); overflow-y: auto;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.modal-box h3 { font-family: 'Archivo Black', sans-serif; font-size: 20px; margin-bottom: 6px; padding-right: 30px; }
.modal-box > p { font-size: 13px; color: var(--muted); margin-bottom: 22px; line-height: 1.5; }
.modal-close {
    position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
    border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink);
    display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.modal-close:hover { border-color: var(--red); color: var(--red); }
.modal-option {
    display: flex; align-items: center; gap: 14px;
    padding: 15px 16px; margin-bottom: 10px; border: 1.5px solid var(--line-strong); border-radius: 2px;
    font-weight: 700; font-size: 14px; transition: border-color .2s, background-color .2s;
}
.modal-option:last-child { margin-bottom: 0; }
.modal-option i { width: 20px; text-align: center; font-size: 18px; color: var(--red); }
.modal-option .arr { margin-left: auto; color: var(--muted); font-size: 12px; }
.modal-option:hover { border-color: var(--red); background: var(--red-tint); }

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Katta planshet / kichik noutbuk */
@media (max-width: 1100px) {
    .main-nav { gap: 20px; }
    .rig-mark { right: 40px; width: 180px; height: 230px; font-size: 60px; }
    .slide-title { font-size: 46px; max-width: 560px; }
}

/* Planshet: menyu burger ichiga o'tadi */
@media (max-width: 960px) {
    :root { --gutter: 24px; --header-h: 64px; }
    .burger { display: inline-flex; }
    .main-nav {
        position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 49;
        flex-direction: column; gap: 0; padding: 12px var(--gutter) 32px;
        background: var(--bg); border-top: 1px solid var(--line);
        font-size: 18px; overflow-y: auto;
        opacity: 0; visibility: hidden; transform: translateY(-8px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }
    .main-nav.open { opacity: 1; visibility: visible; transform: none; }
    .main-nav a { opacity: 1; padding: 18px 0; border-bottom: 1px solid var(--line); font-family: 'Archivo Black', sans-serif; }
    .header-inner { gap: 12px; }
    .header-right { gap: 10px; }

    .hero { height: 520px; }
    .rig-mark { display: none; }
    .slide-title { font-size: 40px; }

    .section, .contact-sec { padding: 64px 0; }
    .about-grid { grid-template-columns: 1fr 1fr; }
    .about-card:last-child { grid-column: 1 / -1; }
    .calc-box, .map-box, .detail-box { grid-template-columns: 1fr; }
    .calc-left, .map-info { border-right: none; border-bottom: 1px solid var(--line); }
    .detail-img { border-right: none; border-bottom: 1px solid var(--line); min-height: 300px; }
    .contact-box { grid-template-columns: 1fr; gap: 36px; }
}

/* Telefon */
@media (max-width: 640px) {
    :root { --gutter: 16px; }
    .company-name { display: none; }
    .brand-logo { font-size: 20px; }
    .call-btn { padding: 0; width: 34px; height: 34px; border-radius: 50%; justify-content: center; }
    .call-btn .txt { display: none; }
    .lang-switch a { padding: 5px 6px; }

    /* Slaydlar ustma-ust turadi, balandlik eng uzun matnga moslashadi */
    .hero { height: auto; display: grid; }
    .slide { position: relative; inset: auto; grid-area: 1 / 1; align-items: flex-end; padding: 56px 0 72px; min-height: 480px; }
    .slide-title { font-size: 30px; line-height: 1.08; }
    .slide-sub { font-size: 15px; margin-bottom: 24px; }
    .slide-cta { flex-direction: column; gap: 10px; }
    .slide-cta a { width: 100%; }

    .trust-inner { grid-template-columns: 1fr 1fr; gap: 18px 0; padding: 20px var(--gutter); }
    .trust-item:nth-child(3) { border-left: none; padding-left: 0; }
    .trust-num { font-size: 22px; }

    .section, .contact-sec { padding: 48px 0; }
    .sec-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 28px; padding-bottom: 16px; }
    .sec-head h2, .contact-box h2 { font-size: 24px; }
    .sec-note { text-align: left; max-width: none; }
    .about-lead { font-size: 15px; margin-bottom: 28px; }
    .about-grid { grid-template-columns: 1fr; gap: 14px; }
    .about-card { padding: 22px; }

    .calc-left, .calc-right, .map-info, .detail-info { padding: 24px 20px; }
    .calc-left h3, .map-info h3 { font-size: 20px; }
    .result-card { grid-template-columns: 1fr; padding: 18px; }
    .result-img { width: 100%; height: 160px; }

    /* Katalog telefonda 2 tadan */
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .card-img { font-size: 28px; }
    .card-img img { padding: 6px; }
    .card-body { padding: 12px; }
    .card-body h3 { font-size: 14px; }
    .card-body .model { font-size: 9.5px; margin-bottom: 8px; }
    .spec-row { flex-direction: column; gap: 0; font-size: 11px; padding: 5px 0; }
    .spec-row span:last-child { text-align: left; }
    .more-link { font-size: 11px; }
    .card-foot { flex-direction: column; align-items: stretch; padding: 12px; gap: 8px; }
    .price { font-size: 13px; white-space: normal; }
    .order-btn { width: 100%; padding: 10px; }
    .cat-group + .cat-group { margin-top: 40px; }

    .map-frame { min-height: 300px; }
    .contact-box .phone { font-size: 20px; }

    .footer-inner { flex-direction: column-reverse; text-align: center; }

    .detail-info h1 { font-size: 26px; margin-bottom: 18px; }
    .detail-price .val { font-size: 24px; }
    .detail-img { padding: 20px; min-height: 240px; }
    .detail-block { margin-top: 40px; }
    .detail-desc { font-size: 15px; }
    .detail-specs .spec-row { flex-direction: row; font-size: 12px; }
    .detail-specs .spec-row span:last-child { text-align: right; }

    .modal-overlay { padding: 16px; align-items: flex-end; }
    .modal-box { padding: 26px 20px; max-width: none; }
}

/* Juda tor ekranlar */
@media (max-width: 360px) {
    .brand-logo { font-size: 16px; gap: 6px; }
    .brand-logo .dot { width: 7px; height: 7px; }
    .header-inner { gap: 8px; }
    .header-right { gap: 5px; }
    .lang-switch { gap: 0; }
    .lang-switch a { padding: 4px 3px; }
    .icon-btn, .call-btn { width: 30px; height: 30px; font-size: 12px; }
    .slide-title { font-size: 26px; }
    .grid { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
}

/* Gallery */
.detail-gallery { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.main-img { background: #fff; border: 1px solid var(--line); border-radius: 4px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.main-img img { width: 100%; height: 100%; object-fit: contain; padding: 20px; transition: opacity 0.3s; }
.thumb-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.thumb { width: 80px; height: 80px; border: 1px solid var(--line); border-radius: 4px; object-fit: contain; cursor: pointer; padding: 5px; background: #fff; opacity: 0.6; transition: all 0.2s; flex-shrink: 0; }
.thumb:hover { opacity: 0.9; }
.thumb.active { opacity: 1; border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }

/* Nice description */
.nice-desc { background: var(--off); padding: 24px; border-radius: 6px; border-left: 4px solid var(--red); font-size: 15px; line-height: 1.6; color: var(--ink); }
.nice-desc p { margin-bottom: 12px; }
.nice-desc p:last-child { margin-bottom: 0; }

/* Bold spec labels */
.spec-row span:first-child { color: var(--ink); font-weight: 600; }

@media (max-width: 768px) {
    .specs-list .spec-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px 16px;
    }
    .specs-list .spec-row span:last-child {
        text-align: left;
        max-width: 100%;
    }
}
