/* =====================================================================
   Lider Decor Plast — dizayn "C — Чистый каталог"
   Butun sayt dizayni shu faylda. Ranglar/o'lchamlar — :root o'zgaruvchilarida.
   ===================================================================== */

:root {
    --brand: #C77B30;
    --brand-hover: #AE6824;
    --brand-soft: #FBF3EA;
    --ink: #141414;
    --ink-2: #15191E;
    --muted: #5B6470;
    --placeholder: #8A929C;
    --line: #E6E8EB;
    --surface: #F4F5F7;
    --bg: #FFFFFF;

    --success-bg: #E8F6EE;
    --success-ink: #1E7A47;
    --danger: #D14343;
    --danger-bg: #FDECEC;
    --info-bg: #EEF2F7;

    --r-btn: 10px;
    --r-card: 14px;
    --r-img: 12px;
    --r-hero: 16px;
    --r-chip: 20px;

    --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --container: 1280px;
    --gutter: 48px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink-2);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;   /* eski brauzerlar uchun */
    overflow-x: clip;     /* hidden emas: sticky header ishlashi uchun */
}

main { flex: 1 0 auto; }

img { max-width: 100%; display: block; }

a { color: var(--ink-2); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand); }

h1, h2, h3, p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

button, input, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

[hidden] { display: none !important; }

.muted { color: var(--muted); }

/* Ekrandan tepaga yashiriladi (left: -9999px o'ngdan chapga sahifalarda gorizontal scroll beradi) */
.skip-link {
    position: absolute;
    inset-inline-start: 8px;
    top: 8px;
    z-index: 100;
    background: var(--ink);
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--r-btn);
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: #fff; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border: 0;
    border-radius: var(--r-btn);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-align: center;
    transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-secondary { background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.btn-surface { background: var(--surface); color: var(--ink-2); }
.btn-surface:hover { background: var(--line); color: var(--ink-2); }
.btn-white { background: #fff; color: var(--ink-2); }
.btn-white:hover { background: var(--brand-soft); color: var(--ink-2); }
.btn-dark { background: var(--ink-2); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-sm { padding: 9px 14px; font-size: 14px; }

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--muted);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.link-btn:hover { color: var(--danger); }

/* ---------- Top-bar ---------- */
.topbar {
    background: var(--ink);
    color: #fff;
    font-size: 13px;
}
.topbar__row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 9px;
    padding-bottom: 9px;
}
.topbar a { color: #fff; }
.topbar a:hover { color: var(--brand); }

/* ---------- Header ---------- */
.site-header {
    position: sticky;     /* prokrutkada tepada qotib turadi */
    top: 0;
    z-index: 40;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .2s;
}
.site-header.is-stuck { box-shadow: 0 8px 24px -12px rgba(20, 20, 20, .25); }
.site-header .header__row { transition: padding .2s; }
.site-header.is-stuck .header__row { padding-top: 12px; padding-bottom: 12px; }
.site-header.is-stuck .header__logo-full { height: 40px; }
.header__row {
    display: flex;
    align-items: center;
    gap: 32px;
    padding-top: 20px;
    padding-bottom: 20px;
}
.header__logo { flex-shrink: 0; }
.header__logo-full { height: 48px; width: auto; }
.header__logo-mark { display: none; height: 36px; width: auto; }

.header__catalog-btn { padding: 13px 20px; }

.header__search {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 46px;
    padding: 0 5px 0 16px;
    border: 2px solid var(--brand);
    border-radius: var(--r-btn);
    background: var(--bg);
}
.header__search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
}
.header__search input::placeholder { color: var(--placeholder); }
.header__search:focus-within { box-shadow: 0 0 0 3px rgba(199, 123, 48, .18); }
.header__search-btn {
    border: 0;
    background: var(--brand);
    color: #fff;
    padding: 8px 16px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
}
.header__search-btn:hover { background: var(--brand-hover); }

.header__actions {
    display: flex;
    align-items: center;
    gap: 24px;
}
.hicon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: 0;
    padding: 0;
    color: var(--ink-2);
    font-size: 12px;
}
.hicon__label { color: var(--muted); }
.hicon:hover, .hicon:hover .hicon__label { color: var(--brand); }
.hicon__icon { position: relative; display: block; line-height: 0; }
.hicon__badge {
    position: absolute;
    top: -7px;
    right: -10px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 19px;
    text-align: center;
}
.hicon--search, .hicon--burger { display: none; }

/* Каталог paneli */
.catalog-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(20, 20, 20, .10);
    padding: 28px 0 32px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}
.catalog-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px 32px;
}
.catalog-panel__root {
    display: block;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
}
.catalog-panel__list li + li { margin-top: 6px; }
.catalog-panel__list a { color: var(--muted); font-size: 14px; }
.catalog-panel__list a:hover { color: var(--brand); }
.catalog-panel__mobile-links { display: none; }

/* ---------- Alerts ---------- */
.alerts { padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--r-btn);
    background: var(--info-bg);
    font-size: 14px;
    transition: opacity .3s, transform .3s;
}
.alert--success { background: var(--success-bg); color: var(--success-ink); }
.alert--warning { background: var(--brand-soft); color: var(--brand-hover); }
.alert--danger, .alert--error { background: var(--danger-bg); color: var(--danger); }
.alert.is-hiding { opacity: 0; transform: translateY(-6px); }
.alert__close {
    background: none;
    border: 0;
    font-size: 20px;
    line-height: 1;
    color: inherit;
    opacity: .7;
}
.alert__close:hover { opacity: 1; }

