/* ============================================================================
   OptS.pro — Storefront Design System (SHOP_UI_2026_09_10)
   Единый слой для всех публичных страниц: главная, каталог, товар, корзина,
   оформление, кабинет, документы. Подключается вместо встроенных стилей.
   ============================================================================ */

/* ---------- 1. Tokens ---------- */
:root {
    --primary: #7C3AED;
    --primary-hover: #6D28D9;
    --primary-soft: #EDE9FE;
    --primary-ring: rgba(124, 58, 237, .22);
    --accent: #C026D3;            /* magenta — скидки, акценты */
    --accent-soft: #FAE8FF;
    --lavender: #F3F0FF;          /* мягкий лавандовый — подложки */
    --background: #F7F7FA;
    --surface: #FFFFFF;
    --surface-2: #F4F4F8;
    --text: #17171F;
    --text-secondary: #6B6B80;
    --text-tertiary: #9A9AAF;
    --border: #E6E6EF;
    --border-strong: #D4D4E0;
    --success: #16A34A;
    --success-soft: #DCFCE7;
    --warning: #D97706;
    --warning-soft: #FEF3C7;
    --danger: #DC2626;
    --danger-soft: #FEE2E2;
    --ozon: #005BFF;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 40px;
    --spacing-2xl: 64px;

    --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 18px; --fs-2xl: 22px; --fs-3xl: 28px; --fs-4xl: 36px;

    --shadow-xs: 0 1px 2px rgba(23, 23, 31, .04);
    --shadow-sm: 0 1px 3px rgba(23, 23, 31, .06), 0 1px 2px rgba(23, 23, 31, .04);
    --shadow-md: 0 8px 24px -10px rgba(23, 23, 31, .16);
    --shadow-lg: 0 24px 48px -16px rgba(23, 23, 31, .24);
    --transition: .15s ease;

    --container: 1320px;
    --header-h: 64px;
    --control-h: 44px;
    --control-h-sm: 36px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: 1.5;
    color: var(--text); background: var(--background);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    min-height: 100vh; display: flex; flex-direction: column;
}
body.no-scroll { overflow: hidden; }
main { flex: 1; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
h1, h2, h3, h4 { color: var(--text); line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: var(--fs-4xl); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); font-weight: 600; }
h4 { font-size: var(--fs-lg); font-weight: 600; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { padding-left: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--spacing-lg); }
.section { padding: var(--spacing-xl) 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--spacing-md); margin-bottom: var(--spacing-lg); flex-wrap: wrap; }
.section-head h2 { font-size: var(--fs-3xl); }
.section-head p { color: var(--text-secondary); font-size: var(--fs-md); margin-top: 4px; }
.section-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--fs-md); white-space: nowrap; }
.section-link .ico { width: 16px; height: 16px; }
.muted { color: var(--text-secondary); }
.small { font-size: var(--fs-sm); }
.tnum { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 24px; height: 24px; }
.ico-spin { animation: shop-spin .8s linear infinite; }
@keyframes shop-spin { to { transform: rotate(360deg); } }

