/* ===== БРИГ — автозапчасти. Основные стили сайта ===== */
:root {
  --blue: #1a4fa0;
  --blue-d: #123a7a;
  --navy: #0d1f45;
  --red: #e1251b;
  --red-d: #bf1a12;
  --ink: #15171c;
  --text: #2b2f38;
  --muted: #6b7280;
  --line: #e4e6eb;
  --bg: #f3f4f7;
  --card: #fff;
  --green: #15803d;
  --amber: #b45309;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(13, 31, 69, .08);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--text); background: #fff; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--red); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.ic { width: 1.2em; height: 1.2em; flex: none; }
[hidden] { display: none !important; }
.hp { position: absolute; left: -9999px; }

/* ----- Кнопки ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 8px; border: 2px solid transparent; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; transition: .15s; white-space: nowrap; }
.btn .ic { width: 18px; height: 18px; }
.btn.sm { padding: 8px 14px; font-size: 12px; }
.btn-block { display: flex; width: 100%; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-d); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-d); color: #fff; }
.btn-outline { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-light { background: #fff; color: var(--ink); }
.link-btn { background: none; border: 0; padding: 0; color: var(--red); font-weight: 600; font-size: 13px; cursor: pointer; border-bottom: 1px dashed currentColor; }
.btn-ic { width: 42px; height: 42px; border-radius: 8px; border: 0; background: var(--red); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; transition: .15s; }
.btn-ic:hover { background: var(--red-d); }
.btn-ic .ic { width: 20px; height: 20px; }

/* ----- Верхняя полоса ----- */
.topbar { background: var(--bg); font-size: 13px; color: var(--muted); }
.topbar-in { display: flex; align-items: center; gap: 24px; min-height: 38px; }
.tb-item { display: inline-flex; align-items: center; gap: 6px; }
.tb-item .ic { color: var(--red); }
.tb-links { display: flex; gap: 22px; margin-left: auto; }
.tb-links a { color: var(--text); font-weight: 500; }
.tb-links a:hover { color: var(--red); }
.tb-hours b { color: var(--ink); }
.tb-order { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--red); cursor: pointer; }
.tb-order:hover { color: var(--red-d); text-decoration: underline; }
.drawer-btn { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; text-align: left; cursor: pointer; color: var(--red); font-weight: 700; }
.order-fields { display: grid; gap: 12px; }
.order-note { margin: 0; font-size: 13px; }