/* ---------- Sections / headings ---------- */
.section { padding-top: 40px; }
.section:last-child { padding-bottom: 56px; }
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.section-title { font-size: 26px; font-weight: 700; line-height: 1.2; }
.page { padding-top: 24px; padding-bottom: 56px; }
.page-title { font-size: 32px; font-weight: 700; line-height: 1.2; }
.page-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.page-count { color: var(--muted); font-size: 15px; }

/* Breadcrumb */
.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 14px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs__sep { color: var(--placeholder); }
.crumbs span[aria-current] { color: var(--ink-2); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-block;
    padding: 8px 14px;
    border-radius: var(--r-chip);
    background: var(--surface);
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}
.chip:hover { background: var(--line); color: var(--ink-2); }
.chip.is-active { background: var(--ink-2); color: #fff; }

/* ---------- Rasm o'rni (rasm bo'lmasa) ---------- */
.ph {
    background-color: var(--surface);
    background-image: repeating-linear-gradient(90deg, #E9E4DC 0 18px, #CFC8BD 18px 23px);
}
.ph--2 { background-image: repeating-linear-gradient(90deg, #A8724A 0 22px, #7E5232 22px 27px); }
.ph--3 { background-image: repeating-linear-gradient(90deg, #CDB48F 0 26px, #A48A66 26px 31px); }
.ph--4 { background-image: repeating-linear-gradient(90deg, #8F8A84 0 12px, #6E6963 12px 17px); }
.ph--5 { background-image: repeating-linear-gradient(0deg, #7A5134 0 30px, #5E3D27 30px 34px); }
.ph--6 { background-image: linear-gradient(135deg, #F0EDE8, #D5CFC6 45%, #F0EDE8 60%, #C9C1B5); }

/* ---------- Karusel (panellar interyerda) ---------- */
.slider__controls { display: flex; align-items: center; gap: 8px; }
.slider__count { font-size: 14px; color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.slider__count b { color: var(--ink-2); font-weight: 600; }
.slider__btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg);
    color: var(--ink-2);
    transition: background .15s, border-color .15s, color .15s;
}
.slider__btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
/* ---------- Tovar to'ri va kartochkasi ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px 16px;
}
.pcard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.pcard__link {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--ink-2);
}
.pcard__link:hover { color: var(--ink-2); }
.pcard__link:hover .pcard__title { color: var(--brand); }
.pcard__img {
    width: 100%;
    aspect-ratio: 216 / 210;
    border-radius: var(--r-img);
    object-fit: cover;
    background: var(--surface);
    transition: opacity .15s;
}
.pcard__link:hover .pcard__img { opacity: .92; }
.pcard__price { font-size: 18px; font-weight: 700; line-height: 1.3; }
.pcard__price--request { font-size: 16px; color: var(--brand); }
.pcard__title {
    font-size: 14px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
}
.pcard__meta { font-size: 12px; color: var(--muted); }
.pcard__form { margin-top: 4px; }
.pcard__btn { padding: 10px; border-radius: 9px; font-size: 14px; }
.product-grid .pcard:nth-child(6n+2) .ph { background-image: repeating-linear-gradient(90deg, #A8724A 0 22px, #7E5232 22px 27px); }
.product-grid .pcard:nth-child(6n+3) .ph { background-image: repeating-linear-gradient(90deg, #CDB48F 0 26px, #A48A66 26px 31px); }
.product-grid .pcard:nth-child(6n+4) .ph { background-image: repeating-linear-gradient(90deg, #8F8A84 0 12px, #6E6963 12px 17px); }
.product-grid .pcard:nth-child(6n+5) .ph { background-image: repeating-linear-gradient(0deg, #7A5134 0 30px, #5E3D27 30px 34px); }
.product-grid .pcard:nth-child(6n+6) .ph { background-image: linear-gradient(135deg, #F0EDE8, #D5CFC6 45%, #F0EDE8 60%, #C9C1B5); }

/* ---------- Bo'sh holat ---------- */
.empty {
    text-align: center;
    padding: 56px 24px;
    border-radius: var(--r-card);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.empty__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
}
.empty__title { font-size: 20px; font-weight: 700; }
.empty__text { color: var(--muted); max-width: 440px; }
.empty .chips { justify-content: center; margin-top: 4px; }
.empty .btn { margin-top: 8px; }

/* ---------- Sahifalash ---------- */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 40px;
}
.pagination a, .pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-btn);
    background: var(--surface);
    color: var(--ink-2);
    font-weight: 500;
    font-size: 14px;
}
.pagination a:hover { background: var(--line); color: var(--ink-2); }
.pagination .is-active { background: var(--brand); color: #fff; }

/* ---------- Kategoriya sahifasi ---------- */
.subcats { margin-bottom: 24px; }

/* ---------- Tovar sahifasi ---------- */
.pd {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}
.gallery__main {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--r-hero);
    object-fit: cover;
    background: var(--surface);
}
.gallery__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.gallery__thumb {
    width: 76px;
    height: 76px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-active, .gallery__thumb:hover { border-color: var(--brand); }

.pd-info { display: flex; flex-direction: column; gap: 14px; }
.pd-info .crumbs { margin-bottom: 0; }
.pd-title { font-size: 28px; font-weight: 700; line-height: 1.25; }
.pd-model { color: var(--muted); font-size: 15px; }
.spec { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec th, .spec td { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec th { color: var(--muted); font-weight: 400; width: 45%; padding-right: 16px; }
.spec td { font-weight: 500; }
.pd-price { font-size: 32px; font-weight: 700; line-height: 1.2; margin-top: 6px; }
.pd-price--request { font-size: 24px; color: var(--brand); }
.pd-buy { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.pd-buy .btn { flex: 1; min-width: 180px; }
.pd-note { font-size: 13px; color: var(--muted); }
.pd-desc { margin-top: 48px; max-width: 820px; }
.pd-desc h2 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.pd-desc p { color: var(--ink-2); line-height: 1.65; }

/* Miqdor tanlash */
.qty {
    display: inline-flex;
    align-items: center;
    height: 52px;
    border: 1px solid var(--line);
    border-radius: var(--r-btn);
    background: var(--bg);
    overflow: hidden;
}
.qty button {
    width: 44px;
    height: 100%;
    border: 0;
    background: transparent;
    font-size: 20px;
    color: var(--ink-2);
}
.qty button:hover { background: var(--surface); color: var(--brand); }
.qty input {
    width: 52px;
    height: 100%;
    border: 0;
    outline: 0;
    text-align: center;
    font-weight: 600;
    -moz-appearance: textfield;
    appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--sm { height: 38px; }
.qty--sm button { width: 34px; font-size: 18px; }
.qty--sm input { width: 40px; }

/* ---------- Savat / checkout ---------- */
.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 32px;
    align-items: start;
}
.cart-list { border-top: 1px solid var(--line); }
.cart-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto auto;
    gap: 20px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}
.cart-item__img { width: 96px; height: 96px; border-radius: var(--r-img); object-fit: cover; background: var(--surface); }
.cart-item__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-item__title { font-weight: 600; font-size: 15px; }
.cart-item__meta { font-size: 13px; color: var(--muted); }
.cart-item__total { font-weight: 700; font-size: 16px; text-align: right; min-width: 120px; }
.cart-item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.summary {
    background: var(--surface);
    border-radius: var(--r-card);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 20px;
}
.summary__title { font-size: 18px; font-weight: 700; }
.summary__row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.summary__row span:first-child { color: var(--muted); }
.summary__item { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.summary__item span:last-child { white-space: nowrap; font-weight: 500; }
.summary__total {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 18px;
    font-weight: 700;
}
.summary__note { font-size: 13px; color: var(--muted); }
.back-link { display: inline-block; margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ---------- Formalar ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field .req { color: var(--brand); }
.checkout_input, .field input, .field textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-btn);
    background: var(--bg);
    font-size: 15px;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 110px; resize: vertical; }
.checkout_input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.checkout_input:focus, .field input:focus, .field textarea:focus {
    outline: 0;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(199, 123, 48, .15);
}
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-error, .form-error { color: var(--danger); font-size: 13px; }
.form-error { background: var(--danger-bg); padding: 10px 14px; border-radius: var(--r-btn); }
.form-note { font-size: 13px; color: var(--muted); }

.card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    padding: 28px;
}
.saved-info { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; background: var(--surface); border: 0; }
.saved-info__title { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.saved-info__row span { color: var(--muted); }
.saved-info a { color: var(--brand); font-size: 14px; font-weight: 500; margin-top: 4px; }
.saved-info a:hover { color: var(--brand-hover); }

/* ---------- Order success ---------- */
.success {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.success__icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success-ink);
    display: flex;
    align-items: center;
    justify-content: center;
}
.success__title { font-size: 30px; font-weight: 700; line-height: 1.2; }
.success__num { color: var(--brand); }
.success__text { color: var(--muted); font-size: 16px; }
.success .summary, .success .tracker { width: 100%; text-align: left; position: static; }
.success__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ---------- Auth ---------- */
.auth {
    display: flex;
    justify-content: center;
    padding: 48px 0 64px;
}
.auth__card {
    width: 100%;
    max-width: 440px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-hero);
    padding: 36px 32px;
    box-shadow: 0 12px 40px rgba(20, 20, 20, .06);
}
.auth__logo { height: 44px; width: auto; margin: 0 auto 20px; }
.auth__title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 24px; }
.auth__alt { text-align: center; margin-top: 20px; font-size: 14px; color: var(--muted); }
.auth__alt a { color: var(--brand); font-weight: 500; }

/* ---------- Kabinet ---------- */
.account {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}
.account__side { background: var(--surface); border-radius: var(--r-card); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.account__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.account__name { font-weight: 700; font-size: 17px; }
.account__phone { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.orders { display: flex; flex-direction: column; gap: 12px; }
.order-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 20px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    color: var(--ink-2);
    transition: border-color .15s, box-shadow .15s;
}
.order-card:hover { border-color: var(--brand); color: var(--ink-2); box-shadow: 0 6px 20px rgba(20, 20, 20, .06); }
.order-card__num { font-weight: 700; font-size: 16px; }
.order-card__date { color: var(--muted); font-size: 13px; }
.order-card__items {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.order-card__total { font-weight: 700; }
.order-card__more { color: var(--brand); font-size: 14px; font-weight: 500; text-align: right; }

.status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--r-chip);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    justify-self: end;
    align-self: start;
}
.status--new { background: var(--brand-soft); color: var(--brand-hover); }
.status--confirmed { background: #E9F0FB; color: #2C5BA8; }
.status--shipping { background: #FFF4D6; color: #8A6300; }
.status--delivered { background: var(--success-bg); color: var(--success-ink); }
.status--canceled { background: var(--danger-bg); color: var(--danger); }

.order-detail { max-width: 760px; }
.order-detail__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.order-detail .summary { position: static; margin-top: 20px; }
.order-detail__info { margin-top: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.order-detail__info strong { color: var(--ink-2); font-weight: 600; }

/* Progress-tracker */
.tracker {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 24px 0 8px;
}
.tracker__step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.tracker__step::before {
    content: '';
    position: absolute;
    top: 15px;
    left: -50%;
    right: 50%;
    height: 3px;
    background: var(--line);
}
.tracker__step:first-child::before { display: none; }
.tracker__dot {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tracker__label { font-size: 12px; color: var(--muted); line-height: 1.3; }
.tracker__step.is-done .tracker__dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.tracker__step.is-done::before { background: var(--brand); }
.tracker__step.is-done .tracker__label { color: var(--ink-2); font-weight: 500; }
.tracker-canceled {
    margin: 20px 0;
    padding: 12px 16px;
    border-radius: var(--r-btn);
    background: var(--danger-bg);
    color: var(--danger);
    font-weight: 600;
    text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: auto;
    background: var(--surface);
    color: var(--muted);
    font-size: 14px;
    padding: 40px 0 28px;
}
.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
}
.footer__logo { height: 46px; width: auto; margin-bottom: 14px; }
.footer__brand p { max-width: 280px; }
.footer__title { color: var(--ink-2); font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.footer__col li + li { margin-top: 8px; }
.footer__col a { color: var(--muted); }
.footer__col a:hover { color: var(--brand); }
.footer__col a.footer__phone { color: var(--ink-2); font-weight: 600; }
.footer__copy {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
}
.footer__dev a { color: var(--ink-2); font-weight: 600; }
.footer__dev a:hover { color: var(--brand); }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1100px) {
    .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .header__row { gap: 20px; }
    .two-col { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 960px) {
    :root { --gutter: 24px; }
    .header__row { gap: 16px; }
    .header__actions { gap: 18px; }
    .hicon__label { display: none; }
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pd { gap: 32px; }
    .two-col { grid-template-columns: 1fr; }
    .summary { position: static; }
    .account { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
    :root { --gutter: 16px; }
    body { font-size: 14px; }

    .topbar__text, .topbar__hours { display: none; }
    .topbar__row { justify-content: center; padding-top: 7px; padding-bottom: 7px; }

    .header__row { flex-wrap: wrap; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
    .header__logo-full { display: none; }
    .header__logo-mark { display: block; }
    .header__catalog-btn { display: none; }
    .header__actions { margin-left: auto; gap: 18px; }
    .hicon__label { display: none; }
    .hicon--search, .hicon--burger { display: flex; }
    .header__search { order: 10; flex-basis: 100%; display: none; height: 44px; }
    .header__search.is-open { display: flex; }
    .header__search input { font-size: 16px; }

    .catalog-panel { padding: 16px 0 20px; max-height: calc(100vh - 110px); overflow-y: auto; }
    .catalog-panel__grid { grid-template-columns: 1fr; gap: 16px; }
    .catalog-panel__mobile-links {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 18px;
        padding-top: 16px;
        border-top: 1px solid var(--line);
        font-weight: 500;
    }
    .catalog-panel__phone { color: var(--brand); font-weight: 700; }


    .section { padding-top: 32px; }
    .section-title { font-size: 22px; }
    .slider__btn { width: 38px; height: 38px; }
    .section-head .chips { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 2px; scrollbar-width: none; }
    .section-head .chips::-webkit-scrollbar { display: none; }
    .page-title { font-size: 24px; }


    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
    .pcard__price { font-size: 16px; }
    .pcard__title { font-size: 13px; }

    .pd { grid-template-columns: 1fr; gap: 20px; }
    .pd-title { font-size: 22px; }
    .pd-price { font-size: 26px; }
    .gallery__thumb { width: 60px; height: 60px; }

    .cart-item { grid-template-columns: 72px minmax(0, 1fr); gap: 10px 14px; align-items: start; }
    .cart-item__img { width: 72px; height: 72px; }
    .cart-item__qty { grid-column: 2; }
    .cart-item__side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
    .cart-item__total { text-align: left; min-width: 0; }

    .card { padding: 20px; }
    .auth { padding: 24px 0 40px; }
    .auth__card { padding: 28px 20px; }
    .success__title { font-size: 24px; }

    .footer__grid { grid-template-columns: 1fr; gap: 24px; }
    .tracker__label { font-size: 11px; }
}

@media (max-width: 480px) {
    .pd-buy .btn { min-width: 0; }
    .order-card { grid-template-columns: 1fr; }
    .status, .order-card__more { justify-self: start; text-align: left; }
}

/* =====================================================================
   Bosh sahifa: 3D bloklar (VAZIFA_3D, namuna: _dizayn/3d_namuna.html)
   ===================================================================== */
:root { --brand-line: #EBD3B8; }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.section-sub { margin-top: 4px; color: var(--muted); max-width: 60ch; }
.btn-ghost-brand { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.btn-ghost-brand:hover { background: var(--brand-soft); color: var(--brand); }
button.chip { border: 0; cursor: pointer; font-family: inherit; }
.chip[aria-pressed="true"] { background: var(--ink-2); color: #fff; }

/* --- Hero: 3D-примерка стены --- */
.hx { display: grid; gap: 20px; grid-template-columns: 1fr; padding-top: 24px; }
@media (min-width: 1000px) { .hx { grid-template-columns: 2fr 1fr; } }
.hx-main { background: var(--brand-soft); border-radius: var(--r-hero); display: grid; grid-template-columns: 1fr; min-width: 0; }  /* overflow yo'q: dekorlar ro'yxati kesilmasin */
@media (min-width: 720px) { .hx-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
@media (min-width: 720px) { .hx-stage { border-end-start-radius: 0; border-start-end-radius: var(--r-hero); } }
.hx-copy { padding: 36px 32px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hx-copy h1 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.hx-copy > p { color: var(--muted); max-width: 42ch; }
.cfg { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.cfg-row { display: flex; flex-direction: column; gap: 7px; }
.cfg-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.cfg-label b { text-transform: none; letter-spacing: 0; color: var(--ink-2); font-weight: 600; }
.sel { font: inherit; font-weight: 600; color: var(--ink-2); background: #fff; border: 1px solid var(--brand-line); border-radius: var(--r-btn); padding: 10px 12px; width: 100%; max-width: 380px; }
.swatches { position: relative; }
.sw-row { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.sw-more > summary { list-style: none; }
.sw-more > summary::-webkit-details-marker { display: none; }
.sw-more__btn { height: 62px; padding: 0 12px; display: inline-flex; align-items: center; gap: 4px; border-radius: 8px; cursor: pointer;
    background: #fff; border: 1px dashed var(--brand-line); color: var(--brand-hover); font-size: 13px; font-weight: 600; white-space: nowrap; }
.sw-more__btn:hover, .sw-more[open] .sw-more__btn { border-style: solid; border-color: var(--brand); }
.sw-more__btn svg { transition: transform .2s; }
.sw-more[open] .sw-more__btn svg { transform: rotate(180deg); }
.sw-pop { position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 30; width: min(100%, 360px);
    display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; padding: 12px;
    max-height: 300px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card);
    box-shadow: 0 18px 40px rgba(20, 20, 20, .16); }
.sw-pop .sw { width: 100%; height: 62px; }
.sw { width: 46px; height: 62px; border-radius: 8px; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--brand-line); padding: 0; background: var(--surface) center / cover no-repeat; transition: transform .2s, box-shadow .2s; }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--brand); transform: scale(1.08); }
.seg { display: inline-flex; align-self: flex-start; background: #fff; border: 1px solid var(--brand-line); border-radius: var(--r-btn); padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: 7px; padding: 7px 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--ink-2); color: #fff; }
.readout { font-size: 13px; font-variant-numeric: tabular-nums; background: #fff; border-radius: 8px; padding: 8px 12px; border: 1px dashed var(--brand-line); }
.readout b { color: var(--brand); }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hx-empty { color: var(--muted); background: #fff; border-radius: var(--r-btn); padding: 12px 14px; border: 1px dashed var(--brand-line); }
.hx-stage { position: relative; overflow: hidden; border-end-start-radius: var(--r-hero); border-end-end-radius: var(--r-hero); min-height: 480px; background: #EFE5D8; transition: background .8s; }
.hx-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.hx-stage canvas:active { cursor: grabbing; }
.hx-fallback { position: absolute; inset: 0; background: #C6A27C center / cover no-repeat; background-image: url('../images/hero.jpg'); background-image: image-set(url('../images/hero.webp') type('image/webp'), url('../images/hero.jpg') type('image/jpeg')); }
.hint3d { position: absolute; left: 16px; bottom: 16px; background: rgba(255, 255, 255, .9); border-radius: 999px; padding: 7px 12px 7px 10px; font-size: 12px; font-weight: 600; display: flex; gap: 6px; align-items: center; pointer-events: none; }
.badge3d { position: absolute; right: 16px; top: 16px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .08em; border-radius: 6px; padding: 5px 8px; }
.hx-stage.night { background: #1d1712; }
.hx-stage.night .hint3d { background: rgba(255, 255, 255, .12); color: #fff; }
.hw { display: inline-block; transform-origin: 50% 100%; animation: wordIn .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--k) * 70ms + 150ms); }
@keyframes wordIn { from { transform: perspective(600px) rotateX(-75deg) translateY(30%); opacity: .15; } }

/* --- Optom kartochkasi + panellar dastasi --- */
.ws { background: var(--ink-2); color: #fff; border-radius: var(--r-hero); padding: 30px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; min-height: 300px; }
.ws h2 { font-size: 24px; line-height: 1.25; font-weight: 700; max-width: 14ch; position: relative; z-index: 1; }
.ws p { color: #B6BCC4; max-width: 30ch; position: relative; z-index: 1; }
.ws .btn { align-self: flex-start; margin-top: auto; position: relative; z-index: 1; }
.ws-list { display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1; font-size: 14px; color: #E6E8EB; }
.ws-list li { display: flex; gap: 8px; align-items: center; }
.ws-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; }
.ws-stack { position: absolute; left: 0; right: 0; bottom: 70px; height: 46%; pointer-events: none; }
.ws-stack canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Tor ekranda dasta matn ustiga tushmasin: ro'yxat va tugma orasida turadi */
@media (max-width: 999px) { .ws { min-height: 0; } .ws-stack { position: relative; left: auto; right: auto; bottom: auto; height: 220px; margin: -6px -30px 0; } }

/* --- Coverflow: Панели в интерьере --- */
.flow { position: relative; height: clamp(240px, 34vw, 420px); perspective: 1400px; overflow: hidden; border-radius: var(--r-hero); touch-action: pan-y; user-select: none; }
.flow-track { position: absolute; inset: 0; transform-style: preserve-3d; }
.cf-slide { position: absolute; top: 6%; left: 50%; width: min(64%, 720px); aspect-ratio: 16 / 9; max-height: 88%; margin: 0 0 0 calc(min(64%, 720px) / -2); border-radius: var(--r-img); overflow: hidden; cursor: pointer;
    transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .7s, filter .7s; box-shadow: 0 30px 60px -30px rgba(20, 20, 20, .45); background: var(--surface); }
.cf-slide picture, .cf-slide img { width: 100%; height: 100%; display: block; }
.cf-slide img { object-fit: cover; pointer-events: none; }
.cf-slide figcaption { position: absolute; left: 14px; bottom: 14px; background: #fff; border-radius: 999px; font-size: 12px; font-weight: 600; padding: 6px 12px; opacity: 0; transition: opacity .4s; }
.cf-slide.is-active figcaption { opacity: 1; }

/* --- Наш ассортимент: 3D halqa --- */
.ring-sec { background: var(--brand-soft); border-radius: var(--r-hero); padding: 28px 0; overflow: hidden; }
.ring-sec .section-head { padding: 0 28px; }
.ring-stage { height: 360px; perspective: 1300px; position: relative; cursor: grab; touch-action: pan-y; user-select: none; }
.ring-stage:active { cursor: grabbing; }
.ring { position: absolute; left: 50%; top: 20px; width: 170px; height: 290px; margin-left: -85px; transform-style: preserve-3d; }
.ring-item { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.ring-item .tile { position: relative; display: block; width: 170px; height: 220px; flex: none; border-radius: 12px; background: var(--surface) center / cover no-repeat; box-shadow: 0 24px 30px -20px rgba(20, 20, 20, .5), inset 0 0 0 1px rgba(0, 0, 0, .06); }
.ring-item .tile.swap { animation: swap .7s; }
@keyframes swap { 50% { transform: rotateY(90deg); } }
.ring-item span { font-size: 13px; font-weight: 600; background: #fff; border-radius: 999px; padding: 4px 10px; white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.ring-item small { font-size: 11px; color: var(--muted); background: #fff; border-radius: 999px; padding: 2px 8px; margin-top: -4px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ring-item:hover .tile, .ring-item:focus-visible .tile { outline: 3px solid var(--brand); outline-offset: 3px; }

/* --- Категории: 3D egilish --- */
.cats { --per: 2; --gap: 16px; display: grid; gap: var(--gap); grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--per) - 1) * var(--gap)) / var(--per));
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 6px; scroll-behavior: smooth; overscroll-behavior-x: contain;
    padding: 6px 6px 18px; margin: -6px -6px -18px; scrollbar-width: none; }   /* bir qatorli karusel */
.cats::-webkit-scrollbar { display: none; }
.cats > .tilt { scroll-snap-align: start; }
@media (min-width: 720px) { .cats { --per: 3; } }
@media (min-width: 1100px) { .cats { --per: 6; } }
@media (prefers-reduced-motion: reduce) { .cats { scroll-behavior: auto; } }
.carousel-nav { display: flex; gap: 8px; margin-inline-start: auto; }
.carousel-nav[hidden] { display: none; }
.carousel-nav__btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line);
    background: var(--bg); color: var(--ink-2); cursor: pointer; transition: background .15s, color .15s, border-color .15s, opacity .15s; }
.carousel-nav__btn:hover:not(:disabled) { background: var(--brand); border-color: var(--brand); color: #fff; }
.carousel-nav__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.carousel-nav__btn:disabled { opacity: .35; cursor: default; }
[dir="rtl"] .carousel-nav__btn svg { transform: scaleX(-1); }
.tilt { perspective: 700px; color: var(--ink-2); }
.tilt:hover { color: var(--ink-2); }
.tilt-card { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%; --ga: 0; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border-radius: var(--r-card); padding: 12px; height: 100%;
    transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .25s ease-out, box-shadow .25s; position: relative; }
.tilt-card:hover { box-shadow: 0 22px 40px -22px rgba(20, 20, 20, .35); }
.tilt-card .ph-img { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 8 / 5; transform: translateZ(26px); box-shadow: 0 12px 20px -14px rgba(0, 0, 0, .45); background: var(--surface); }
.tilt-card .ph-img img, .tilt-card .ph-img picture, .tilt-card .ph-img .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.tilt-card .nm { font-weight: 600; font-size: 14px; line-height: 1.3; transform: translateZ(16px); }
.tilt-card .sub { font-size: 12px; color: var(--muted); transform: translateZ(10px); margin-top: -8px; }
.tilt-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: var(--ga);
    background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .55), transparent 55%); transition: opacity .3s; }

/* --- Собственное производство --- */
.prod-band { background: #121315; color: #fff; border-radius: var(--r-hero); overflow: hidden; display: grid; grid-template-columns: 1fr; }
@media (min-width: 960px) { .prod-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); } }
.prod-copy { padding: 36px 32px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.prod-copy h2 { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.prod-copy p { color: #B6BCC4; max-width: 40ch; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.stat { background: #1D1F22; border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 28px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat span { font-size: 13px; color: #B6BCC4; }
.prod-stage { position: relative; min-height: 340px; }
.prod-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.prod-tag { position: absolute; right: 16px; bottom: 16px; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 6px 12px; font-variant-numeric: tabular-nums; }

/* --- Товары: ag'dariladigan kartochkalar --- */
.prods { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .prods { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.flip { perspective: 1000px; min-width: 0; }
.flip-in { display: grid; height: 100%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.flip.on .flip-in { transform: rotateY(180deg); }
.face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.face.back { transform: rotateY(180deg); background: var(--brand-soft); border-radius: var(--r-img); padding: 14px; gap: 10px; }
.pimg { position: relative; display: block; border-radius: var(--r-img); overflow: hidden; aspect-ratio: 1 / 1; background: var(--surface); }
.pimg img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.pimg .ph { position: absolute; inset: 0; }
.flip:hover .pimg img { transform: scale(1.04); }
.stock { position: absolute; left: 10px; top: 10px; border-radius: 6px; font-size: 11px; font-weight: 700; padding: 4px 8px; letter-spacing: .02em; }
.stock.in { background: #E7F4EC; color: #1D6B3F; }
.stock.order { background: var(--ink); color: #fff; }
.prof-btn { position: absolute; right: 10px; bottom: 10px; border: 0; background: var(--ink); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 600; padding: 7px 11px; display: flex; gap: 6px; align-items: center; }
.prof-btn:hover { background: var(--brand); }
.face .price { font-size: 17px; font-weight: 700; }
.face .price.req { color: var(--brand); font-size: 15px; }
.pname { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); }
.part { font-size: 12px; color: var(--muted); }
.face .btn { padding: 10px; font-size: 14px; margin-top: auto; }
.back svg { width: 100%; height: auto; display: block; background: #fff; border-radius: 8px; }
.back dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 13px; }
.back dt { color: var(--muted); }
.back dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.back .row { display: flex; gap: 8px; margin-top: auto; }
.back .row .btn { flex: 1; margin: 0; }
.prods-more { display: flex; justify-content: center; margin-top: 20px; }

/* --- Savatga uchish, toast --- */
.hicon__badge.bump { animation: bump .5s; }
@keyframes bump { 40% { transform: scale(1.5); } }
.flyer { position: fixed; z-index: 50; border-radius: 12px; pointer-events: none; object-fit: cover; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .4); }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); max-width: calc(100% - 32px); background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 16px; font-size: 14px; z-index: 60; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4); }

/* --- Pastdagi bo'limlar chuqurlik bilan chiqadi --- */
.rise { transition: transform .9s cubic-bezier(.2, .7, .2, 1), opacity .9s; }
.rise.pre { transform: translateY(28px); opacity: 0; }   /* egilish (rotateX) keng ekranda chetga toshirardi */

/* --- WebGL yo'q: 3D bloklar yashiriladi, hero'da rasm qoladi --- */
.no-webgl .ws-stack, .no-webgl .prod-stage, .no-webgl .hint3d, .no-webgl .badge3d { display: none; }
.no-webgl .ws { min-height: 0; }
.no-webgl .prod-band, .prod-band:has(.prod-stage[hidden]) { grid-template-columns: 1fr; }

@media (max-width: 767px) {
    .hx { padding-top: 16px; }
    .hx-copy { padding: 26px 20px; }
    .hx-stage { min-height: 340px; }
    .ws { padding: 24px 20px; }
    .ring-sec .section-head { padding: 0 16px; }
    .ring-stage { height: 330px; }
    .prod-copy { padding: 28px 20px; }
    .prod-copy h2 { font-size: 24px; }
    .stat b { font-size: 24px; }
    .prod-stage { min-height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
    .hw, .ring-item .tile.swap, .hicon__badge.bump { animation: none; }
    .cf-slide, .flip-in, .tilt-card, .rise, .pimg img { transition: none; }
}

/* =====================================================================
   Tillar: tanlagich va o'ngdan chapga (dari, pushtu) yoziladigan sahifalar
   ===================================================================== */
.lang { position: relative; }
.lang > summary { list-style: none; cursor: pointer; }
.lang > summary::-webkit-details-marker { display: none; }
.lang__menu {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    z-index: 60;
    min-width: 180px;
    padding: 6px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: 0 18px 40px rgba(20, 20, 20, .14);
}
.lang__menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 15px;
    color: var(--ink-2);
}
.lang__menu a:hover { background: var(--surface); color: var(--ink-2); }
.lang__menu a[aria-current="true"] { background: var(--brand-soft); color: var(--brand-hover); font-weight: 600; }

/* Dari va pushtu: arab yozuvi uchun shrift, oynaviy joylashuv */
[dir="rtl"] body { font-family: 'Vazirmatn', var(--font); }
[dir="rtl"] .hicon__badge { right: auto; left: -10px; }
[dir="rtl"] .stock { left: auto; right: 10px; }
[dir="rtl"] .prof-btn { right: auto; left: 10px; }
[dir="rtl"] .hint3d { left: auto; right: 16px; }
[dir="rtl"] .badge3d { right: auto; left: 16px; }
[dir="rtl"] .cf-slide figcaption { left: auto; right: 14px; }
[dir="rtl"] .prod-tag { right: auto; left: 16px; }
[dir="rtl"] .alert__close { margin-left: 0; }
[dir="rtl"] .ws-list li::before { order: 0; }
[dir="rtl"] .spec th { text-align: right; padding-right: 0; padding-left: 16px; }
[dir="rtl"] .spec td { text-align: right; }
[dir="rtl"] .cart-item__total { text-align: left; }
[dir="rtl"] .cart-item__side { align-items: flex-start; }
[dir="rtl"] .order-card__more { text-align: left; }
[dir="rtl"] .status { justify-self: start; }
[dir="rtl"] .header__search { padding: 0 16px 0 5px; }
[dir="rtl"] input[type="search"], [dir="rtl"] input[type="text"], [dir="rtl"] input[type="password"], [dir="rtl"] textarea { text-align: right; }
@media (max-width: 767px) {
    [dir="rtl"] .header__actions { margin-left: 0; margin-right: auto; }
    [dir="rtl"] .cart-item__total { text-align: right; }
}

/* =====================================================================
   Narxlar ($), variantlar (Стандарт / Внутренний / Gold), uzunlik, qolip
   ===================================================================== */
.pcard__som { font-size: 12px; color: var(--muted); margin-top: -6px; }
.pd-form { display: flex; flex-direction: column; gap: 14px; }
.pd-pricebox { display: flex; flex-direction: column; gap: 2px; }
.pd-pricebox .pd-price { margin: 0; }
.pd-unit { font-size: 16px; font-weight: 500; color: var(--muted); }
.pd-som { font-size: 14px; color: var(--muted); min-height: 1em; }
.opt { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.opt legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.opt-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.opt-card { position: relative; cursor: pointer; }
.opt-card input, .opt-chip input { position: absolute; opacity: 0; pointer-events: none; }
.opt-card__body { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.opt-card__body b { font-size: 15px; }
.opt-card__price { font-weight: 700; color: var(--brand); }
.opt-card__body small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.opt-card input:checked + .opt-card__body { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.opt-card input:focus-visible + .opt-card__body, .opt-chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip { cursor: pointer; }
.opt-chip span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-chip); font-size: 14px; font-weight: 500; background: var(--bg); }
.opt-chip input:checked + span { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.pd-length { font-size: 14px; color: var(--muted); }
.pd-length b { color: var(--ink-2); }
.pd-stock { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 8px 12px; border-radius: var(--r-btn); background: var(--surface); }
.pd-stock.is-in { background: #E7F4EC; color: #1D6B3F; }
.pd-qty-unit { align-self: center; font-size: 14px; color: var(--muted); }
.pd-profile { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; }
.pd-profile figcaption { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.pd-profile img { width: 100%; max-height: 160px; object-fit: contain; }
.back .profile-img { width: 100%; height: 90px; object-fit: contain; background: #fff; border-radius: 8px; padding: 6px; }

/* ---------- «Наверх» tugmasi ---------- */
.to-top {
    position: fixed;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 45;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 24px -8px rgba(20, 20, 20, .45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .2s, transform .2s, visibility .2s, background .15s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--ink-2); }
.to-top:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
[dir="rtl"] .to-top { right: auto; left: 20px; }
@media (max-width: 767px) {
    .to-top { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; }
    [dir="rtl"] .to-top { right: auto; left: 14px; }
}
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* ---------- Katalog: tushuvchi menyu (desktop) ---------- */
.catdrop { position: relative; flex-shrink: 0; }
.catdrop > summary { list-style: none; cursor: pointer; user-select: none; }
.catdrop > summary::-webkit-details-marker { display: none; }
.catdrop__chev { transition: transform .2s; margin-inline-start: 2px; }
.catdrop[open] .catdrop__chev { transform: rotate(180deg); }
.catdrop__menu, .catdrop__subs {
    list-style: none;
    margin: 0;
    padding: 6px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow: 0 18px 40px rgba(20, 20, 20, .14);
}
.catdrop__menu {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-start: 0;
    z-index: 60;
    width: 280px;
}
.catdrop__item { position: relative; }
.catdrop__root {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-2);
}
.catdrop__root svg { color: var(--muted); flex-shrink: 0; }
.catdrop__item:hover > .catdrop__root, .catdrop__item:focus-within > .catdrop__root { background: var(--brand-soft); color: var(--brand-hover); }
.catdrop__item:hover > .catdrop__root svg, .catdrop__item:focus-within > .catdrop__root svg { color: var(--brand); }
.catdrop__subs {
    position: absolute;
    top: -7px;
    inset-inline-start: calc(100% + 6px);
    width: 290px;
    display: none;
}
.catdrop__subs::before { content: ''; position: absolute; top: 0; bottom: 0; inset-inline-start: -10px; width: 10px; } /* sichqoncha o'tish ko'prigi */
.catdrop__item:hover > .catdrop__subs, .catdrop__item:focus-within > .catdrop__subs { display: block; }
.catdrop__subs a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--ink-2); }
.catdrop__subs a:hover { background: var(--surface); color: var(--brand-hover); }
.catdrop__subs-title a { font-weight: 700; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.catdrop__empty { padding: 10px 12px; color: var(--muted); font-size: 14px; }
@media (max-width: 767px) { .catdrop { display: none; } }


/* =====================================================================
   Keng ekranlar (≥1440 px, 21:9 va h.k.): sayt butun kenglikka yoyiladi
   ===================================================================== */
@media (min-width: 1440px) {
    :root { --container: 100%; --gutter: clamp(48px, 3.2vw, 112px); }
    .product-grid, .prods { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .cats { --per: 7; }
    .hx-stage { min-height: clamp(480px, 30vw, 860px); }
    .prod-stage { min-height: clamp(340px, 24vw, 680px); }
    .flow { height: clamp(420px, 26vw, 680px); }
    .ring-stage { height: clamp(360px, 20vw, 540px); }
}
@media (min-width: 2400px) {
    .product-grid, .prods { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    body { font-size: 16px; }
}

/* ---------- Xavfsizlik: bot tuzog'i va chiqish tugmasi ---------- */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.inline-form { display: inline; margin: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: start; }
.link-btn:hover { color: var(--brand); }