/* ---------- 3. Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: var(--control-h); padding: 0 20px; border-radius: 10px;
    border: 1px solid transparent; font-size: var(--fs-md); font-weight: 600; line-height: 1;
    white-space: nowrap; text-decoration: none; cursor: pointer; user-select: none;
    transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
    background: var(--surface); color: var(--text); border-color: var(--border);
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn .ico { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(124, 58, 237, .2); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-primary.in-cart { background: var(--success); border-color: var(--success); }
.btn-primary.in-cart:hover { background: #15803D; border-color: #15803D; }
.btn-secondary { background: var(--primary-soft); border-color: transparent; color: var(--primary-hover); }
.btn-secondary:hover { background: #E1D8FD; color: var(--primary-hover); }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--text); }
.btn-ozon { background: var(--ozon); border-color: var(--ozon); color: #fff; }
.btn-ozon:hover { background: #0047CC; border-color: #0047CC; color: #fff; }
.btn-danger-soft { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-danger-soft:hover { background: var(--danger); color: #fff; }
.btn-sm { height: var(--control-h-sm); padding: 0 14px; font-size: var(--fs-sm); border-radius: var(--radius-sm); }
.btn-sm .ico { width: 16px; height: 16px; }
.btn-lg { height: 52px; padding: 0 28px; font-size: var(--fs-lg); border-radius: var(--radius-md); }
.btn-icon { width: var(--control-h); padding: 0; }
.btn-icon.btn-sm { width: var(--control-h-sm); }
.btn-block { width: 100%; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.9); border-right-color: transparent; animation: shop-spin .7s linear infinite; }
.btn-outline.is-loading::after, .btn.is-loading:not(.btn-primary):not(.btn-ozon)::after { border-color: var(--text-secondary); border-right-color: transparent; }

/* ---------- 4. Inputs ---------- */
.input, .field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
    width: 100%; height: var(--control-h); padding: 0 14px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text);
    font-size: var(--fs-md); transition: border-color var(--transition), box-shadow var(--transition); appearance: none;
}
.field textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--text-tertiary); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 500; color: var(--text); margin-bottom: 6px; }
.field label .req { color: var(--danger); }
.field .hint { font-size: var(--fs-xs); color: var(--text-secondary); margin-top: 5px; }
.field select { padding-right: 36px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6B80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; }
.select { height: var(--control-h-sm); padding: 0 34px 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: var(--fs-sm); font-weight: 500; color: var(--text); cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6B80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; }
.select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.check { display: flex; align-items: center; gap: 10px; font-size: var(--fs-md); cursor: pointer; padding: 6px 0; color: var(--text); }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.check .cnt { margin-left: auto; color: var(--text-tertiary); font-size: var(--fs-xs); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); height: var(--control-h); overflow: hidden; }
.qty button { width: 42px; height: 100%; border: none; background: transparent; color: var(--text-secondary); font-size: 18px; font-weight: 600; transition: background var(--transition), color var(--transition); }
.qty button:hover { background: var(--surface-2); color: var(--primary); }
.qty input, .qty .qty-val { width: 44px; height: 100%; border: none; text-align: center; font-weight: 600; font-size: var(--fs-md); background: transparent; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.qty input:focus { outline: none; }
.qty.qty-sm { height: 34px; border-radius: var(--radius-sm); }
.qty.qty-sm button { width: 32px; font-size: 16px; }
.qty.qty-sm input, .qty.qty-sm .qty-val { width: 36px; font-size: var(--fs-sm); }

/* ---------- 5. Badges, price ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: var(--fs-xs); font-weight: 600; line-height: 1; white-space: nowrap; }
.badge-stock { background: var(--success-soft); color: #166534; }
.badge-stock::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.badge-out { background: var(--surface-2); color: var(--text-secondary); }
.badge-out::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--text-tertiary); }
.badge-sale { background: var(--accent); color: #fff; }
.badge-low { background: var(--warning-soft); color: #92400E; }
.badge-low::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }
.badge-new { background: var(--primary-soft); color: var(--primary-hover); }
.badge-ozon { background: #EAF1FF; color: var(--ozon); }
.badge-muted { background: var(--surface-2); color: var(--text-secondary); border: 1px solid var(--border); }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-old { font-size: var(--fs-sm); color: var(--text-tertiary); text-decoration: line-through; white-space: nowrap; }
.price-off { font-size: var(--fs-xs); font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 6px; border-radius: 6px; }

/* ---------- 6. Header ---------- */
.shop-header { position: sticky; top: 0; z-index: 100; background: var(--surface); border-bottom: 1px solid var(--border); }
.shop-header-row { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.shop-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.shop-logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.shop-logo-text { display: flex; flex-direction: column; line-height: 1; }
.shop-logo-text b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.shop-logo-text b i { color: var(--primary); font-style: normal; }
.shop-logo-text span { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-tertiary); margin-top: 3px; }
.shop-cat-btn { height: 44px; padding: 0 16px; gap: 8px; flex-shrink: 0; }
.shop-cat-btn .ico-x { display: none; }
.shop-cat-btn.open .ico-menu { display: none; }
.shop-cat-btn.open .ico-x { display: block; }
.shop-search { position: relative; flex: 1; max-width: 640px; min-width: 0; }
.shop-search input { width: 100%; height: 44px; padding: 0 44px 0 42px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: var(--fs-md); color: var(--text); transition: border-color var(--transition), box-shadow var(--transition), background var(--transition); }
.shop-search input::placeholder { color: var(--text-tertiary); }
.shop-search input:focus { outline: none; background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.shop-search .ico-search { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); pointer-events: none; width: 18px; height: 18px; }
.shop-search .search-clear { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border-radius: 8px; border: none; background: transparent; color: var(--text-tertiary); display: none; align-items: center; justify-content: center; }
.shop-search .search-clear:hover { background: var(--surface-2); color: var(--text); }
.shop-search.has-value .search-clear { display: inline-flex; }
.search-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 6px; display: none; z-index: 120; max-height: 70vh; overflow: auto; }
.search-suggest.open { display: block; }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; cursor: pointer; }
.suggest-item:hover, .suggest-item.active { background: var(--surface-2); color: var(--text); }
.suggest-item img, .suggest-item .ph { width: 44px; height: 44px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--border); flex-shrink: 0; padding: 2px; }
.suggest-item .ph { display: flex; align-items: center; justify-content: center; color: var(--text-tertiary); }
.suggest-item .sn { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.suggest-item .sn small { display: block; color: var(--text-secondary); font-weight: 400; margin-top: 2px; }
.suggest-item .sp { font-weight: 700; font-size: var(--fs-md); white-space: nowrap; }
.suggest-all { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-top: 1px solid var(--border); margin-top: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--primary); cursor: pointer; }
.suggest-empty { padding: 16px; text-align: center; color: var(--text-secondary); font-size: var(--fs-sm); }
.suggest-item mark { background: transparent; color: var(--primary); font-weight: 700; }
.shop-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-shrink: 0; }
.shop-action { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 60px; height: 52px; padding: 0 8px; border-radius: 10px; color: var(--text-secondary); text-decoration: none; font-size: 11px; font-weight: 500; border: none; background: transparent; transition: background var(--transition), color var(--transition); }
.shop-action:hover { background: var(--surface-2); color: var(--primary); }
.shop-action .ico { width: 22px; height: 22px; }
.shop-action .cnt { position: absolute; top: 2px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }
.shop-action .cnt.zero { display: none; }
.shop-action.active .ico { fill: var(--accent); stroke: var(--accent); }
.shop-burger { display: none; }
.shop-nav { display: flex; align-items: center; gap: 4px; height: 44px; border-top: 1px solid var(--border); }
.shop-nav a { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; color: var(--text); font-size: var(--fs-md); font-weight: 500; text-decoration: none; transition: background var(--transition), color var(--transition); }
.shop-nav a:hover { background: var(--surface-2); color: var(--primary); }
.shop-nav a.hot { color: var(--accent); font-weight: 600; }
.shop-nav .spacer { flex: 1; }
.shop-nav .nav-note { font-size: var(--fs-sm); color: var(--text-secondary); display: inline-flex; align-items: center; gap: 6px; }
.shop-nav .nav-note .ico { width: 16px; height: 16px; color: var(--success); }

