:root {
    --page: #f5f6f8;
    --surface: #ffffff;
    --surface-soft: #f0f2f5;
    --text: #111318;
    --muted: #69707d;
    --line: #e2e5ea;
    --accent: #2563eb;
    --accent-soft: #eef4ff;
    --dark: #171a21;
    --contrast-bg: #171a21;
    --contrast-text: #ffffff;
    --field: #f8f9fb;
    --surface-subtle: #fafbfc;
    --surface-hover: #f1f4f8;
    --surface-footer: #fbfbfc;
    --image-bg: #ffffff;
    --skeleton-a: #eceef2;
    --skeleton-b: #f7f8fa;
    --success-soft: #eaf8ee;
    --success-text: #16833d;
    --danger-soft: #fff1f1;
    --danger-text: #a72c2c;
    --warning-soft: #fff8e7;
    --warning-text: #765b19;
    --telegram-card: #f0faff;
    --telegram-line: #bfe5f7;
    --telegram-muted: #496572;
    --radius: 18px;
    --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .05);
    color-scheme: light;
    font-family: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
    --page: #0e1014; --surface: #171a20; --surface-soft: #20242c; --text: #f3f5f7;
    --muted: #a3abb7; --line: #303640; --accent: #78a1ff; --accent-soft: #202d47;
    --contrast-bg: #f1f3f6; --contrast-text: #12151a; --field: #1d2128;
    --surface-subtle: #1b1f26; --surface-hover: #262b34; --surface-footer: #191d23;
    --image-bg: #ffffff; --skeleton-a: #242932; --skeleton-b: #303640;
    --success-soft: #173525; --success-text: #7ddd9b; --danger-soft: #3b2023;
    --danger-text: #ffaaa9; --warning-soft: #3a301a; --warning-text: #f2d47c;
    --telegram-card: #132b37; --telegram-line: #24536a; --telegram-muted: #9ccbdd;
    --shadow-card: 0 1px 2px rgba(0,0,0,.22), 0 12px 32px rgba(0,0,0,.25);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --page: #0e1014; --surface: #171a20; --surface-soft: #20242c; --text: #f3f5f7;
        --muted: #a3abb7; --line: #303640; --accent: #78a1ff; --accent-soft: #202d47;
        --contrast-bg: #f1f3f6; --contrast-text: #12151a; --field: #1d2128;
        --surface-subtle: #1b1f26; --surface-hover: #262b34; --surface-footer: #191d23;
        --image-bg: #ffffff; --skeleton-a: #242932; --skeleton-b: #303640;
        --success-soft: #173525; --success-text: #7ddd9b; --danger-soft: #3b2023;
        --danger-text: #ffaaa9; --warning-soft: #3a301a; --warning-text: #f2d47c;
        --telegram-card: #132b37; --telegram-line: #24536a; --telegram-muted: #9ccbdd;
        --shadow-card: 0 1px 2px rgba(0,0,0,.22), 0 12px 32px rgba(0,0,0,.25);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { width: 100%; overflow-x: hidden; }
body {
    width: 100%; min-height: 100vh; margin: 0; overflow-x: hidden;
    background: var(--page); color: var(--text); -webkit-font-smoothing: antialiased;
}
body, button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.orb, .mobile-filter-bar, .mobile-toggle { display: none; }
.theme-toggle {
    flex: 0 0 auto; width: 44px; height: 44px; padding: 0; display: inline-grid; place-items: center;
    border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); color: var(--text);
    font-size: 20px; line-height: 1; cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-hover); transform: translateY(-1px); }