/* ----- Шапка ----- */
.header { background: #fff; border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 28px; min-height: 88px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--ink); flex: none; }
.logo:hover { color: var(--ink); }
.logo-badge { position: relative; overflow: hidden; display: inline-block; background: var(--blue); color: #fff; font-family: 'Lobster', cursive; font-size: 34px; line-height: 1; padding: 8px 26px 12px 16px; border-radius: 8px; letter-spacing: .01em; }
.logo-badge::after { content: ''; position: absolute; right: -14px; top: -10px; width: 26px; height: 90px; background: var(--red); transform: rotate(28deg); box-shadow: -6px 0 0 #fff; }
.logo-badge.sm { font-size: 26px; padding: 6px 22px 9px 12px; }
.logo-sub { display: flex; flex-direction: column; font-size: 11px; line-height: 1.3; color: var(--muted); }
.logo-sub b { font-size: 13px; text-transform: uppercase; color: var(--ink); letter-spacing: .04em; }
.burger, .h-phone-ic { display: none; }

.search { position: relative; flex: 1; display: flex; height: 48px; border: 2px solid var(--blue); border-radius: 10px; background: #fff; }
.search-cat { position: relative; display: flex; border-right: 1px solid var(--line); }
.search-cat select { appearance: none; border: 0; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M14 18l10 10 10-10' fill='none' stroke='%236b7280' stroke-width='4'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; padding: 0 32px 0 14px; max-width: 170px; font-size: 13px; font-weight: 600; border-radius: 8px 0 0 8px; cursor: pointer; outline: none; }
.search input { flex: 1; min-width: 0; border: 0; padding: 0 16px; font-size: 15px; outline: none; background: transparent; }
.search button { display: flex; align-items: center; gap: 8px; border: 0; background: var(--blue); color: #fff; padding: 0 22px; font-weight: 700; text-transform: uppercase; font-size: 13px; cursor: pointer; border-radius: 0 7px 7px 0; }
.search button:hover { background: var(--blue-d); }
.search button .ic { width: 18px; height: 18px; }
.search.inline { max-width: 520px; margin: 0 auto 16px; width: 100%; }
.search.inline input { padding-left: 16px; }

.suggest { position: absolute; z-index: 60; top: calc(100% + 6px); left: -2px; right: -2px; background: #fff; border-radius: 10px; box-shadow: 0 18px 50px rgba(13, 31, 69, .22); overflow: hidden; }
.sg-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--line); }
.sg-item:hover, .sg-item.on { background: #f1f5fd; color: var(--text); }
.sg-img { width: 48px; height: 48px; border-radius: 6px; background: var(--bg); display: grid; place-items: center; color: var(--blue); overflow: hidden; }
.sg-img img { width: 100%; height: 100%; object-fit: contain; }
.sg-img .ic { width: 26px; height: 26px; }
.sg-name, .sg-meta { display: block; }
.sg-name { font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.3; }
.sg-meta { font-size: 12px; color: var(--muted); }
.sg-price { text-align: right; font-weight: 700; color: var(--ink); white-space: nowrap; font-size: 14px; }
.sg-price small { display: block; font-weight: 600; font-size: 11px; }
.sg-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; background: var(--bg); font-size: 13px; }
.sg-cats a { background: #fff; padding: 3px 10px; border-radius: 20px; }
.sg-all { display: block; padding: 12px 14px; font-weight: 700; text-align: center; font-size: 13px; text-transform: uppercase; }
.sg-empty { padding: 16px; color: var(--muted); font-size: 14px; }
.sg-note { padding: 8px 14px; font-size: 12px; background: #fff7e6; color: var(--amber); }

.header-contacts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.h-phone { font-weight: 800; font-size: 19px; color: var(--ink); white-space: nowrap; }

/* ----- Тёмная навигация ----- */
.navbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; }
.navbar-in { display: flex; align-items: stretch; height: 52px; }
.cat-menu { position: relative; }
.cat-btn { height: 100%; display: flex; align-items: center; gap: 10px; padding: 0 26px; background: var(--red); color: #fff; border: 0; font-weight: 800; text-transform: uppercase; font-size: 14px; letter-spacing: .04em; cursor: pointer; }
.cat-btn .ic { width: 20px; height: 20px; }
.cat-drop { position: absolute; top: 100%; left: 0; width: min(920px, calc(100vw - 40px)); background: #fff; color: var(--text); box-shadow: 0 24px 60px rgba(13, 31, 69, .25); border-radius: 0 0 12px 12px; padding: 22px; display: none; grid-template-columns: repeat(3, 1fr); gap: 6px 22px; max-height: 75vh; overflow: auto; }
.cat-menu.open .cat-drop { display: grid; }
.cd-group { padding: 6px 0 10px; }
.cd-root { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.cd-root .ic { width: 24px; height: 24px; color: var(--blue); }
.cd-sub { display: block; padding: 2px 0 2px 34px; font-size: 13px; color: var(--muted); }
.cd-sub:hover, .cd-root:hover { color: var(--red); }
.nav-links { display: flex; align-items: stretch; overflow: hidden; }
.nav-links a { display: flex; align-items: center; padding: 0 16px; color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; text-transform: uppercase; letter-spacing: .02em; }
.nav-links a:hover, .nav-links a.on { background: rgba(255, 255, 255, .1); color: #fff; }

/* ----- Мобильное меню ----- */
.drawer { position: fixed; inset: 0; z-index: 100; background: rgba(13, 31, 69, .5); opacity: 0; pointer-events: none; transition: .2s; }
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); background: #fff; overflow: auto; padding: 16px; transform: translateX(-100%); transition: .25s; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer-head button { border: 0; background: var(--bg); width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.drawer-link { display: flex; align-items: center; gap: 12px; padding: 10px 4px; color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--line); }
.drawer-link .ic { width: 22px; height: 22px; color: var(--blue); }
.drawer-link.strong { font-weight: 800; text-transform: uppercase; font-size: 14px; }
.drawer hr { border: 0; margin: 10px 0; }
.drawer-foot { display: grid; gap: 8px; padding-top: 16px; }

/* ----- Общие блоки ----- */
main { min-height: 50vh; }
.block { margin-top: 56px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.block-head h2, .page-title, .about h2, .contacts h2 { font-size: 24px; font-weight: 800; text-transform: uppercase; letter-spacing: .01em; margin: 0; }
.page-title { margin: 6px 0 22px; }
.page-title small { font-size: 15px; color: var(--muted); font-weight: 600; margin-left: 6px; vertical-align: middle; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); padding-top: 20px; }
.crumbs a { color: var(--muted); }
.crumbs a::after { content: '/'; margin-left: 6px; color: #c4c8d0; }
.crumbs a:hover { color: var(--red); }
.notice { background: #fff7e6; color: #7a4a00; padding: 12px 16px; border-radius: 8px; }

/* ----- Главный экран ----- */
.hero { display: grid; grid-template-columns: 1fr 340px; gap: 20px; margin-top: 24px; }
.slider { position: relative; min-height: 380px; border-radius: 14px; overflow: hidden; background: var(--navy); }
.slide { position: absolute; inset: 0; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; padding: 40px 48px; color: #fff; opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
.slide.on { opacity: 1; visibility: visible; }
.slide:hover { color: #fff; }
.theme-blue { background: linear-gradient(120deg, var(--blue-d), var(--blue) 60%, #2d6fd1); }
.theme-red { background: linear-gradient(120deg, #9f150e, var(--red) 70%, #ff4b3f); }
.theme-dark { background: linear-gradient(120deg, #0a1430, var(--navy) 60%, #1d3470); }
.slide::before { content: ''; position: absolute; right: -60px; top: -80px; width: 380px; height: 520px; background: rgba(255, 255, 255, .07); transform: rotate(24deg); }
.slide-tag { display: inline-block; font-family: 'Lobster', cursive; font-size: 22px; background: rgba(255, 255, 255, .15); padding: 2px 14px 4px; border-radius: 6px; margin-bottom: 14px; }
.slide h2 { color: #fff; font-size: 36px; font-weight: 800; text-transform: uppercase; margin-bottom: 14px; }
.slide p { font-size: 16px; opacity: .9; max-width: 460px; margin: 0 0 26px; }
.slide-art { position: relative; display: grid; place-items: center; }
.slide-art img { max-height: 300px; object-fit: contain; }
.slide-ic { width: 230px; height: 230px; stroke-width: 1.4; color: rgba(255, 255, 255, .9); filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .25)); }
.slider-dots { position: absolute; left: 48px; bottom: 22px; display: flex; gap: 8px; z-index: 2; }
.slider-dots button { width: 26px; height: 5px; border-radius: 3px; border: 0; background: rgba(255, 255, 255, .4); cursor: pointer; padding: 0; }
.slider-dots button.on { background: #fff; width: 42px; }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }
.promo { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; text-align: left; border-radius: 14px; padding: 22px; overflow: hidden; border: 0; cursor: pointer; color: #fff; }
.promo-red { background: linear-gradient(135deg, var(--red), #a3140c); }
.promo-ic { position: absolute; right: 16px; top: 16px; width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, .15); display: grid; place-items: center; }
.promo-ic .ic { width: 32px; height: 32px; }
.promo b { font-size: 20px; text-transform: uppercase; font-weight: 800; }
.promo span { font-size: 13px; opacity: .92; }
.promo-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-transform: uppercase; font-size: 12px !important; margin-top: 6px; }
.promo-link .ic { width: 16px; height: 16px; }
.promo-photo { padding: 0; background: var(--navy); }
.promo-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo-cap { position: relative; display: block; padding: 40px 18px 16px; background: linear-gradient(transparent, rgba(8, 18, 40, .9)); }
.promo-cap b { font-size: 15px; }

/* ----- Марки ----- */
.brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); transition: .15s; }
.brand:hover { border-color: var(--blue); box-shadow: var(--shadow); color: var(--ink); }
.brand.is-empty { opacity: .55; }
.brand-mark { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--red); font-weight: 800; font-size: 16px; flex: none; }
.brand:hover .brand-mark { background: var(--blue); color: #fff; }
.brand-name { font-weight: 700; font-size: 14px; }
.brand-n { margin-left: auto; font-size: 12px; color: var(--muted); }

/* ----- Категории ----- */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cat { display: flex; justify-content: space-between; gap: 12px; padding: 20px; background: var(--bg); border-radius: 12px; color: var(--ink); min-height: 128px; transition: .15s; border: 2px solid transparent; }
.cat:hover { background: #fff; border-color: var(--blue); box-shadow: var(--shadow); color: var(--ink); }
.cat-text { display: flex; flex-direction: column; gap: 4px; }
.cat-text b { font-size: 15px; text-transform: uppercase; font-weight: 800; }
.cat-text small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.cat-text em { font-style: normal; font-size: 12px; color: var(--blue); font-weight: 600; margin-top: auto; }
.cat-ic { width: 72px; height: 72px; flex: none; display: grid; place-items: center; color: var(--blue); align-self: center; }
.cat-ic .ic { width: 60px; height: 60px; stroke-width: 1.8; }
.cat:hover .cat-ic { color: var(--red); }
.cat-all { background: var(--red); color: #fff; }
.cat-all .cat-text small { color: rgba(255, 255, 255, .85); }
.cat-all .cat-ic { color: #fff; }
.cat-all:hover { background: var(--red-d); color: #fff; border-color: var(--red-d); }
.cat-all:hover .cat-ic { color: #fff; }

/* ----- Карточки товаров ----- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, calc((100% - 64px) / 5)); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
.arrows { display: flex; gap: 8px; }
.arrows button { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.arrows button:hover { border-color: var(--red); color: var(--red); }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: .15s; }
.card:hover { box-shadow: var(--shadow); border-color: #cfd6e4; }
.card-img { position: relative; aspect-ratio: 4 / 3; background: #fff; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #f5f7fb, #e9eef8); color: #9fb3d9; }
.ph .ic { width: 64px; height: 64px; stroke-width: 1.6; }
.ph.big { flex-direction: column; gap: 10px; border-radius: 12px; }
.ph.big .ic { width: 140px; height: 140px; stroke-width: 1.2; }
.ph.big small { color: var(--muted); }
.badge-sale { position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff; font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 6px; }
.card-body { padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { color: var(--ink); font-weight: 600; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--muted); }
.card-meta b { color: var(--text); font-weight: 600; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 8px 14px 14px; }
.price { display: flex; flex-direction: column; }
.price b { font-size: 18px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.price s { font-size: 13px; color: var(--muted); }
.price.big b { font-size: 30px; }
.price-ask { font-weight: 600; font-size: 13px; color: var(--muted); }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock-in { color: var(--green); }
.stock-few { color: var(--amber); }
.stock-order { color: var(--blue); }
.stock-out { color: var(--muted); }

/* ----- Преимущества ----- */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; background: var(--navy); color: #fff; border-radius: 14px; padding: 28px; }
.perk { display: flex; gap: 14px; align-items: flex-start; }
.perk .ic { width: 40px; height: 40px; color: #ff6a60; stroke-width: 2; }
.perk b { display: block; font-size: 14px; text-transform: uppercase; margin-bottom: 4px; }
.perk span { font-size: 13px; opacity: .8; }

/* ----- О магазине ----- */
.about { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; }
.about-text p { color: var(--text); margin: 14px 0; }
.about-text .btn { margin-top: 8px; }
.about-photos { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 150px 230px; gap: 12px; }
.about-photos img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.about-photos img:first-child { grid-column: 1 / -1; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 24px; }
.gallery img { width: 100%; height: 240px; object-fit: cover; border-radius: 12px; }
.prose { max-width: 820px; font-size: 16px; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 4px; }
.policy h2 { font-size: 19px; margin: 26px 0 10px; }
.consent { display: flex !important; gap: 9px; align-items: flex-start; font-size: 12px; line-height: 1.45; color: #5b6475; font-weight: 400; margin: 4px 0 12px; cursor: pointer; }
.consent input { width: 17px !important; height: 17px; min-height: 0 !important; flex: none; margin: 1px 0 0 !important; padding: 0 !important; accent-color: #1a4fa0; cursor: pointer; }
.consent a { color: #1a4fa0; text-decoration: underline; }
.requisites { background: #fff; border: 1px solid #e3e7ee; border-radius: 14px; padding: 24px 28px; max-width: 820px; }
.requisites h2 { margin: 0 0 14px; font-size: 21px; }
.requisites dl { display: grid; grid-template-columns: 190px 1fr; gap: 8px 18px; margin: 0 0 14px; }
.requisites dt { color: #6b7385; }
.requisites dd { margin: 0; font-weight: 600; }
@media (max-width: 600px) { .requisites { padding: 18px 16px; } .requisites dl { grid-template-columns: 1fr; gap: 2px; } .requisites dd { margin-bottom: 8px; } }
.footer-bottom a { color: rgba(255, 255, 255, .75); text-decoration: underline; }

/* ----- Контакты ----- */
.contacts { display: grid; grid-template-columns: 380px 1fr; gap: 20px; }
.contacts-card { background: var(--bg); border-radius: 14px; padding: 28px; }
.contacts-list { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 16px; }
.contacts-list li { display: flex; gap: 14px; }
.contacts-list .ic { width: 22px; height: 22px; color: var(--red); margin-top: 2px; }
.contacts-list div { display: flex; flex-direction: column; }
.contacts-list b { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.contacts-list a { color: var(--ink); font-weight: 700; font-size: 17px; }
.map { border-radius: 14px; overflow: hidden; min-height: 340px; background: var(--bg); }
.map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }
.map-ph { height: 100%; min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); text-align: center; padding: 20px; background: repeating-linear-gradient(45deg, #eef1f6, #eef1f6 14px, #f5f7fa 14px, #f5f7fa 28px); }
.map-ph .ic { width: 48px; height: 48px; color: var(--red); }

/* ----- CTA и подвал ----- */
.cta { margin-top: 64px; background: var(--red); color: #fff; }
.cta-in { display: flex; align-items: center; gap: 20px; padding-top: 26px; padding-bottom: 26px; }
.cta-ic .ic { width: 48px; height: 48px; }
.cta-text { flex: 1; display: flex; flex-direction: column; }
.cta-text b { font-size: 20px; text-transform: uppercase; font-weight: 800; }
.cta .btn-red { background: #fff; color: var(--red); }
.cta .btn-red:hover { background: var(--navy); color: #fff; }
.footer { background: var(--navy); color: rgba(255, 255, 255, .8); padding: 44px 0 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 30px; }
.footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; margin-bottom: 14px; }
.footer a { display: block; color: rgba(255, 255, 255, .8); padding: 3px 0; }
.footer a:hover { color: #fff; }
.logo-footer { margin-bottom: 16px; display: inline-flex !important; }
.f-phone { font-size: 20px; font-weight: 800; color: #fff !important; }
.f-phone.sm { font-size: 16px; }
.f-muted { margin: 6px 0; color: rgba(255, 255, 255, .6); }
.socials { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.socials a { padding: 6px 12px; border-radius: 6px; background: rgba(255, 255, 255, .1); font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; margin-top: 36px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 12px; color: rgba(255, 255, 255, .5); }

/* ----- Каталог ----- */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.cg { border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.cg-head { display: flex; gap: 14px; align-items: center; color: var(--ink); }
.cg-head b { display: block; text-transform: uppercase; font-size: 15px; }
.cg-head small { color: var(--muted); }
.cg-ic { width: 52px; height: 52px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; color: var(--blue); flex: none; }
.cg-ic .ic { width: 32px; height: 32px; }
.cg ul { list-style: none; padding: 12px 0 0; margin: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.cg li { display: flex; justify-content: space-between; font-size: 14px; }
.cg li a { color: var(--text); }
.cg li a:hover { color: var(--red); }
.cg li span { color: var(--muted); font-size: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 22px; align-items: center; }
.chips-label { font-size: 13px; color: var(--muted); }
.chip { padding: 7px 14px; border-radius: 20px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 600; }
.chip em { font-style: normal; color: var(--muted); font-weight: 500; }
.chip:hover { background: #e3e9f5; color: var(--ink); }
.chip.on { background: var(--blue); color: #fff; }
.chip.on em { color: rgba(255, 255, 255, .8); }

.listing { display: grid; grid-template-columns: 260px 1fr; gap: 26px; align-items: start; }
.filters { position: sticky; top: 70px; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.filters form { display: grid; gap: 16px; }
.f-head { display: flex; justify-content: space-between; align-items: center; }
.f-head b { text-transform: uppercase; font-size: 14px; }
.f-close { display: none; }
.f-block { display: grid; gap: 6px; }
.f-title { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.filters input[type=search], .filters select { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.f-check, .f-radio { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.f-radio em { font-style: normal; color: var(--muted); font-size: 12px; margin-left: auto; }
.f-check input, .f-radio input { accent-color: var(--red); width: 16px; height: 16px; }
.f-reset { text-align: center; font-size: 13px; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.f-open { display: none; }
.sorts { display: flex; flex-wrap: wrap; gap: 6px; }
.sorts a { padding: 6px 12px; border-radius: 6px; font-size: 13px; color: var(--text); font-weight: 500; }
.sorts a:hover { background: var(--bg); color: var(--ink); }
.sorts a.on { background: var(--ink); color: #fff; }

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 30px; }
.pager a, .pager b, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.pager b { background: var(--red); border-color: var(--red); color: #fff; }
.pager span { border: 0; }
.pager a:hover { border-color: var(--red); color: var(--red); }

.empty { text-align: center; padding: 50px 20px; border: 2px dashed var(--line); border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty.big { margin: 50px 0; }
.empty > .ic { width: 56px; height: 56px; color: #b5c3dc; }
.empty b { font-size: 18px; color: var(--ink); }
.empty p { max-width: 520px; color: var(--muted); margin: 0 0 8px; }

/* ----- Товар ----- */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 320px; gap: 32px; margin-top: 20px; align-items: start; }
.product-media { border: 1px solid var(--line); border-radius: 14px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; background: #fff; }
.product-media img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.product-info h1 { font-size: 26px; font-weight: 800; }
.product-codes { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.product-codes b { color: var(--ink); }
.copy { cursor: copy; border-bottom: 1px dashed var(--muted); }
.copy.done::after { content: ' ✓ скопировано'; color: var(--green); font-weight: 500; font-size: 12px; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs th, .specs td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { color: var(--muted); font-weight: 500; width: 42%; padding-right: 14px; }
.product-desc { margin-top: 20px; font-size: 14px; color: var(--text); }
.buybox { position: sticky; top: 70px; border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.buybox-list { list-style: none; margin: 4px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 13px; color: var(--muted); }
.buybox-list li { display: flex; gap: 10px; align-items: flex-start; }
.buybox-list .ic { width: 18px; height: 18px; color: var(--blue); margin-top: 1px; }

/* ----- Поиск ----- */
.search-help { max-width: 760px; font-size: 16px; }
.results { display: grid; gap: 8px; }
.result { display: grid; grid-template-columns: 64px 1fr 130px 130px; gap: 16px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); }
.result:hover { border-color: var(--blue); box-shadow: var(--shadow); color: var(--text); }
.result.exact { border-color: var(--red); background: #fff8f7; }
.r-img { width: 64px; height: 64px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; color: var(--blue); overflow: hidden; }
.r-img img { width: 100%; height: 100%; object-fit: contain; }
.r-img .ic { width: 32px; height: 32px; }
.r-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.r-main b { color: var(--ink); font-weight: 600; }
.r-meta { font-size: 13px; color: var(--muted); }
.r-tag { font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--red); }
.r-price { text-align: right; font-weight: 800; font-size: 17px; color: var(--ink); }

/* ----- Окно заявки ----- */
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(13, 31, 69, .6); display: grid; place-items: center; padding: 16px; }
.modal-box { position: relative; width: 100%; max-width: 440px; background: #fff; border-radius: 16px; padding: 30px; max-height: 92vh; overflow: auto; }
.modal-box h3 { font-size: 22px; font-weight: 800; text-transform: uppercase; margin-bottom: 6px; }
.modal-x { position: absolute; right: 14px; top: 14px; border: 0; background: var(--bg); width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.modal form { display: grid; gap: 12px; }
.modal label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.modal input, .modal textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-weight: 400; font-size: 15px; }
.modal input:focus, .modal textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.form-msg { margin: 0; font-weight: 600; }
.form-msg.ok { color: var(--green); }
.form-msg.err { color: var(--red); }
[data-modal-product]:empty { display: none; }
[data-modal-product] { margin: 0; font-size: 14px; background: var(--bg); padding: 10px 12px; border-radius: 8px; }

/* ----- Корзина ----- */
.h-cart { position: relative; display: flex; align-items: center; gap: 8px; flex: none; color: var(--ink); font-weight: 700; font-size: 14px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 10px; }
.h-cart:hover { border-color: var(--red); color: var(--red); }
.h-cart .ic { width: 24px; height: 24px; }
.h-cart-n { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font-style: normal; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.btn-ic.added { background: var(--green); }
.btn-ic-gray { background: var(--bg); color: var(--muted); }
.btn-ic-gray:hover { background: #e3e7ee; color: var(--ink); }
.toast { position: fixed; z-index: 300; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; transition: .25s; background: var(--ink); color: #fff; border-radius: 12px; padding: 14px 18px; display: flex; gap: 16px; align-items: center; box-shadow: 0 14px 40px rgba(0, 0, 0, .3); font-size: 14px; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast a { color: #ffb4ae; font-weight: 700; white-space: nowrap; }
.qty { display: inline-flex; align-items: stretch; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; height: 48px; flex: none; }
.qty button { width: 40px; border: 0; background: var(--bg); font-size: 20px; cursor: pointer; color: var(--ink); }
.qty button:hover { background: #e3e7ee; }
.qty input { width: 52px; border: 0; text-align: center; font-weight: 700; font-size: 16px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 38px; }
.qty-sm button { width: 32px; font-size: 17px; }
.qty-sm input { width: 42px; font-size: 14px; }
.buy-row { display: flex; gap: 10px; }
.buy-row .btn { flex: 1; }
.buy-note { margin: -4px 0 0; font-size: 13px; color: var(--blue); }

.cart-loading { padding: 40px 0; color: var(--muted); }
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
.cart-list { display: grid; gap: 10px; }
.ci { display: grid; grid-template-columns: 76px 1fr auto 120px 32px; gap: 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.ci-off { opacity: .6; }
.ci-img { width: 76px; height: 76px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; overflow: hidden; color: #9fb3d9; }
.ci-img img { width: 100%; height: 100%; object-fit: contain; }
.ci-img .ic { width: 36px; height: 36px; }
.ci-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ci-name { color: var(--ink); font-weight: 600; font-size: 14px; line-height: 1.35; }
.ci-meta { font-size: 12px; color: var(--muted); }
.ci-warn { font-size: 12px; color: var(--red); font-weight: 600; }
.ci-price { text-align: right; display: flex; flex-direction: column; }
.ci-price b { font-size: 17px; color: var(--ink); white-space: nowrap; }
.ci-price small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ci-del { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.ci-del:hover { background: #fdecec; color: var(--red); }
.checkout { position: sticky; top: 70px; border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.checkout h2 { font-size: 18px; font-weight: 800; text-transform: uppercase; margin-bottom: 14px; }
.pickup-box { display: flex; gap: 12px; background: var(--bg); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.pickup-box .ic { width: 22px; height: 22px; color: var(--red); margin-top: 2px; }
.pickup-box div { display: flex; flex-direction: column; font-size: 13px; }
.pickup-box b { font-size: 14px; color: var(--ink); }
.pickup-box small { color: var(--muted); }
.cart-sum { display: flex; flex-direction: column; gap: 4px; padding: 0 0 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.cart-total { font-size: 16px; }
.cart-total b { font-size: 24px; color: var(--ink); font-weight: 800; }
.checkout-form { display: grid; gap: 12px; }
.checkout-form label, .pickup-time { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.checkout-form input, .checkout-form textarea, .checkout-form select { width: 100%; padding: 11px 12px; border: 1px solid #d5d9e0; border-radius: 8px; font-size: 15px; font-weight: 400; background: #fff; }
.checkout-form input:focus, .checkout-form textarea:focus, .checkout-form select:focus { outline: 2px solid var(--blue); border-color: transparent; }
.pickup-selects { display: grid; grid-template-columns: 1.8fr 1fr; gap: 8px; }
.order-done { max-width: 620px; margin: 10px auto 0; text-align: center; border: 1px solid var(--line); border-radius: 16px; padding: 36px 28px; box-shadow: var(--shadow); }
.order-done-ic { width: 72px; height: 72px; border-radius: 50%; background: #e8f6ee; color: var(--green); display: grid; place-items: center; margin: 0 auto 14px; }
.order-done-ic .ic { width: 38px; height: 38px; }
.order-done h2 { font-size: 24px; font-weight: 800; }
.order-done p { font-size: 15px; }

/* ===== Адаптив ===== */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: 200px; }
  .product { grid-template-columns: 1fr 1fr; }
  .buybox { grid-column: 1 / -1; position: static; }
  .perks { grid-template-columns: 1fr 1fr; }
  .header-contacts { display: none; }
  .h-phone-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--red); color: #fff; flex: none; }
  .h-phone-ic .ic { width: 22px; height: 22px; }
  .rail { grid-auto-columns: minmax(220px, calc((100% - 48px) / 4)); }
}
@media (max-width: 900px) {
  .topbar { display: none; }
  .header-in { flex-wrap: wrap; gap: 12px; padding: 12px 0; min-height: 0; }
  .burger { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--bg); cursor: pointer; }
  .burger .ic { width: 24px; height: 24px; }
  .logo { margin-right: auto; }
  .search { order: 5; flex-basis: 100%; }
  .navbar { display: none; }
  .listing { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0; z-index: 120; border-radius: 0; overflow: auto; background: #fff; display: none; }
  .filters.open { display: block; }
  .f-close { display: grid; place-items: center; border: 0; background: var(--bg); width: 38px; height: 38px; border-radius: 8px; }
  .f-open { display: inline-flex; }
  .about, .contacts { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout { position: static; }
  .h-cart-label { display: none; }
  .h-cart { padding: 8px 10px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .rail { grid-auto-columns: minmax(200px, calc((100% - 32px) / 3)); }
  .result { grid-template-columns: 56px 1fr; }
  .result .stock, .result .r-price { grid-column: 2; text-align: left; }
  .r-img { width: 56px; height: 56px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  body { font-size: 14px; }
  .logo-sub { display: none; }
  .logo-badge { font-size: 28px; }
  .search-cat { display: none; }
  .search button span { display: none; }
  .search button { padding: 0 16px; }
  .slider { min-height: 340px; }
  .slide { grid-template-columns: 1fr; padding: 28px 24px 56px; }
  .slide h2 { font-size: 24px; }
  .slide p { font-size: 14px; margin-bottom: 18px; }
  .slide-art { position: absolute; right: -20px; bottom: -10px; opacity: .25; }
  .slide-ic { width: 180px; height: 180px; }
  .slider-dots { left: 24px; }
  .hero-side { grid-template-columns: 1fr; grid-template-rows: auto 200px; }
  .promo-red { min-height: 170px; }
  .block { margin-top: 40px; }
  .block-head h2, .page-title, .about h2, .contacts h2 { font-size: 19px; }
  .brands { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .brand.is-empty { display: none; }
  .brand { padding: 8px 10px; gap: 8px; }
  .brand-mark { width: 30px; height: 30px; font-size: 14px; }
  .cats { grid-template-columns: 1fr; gap: 10px; }
  .cat { min-height: 0; padding: 16px; }
  .cat-ic, .cat-ic .ic { width: 48px; height: 48px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rail { grid-auto-columns: 46%; gap: 10px; }
  .card-body { padding: 10px 10px 4px; }
  .card-foot { padding: 6px 10px 10px; }
  .card-title { font-size: 13px; }
  .price b { font-size: 16px; }
  .btn-ic { width: 38px; height: 38px; }
  .perks { grid-template-columns: 1fr; padding: 22px; }
  .about-photos { grid-template-rows: 130px 150px; }
  .product { grid-template-columns: 1fr; gap: 20px; }
  .product-info h1 { font-size: 21px; }
  .contacts-card { padding: 22px; }
  .cta-in { flex-direction: column; text-align: center; }
  .cta-text b { font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .modal-box { padding: 24px 20px; }
  .ci { grid-template-columns: 60px 1fr 28px; gap: 10px; }
  .ci-img { width: 60px; height: 60px; grid-row: span 2; }
  .ci .qty { grid-column: 2; justify-self: start; }
  .ci-price { grid-column: 2; text-align: left; }
  .ci-del { grid-column: 3; grid-row: 1; }
  .toast { flex-direction: column; gap: 6px; text-align: center; }
  .sorts { flex-wrap: nowrap; overflow-x: auto; }
  .sorts a { white-space: nowrap; }
  .toolbar { overflow: hidden; }
}