/* мегаменю каталога */
.shop-catmenu { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); display: none; z-index: 110; }
.shop-catmenu.open { display: block; }
.shop-catmenu-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; padding: 24px 0 28px; }
.shop-catmenu h4 { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 10px; }
.catmenu-list a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; text-decoration: none; }
.catmenu-list a:hover { background: var(--lavender); color: var(--primary); }
.catmenu-list a .cico { width: 34px; height: 34px; border-radius: 9px; background: var(--lavender); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.catmenu-list a .cico .ico { width: 18px; height: 18px; }
.catmenu-list a .cnt { margin-left: auto; font-size: var(--fs-xs); color: var(--text-tertiary); }
.catmenu-brands { display: flex; flex-wrap: wrap; gap: 8px; }
.catmenu-brands a { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.catmenu-brands a:hover { border-color: var(--primary); color: var(--primary); }
.catmenu-promo { background: var(--lavender); border-radius: var(--radius-md); padding: 18px; }
.catmenu-promo b { display: block; font-size: var(--fs-lg); margin-bottom: 4px; }
.catmenu-promo p { color: var(--text-secondary); font-size: var(--fs-sm); margin-bottom: 12px; }
.shop-backdrop { position: fixed; inset: 0; background: rgba(23, 23, 31, .45); z-index: 105; opacity: 0; pointer-events: none; transition: opacity .2s; }
.shop-backdrop.open { opacity: 1; pointer-events: auto; }

/* мобильное меню */
.shop-mobmenu { position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 88vw); background: var(--surface); z-index: 130; transform: translateX(-100%); transition: transform .25s ease; display: flex; flex-direction: column; overflow-y: auto; }
.shop-mobmenu.open { transform: translateX(0); }
.shop-mobmenu-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.shop-mobmenu-body { padding: 8px 12px 24px; }
.shop-mobmenu h4 { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); margin: 16px 10px 6px; }
.shop-mobmenu .catmenu-list a { padding: 10px; }
.shop-mobmenu .mob-links a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; text-decoration: none; }
.shop-mobmenu .mob-links a:hover { background: var(--surface-2); }
.shop-mobmenu .mob-links a .ico { color: var(--text-secondary); width: 18px; height: 18px; }

@media (max-width: 1100px) {
    .shop-nav { display: none; }
    .shop-action { min-width: 52px; }
}
@media (max-width: 768px) {
    :root { --header-h: 56px; }
    .shop-header-row { gap: 8px; flex-wrap: wrap; height: auto; padding: 8px 0; }
    .shop-logo-text span { display: none; }
    .shop-logo-mark { width: 32px; height: 32px; font-size: 14px; }
    .shop-cat-btn { display: none; }
    .shop-search { order: 5; flex-basis: 100%; max-width: none; }
    .shop-search input { height: 40px; }
    .shop-actions { gap: 0; }
    .shop-action { min-width: 44px; height: 44px; padding: 0; gap: 0; }
    .shop-action span:not(.cnt) { display: none; }
    .shop-action .cnt { top: 0; right: 0; }
    .shop-action.act-fav, .shop-action.act-user { display: none; }
    .shop-burger { display: inline-flex; }
    .shop-catmenu { display: none !important; }
}

/* ---------- 7. Footer ---------- */
.shop-footer { margin-top: var(--spacing-2xl); background: var(--surface); border-top: 1px solid var(--border); }
.shop-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 40px 0 32px; }
.shop-footer h4 { font-size: var(--fs-sm); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text); margin-bottom: 14px; }
.shop-footer ul li { margin-bottom: 8px; }
.shop-footer ul a { color: var(--text-secondary); font-size: var(--fs-md); text-decoration: none; }
.shop-footer ul a:hover { color: var(--primary); }
.shop-footer-about p { color: var(--text-secondary); font-size: var(--fs-md); margin-top: 12px; max-width: 360px; line-height: 1.55; }
.shop-footer-ozon { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; height: 38px; padding: 0 14px; border-radius: var(--radius-sm); background: #EAF1FF; color: var(--ozon); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.shop-footer-ozon:hover { background: #DCE8FF; color: var(--ozon); }
.shop-footer-bottom { border-top: 1px solid var(--border); padding: 16px 0 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-secondary); }
.shop-footer-bottom a { color: var(--text-secondary); text-decoration: none; }
.shop-footer-bottom a:hover { color: var(--primary); }
@media (max-width: 900px) { .shop-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding: 32px 0 24px; } }
@media (max-width: 480px) { .shop-footer-grid { grid-template-columns: 1fr; } }