.topbar {
    position: sticky; top: 0; z-index: 20; width: 100%; min-height: 72px;
    padding: 14px max(24px, calc((100vw - 1480px) / 2));
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    background: var(--surface); border-bottom: 1px solid var(--line);
}
.logo { flex: 0 0 auto; font-size: 22px; line-height: 1; font-weight: 850; letter-spacing: -.045em; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.search { position: relative; width: min(360px, 36vw); }
.search input {
    width: 100%; min-width: 0; height: 44px; padding: 0 42px 0 15px;
    border: 1px solid var(--line); border-radius: 12px; outline: 0;
    background: var(--field); color: var(--text); font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.search input:focus { background: var(--surface); border-color: #9db9f7; box-shadow: 0 0 0 4px rgba(37, 99, 235, .09); }
.icon-search { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pill {
    min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px;
    border-radius: 12px; background: var(--contrast-bg); color: var(--contrast-text); font-size: 14px; font-weight: 750;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #34c759; }
.cart-button {
    position: relative; min-height: 44px; padding: 0 14px; display: inline-flex;
    align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface); color: var(--text); font-size: 14px; font-weight: 750;
}
.cart-button:hover { border-color: var(--muted); background: var(--field); }
.cart-count {
    min-width: 22px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center;
    justify-content: center; border-radius: 999px; background: var(--accent); color: #fff;
    font-size: 11px; line-height: 1; font-weight: 800;
}
.cart-count[hidden] { display: none; }

.page {
    position: relative; display: grid; grid-template-columns: 270px minmax(0, 1fr);
    align-items: start; gap: 28px; width: 100%; max-width: 1480px;
    margin: 0 auto; padding: 28px 24px 56px;
}
.panel { width: 100%; min-width: 0; }
.filters-panel {
    position: relative; padding: 16px; border: 1px solid var(--line);
    border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 3px rgba(16, 24, 40, .04);
}
main.panel { padding: 0; border: 0; background: transparent; box-shadow: none; }

button, .btn { min-width: 0; border: 0; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 2px; }
.filter-card { display: grid; gap: 14px; }
.filter-toggle {
    width: 100%; min-height: 46px; padding: 0 14px; display: flex;
    align-items: center; justify-content: space-between; border-radius: 12px;
    background: var(--contrast-bg); color: var(--contrast-text); font-weight: 760;
}
.filter-toggle:hover { opacity: .88; }
.nav-chevron { display: inline-flex; align-items: center; justify-content: center; transition: transform .2s ease; }
.filter-toggle.open .nav-chevron { transform: rotate(180deg); }
.advanced-filters { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .24s ease, opacity .18s ease; }
.advanced-filters.open { grid-template-rows: 1fr; opacity: 1; }
.advanced-filters-inner { min-height: 0; overflow: hidden; display: grid; gap: 18px; }
.advanced-filters.open .advanced-filters-inner { padding: 2px 0 4px; }
.filter-group label {
    display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px;
    font-weight: 750; letter-spacing: .04em; text-transform: uppercase;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
    min-width: 40px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line);
    border-radius: 10px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 700;
}
.chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.chip.active { border-color: var(--contrast-bg); background: var(--contrast-bg); color: var(--contrast-text); }
.inputs-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
input[type="number"] {
    width: 100%; min-width: 0; height: 42px; padding: 0 11px; border: 1px solid var(--line);
    border-radius: 10px; outline: 0; background: var(--field); color: var(--text); font-size: 14px;
}
input[type="number"]:focus { border-color: #9db9f7; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.filter-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.filter-actions button {
    min-height: 40px; padding: 0 10px; border-radius: 10px;
    background: var(--contrast-bg); color: var(--contrast-text); font-size: 13px; font-weight: 730;
}
.filter-actions .btn-secondary { border: 1px solid var(--line); background: var(--surface-soft); color: var(--text); }
.divider { height: 1px; background: var(--line); }
.brand-navigation { display: grid; gap: 8px; }
.brand-navigation-title {
    width: 100%; padding: 2px 4px 4px; display: flex; align-items: center;
    justify-content: space-between; border: 0; background: transparent;
    color: var(--muted); font-size: 12px; cursor: default;
    font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.brand-navigation-title .nav-chevron { display: none; }
.brand-list { display: grid; gap: 3px; }
.brand-node { display: grid; }
.brand { 
    width: 100%; min-height: 42px; padding: 0 11px; display: flex;
    align-items: center; justify-content: space-between; gap: 10px; border: 0;
    border-radius: 10px; background: transparent; color: var(--text);
    text-align: left; font-size: 14px; font-weight: 680;
}
.brand:hover { background: var(--surface-soft); }
.brand.active { background: var(--accent-soft); color: var(--accent); }
.brand-all { margin-bottom: 2px; }
.brand-meta { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-node.open > .brand .nav-chevron { transform: rotate(90deg); }
.model-panel { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .22s ease, opacity .16s ease; }
.brand-node.open .model-panel { grid-template-rows: 1fr; opacity: 1; }
.model-list { min-height: 0; overflow: hidden; display: grid; gap: 2px; padding: 0 4px 0 17px; }
.brand-node.open .model-list { padding-top: 4px; padding-bottom: 7px; }
.model-item {
    width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: 9px;
    background: transparent; color: var(--muted); text-align: left; white-space: normal;
    font-size: 13px; font-weight: 620;
}
.model-item:hover { background: var(--surface-soft); color: var(--text); }
.model-item.active { background: var(--accent-soft); color: var(--accent); }

.hero { padding: 2px 0 20px; }
.hero h1 { margin: 0; font-size: clamp(28px, 3vw, 42px); line-height: 1.05; letter-spacing: -.045em; font-weight: 820; }
.section-head { display: flex; align-items: center; min-height: 42px; margin: 0 0 14px; }
.section-head h3 { margin: 0; font-size: 17px; font-weight: 750; letter-spacing: -.015em; }
.catalog {
    width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch; gap: 18px;
}
.card {
    width: 100%; min-width: 0; height: 412px; padding: 12px; overflow: hidden;
    display: grid; grid-template-rows: 20px 168px 44px 70px 48px; gap: 9px;
    border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card);
}
.card:hover { border-color: #d4d8df; transform: translateY(-2px); }
.card.unavailable { opacity: .68; }
.card.unavailable .thumb img { filter: grayscale(.35); }
.card-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand-tag { overflow: hidden; color: var(--text); font-size: 12px; font-weight: 780; text-overflow: ellipsis; white-space: nowrap; }
.article { flex: 0 0 auto; color: #89909c; font-size: 11px; font-weight: 600; }
.thumb {
    width: 100%; height: 100%; overflow: hidden; display: flex; align-items: center;
    justify-content: center; border-radius: 12px; background: var(--surface-soft); cursor: pointer;
}
.thumb-wrap { position: relative; width: 100%; height: 100%; min-width: 0; overflow: visible; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.catalog-image-edit {
    position: absolute; z-index: 3; top: 9px; right: 9px; width: 36px; height: 36px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.72);
    border-radius: 50%; background: rgba(17,19,24,.82); color: #fff; box-shadow: 0 5px 18px rgba(0,0,0,.22);
    font-size: 18px; line-height: 1; backdrop-filter: blur(8px);
}
.catalog-image-edit:hover { background: #111318; color: #fff; transform: translateY(-1px); }
.title {
    min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; color: var(--text); font-size: 16px; line-height: 22px;
    font-weight: 750; letter-spacing: -.018em;
}
.size-row {
    min-width: 0; display: flex; flex-wrap: wrap; align-items: flex-start;
    align-content: flex-start; gap: 6px; overflow: hidden;
}
.size-row::-webkit-scrollbar { display: none; }
.size-chip {
    flex: 0 0 auto; min-width: 34px; height: 32px; padding: 0 8px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 9px; background: var(--field);
    color: var(--text); font-size: 12px; font-weight: 720;
}
.product-size-button { cursor: pointer; }
.product-size-button:hover { border-color: var(--muted); background: var(--surface-hover); }
.product-size-button.selected {
    border-color: var(--contrast-bg); background: var(--contrast-bg); color: var(--contrast-text);
    box-shadow: 0 0 0 2px rgba(23, 26, 33, .08);
}
.size-row.needs-selection { border-radius: 9px; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.card-footer { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { white-space: nowrap; font-size: 19px; line-height: 1; font-weight: 820; letter-spacing: -.03em; }
.actions { display: flex; align-items: center; gap: 7px; min-width: 0; }
.btn {
    min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center;
    justify-content: center; border-radius: 10px; background: var(--contrast-bg); color: var(--contrast-text);
    font-size: 13px; font-weight: 760; white-space: nowrap;
}
.btn:hover { opacity: .88; }
.btn.ghost { border: 1px solid var(--line); background: var(--surface-soft); color: var(--text); }
.btn.ghost:hover { background: var(--surface-hover); }
.btn.arrow { width: 42px; padding: 0; font-size: 17px; }

.card-skeleton { pointer-events: none; }
.skeleton-image, .skeleton-line {
    border-radius: 9px; background: linear-gradient(90deg, var(--skeleton-a) 25%, var(--skeleton-b) 50%, var(--skeleton-a) 75%);
    background-size: 200% 100%; animation: skeleton-shimmer 1.25s linear infinite;
}
.skeleton-image { width: 100%; height: 100%; border-radius: 12px; }
.skeleton-line { width: 100%; height: 14px; }
.skeleton-line.medium { width: 68%; }
.skeleton-line.short { width: 38%; }
@keyframes skeleton-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.catalog-loader { min-height: 24px; padding: 16px 0 4px; color: var(--muted); text-align: center; font-size: 13px; }
.load-more-wrap { display: flex; justify-content: center; padding: 14px 0 8px; }
.load-more { min-width: 190px; }
.load-more[hidden] { display: none; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.55; word-break: break-word; }
.badge {
    display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px;
    border: 1px solid var(--line); border-radius: 9px; background: var(--field);
    color: var(--text); font-size: 12px; font-weight: 650;
}

.product-detail {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 36px; align-items: start; padding: 24px; border: 1px solid var(--line);
    border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-card);
}
.gallery.slider { position: relative; min-width: 0; }
.gallery .thumb.big { height: min(580px, 62vw); }
.gallery .thumbs {
    width: 100%; margin-top: 10px; display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px;
}
.thumb.small { width: 100%; height: 78px; border: 1px solid transparent; }
.thumbs .thumb.small.active { border-color: var(--text); }
.product-meta { padding: 8px 4px; }
.product-meta h1 { margin: 8px 0 14px; font-size: clamp(28px, 3vw, 42px); line-height: 1.08; letter-spacing: -.04em; }
.product-meta .chips { margin-top: 20px; }
.product-meta .price { margin: 24px 0 !important; font-size: 28px; }
.product-meta .actions { flex-wrap: wrap; }
.product-meta .btn { min-height: 46px; padding: 0 18px; }
.product-size-picker { margin-top: 22px; }
.product-option-label { margin-bottom: 10px; font-size: 13px; font-weight: 780; }
.product-size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.product-size-picker .size-chip { min-width: 46px; height: 42px; font-size: 14px; }
.product-size-picker.needs-selection .product-size-options {
    width: fit-content; border-radius: 10px; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}
.product-size-error { min-height: 18px; margin-top: 7px; color: #b42318; font-size: 12px; font-weight: 650; }
.nav-arrow { display: none; }
.lightbox {
    position: fixed; inset: 0; z-index: 100; display: none; align-items: center;
    justify-content: center; background: rgba(10, 12, 16, .88);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 12px; }
.lb-close, .lb-arrow {
    position: absolute; width: 44px; height: 44px; padding: 0; display: inline-flex;
    align-items: center; justify-content: center; border-radius: 50%;
    border: 1px solid rgba(17,19,24,.12); background: rgba(255,255,255,.96);
    color: #111318; box-shadow: 0 5px 18px rgba(0,0,0,.2); font-size: 20px;
}
.lb-close:hover, .lb-arrow:hover { background: #fff; color: #111318; }
.lb-close { top: 18px; right: 18px; }
.lb-arrow { top: 50%; transform: translateY(-50%); }
.lb-arrow.prev { left: 18px; }
.lb-arrow.next { right: 18px; }

body.cart-open { overflow: hidden; }
.cart-overlay {
    position: fixed; inset: 0; z-index: 90; display: flex; justify-content: flex-end;
    background: rgba(17, 19, 24, .42); opacity: 0; visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-drawer {
    width: min(440px, 100%); height: 100%; display: flex; flex-direction: column;
    background: var(--surface); box-shadow: -18px 0 50px rgba(16, 24, 40, .16);
    transform: translateX(100%); transition: transform .26s ease;
}
.cart-overlay.open .cart-drawer { transform: translateX(0); }
.cart-drawer-head {
    min-height: 86px; padding: 18px 20px; display: flex; align-items: center;
    justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line);
}
.cart-drawer-head h2 { margin: 2px 0 0; font-size: 25px; letter-spacing: -.035em; }
.cart-eyebrow { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cart-close {
    flex: 0 0 auto; width: 40px; height: 40px; padding: 0; display: inline-flex;
    align-items: center; justify-content: center; border-radius: 50%;
    background: var(--surface-soft); color: var(--text); font-size: 14px;
}
.cart-items { min-height: 0; flex: 1 1 auto; padding: 8px 20px; overflow-y: auto; }
.cart-item { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item-image { width: 88px; height: 76px; overflow: hidden; border-radius: 11px; background: var(--surface-soft); }
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-body { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.cart-item-top, .cart-item-bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cart-item-bottom { align-items: center; }
.cart-item-title {
    overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    font-size: 14px; line-height: 18px; font-weight: 760;
}
.cart-item-meta { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.cart-remove { flex: 0 0 auto; padding: 4px; background: transparent; color: #8a919c; font-size: 12px; }
.cart-quantity {
    height: 32px; display: inline-grid; grid-template-columns: 30px 32px 30px; align-items: center;
    border: 1px solid var(--line); border-radius: 9px; overflow: hidden;
}
.cart-quantity button { width: 30px; height: 30px; padding: 0; background: var(--field); color: var(--text); font-size: 17px; }
.cart-quantity span { text-align: center; font-size: 12px; font-weight: 750; }
.cart-item-bottom strong { font-size: 14px; white-space: nowrap; }
.cart-footer { padding: 18px 20px 20px; border-top: 1px solid var(--line); background: var(--surface-footer); }
.cart-footer[hidden] { display: none; }
.cart-total-row { margin-bottom: 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 15px; }
.cart-total-row strong { font-size: 22px; letter-spacing: -.025em; }
.cart-checkout { width: 100%; min-height: 48px; }
.cart-clear { width: 100%; margin-top: 7px; padding: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; }
.cart-empty { min-height: 70vh; padding: 50px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.cart-empty-icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-soft); font-size: 26px; }
.cart-empty h3 { margin: 17px 0 6px; font-size: 20px; }
.cart-empty p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.cart-added-overlay {
    position: fixed; inset: 0; z-index: 105; padding: 20px; display: flex;
    align-items: center; justify-content: center; background: rgba(17, 19, 24, .48);
    opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.cart-added-overlay.open { opacity: 1; visibility: visible; }
.cart-added-modal {
    position: relative; width: min(460px, 100%); padding: 28px; border: 1px solid var(--line);
    border-radius: 20px; background: var(--surface); box-shadow: 0 24px 70px rgba(16,24,40,.2);
    transform: translateY(12px) scale(.98); transition: transform .22s ease;
}
.cart-added-overlay.open .cart-added-modal { transform: translateY(0) scale(1); }
.cart-added-close {
    position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
    background: var(--surface-soft); color: var(--text); font-size: 12px;
}
.cart-added-mark {
    width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
    background: var(--success-soft); color: var(--success-text); font-size: 22px; font-weight: 850;
}
.cart-added-modal h2 { margin: 15px 44px 18px 0; font-size: 23px; line-height: 1.15; letter-spacing: -.03em; }
.cart-added-product {
    min-width: 0; padding: 10px; display: grid; grid-template-columns: 76px minmax(0,1fr);
    align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 13px;
    background: var(--surface-subtle);
}
.cart-added-product img { width: 76px; height: 66px; object-fit: cover; border-radius: 9px; background: var(--surface-soft); }
.cart-added-product strong {
    overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    font-size: 14px; line-height: 19px;
}
.cart-added-product span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.cart-added-actions { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.cart-added-actions .btn { min-height: 48px; padding: 7px 13px; white-space: normal; text-align: center; line-height: 1.25; }

body.crop-editor-open { overflow: hidden; }
.crop-editor-overlay {
    position: fixed; inset: 0; z-index: 140; padding: 20px; display: flex; align-items: center; justify-content: center;
    background: rgba(7,10,16,.72); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.crop-editor-overlay.open { opacity: 1; visibility: visible; }
.crop-editor-modal {
    position: relative; width: min(760px,100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 26px;
    border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--text);
    box-shadow: 0 28px 90px rgba(0,0,0,.34); transform: translateY(12px) scale(.985); transition: transform .2s ease;
}
.crop-editor-overlay.open .crop-editor-modal { transform: translateY(0) scale(1); }
.crop-editor-close {
    position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; padding: 0; display: grid; place-items: center;
    border-radius: 50%; background: var(--surface-soft); color: var(--text); font-size: 13px;
}
.crop-editor-heading { padding-right: 48px; }
.crop-editor-heading > span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.crop-editor-heading h2 { margin: 6px 0 5px; font-size: 23px; line-height: 1.2; letter-spacing: -.03em; }
.crop-editor-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.crop-preview {
    position: relative; width: min(640px,100%); aspect-ratio: 16 / 11; margin: 20px auto 18px; overflow: hidden;
    border: 1px solid var(--line); border-radius: 15px; background: #fff;
}
.crop-preview img { position: absolute; max-width: none; display: block; transition: left .06s linear, top .06s linear, width .06s linear, height .06s linear; }
.crop-controls { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.crop-controls label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 720; }
.crop-controls input[type="range"] { width: 100%; accent-color: var(--accent); cursor: pointer; }
.crop-editor-status { min-height: 20px; margin-top: 12px; color: var(--success-text); font-size: 12px; font-weight: 700; }
.crop-editor-status.error { color: var(--danger-text); }
.crop-editor-actions { display: flex; justify-content: flex-end; gap: 10px; }
.crop-editor-actions button { min-height: 44px; padding: 0 18px; }

.checkout-page { background: var(--page); }
.checkout-topbar { position: relative; }
.checkout-top-actions { display: flex; align-items: center; gap: 12px; }
.checkout-back { color: var(--muted); font-size: 13px; font-weight: 700; }
.checkout-back:hover { color: var(--text); }
.checkout-shell { width: min(1240px, 100%); margin: 0 auto; padding: 38px 24px 70px; }
.checkout-heading { margin-bottom: 24px; }
.checkout-heading > span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.checkout-heading h1 { margin: 7px 0 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; letter-spacing: -.045em; }
.checkout-layout { display: grid; grid-template-columns: minmax(0,1fr) 380px; align-items: start; gap: 24px; }
.checkout-form { min-width: 0; display: grid; gap: 16px; }
.checkout-section, .checkout-summary, .checkout-empty, .checkout-success {
    border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-card);
}
.checkout-section { padding: 24px; }
.checkout-section-title { margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.checkout-section-title > span {
    flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center;
    border-radius: 50%; background: var(--contrast-bg); color: var(--contrast-text); font-size: 12px; font-weight: 800;
}
.checkout-section-title h2 { margin: 0; font-size: 19px; line-height: 1.2; letter-spacing: -.025em; }
.checkout-section-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.checkout-fields { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
.checkout-fields.three-columns { grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 12px; }
.checkout-fields.address-grid { grid-template-columns: minmax(0,1fr) 120px 120px; }
.checkout-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 720; }
.checkout-form input[type="text"], .checkout-form input[type="tel"], .checkout-form textarea {
    width: 100%; min-width: 0; padding: 0 13px; border: 1px solid var(--line);
    border-radius: 11px; outline: 0; background: var(--surface-subtle); color: var(--text); font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.checkout-form input[type="text"], .checkout-form input[type="tel"] { height: 46px; }
.checkout-form textarea { min-height: 110px; padding-top: 12px; padding-bottom: 12px; resize: vertical; line-height: 1.45; }
.checkout-form input:focus { border-color: #9db9f7; background: var(--surface); box-shadow: 0 0 0 4px rgba(37,99,235,.08); }
.checkout-form input:disabled { background: var(--surface-soft); color: var(--muted); cursor: not-allowed; }
.checkout-choice-grid { display: grid; gap: 10px; }
.checkout-choice-grid.two-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
.checkout-choice-grid.three-delivery-columns { grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 18px; }
.checkout-choice {
    position: relative; min-height: 82px; padding: 14px; display: flex !important; align-items: flex-start;
    border: 1px solid var(--line); border-radius: 13px; background: var(--surface-subtle); cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.checkout-choice:hover { border-color: #bcc7da; }
.checkout-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.checkout-choice input { position: absolute; opacity: 0; pointer-events: none; }
.checkout-choice span { display: grid; gap: 5px; }
.checkout-choice strong { color: var(--text); font-size: 14px; }
.checkout-choice small { color: var(--muted); font-size: 11px; line-height: 1.4; font-weight: 550; }
.delivery-fields { margin-top: 2px; }
.checkout-address-fields { margin-top: 12px; }
.autocomplete-field { position: relative; }
.autocomplete-list {
    position: absolute; left: 0; right: 0; top: calc(100% - 20px); z-index: 30;
    max-height: 280px; overflow-y: auto; padding: 5px; border: 1px solid var(--line);
    border-radius: 12px; background: var(--surface); box-shadow: 0 16px 40px rgba(16,24,40,.14);
}
.autocomplete-list[hidden] { display: none; }
.autocomplete-option {
    width: 100%; min-height: 42px; padding: 8px 10px; display: flex; align-items: center;
    border-radius: 8px; background: var(--surface); color: var(--text); text-align: left;
    font-size: 12px; line-height: 1.35; font-weight: 650;
}
.autocomplete-option:hover { background: var(--surface-soft); }
.autocomplete-empty { padding: 12px 10px; color: var(--muted); font-size: 12px; }
.field-hint { min-height: 17px; color: var(--muted); font-size: 11px; font-weight: 550; }
.field-hint.error { color: #b42318; }
.checkout-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0; }
.checkout-error { padding: 12px 14px; border: 1px solid var(--danger-text); border-radius: 11px; background: var(--danger-soft); color: var(--danger-text); font-size: 13px; }
.checkout-submit { min-height: 52px; font-size: 15px; }
.checkout-note { margin: -5px 10px 0; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.5; }
.checkout-summary { position: sticky; top: 92px; overflow: hidden; }
.checkout-summary-head { padding: 18px 18px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.checkout-summary-head h2 { margin: 0; font-size: 18px; }
.checkout-summary-head a { color: var(--accent); font-size: 12px; font-weight: 720; }
.checkout-summary-items { max-height: 440px; overflow-y: auto; padding: 4px 18px; }
.checkout-summary-item { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.checkout-summary-item img { width: 72px; height: 62px; object-fit: cover; border-radius: 9px; background: var(--surface-soft); }
.checkout-summary-item div { min-width: 0; }
.checkout-summary-item strong { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 12px; line-height: 16px; }
.checkout-summary-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.checkout-summary-item b { font-size: 12px; white-space: nowrap; }
.checkout-summary-total { padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checkout-summary-total span { font-size: 14px; }
.checkout-summary-total strong { font-size: 22px; letter-spacing: -.03em; }
.checkout-prepayment { margin: -7px 18px 18px; padding: 10px; border-radius: 9px; background: var(--warning-soft); color: var(--warning-text); font-size: 11px; }
.checkout-empty { padding: 50px 24px; text-align: center; }
.checkout-empty h2, .checkout-success h1 { margin: 0 0 9px; }
.checkout-empty p, .checkout-success p { margin: 0 0 20px; color: var(--muted); }
.checkout-success-overlay {
    position: fixed; inset: 0; z-index: 120; padding: 18px; display: flex; align-items: center;
    justify-content: center; background: rgba(17,19,24,.5);
}
.checkout-success-overlay[hidden] { display: none; }
.checkout-success { width: min(560px,100%); padding: 48px 28px; text-align: center; box-shadow: 0 24px 70px rgba(16,24,40,.22); }
.checkout-success p strong { color: var(--text); }
.checkout-success-mark { width: 62px; height: 62px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: var(--success-soft); color: var(--success-text); font-size: 28px; font-weight: 850; }
.checkout-success-contact { max-width: 440px; margin-right: auto !important; margin-left: auto !important; line-height: 1.5; }
.checkout-manager-card {
    max-width: 420px; margin: -4px auto 22px; padding: 14px; display: grid; gap: 9px;
    border: 1px solid var(--telegram-line); border-radius: 14px; background: var(--telegram-card);
}
.checkout-manager-card > span { color: var(--telegram-muted); font-size: 11px; font-weight: 720; }
.telegram-manager-link {
    min-height: 56px; padding: 9px 16px; display: flex; align-items: center; justify-content: center; gap: 11px;
    border-radius: 11px; background: #229ed9; color: #fff; box-shadow: 0 8px 20px rgba(34,158,217,.22);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.telegram-manager-link:hover { background: #168bc3; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(34,158,217,.28); }
.telegram-manager-link svg { flex: 0 0 auto; width: 25px; height: 25px; fill: currentColor; }
.telegram-manager-link span { display: grid; gap: 1px; text-align: left; }
.telegram-manager-link small { color: rgba(255,255,255,.83); font-size: 10px; font-weight: 650; }
.telegram-manager-link strong { color: #fff; font-size: 14px; letter-spacing: -.01em; }

.site-footer {
    position: relative; z-index: 2; width: 100%; margin-top: 34px; padding: 48px max(24px,calc((100vw - 1440px) / 2)) 22px;
    border-top: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.site-footer-inner { display: grid; grid-template-columns: minmax(240px,1.4fr) repeat(2,minmax(180px,1fr)); gap: 50px; }
.site-footer-logo { font-size: 21px; font-weight: 850; letter-spacing: -.045em; }
.site-footer-brand p { max-width: 310px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.site-footer-column h2 { margin: 2px 0 14px; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.site-footer-column nav { display: grid; gap: 10px; }
.site-footer-column a { width: fit-content; color: var(--muted); font-size: 13px; line-height: 1.35; transition: color .18s ease; }
.site-footer-column a:hover { color: var(--text); }
.site-footer-bottom {
    margin-top: 38px; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
    border-top: 1px solid var(--line); color: var(--muted); font-size: 11px;
}

.info-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--page); }
.info-page-shell { flex: 1 0 auto; width: min(1040px,100%); margin: 0 auto; padding: 42px 24px 70px; }
.info-page-back { display: inline-flex; margin-bottom: 18px; color: var(--muted); font-size: 12px; font-weight: 720; }
.info-page-back:hover { color: var(--text); }
.info-page-card { padding: clamp(28px,5vw,64px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-card); }
.info-page-card h1 { max-width: 760px; margin: 0 0 30px; font-size: clamp(30px,5vw,52px); line-height: 1.04; letter-spacing: -.05em; }
.info-page-content { max-width: 780px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.info-page-content p { margin: 0 0 19px; }
.info-page-content p:last-child { margin-bottom: 0; }
.info-page-content a { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.info-catalog-link { min-height: 40px; }

@media (max-width: 1180px) {
    .page { grid-template-columns: 240px minmax(0, 1fr); gap: 20px; }
    .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .topbar { min-height: 64px; padding: 12px 14px; }
    .logo { font-size: 19px; }
    .page { grid-template-columns: 1fr; padding: 16px 14px 40px; }
    .filters-panel { padding: 13px; }
    .brand-navigation-title { min-height: 40px; padding: 0 4px; cursor: pointer; }
    .brand-navigation-title .nav-chevron { display: inline-flex; }
    .brand-navigation:not(.open) .brand-list { display: none; }
    .brand-navigation.open .brand-navigation-title .nav-chevron { transform: rotate(180deg); }
    .product-detail { grid-template-columns: 1fr; gap: 24px; padding: 16px; }
    .gallery .thumb.big { height: min(520px, 90vw); }
    .checkout-shell { padding: 26px 14px 50px; }
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-summary { position: relative; top: auto; grid-row: 1; }
    .site-footer { padding: 36px 20px 20px; }
    .site-footer-inner { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
    .site-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
    .crop-editor-overlay { padding: 10px; }
    .crop-editor-modal { padding: 20px 16px; border-radius: 18px; }
    .crop-controls { grid-template-columns: 1fr; gap: 11px; }
    .topbar { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
    .top-actions { width: 100%; }
    .search { width: auto; flex: 1 1 auto; }
    .pill { padding: 0 13px; }
    .cart-button { padding: 0 12px; }
    .hero { padding-bottom: 14px; }
    .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .card {
        height: 362px; padding: 9px; grid-template-rows: 18px 120px 42px 62px 72px;
        gap: 7px; border-radius: 13px;
    }
    .thumb { border-radius: 9px; }
    .brand-tag { font-size: 11px; }
    .article { font-size: 10px; }
    .title { font-size: 14px; line-height: 19px; }
    .size-row { gap: 4px 3px; }
    .card .size-chip { min-width: 26px; height: 29px; padding: 0 4px; font-size: 11px; }
    .card-footer { align-items: stretch; flex-direction: column; gap: 7px; }
    .price { font-size: 17px; }
    .actions { width: 100%; }
    .actions .btn.buy { flex: 1 1 auto; }
    .btn { min-height: 36px; padding: 0 10px; }
    .btn.arrow { width: 38px; }
    .lb-arrow { display: none; }
    .cart-drawer { width: 100%; }
    .cart-drawer-head { min-height: 76px; padding: 14px 16px; }
    .cart-items { padding: 6px 16px; }
    .cart-footer { padding: 15px 16px 18px; }
    .cart-added-overlay { padding: 12px; }
    .cart-added-modal { padding: 23px 18px 18px; border-radius: 17px; }
    .cart-added-modal h2 { font-size: 21px; }
    .cart-added-actions { grid-template-columns: 1fr; }
    .checkout-topbar { align-items: center; flex-wrap: nowrap; }
    .checkout-back { font-size: 0; }
    .checkout-back::after { content: '← Каталог'; font-size: 12px; }
    .checkout-heading { margin-bottom: 18px; }
    .checkout-section { padding: 18px 14px; border-radius: 15px; }
    .checkout-fields.three-columns, .checkout-choice-grid.two-columns, .checkout-choice-grid.three-delivery-columns { grid-template-columns: 1fr; }
    .checkout-fields.address-grid { grid-template-columns: minmax(0,1fr) 1fr 1fr; }
    .checkout-choice { min-height: 70px; }
    .checkout-summary-items { max-height: 330px; }
    .checkout-success { padding: 38px 18px; }
    .site-footer { margin-top: 20px; }
    .site-footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .site-footer-brand { grid-column: auto; }
    .site-footer-bottom { margin-top: 30px; }
    .info-page-shell { padding: 26px 14px 46px; }
    .info-page-card { padding: 24px 18px; border-radius: 17px; }
    .info-page-card h1 { margin-bottom: 22px; }
}
@media (max-width: 460px) {
    .cart-button-label { display: none; }
    .cart-button::before { content: '🛒'; font-size: 16px; }
    .cart-button { min-width: 44px; padding: 0 10px; justify-content: center; }
    .cart-count { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; font-size: 10px; }
}
@media (max-width: 380px) {
    .catalog { grid-template-columns: 1fr; }
    .card { height: 410px; grid-template-rows: 18px 168px 42px 62px 72px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
