:root {
    --blue: #0057a8;
    --blue-d: #003e7a;
    --red: #d0121a;
    --ink: #1b1e23;
    --muted: #5e6772;
    --line: #e4e7eb;
    --bg: #f4f6f8;
    --card: #fff;
    --ok: #157a3a;
    --shadow: 0 8px 24px rgba(16, 35, 63, .08);
    --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font: 16px/1.5 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin-top: 0; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.sr, .skip {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
.skip:focus { position: fixed; left: 12px; top: 12px; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 12px; z-index: 20; }
.topbar { background: var(--blue); color: #fff; font-size: 13px; }
.topbar-inner, .header-row, .catbar-inner { display: flex; align-items: center; gap: 16px; }
.topbar-inner { justify-content: space-between; min-height: 36px; }
.topbar p { margin: 0; }
.topbar nav { display: flex; gap: 14px; }
.topbar a { color: #fff; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.header-row { min-height: 78px; }
.logo { display: flex; gap: 10px; align-items: center; color: var(--ink); min-width: 180px; }
.logo strong { display: block; font-size: 20px; letter-spacing: -.03em; }
.logo small { color: var(--muted); font-size: 12px; }
.logo-mark {
    width: 42px; height: 42px; border-radius: 12px; background: var(--blue); color: #fff;
    display: grid; place-items: center; font-weight: 800;
}
.search { flex: 1; display: flex; position: relative; background: #f2f4f7; border-radius: 999px; border: 1px solid transparent; }
.search:focus-within { border-color: var(--blue); background: #fff; }
.search input { flex: 1; border: 0; background: transparent; padding: 12px 18px; outline: none; border-radius: 999px; }
.search button { border: 0; background: var(--blue); color: #fff; border-radius: 999px; margin: 4px; padding: 0 18px; cursor: pointer; }
.suggest {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border-radius: 14px;
    box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; z-index: 40;
}
.suggest a { display: flex; gap: 10px; align-items: center; padding: 8px 12px; color: var(--ink); }
.suggest a:hover { background: #f6f8fb; }
.suggest img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; }
.suggest span { margin-left: auto; color: var(--red); font-weight: 700; }
.header-actions { display: flex; gap: 8px; }
.header-actions a, .cart-btn {
    background: transparent; border: 0; text-align: left; cursor: pointer; padding: 6px 8px; border-radius: 10px; color: var(--ink);
}
.header-actions a:hover, .cart-btn:hover { background: #f3f6fa; }
.header-actions span, .cart-btn span { display: block; color: var(--muted); font-size: 12px; }
.header-actions strong, .cart-btn strong { font-size: 14px; }
.cart-btn em, .tabbar em {
    font-style: normal; background: var(--red); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 12px;
}
.icon-btn, .tabbar { display: none; }
.icon-btn { border: 0; background: #f2f4f7; width: 42px; height: 42px; border-radius: 12px; }
.icon-btn svg, .btn-cats svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.catbar { background: #fff; border-bottom: 1px solid var(--line); }
.catbar-inner { min-height: 52px; }
.btn-cats {
    display: flex; align-items: center; gap: 8px; background: var(--blue); color: #fff; border: 0;
    border-radius: 10px; padding: 8px 12px; cursor: pointer; white-space: nowrap;
}
.cat-scroll { display: flex; gap: 18px; overflow: auto; }
.cat-scroll a { color: var(--ink); font-weight: 600; white-space: nowrap; }
.mega { position: relative; }
.mega-panel {
    display: none; position: absolute; left: 0; top: calc(100% + 8px); width: min(760px, 80vw);
    background: #fff; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 8px; z-index: 35;
}
.mega:hover .mega-panel, .mega:focus-within .mega-panel { display: block; }
.mega-parents { list-style: none; margin: 0; padding: 0; display: grid; width: 230px; }
.mega-parents > li > a { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-weight: 700; }
.mega-parents > li > a svg { width: 18px; height: 18px; fill: none; stroke: var(--blue); stroke-width: 1.8; }
.mega-children { display: none; position: absolute; left: 240px; top: 8px; right: 8px; bottom: 8px; padding: 12px; }
.mega-parents > li:hover .mega-children, .mega-parents > li:focus-within .mega-children { display: block; }
.mega-parents > li:hover > a, .mega-parents > li:focus-within > a { background: #f3f7fc; }
.mega-children p { font-weight: 800; margin-bottom: 8px; }
.mega-children a { display: block; padding: 6px 0; color: var(--ink); }
.hero { display: grid; grid-template-columns: 1.7fr .8fr; gap: 16px; margin-top: 18px; }
.slider { position: relative; min-height: 280px; }
.slide, .side-card, .wide-card {
    background: var(--slide, var(--blue)); color: #fff; border-radius: 20px; min-height: 180px;
    padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden;
}
.slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.slide.on { opacity: 1; pointer-events: auto; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.slide div, .side-card, .wide-card { position: relative; z-index: 1; }
.slide h2, .side-card strong, .wide-card strong { font-size: 28px; letter-spacing: -.03em; margin-bottom: 8px; }
.hero-side { display: grid; gap: 16px; }
.side-card, .wide-card { color: #fff; min-height: 132px; }
.slide-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; border-radius: 50%;
    border: 0; background: #fff; cursor: pointer;
}
.slide-nav.prev { left: 10px; }
.slide-nav.next { right: 10px; }
.circles { display: flex; gap: 14px; overflow: auto; padding: 18px 0 6px; }
.circles a, .chips a { display: grid; justify-items: center; gap: 6px; color: var(--ink); font-size: 13px; font-weight: 650; min-width: 92px; text-align: center; }
.circles span, .chips a {
    width: 72px; height: 72px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow);
}
.circles svg, .chips svg, .drawer svg { width: 28px; height: 28px; fill: none; stroke: var(--blue); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 28px 0 12px; }
.sec-head h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.sec-head p { margin: 0; color: var(--muted); }
.sec-head > a { font-weight: 700; }
.rail, .grid { display: grid; gap: 12px; }
.rail { grid-auto-flow: column; grid-auto-columns: minmax(180px, 220px); overflow: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.grid { grid-template-columns: repeat(4, 1fr); }
.pcard {
    position: relative; background: var(--card); border-radius: var(--radius); padding: 12px; border: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 6px; scroll-snap-align: start; min-height: 100%;
}
.pcard-img { background: #f7f9fb; border-radius: 12px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.pcard img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; left: 18px; top: 18px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 3px 8px; }
.fav { position: absolute; right: 18px; top: 18px; border: 0; background: #fff; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.fav.on { color: var(--red); }
.brand, .unit, .sku { color: var(--muted); font-size: 13px; margin: 0; }
.pcard h3 { font-size: 15px; line-height: 1.35; min-height: 40px; margin: 0; }
.pcard h3 a { color: var(--ink); }
.price { margin: 0; display: flex; flex-direction: column; }
.price s, .price-lg s { color: var(--muted); font-size: 13px; }
.price strong, .price-lg strong { color: var(--red); font-size: 20px; }
.rate { margin: 0; font-size: 13px; }
.stars { color: #d5d8de; letter-spacing: 1px; }
.stars .on { color: #f5b400; }
.btn, button.btn {
    display: inline-flex; justify-content: center; align-items: center; border-radius: 12px; padding: 12px 16px;
    border: 0; cursor: pointer; font-weight: 700; text-align: center;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-d); }
.btn-line, .btn-light { background: #fff; color: var(--blue); border: 1px solid #d5e3f5; }
.btn-light { color: var(--blue); }
.pcard .btn { width: 100%; margin-top: auto; }
.banner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.brands, .posts, .seo-block, .page { margin-top: 22px; }
.brands div, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.brands a { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; color: var(--ink); font-weight: 700; }
.chips a { width: auto; height: auto; min-width: 0; grid-auto-flow: column; align-items: center; padding: 8px 12px; border-radius: 999px; }
.chips svg { width: 18px; height: 18px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.post-grid article, .note, .summary, .filters, .buybox {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.seo-block { background: #fff; border-radius: var(--radius); padding: 22px; margin-bottom: 28px; }
.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 28px; padding-bottom: 24px; }
.trust, .footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 22px 0; }
.trust span, .footer-grid a, .legal { color: var(--muted); display: block; }
.footer-grid h2 { font-size: 16px; }
.legal { border-top: 1px solid var(--line); font-size: 13px; }
.flash { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: #e8f6ee; color: #0f6b32; }
.flash.err { background: #fdecec; color: #9f1239; }
.page { padding-bottom: 40px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.crumbs > * + *::before { content: " / "; color: #b0b6bf; }
.page-head { display: flex; justify-content: space-between; align-items: end; }
.listing { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
.filters form, .stack, .sortbar { display: grid; gap: 10px; }
label { display: grid; gap: 4px; font-size: 14px; font-weight: 650; }
input, select, textarea {
    width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff;
}
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: auto; }
.pager { display: flex; gap: 6px; margin-top: 16px; }
.pager a, .pager .on { min-width: 36px; text-align: center; padding: 8px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.pager .on { background: var(--blue); color: #fff; }
.product { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
.gallery img[data-photo], .gallery > img { width: 100%; border-radius: 20px; background: #fff; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; }
.thumbs button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 0; width: 64px; }
.price-lg { display: flex; align-items: center; gap: 8px; }
.price-lg .badge { position: static; }
.price-lg strong { font-size: 32px; }
.stock.ok { color: var(--ok); font-weight: 700; }
.stock.no { color: var(--red); font-weight: 700; }
.buy { display: flex; gap: 8px; align-items: end; }
.buy label { flex: 0 0 100px; }
.promises { padding-left: 18px; color: var(--muted); }
.specs { width: 100%; border-collapse: collapse; background: #fff; }
.specs th, .specs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { width: 42%; color: var(--muted); font-weight: 650; }
.review { padding: 12px 0; border-bottom: 1px solid var(--line); }
.prose h2 { margin-top: 22px; }
.cart-layout, .account { display: grid; grid-template-columns: 1.4fr .8fr; gap: 16px; }
.account { grid-template-columns: 220px 1fr; }
.cart-lines article { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; background: #fff; border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.cart-lines img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; }
.cart-lines h2 { font-size: 16px; margin: 0 0 6px; }
.cart-lines h2 a { color: var(--ink); }
.summary p, .grand { display: flex; justify-content: space-between; gap: 12px; }
.grand { font-size: 18px; }
.narrow { max-width: 760px; }
.auth { max-width: 460px; }
.account-nav { display: grid; align-content: start; gap: 6px; }
.account-nav a, .account-nav button { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--ink); cursor: pointer; }
.account-nav .on { background: var(--blue); color: #fff; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp { position: absolute; left: -9999px; }
.note { margin: 12px 0; }
.plain { padding-left: 18px; }
.buybar {
    display: none; position: fixed; left: 0; right: 0; bottom: 62px; background: #fff; border-top: 1px solid var(--line);
    padding: 10px 16px; z-index: 25; align-items: center; justify-content: space-between; gap: 10px;
}
.drawer {
    position: fixed; top: 0; bottom: 0; background: #fff; z-index: 50; width: min(420px, 92vw); display: flex; flex-direction: column;
}
#nav { left: 0; }
#cart { right: 0; }
.drawer[hidden], .backdrop[hidden], .cookie[hidden], .suggest[hidden] { display: none; }
.drawer-head, .drawer-foot { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
.drawer-foot { border-bottom: 0; border-top: 1px solid var(--line); display: grid; }
.drawer-head button { border: 0; background: transparent; font-size: 28px; cursor: pointer; }
.drawer-body { overflow: auto; padding: 8px 14px 20px; }
.drawer-body details { border-bottom: 1px solid var(--line); padding: 8px 0; }
.drawer-body a, .drawer-link { display: block; padding: 8px 0; color: var(--ink); }
.mini-item { display: grid; grid-template-columns: 54px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mini-item img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.backdrop { position: fixed; inset: 0; background: rgba(12, 20, 32, .45); z-index: 45; }
.cookie {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; background: #102033; color: #fff;
    border-radius: 16px; padding: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.cookie a { color: #fff; text-decoration: underline; }
.cookie button { border: 0; background: #fff; color: #102033; border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.empty { background: #fff; border-radius: 16px; padding: 18px; }
button:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 980px) {
    .hero, .listing, .product, .cart-layout, .account, .trust, .footer-grid, .post-grid { grid-template-columns: 1fr; }
    .grid { grid-template-columns: repeat(3, 1fr); }
    .header-actions a span, .cart-btn span { display: none; }
    .mega-children { position: static; display: none; }
    .mega-parents > li:hover .mega-children { display: block; padding-left: 28px; }
}
@media (max-width: 760px) {
    .topbar nav, .catbar, .header-actions a, .hero-side { display: none; }
    .icon-btn, .tabbar { display: flex; }
    .header-row { min-height: 64px; }
    .search { order: 5; flex-basis: 100%; }
    .header-row { flex-wrap: wrap; padding: 8px 0; }
    .logo small { display: none; }
    .grid, .banner-grid { grid-template-columns: 1fr 1fr; }
    .slide h2 { font-size: 22px; }
    .slider { min-height: 220px; }
    .tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line);
        z-index: 35; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    }
    .tabbar a, .tabbar button { background: transparent; border: 0; color: var(--ink); font-size: 12px; font-weight: 700; }
    body { padding-bottom: 64px; }
    .buybar { display: flex; }
    .product .buy { display: none; }
    .cart-lines article { grid-template-columns: 72px 1fr; }
    .cart-lines article > strong { grid-column: 2; }
    .cookie { bottom: 72px; }
}