/* ---------- 8. Cards & product grid ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 360px) { .product-grid { grid-template-columns: 1fr; } }
.product-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.product-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card .pc-img { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; border-bottom: 1px solid var(--border); overflow: hidden; }
.product-card .pc-img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .25s ease; }
.product-card:hover .pc-img img { transform: scale(1.03); }
.product-card .pc-img .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-tertiary); background: var(--surface-2); }
.product-card .pc-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.product-card .pc-fav { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,.95); color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; transition: color var(--transition), border-color var(--transition), background var(--transition); }
.product-card .pc-fav:hover { color: var(--accent); border-color: var(--accent); }
.product-card .pc-fav.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.product-card .pc-fav.active .ico { fill: currentColor; }
.product-card .pc-fav .ico { width: 18px; height: 18px; }
.product-card .pc-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; flex: 1; }
.product-card .pc-stock { display: flex; align-items: center; gap: 8px; }
.product-card .pc-name { font-size: var(--fs-md); font-weight: 600; line-height: 1.35; color: var(--text); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: calc(1.35em * 2); }
.product-card .pc-name:hover { color: var(--primary); }
.product-card .pc-specs { font-size: var(--fs-xs); color: var(--text-secondary); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; min-height: 1.4em; }
.product-card .price { margin-top: auto; padding-top: 4px; }
.product-card .pc-actions { display: flex; gap: 8px; margin-top: 4px; }
.product-card .pc-actions .btn { flex: 1; height: 40px; padding: 0 12px; font-size: var(--fs-sm); }
.product-card .pc-ozon { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--text-secondary); text-decoration: none; margin-top: 2px; }
.product-card .pc-ozon:hover { color: var(--ozon); }
.product-card .pc-ozon .ico { width: 12px; height: 12px; }
@media (max-width: 700px) {
    .product-card .pc-body { padding: 10px 10px 12px; gap: 6px; }
    .product-card .pc-img img { padding: 10px; }
    .product-card .pc-name { font-size: var(--fs-sm); }
    .product-card .price-now { font-size: 17px; }
    .product-card .price-old { display: none; }
    .product-card .pc-actions .btn { padding: 0 8px; }
    .product-card .pc-actions .btn .lbl-long { display: none; }
}
@media (min-width: 701px) { .product-card .pc-actions .btn .lbl-short { display: none; } }
.product-card.skeleton .pc-img, .product-card.skeleton .sk { background: linear-gradient(90deg, var(--surface-2) 25%, #ECECF3 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shop-skel 1.3s ease infinite; border-radius: 6px; }
.product-card.skeleton .sk { height: 14px; }
@keyframes shop-skel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* горизонтальная лента карточек (главная) */
.product-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 16px) / 4); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.product-row::-webkit-scrollbar { display: none; }
.product-row > * { scroll-snap-align: start; }
@media (max-width: 1100px) { .product-row { grid-auto-columns: calc((100% - 2 * 16px) / 3); } }
@media (max-width: 700px) { .product-row { grid-auto-columns: calc((100% - 12px) / 2); gap: 12px; } }
.row-nav { display: flex; gap: 6px; }
.row-nav button { width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; }
.row-nav button:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 9. Empty / loading / toast ---------- */
.empty { text-align: center; padding: 56px 24px; color: var(--text-secondary); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.empty .ico-wrap { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: var(--radius-md); background: var(--lavender); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.empty .ico-wrap .ico { width: 26px; height: 26px; stroke-width: 1.6; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { font-size: var(--fs-md); }
.empty .btn { margin-top: 16px; }
#shop-toast-host { position: fixed; left: 16px; bottom: 16px; z-index: 300; display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none; }
.shop-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 12px 14px; background: var(--text); color: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); font-size: var(--fs-sm); font-weight: 500; transform: translateY(12px); opacity: 0; transition: transform .2s, opacity .2s; }
.shop-toast.show { transform: none; opacity: 1; }
.shop-toast .ico { width: 18px; height: 18px; color: #A7F3D0; }
.shop-toast.error .ico { color: #FCA5A5; }
.shop-toast a { color: #DDD6FE; font-weight: 600; margin-left: auto; white-space: nowrap; }
@media (max-width: 480px) { #shop-toast-host { left: 12px; right: 12px; } .shop-toast { min-width: 0; max-width: none; } }

/* ---------- 10. Cart drawer ---------- */
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); z-index: 130; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.cart-drawer-head h3 { font-size: var(--fs-xl); }
.cart-drawer-head h3 small { color: var(--text-secondary); font-weight: 500; font-size: var(--fs-sm); margin-left: 6px; }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.cart-drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--border); background: var(--surface); }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: start; }
.cart-line:last-child { border-bottom: none; }
.cart-line img, .cart-line .ph { width: 64px; height: 64px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--border); padding: 3px; }
.cart-line .ph { display: flex; align-items: center; justify-content: center; color: var(--text-tertiary); }
.cart-line-name { font-size: var(--fs-sm); font-weight: 500; line-height: 1.35; color: var(--text); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-line-name:hover { color: var(--primary); }
.cart-line-meta { font-size: var(--fs-xs); color: var(--text-secondary); margin-top: 3px; }
.cart-line-ctrl { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cart-line-total { font-weight: 700; font-size: var(--fs-md); white-space: nowrap; text-align: right; }
.cart-line-remove { border: none; background: transparent; color: var(--text-tertiary); width: 30px; height: 30px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.cart-line-remove:hover { color: var(--danger); background: var(--danger-soft); }
.cart-line-remove .ico { width: 16px; height: 16px; }
.cart-summary-row { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-md); color: var(--text-secondary); margin-bottom: 6px; }
.cart-summary-row.total { font-size: var(--fs-xl); font-weight: 700; color: var(--text); margin: 6px 0 14px; }
.cart-empty { text-align: center; padding: 48px 12px; color: var(--text-secondary); }
.cart-empty .ico-wrap { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: var(--radius-md); background: var(--lavender); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.cart-empty b { display: block; color: var(--text); font-size: var(--fs-lg); margin-bottom: 4px; }

/* ---------- 11. Breadcrumbs, page head ---------- */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--fs-sm); color: var(--text-secondary); padding: 16px 0 0; }
.crumbs a { color: var(--text-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }
.crumbs .ico { width: 14px; height: 14px; color: var(--text-tertiary); }
.crumbs .cur { color: var(--text); font-weight: 500; max-width: 60vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 0 20px; }
.page-head h1 { font-size: var(--fs-3xl); }
.page-head .count { font-size: var(--fs-md); color: var(--text-secondary); font-weight: 500; margin-left: 10px; }

/* ---------- 12. Catalog: filters + toolbar ---------- */
.catalog-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px 16px 16px; }
.filters-head { display: none; }
.filter-group { padding: 14px 0; border-bottom: 1px solid var(--border); }
.filter-group:last-of-type { border-bottom: none; }
.filter-group h4 { font-size: var(--fs-sm); font-weight: 700; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.filter-cats a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px; border-radius: var(--radius-sm); color: var(--text); font-size: var(--fs-md); text-decoration: none; }
.filter-cats a:hover { background: var(--surface-2); color: var(--primary); }
.filter-cats a.active { background: var(--lavender); color: var(--primary); font-weight: 600; }
.filter-cats a .cnt { margin-left: auto; font-size: var(--fs-xs); color: var(--text-tertiary); }
.filter-cats a .ico { width: 18px; height: 18px; color: var(--text-tertiary); }
.filter-cats a.active .ico { color: var(--primary); }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input { flex: 1; min-width: 0; height: var(--control-h-sm); padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: var(--fs-sm); }
.price-range input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.price-range span { color: var(--text-tertiary); }
.filters-actions { display: flex; gap: 8px; padding-top: 14px; }
.catalog-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.catalog-toolbar .chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--surface); color: var(--text); font-size: var(--fs-sm); font-weight: 500; cursor: pointer; user-select: none; transition: border-color var(--transition), background var(--transition), color var(--transition); }
.chip:hover { border-color: var(--border-strong); }
.chip.on { border-color: var(--primary); background: var(--lavender); color: var(--primary); font-weight: 600; }
.chip .x { display: inline-flex; width: 16px; height: 16px; }
.chip input { display: none; }
.catalog-toolbar .btn-filters { display: none; }
.catalog-count { font-size: var(--fs-sm); color: var(--text-secondary); }
@media (max-width: 1000px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .filters { position: fixed; inset: 0 auto 0 0; width: min(360px, 90vw); z-index: 130; border-radius: 0; border: none; overflow-y: auto; transform: translateX(-100%); transition: transform .25s ease; padding: 0 16px 24px; }
    .filters.open { transform: translateX(0); }
    .filters-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
    .catalog-toolbar .btn-filters { display: inline-flex; }
}

/* ---------- 13. Home sections ---------- */
.hero { margin-top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 420px; }
.hero-body { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: var(--radius-full); background: var(--primary-soft); color: var(--primary-hover); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; width: fit-content; margin-bottom: 18px; }
.hero h1 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p { color: var(--text-secondary); font-size: var(--fs-lg); max-width: 520px; margin-bottom: 22px; }
.hero-points { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin-bottom: 26px; }
.hero-points li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-md); font-weight: 500; color: var(--text); }
.hero-points .ico { width: 20px; height: 20px; color: var(--primary); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-visual { position: relative; background: var(--lavender); display: flex; align-items: center; justify-content: center; padding: 32px; overflow: hidden; }
.hero-visual::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 58, 237, .16), transparent 65%); top: -120px; right: -120px; }
.hero-product { position: relative; width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-md); text-decoration: none; color: var(--text); }
.hero-product img { width: 100%; height: 200px; object-fit: contain; }
.hero-product .hp-name { font-size: var(--fs-md); font-weight: 600; margin: 12px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-product .price-now { font-size: 24px; }
.hero-product .hp-tag { position: absolute; top: 14px; left: 14px; }
.hero-mini { position: absolute; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 14px; box-shadow: var(--shadow-sm); font-size: var(--fs-sm); font-weight: 600; }
.hero-mini .ico { width: 18px; height: 18px; color: var(--success); }
.hero-mini.m1 { left: 24px; bottom: 28px; }
.hero-mini.m2 { right: 24px; top: 28px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; min-height: 0; } .hero-visual { padding: 24px; min-height: 280px; } .hero-mini { display: none; } .hero-body { padding: 28px 22px; } .hero-points { grid-template-columns: 1fr; } }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.cat-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text); text-decoration: none; transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition); }
.cat-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-1px); color: var(--text); }
.cat-card .cc-img { width: 56px; height: 56px; border-radius: 10px; background: var(--lavender); display: flex; align-items: center; justify-content: center; color: var(--primary); flex-shrink: 0; overflow: hidden; }
.cat-card .cc-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; }
.cat-card .cc-img .ico { width: 24px; height: 24px; }
.cat-card b { display: block; font-size: var(--fs-md); font-weight: 600; }
.cat-card span { display: block; font-size: var(--fs-xs); color: var(--text-secondary); margin-top: 2px; }

.brands { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand-pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text); font-weight: 700; font-size: var(--fs-md); letter-spacing: .02em; text-decoration: none; transition: border-color var(--transition), color var(--transition); }
.brand-pill:hover { border-color: var(--primary); color: var(--primary); }
.brand-pill small { font-weight: 500; color: var(--text-tertiary); font-size: var(--fs-xs); }

.benefits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.benefit { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.benefit .bi { width: 44px; height: 44px; border-radius: 12px; background: var(--lavender); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.benefit .bi .ico { width: 22px; height: 22px; }
.benefit b { display: block; font-size: var(--fs-md); margin-bottom: 3px; }
.benefit span { display: block; font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.45; }
@media (max-width: 900px) { .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .benefits { grid-template-columns: 1fr; } }

.wholesale { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; background: var(--text); color: #fff; border-radius: var(--radius-lg); padding: 40px 44px; overflow: hidden; position: relative; }
.wholesale::after { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 58, 237, .55), transparent 65%); pointer-events: none; }
.wholesale h2 { color: #fff; font-size: var(--fs-3xl); margin-bottom: 10px; }
.wholesale p { color: rgba(255,255,255,.72); font-size: var(--fs-lg); max-width: 520px; margin-bottom: 22px; }
.wholesale .btn-primary { box-shadow: none; }
.wholesale .btn-outline { background: transparent; border-color: rgba(255,255,255,.28); color: #fff; }
.wholesale .btn-outline:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }
.wholesale-steps { position: relative; display: grid; gap: 10px; }
.wholesale-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-md); font-size: var(--fs-md); }
.wholesale-steps li b { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-sm); flex-shrink: 0; }
@media (max-width: 900px) { .wholesale { grid-template-columns: 1fr; padding: 28px 22px; } }

.subscribe { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 26px; }
.subscribe .si { width: 48px; height: 48px; border-radius: 12px; background: var(--lavender); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.subscribe .st { flex: 1; min-width: 240px; }
.subscribe .st b { display: block; font-size: var(--fs-lg); }
.subscribe .st span { display: block; font-size: var(--fs-sm); color: var(--text-secondary); margin-top: 2px; }
.subscribe form { display: flex; gap: 8px; flex: 1; min-width: 280px; max-width: 460px; }
.subscribe form input { flex: 1; min-width: 0; }
.subscribe .sub-msg { flex-basis: 100%; font-size: var(--fs-sm); color: var(--text-secondary); }
.subscribe .sub-msg.ok { color: var(--success); }

/* ---------- 14. Product page ---------- */
.product-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 8px; }
.gallery { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
.gallery-thumbs { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow-y: auto; scrollbar-width: none; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb { width: 76px; height: 76px; border-radius: 10px; border: 2px solid var(--border); background: #fff; overflow: hidden; cursor: pointer; flex-shrink: 0; transition: border-color var(--transition); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.gallery-thumb.active { border-color: var(--primary); }
.gallery-main { position: relative; aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.gallery-main .gm-badges { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; }
.gallery-main .gm-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,.95); color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--transition); }
.gallery-main:hover .gm-nav { opacity: 1; }
.gallery-main .gm-nav.prev { left: 12px; } .gallery-main .gm-nav.next { right: 12px; }
.gallery-main .gm-nav:hover { color: var(--primary); border-color: var(--primary); }
.gallery.single { grid-template-columns: 1fr; }
.buy-box { display: flex; flex-direction: column; gap: 16px; }
.buy-box h1 { font-size: clamp(22px, 2.4vw, 30px); }
.buy-meta { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--text-secondary); }
.buy-meta code { font-family: inherit; color: var(--text); font-weight: 500; }
.buy-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.buy-card .price { margin: 10px 0 4px; }
.buy-card .price-now { font-size: 30px; }
.buy-card .price-old { font-size: var(--fs-md); }
.buy-card .price-off { font-size: var(--fs-sm); padding: 3px 8px; }
.buy-save { font-size: var(--fs-sm); color: var(--text-secondary); margin-bottom: 14px; }
.buy-save b { color: var(--success); }
.buy-ship { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-secondary); margin-bottom: 16px; }
.buy-ship .ico { width: 16px; height: 16px; color: var(--text-tertiary); }
.buy-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.buy-row .btn { flex: 1; }
.buy-total { font-size: var(--fs-sm); color: var(--text-secondary); margin-left: auto; }
.buy-total b { color: var(--text); }
.buy-ozon { width: 100%; margin-bottom: 12px; }
.buy-links { display: flex; gap: 8px; }
.buy-links .btn { flex: 1; }
.buy-links .btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.buy-links .btn.active .ico { fill: currentColor; }
.info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.info-card .ii { width: 38px; height: 38px; border-radius: 10px; background: var(--lavender); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-card .ii .ico { width: 19px; height: 19px; }
.info-card b { display: block; font-size: var(--fs-sm); }
.info-card span { display: block; font-size: var(--fs-xs); color: var(--text-secondary); margin-top: 2px; line-height: 1.4; }
.product-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 40px 0 20px; overflow-x: auto; scrollbar-width: none; }
.product-tabs a { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; font-size: var(--fs-md); font-weight: 600; color: var(--text-secondary); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; white-space: nowrap; }
.product-tabs a:hover { color: var(--text); }
.product-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.product-section { margin-bottom: 32px; scroll-margin-top: calc(var(--header-h) + 60px); }
.product-section h2 { font-size: var(--fs-2xl); margin-bottom: 14px; }
.desc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px; font-size: 15px; line-height: 1.7; color: var(--text); }
.desc p { margin-bottom: 12px; } .desc p:last-child { margin-bottom: 0; }
.desc ul, .desc ol { list-style: disc; padding-left: 20px; margin-bottom: 12px; }
.desc h2, .desc h3, .desc h4 { font-size: var(--fs-lg); margin: 16px 0 8px; }
.desc.clamp { max-height: 260px; overflow: hidden; position: relative; }
.desc.clamp::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 80px; background: linear-gradient(transparent, var(--surface)); }
.desc-more { margin-top: 10px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.spec-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 22px; }
.spec-group h3 { font-size: var(--fs-md); color: var(--text); margin-bottom: 8px; }
.spec-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: var(--fs-sm); line-height: 1.45; }
.spec-row:last-child { border-bottom: none; }
.spec-row .k { color: var(--text-secondary); }
.spec-row .v { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 900px) { .product-layout { grid-template-columns: 1fr; gap: 20px; } .specs { grid-template-columns: 1fr; } .gallery { grid-template-columns: 1fr; } .gallery-thumbs { flex-direction: row; order: 2; max-height: none; } .gallery-thumb { width: 64px; height: 64px; } .gallery-main .gm-nav { opacity: 1; } }
@media (max-width: 560px) { .info-cards { grid-template-columns: 1fr; } .buy-card { padding: 16px; } .buy-links { flex-direction: column; } }

/* ---------- 15. Checkout / cart page ---------- */
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.box h2 { font-size: var(--fs-xl); margin-bottom: 16px; }
.box h2.mt { margin-top: 28px; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-secondary); padding: 0 8px 10px; border-bottom: 1px solid var(--border); }
.cart-table td { padding: 12px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: var(--fs-md); }
.cart-table tr:last-child td { border-bottom: none; }
.cart-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cart-table .ct-prod { display: flex; align-items: center; gap: 12px; }
.cart-table .ct-prod img, .cart-table .ct-prod .ph { width: 56px; height: 56px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--border); padding: 3px; flex-shrink: 0; }
.cart-table .ct-prod a { color: var(--text); font-weight: 500; font-size: var(--fs-sm); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-table .ct-prod a:hover { color: var(--primary); }
.summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: var(--fs-md); color: var(--text-secondary); }
.summary-line b { color: var(--text); }
.summary-line.discount { color: var(--success); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--border); font-size: var(--fs-lg); font-weight: 700; }
.summary-total .val { font-size: 24px; font-weight: 800; }
.delivery-opts { display: grid; gap: 8px; }
.delivery-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: border-color var(--transition), background var(--transition); }
.delivery-opt:hover { border-color: var(--border-strong); }
.delivery-opt input { margin: 0; accent-color: var(--primary); }
.delivery-opt.active { border-color: var(--primary); background: var(--lavender); }
.delivery-opt .dl { flex: 1; font-weight: 500; }
.delivery-opt .dl small { display: block; color: var(--text-secondary); font-weight: 400; font-size: var(--fs-xs); margin-top: 2px; }
.delivery-opt .dp { font-weight: 700; white-space: nowrap; }
.error { background: var(--danger-soft); border: 1px solid #FECACA; color: #991B1B; padding: 12px 14px; border-radius: 10px; margin-top: 12px; font-size: var(--fs-sm); }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--lavender); border: 1px solid #DDD6FE; border-radius: 10px; padding: 12px 14px; font-size: var(--fs-sm); color: var(--text); margin-bottom: 16px; }
.notice .ico { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; margin-top: 1px; }
.notice a { font-weight: 600; }
.auth-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; font-size: var(--fs-sm); color: var(--text-secondary); cursor: pointer; }
.consent input { margin-top: 3px; accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; }
.promo-row { display: flex; gap: 8px; }
.promo-row input { flex: 1; text-transform: uppercase; }
.city-results { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-top: 4px; max-height: 240px; overflow-y: auto; z-index: 10; box-shadow: var(--shadow-md); }
.city-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); }
.city-item:last-child { border-bottom: none; }
.city-item:hover { background: var(--surface-2); }
.city-item div:first-child { font-weight: 600; }
.city-item div:last-child { color: var(--text-secondary); font-size: var(--fs-xs); }
.pvz-picked { padding: 12px 14px; background: var(--lavender); border: 1px solid #DDD6FE; border-radius: 10px; margin-bottom: 8px; }
.pvz-btn { width: 100%; height: 48px; border: 1px dashed var(--primary); background: var(--surface); color: var(--primary); border-radius: 10px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pvz-btn:hover { background: var(--lavender); }
.modal-bg { position: fixed; inset: 0; background: rgba(23, 23, 31, .5); z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.modal-bg.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-lg); width: min(720px, 100%); max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h3 { font-size: var(--fs-lg); }
.modal-head h3 small { color: var(--text-secondary); font-weight: 400; font-size: var(--fs-sm); }
.modal-body { flex: 1; overflow-y: auto; padding: 8px 12px; }
.modal-search { padding: 12px 20px; border-bottom: 1px solid var(--border); }
.pvz-item { padding: 12px 14px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pvz-item:hover { background: var(--surface-2); }
.pvz-item .pa { font-weight: 600; font-size: var(--fs-md); }
.pvz-item .pm { font-size: var(--fs-xs); color: var(--text-secondary); margin-top: 3px; }
.success-box { text-align: center; padding: 48px 28px; max-width: 640px; margin: 32px auto 0; }
.success-box .ok { width: 72px; height: 72px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.success-box .ok .ico { width: 34px; height: 34px; stroke-width: 2.5; }
.success-box .order-num { display: inline-block; padding: 8px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; font-size: var(--fs-lg); font-weight: 700; margin: 12px 0 20px; font-variant-numeric: tabular-nums; }
.success-box p.lead { color: var(--text-secondary); font-size: var(--fs-lg); line-height: 1.6; margin-bottom: 24px; }
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } .cart-table thead { display: none; } .cart-table td { display: block; padding: 6px 0; border: none; } .cart-table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--border); } .cart-table td.ct-prod-cell { grid-column: 1 / -1; } .cart-table .num { text-align: left; } }

/* ---------- 16. Account & documents ---------- */
.auth-card { max-width: 440px; margin: 24px auto; }
.tabs { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; margin-bottom: 20px; }
.tab { flex: 1; height: 36px; border: none; background: transparent; border-radius: 8px; font-size: var(--fs-md); font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: background var(--transition), color var(--transition); }
.tab.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.form-panel { display: none; } .form-panel.active { display: block; }
.account-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 20px; }
.account-row .who b { font-size: var(--fs-lg); }
.account-row .who .meta { color: var(--text-secondary); font-size: var(--fs-sm); margin-top: 2px; }
.order { overflow: hidden; margin-bottom: 12px; }
.order-head { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px; cursor: pointer; flex-wrap: wrap; }
.order-head:hover { background: var(--surface-2); }
.order-num { font-weight: 600; font-size: var(--fs-md); }
.order-date { color: var(--text-secondary); font-size: var(--fs-xs); margin-top: 2px; }
.order-total { font-size: var(--fs-lg); font-weight: 700; text-align: right; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 6px; font-size: var(--fs-xs); font-weight: 600; }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.order-body { display: none; padding: 0 18px 16px; border-top: 1px solid var(--border); }
.order.open .order-body { display: block; }
.items { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: var(--fs-sm); }
.items td { padding: 8px 6px; border-bottom: 1px solid var(--border); }
.items tr:last-child td { border-bottom: none; }
.items .num { text-align: right; white-space: nowrap; }
.meta-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 8px 0; font-size: var(--fs-sm); border-bottom: 1px dashed var(--border); }
.meta-row .k { color: var(--text-secondary); }
.pw-bar { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.pw-bar-fill { height: 100%; width: 0; transition: width .2s, background .2s; background: var(--danger); }
.pw-bar-fill.lvl-1 { width: 25%; background: var(--danger); } .pw-bar-fill.lvl-2 { width: 50%; background: var(--warning); } .pw-bar-fill.lvl-3 { width: 75%; background: #84CC16; } .pw-bar-fill.lvl-4 { width: 100%; background: var(--success); }
.pw-hint { font-size: var(--fs-xs); color: var(--text-secondary); margin-top: 6px; line-height: 1.6; }
.pw-check { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; }
.pw-check.ok { color: var(--success); }
.doc { max-width: 860px; margin: 0 auto; }
.doc .box { padding: 28px 32px; }
.doc h2 { font-size: var(--fs-xl); margin: 24px 0 10px; }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { font-size: 15px; color: var(--text); line-height: 1.65; }
.doc p { margin-bottom: 12px; }
.doc ul, .doc ol { margin: 8px 0 16px 22px; list-style: disc; }
.doc ol { list-style: decimal; }
.doc li { margin-bottom: 6px; }
.doc .note { background: var(--warning-soft); border: 1px solid #FDE68A; color: #92400E; padding: 14px 18px; border-radius: 10px; font-size: var(--fs-sm); margin: 20px 0; }
.doc .req-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: var(--fs-md); }
.doc .req-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.doc .req-table td:first-child { color: var(--text-secondary); width: 220px; }
.doc .subtitle { color: var(--text-secondary); font-size: var(--fs-md); margin: 6px 0 20px; }
@media (max-width: 600px) { .doc .box { padding: 20px; } .doc .req-table td:first-child { width: 40%; } }

/* ---------- 17. Cookie banner (cookie.js) ---------- */
.opts-cookie { font-family: var(--font) !important; }
.opts-cookie a { color: var(--primary) !important; }
.opts-cookie button { background: var(--primary) !important; border-radius: 8px !important; }
.opts-cookie button:hover { background: var(--primary-hover) !important; transform: none !important; }

/* ---------- 17b. Оптовые пороги (WHOLESALE_TIERS_2026_09_10) ---------- */
.pc-tier { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--primary-hover); font-weight: 600; margin-top: -2px; }
.pc-tier .ico { width: 13px; height: 13px; }
.tier-badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; background: var(--success-soft); color: #166534; font-size: 11px; font-weight: 600; vertical-align: 1px; }
.tier-box { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 14px; }
.tier-box .tier-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--lavender); font-size: var(--fs-sm); font-weight: 600; color: var(--primary-hover); }
.tier-box .tier-head .ico { width: 16px; height: 16px; }
.tier-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.tier-row .tq { color: var(--text-secondary); }
.tier-row .tp { font-weight: 600; color: var(--success); }
.tier-row .tu { font-weight: 700; font-variant-numeric: tabular-nums; }
.tier-row.on { background: var(--success-soft); }
.tier-list { display: grid; gap: 8px; margin: 0 0 22px; }
.tier-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm); font-size: var(--fs-md); }
.tier-list li b { color: #fff; font-size: var(--fs-lg); }
.cart-table .tier-badge { margin-left: 6px; }
.cart-table .base { display: block; font-size: var(--fs-xs); color: var(--text-tertiary); text-decoration: line-through; }

/* ---------- 18. Utilities ---------- */
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-md { margin-bottom: var(--spacing-md); }
.hide-mobile { } .show-mobile { display: none; }
@media (max-width: 768px) { .hide-mobile { display: none !important; } .show-mobile { display: initial; } .container { padding: 0 var(--spacing-md); } .section { padding-top: 32px; } h1 { font-size: 26px; } .section-head h2, .page-head h1 { font-size: 22px; } }
