:root {
    --bg: #0e1016;
    --bg-2: #161a24;
    --card: #1b2030;
    --line: #2a3040;
    --txt: #eef1f7;
    --muted: #9aa3b5;
    --accent: #ffb347;
    --accent-2: #7c5cff;
    --ok: #38c172;
    --err: #ff6b6b;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--txt);
    line-height: 1.5;
}

.wrap { width: min(1100px, 92%); margin: 0 auto; }

/* ---------- hero ---------- */
.hero {
    background: radial-gradient(1200px 500px at 70% -10%, rgba(124, 92, 255, 0.35), transparent 60%),
                linear-gradient(180deg, #1a1f2c 0%, var(--bg) 100%);
    background-color: var(--bg-2);
    padding: 48px 0 56px;
    border-bottom: 1px solid var(--line);
}
.hero__brand { font-size: 20px; letter-spacing: 0.5px; color: var(--accent); font-weight: 700; }
.hero__title { font-size: clamp(28px, 5vw, 44px); margin: 16px 0 8px; line-height: 1.15; }
.hero__sub { color: var(--muted); font-size: 18px; max-width: 560px; }
.btn--hero { margin-top: 24px; }

/* ---------- buttons ---------- */
.btn {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.06s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--hero, .btn--primary { background: var(--accent); color: #201400; }
.btn--primary { width: 100%; padding: 14px; font-size: 16px; }
.btn--primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--add { background: var(--accent-2); color: #17102e; font-weight: 600; padding: 9px 16px; font-size: 14px; }
.btn--added { background: var(--ok); color: #08260f; }
.btn--ghost { background: transparent; color: var(--txt); border: 1px solid var(--line); }

/* ---------- sections ---------- */
.section__title { font-size: 22px; margin: 0 0 16px; }
.catalog { padding: 40px 0 8px; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
}
.section__count { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 8px; }

/* фильтр категорий */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter {
    background: var(--card); color: var(--txt);
    border: 1px solid var(--line); border-radius: 999px;
    padding: 8px 14px; font-size: 14px; cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.filter span { color: var(--muted); }
.filter:hover { border-color: var(--accent-2); }
.filter.is-active { background: var(--accent-2); border-color: var(--accent-2); color: #17102e; font-weight: 600; }
.filter.is-active span { color: rgba(23,16,46,.7); }

/* навигация по категориям (чипы-ссылки) на страницах каталога/категории */
.catnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.catnav .filter { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }

/* карточка товара */
.card__media {
    position: relative;
    height: 180px;
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(145deg, #232a3d, #171b28);
    display: flex; align-items: center; justify-content: center;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__ph { font-size: 64px; opacity: .85; }
.card__cat {
    position: absolute; left: 8px; top: 8px;
    background: rgba(14,16,22,.72); color: var(--muted);
    font-size: 11px; letter-spacing: .3px; padding: 3px 8px; border-radius: 6px;
}
.card__oos {
    position: absolute; right: 8px; top: 8px;
    background: rgba(255,179,71,.92); color: #201400;
    font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
}
.card__name { margin: 0 0 4px; font-size: 15px; line-height: 1.3; }
.card__note { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.card__bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.card__price { font-size: 17px; font-weight: 700; }
.card__price s { color: var(--muted); font-weight: 400; font-size: 13px; margin-right: 2px; }
.grid__empty { color: var(--muted); text-align: center; padding: 30px 0; }

/* ---------- checkout layout ---------- */
.checkout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
    padding: 40px 0 20px;
    align-items: start;
}
.cart, .callback {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
}
.cart__items { list-style: none; margin: 0 0 8px; padding: 0; }
.cart__item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.cart__item-name { font-size: 14px; }
.cart__item-sum { font-weight: 600; min-width: 78px; text-align: right; }
.cart__empty { color: var(--muted); font-size: 14px; }

.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty__btn {
    width: 28px; height: 28px; border-radius: 8px;
    border: 1px solid var(--line); background: var(--card); color: var(--txt);
    font-size: 16px; cursor: pointer; line-height: 1;
}
.qty__val { min-width: 20px; text-align: center; }

.cart__summary { margin: 14px 0 18px; }
.cart__summary .row { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); }
.cart__summary .row--total { color: var(--txt); font-size: 18px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 13px; color: var(--muted); }
.field--req > span { color: var(--txt); }
.form input[type="text"], .form input[type="tel"] {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    color: var(--txt);
    font-size: 15px;
}
.form input:focus { outline: 2px solid var(--accent-2); outline-offset: 0; }
.form__hint { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.form__error { color: var(--err); font-size: 14px; margin: 4px 0 0; }
.callback__lead { color: var(--muted); margin-top: 0; }

/* honeypot: скрыто от людей, доступно ботам */
.hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 26px 0 40px; color: var(--muted); font-size: 14px; }
.footer__muted { font-size: 13px; opacity: 0.8; }

/* ---------- toast ---------- */
.toast[hidden] { display: none; }
.toast {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex; align-items: center; justify-content: center;
    padding: 20px; z-index: 50;
}
.toast__box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    max-width: 380px; text-align: center;
}
.toast__box p { font-size: 17px; margin: 0 0 18px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar { background: var(--bg-2); font-size: 13px; color: var(--muted); }
.topbar__in { display: flex; gap: 18px; align-items: center; padding: 7px 0; flex-wrap: wrap; }
.topbar__msgr { margin-left: auto; display: flex; gap: 12px; }
.topbar a { color: var(--muted); text-decoration: none; }
.topbar a:hover { color: var(--accent); }
.headbar__in { display: flex; align-items: center; gap: 20px; padding: 12px 0; }
.logo { font-size: 20px; font-weight: 700; color: var(--txt); text-decoration: none; white-space: nowrap; }
.logo:hover { color: var(--accent); }
.mainnav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.mainnav a { color: var(--txt); text-decoration: none; font-size: 15px; }
.mainnav a:hover { color: var(--accent); }
.mainnav__item.has-drop { position: relative; }
.drop { position: absolute; top: 100%; left: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-width: 220px; display: none; flex-direction: column; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.mainnav__item.has-drop:hover .drop { display: flex; }
.drop a { padding: 7px 10px; border-radius: 7px; display: flex; justify-content: space-between; gap: 10px; }
.drop a span { color: var(--muted); font-size: 13px; }
.drop a:hover { background: var(--bg-2); }
.headbar__right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.head-phone { text-align: right; text-decoration: none; line-height: 1.15; }
.head-phone__num { display: block; color: var(--txt); font-weight: 700; font-size: 16px; }
.head-phone__hint { display: block; color: var(--muted); font-size: 11px; }
.cart-link { position: relative; font-size: 24px; text-decoration: none; }
.cart-link__count { position: absolute; top: -6px; right: -10px; background: var(--accent); color: #201400; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 999px; padding: 0 4px; }

/* ---------- crumbs / page ---------- */
.crumbs { border-bottom: 1px solid var(--line); font-size: 13px; }
.crumbs .wrap { padding: 10px 0; display: flex; gap: 6px; flex-wrap: wrap; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs__cur { color: var(--txt); }
.page { padding: 24px 0 10px; }
.page__h1 { font-size: 28px; margin: 6px 0 12px; }
.page__lead { color: var(--muted); max-width: 780px; margin: 0 0 18px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section__more { color: var(--accent); text-decoration: none; white-space: nowrap; }
.section__count { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 8px; }

/* ---------- category tiles / usps ---------- */
.cats { padding: 24px 0; }
.cats__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cattile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-decoration: none; color: var(--txt); display: flex; flex-direction: column; gap: 4px; transition: border-color .15s; }
.cattile:hover { border-color: var(--accent-2); }
.cattile__emoji { font-size: 30px; }
.cattile__name { font-weight: 600; }
.cattile__count { color: var(--muted); font-size: 13px; }
.usps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 30px 0; }
.usp { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.usp b { display: block; font-size: 17px; margin-bottom: 4px; }
.usp span { color: var(--muted); font-size: 14px; }
.hero--home { padding: 40px 0 20px; }
.catalog__count { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

/* ---------- pager ---------- */
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin: 26px 0 8px; }
.pager a, .pager__cur, .pager__nav { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; color: var(--txt); }
.pager a:hover { border-color: var(--accent-2); }
.pager__cur { background: var(--accent-2); border-color: var(--accent-2); color: #17102e; font-weight: 700; }

/* ---------- product ---------- */
.product { display: grid; grid-template-columns: 420px 1fr; gap: 30px; padding: 10px 0 20px; align-items: start; }
.product__media { background: linear-gradient(145deg, #232a3d, #171b28); border: 1px solid var(--line); border-radius: 14px; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product__media img { width: 100%; height: 100%; object-fit: cover; }
.product__ph { font-size: 120px; }
.product__h1 { font-size: 26px; margin: 0 0 12px; }
.product__meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.product__meta a { color: var(--accent-2); text-decoration: none; }
.product__meta .in-stock { color: var(--ok); }
.product__meta .out-stock { color: var(--accent); }
.product__price { font-size: 30px; font-weight: 800; margin-bottom: 16px; }
.product__price s { color: var(--muted); font-weight: 400; font-size: 20px; margin-right: 8px; }
.product__desc { color: var(--muted); margin-bottom: 20px; }
.product__buy { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.product__buy .btn { flex: 1; min-width: 180px; }
.product__delivery { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14px; }
.product__delivery p { margin: 6px 0; }
.product__geo { color: var(--muted); }

/* ---------- reviews / related ---------- */
.reviews, .related { margin: 34px 0; }
.reviews__empty { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px; color: var(--muted); }
.review-form { display: grid; grid-template-columns: 1fr 120px; gap: 10px; margin-top: 14px; }
.review-form textarea { grid-column: 1 / -1; }
.review-form input, .review-form select, .review-form textarea { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 10px; color: var(--txt); font-size: 14px; }
.review-form .btn { grid-column: 1 / -1; }
.related__more { margin-top: 14px; }
.related__more a { color: var(--accent); text-decoration: none; }

/* ---------- cart page ---------- */
.cart-page { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.cart-page__side { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.cart-empty { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.consent a { color: var(--accent-2); }

/* ---------- footer ---------- */
.footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 24px; padding: 36px 0 24px; }
.footer__brand { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.footer__col h4 { font-size: 14px; margin: 0 0 12px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin: 7px 0; }
.footer__col a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer__col a:hover { color: var(--accent); }
.footer__contacts li { color: var(--muted); font-size: 14px; }
.footer__legal { border-top: 1px solid var(--line); padding: 18px 0 40px; color: var(--muted); font-size: 13px; }
.footer__req { opacity: .8; margin-top: 6px; }

/* ---------- cookie / modal ---------- */
.cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--card); border-top: 1px solid var(--line); }
.cookie__in { width: min(1100px, 92%); margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 14px 0; }
.cookie__in p { margin: 0; font-size: 14px; color: var(--muted); flex: 1; }
.cookie__in a { color: var(--accent-2); }
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal__box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; max-width: 420px; width: 100%; position: relative; }
.modal__x { position: absolute; top: 10px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; }
.modal__prod { font-weight: 600; margin: 4px 0; }
.modal__hint { color: var(--muted); font-size: 14px; margin-bottom: 12px; }

/* ---------- blog / prose ---------- */
.prose { max-width: 780px; line-height: 1.7; }
.prose h2 { font-size: 20px; margin: 24px 0 10px; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 22px; }
.doc-note { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--muted); font-size: 13px; }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.bloglist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.blogcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.blogcard__title { text-decoration: none; color: var(--txt); }
.blogcard__title h2 { font-size: 19px; margin: 0 0 8px; }
.blogcard__meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.blogcard p { color: var(--muted); font-size: 14px; }
.blogcard__more { color: var(--accent); text-decoration: none; }
.post { max-width: 800px; }
.post__h1 { font-size: 30px; margin: 6px 0 10px; }
.post__meta { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.toc { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; }
.toc ul { list-style: none; margin: 8px 0 0; padding: 0; }
.toc li { margin: 5px 0; }
.toc a { color: var(--accent-2); text-decoration: none; }
.post__cats { margin: 24px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.post__cats a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--txt); text-decoration: none; font-size: 14px; }
.post__cats a:hover { border-color: var(--accent-2); }
.author { display: flex; gap: 14px; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 24px 0; }
.author__ava { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-2); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.author__info b { display: block; }
.author__info span { color: var(--muted); font-size: 13px; }
.post__back { margin-top: 20px; }
.post__back a { color: var(--accent); text-decoration: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .product { grid-template-columns: 1fr; }
    .product__media { max-width: 360px; }
    .cart-page { grid-template-columns: 1fr; }
    .footer__cols { grid-template-columns: 1fr 1fr; }
    .contacts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .checkout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .headbar__in { flex-wrap: wrap; gap: 10px; }
    .mainnav { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .topbar { display: none; }
    .head-phone__txt { display: none; }
    .head-phone__ico { display: inline-flex; }
    .headsearch { order: 5; flex-basis: 100%; max-width: 100%; }
    .footer__cols { grid-template-columns: 1fr; }
    .cookie__in { flex-direction: column; align-items: flex-start; }
    .product__buywrap { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; z-index: 10; }
    .review-form { grid-template-columns: 1fr; }
}

/* ===================== ПОСТ-АУДИТ: улучшения ===================== */

/* фокус для клавиатуры (a11y) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, .filter:focus-visible, .cattile:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}

/* карточка товара: hover + ссылки-названия */
.card { transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.card:hover { border-color: var(--accent-2); box-shadow: 0 10px 24px rgba(0,0,0,.35); transform: translateY(-2px); }
.card__name a { color: var(--txt); text-decoration: none; }
.card__name a:hover { color: var(--accent); }
.card__attrs { color: var(--muted); font-size: 12px; margin: 2px 0 8px; }
.card__ship { color: var(--muted); font-size: 11px; }
.card__actions { display: flex; gap: 6px; margin-top: auto; }
.card__actions .btn { flex: 1; padding: 8px 6px; font-size: 13px; }
.card__quick { background: transparent; border: 1px solid var(--line); color: var(--txt); }
.card__quick:hover { border-color: var(--accent-2); }
.card__priceline { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }

/* анимации toast/modal (интерфейс перестаёт быть статичным) */
@keyframes nd-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nd-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.toast:not([hidden]), .modal:not([hidden]), .agegate:not([hidden]) { animation: nd-fade .18s ease; }
.toast__box, .modal__box, .agegate__box { animation: nd-pop .2s ease; }
.btn.is-loading { opacity: .7; pointer-events: none; }

/* единый размер H1 */
.page__h1, .product__h1, .post__h1 { font-size: 30px; }

/* поиск в шапке */
.headsearch { position: relative; flex: 1; max-width: 340px; }
.headsearch input { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; color: var(--txt); font-size: 14px; }
.headsearch__results { position: absolute; top: 112%; left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; max-height: 360px; overflow-y: auto; z-index: 26; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.headsearch__results a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; text-decoration: none; color: var(--txt); font-size: 14px; }
.headsearch__results a:hover { background: var(--bg-2); }
.headsearch__results img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; background: var(--bg-2); }
.headsearch__results b { color: var(--accent); margin-left: auto; white-space: nowrap; }
.headsearch__empty { padding: 12px; color: var(--muted); font-size: 13px; }

/* панель сортировки/фильтра каталога */
.catbar { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin: 0 0 18px; }
.catbar select { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--txt); font-size: 14px; }
.catbar label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); cursor: pointer; }

/* количество: ручной ввод */
input.qty__val { width: 46px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 8px; color: var(--txt); padding: 4px; font-size: 14px; }

/* корзина: миниатюра товара */
.cart__item { grid-template-columns: 46px 1fr auto auto; }
.cart__thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--bg-2); }
.cart__oos-note { color: var(--accent); font-size: 12px; }

/* прогресс бесплатной доставки */
.freeship { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 13px; }
.freeship__bar { height: 6px; background: var(--line); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.freeship__fill { height: 100%; background: var(--accent); width: 0; transition: width .3s ease; }
.freeship.is-free b { color: var(--ok); }

/* ETA в корзине */
.cart-eta { color: var(--muted); font-size: 13px; margin: 12px 0 4px; text-align: center; }

/* кросс-сейл */
.crosssell { margin: 26px 0; }
.crosssell .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* age-gate */
.agegate { position: fixed; inset: 0; z-index: 60; background: rgba(6,7,10,.94); display: flex; align-items: center; justify-content: center; padding: 20px; }
.agegate[hidden] { display: none; }
.agegate__box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px; max-width: 400px; text-align: center; }
.agegate__box h2 { margin: 0 0 10px; }
.agegate__box p { color: var(--muted); margin: 0 0 20px; }
.agegate__btns { display: flex; gap: 10px; }
.agegate__btns .btn { flex: 1; }
.agegate__req { font-size: 12px; color: var(--muted); margin-top: 16px; }

/* соцдоказательство / рейтинг */
.trustbar { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; margin: 14px 0 4px; color: var(--muted); font-size: 14px; }
.trustbar b { color: var(--txt); font-size: 18px; }
.trustbar .star { color: var(--accent); }
.head-rating { color: var(--accent); font-weight: 700; font-size: 13px; white-space: nowrap; }
.usp--trust b { color: var(--accent); }

/* платёжные значки в подвале */
.footer__pay { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.footer__pay span { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; font-size: 11px; color: var(--muted); }

/* акцент на коммерчески значимых блоках */
.product__delivery { border-left: 3px solid var(--accent); }

/* inline-svg иконки */
.icon { width: 1em; height: 1em; vertical-align: -0.14em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.logo .icon { width: 22px; height: 22px; color: var(--accent); }
.cart-link .icon { width: 26px; height: 26px; color: var(--txt); }

/* выпадающее меню — доступ с клавиатуры и тапа */
/* :focus-within убран: клавиатура проходила 12 ссылок на каждой странице; список открывает кнопка .drop-toggle */
.drop.is-open { display: flex; }

/* hero CTA row + прочее */
.hero__cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero__cta-row .btn { margin-top: 0; }
.map-placeholder { background: var(--bg-2); border: 1px dashed var(--line); border-radius: 10px; padding: 14px; color: var(--muted); font-size: 14px; }
.map-placeholder a { color: var(--accent-2); }

/* SVG-иконки в шапке */
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo .icon { width: 22px; height: 22px; color: var(--accent); }
.topbar .icon { width: 13px; height: 13px; vertical-align: -2px; color: var(--muted); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.headsearch__ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.headsearch__ico .icon { width: 16px; height: 16px; }
.headsearch input { padding-left: 40px; }
.head-phone { display: inline-flex; align-items: center; gap: 8px; }
.head-phone__ico { display: none; }
.head-phone__ico .icon { width: 24px; height: 24px; color: var(--txt); }
.card__ship .icon, .product__delivery .icon { width: 14px; height: 14px; vertical-align: -2px; }

/* hero: декоративная иллюстрация вместо generic-градиента */
.hero--home { position: relative; overflow: hidden; }
.hero__deco { position: absolute; right: -30px; top: 50%; transform: translateY(-50%); opacity: .07; pointer-events: none; }
.hero__deco .icon { width: 360px; height: 360px; color: var(--accent); stroke-width: 1; }
@media (max-width: 700px) { .hero__deco { display: none; } }
.footer__brand { display: inline-flex; align-items: center; gap: 8px; }
.footer__brand .icon { width: 20px; height: 20px; color: var(--accent); }

/* hero home: вертикальное центрирование + фон из бутылок и бокалов */
.hero--home { padding: 48px clamp(20px, 4vw, 48px); display: flex; align-items: center; min-height: 340px; }
.hero__content { position: relative; z-index: 2; max-width: 560px; }
.hero__content .hero__title { margin-top: 0; }
.hero__bg { position: absolute; top: 0; right: 0; bottom: 0; width: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent); opacity: .13; pointer-events: none; }
.hero__bg svg { width: 88%; height: auto; max-height: 78%; }
@media (max-width: 760px) {
    .hero__bg { display: none; }
    .hero--home { min-height: auto; padding: 36px 20px; }
    .hero__content { max-width: 100%; }
}
.cattile__ico .icon { width: 30px; height: 30px; color: var(--accent); }

/* планшет: поиск на отдельную строку, чтобы шапка не теснилась */
@media (max-width: 980px) and (min-width: 641px) {
    .headbar__in { flex-wrap: wrap; row-gap: 10px; }
    .headsearch { order: 5; flex-basis: 100%; max-width: 100%; }
}

/* SEO-блок на главной */
.seo-home { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 26px; }
.seo-home .prose { max-width: 820px; color: var(--muted); }
.seo-home .prose h2 { color: var(--txt); font-size: 19px; margin: 22px 0 8px; }
.seo-home .prose p { margin: 0 0 12px; }

/* описание товара */
.product__attrs { color: var(--accent); font-size: 14px; margin: 0 0 14px; }
.product__desc { margin: 0 0 20px; }
.product__desc h2 { font-size: 16px; margin: 0 0 6px; color: var(--txt); }
.product__desc p { color: var(--muted); margin: 0; line-height: 1.65; }

/* Мобильная шапка: правило должно идти ПОСЛЕ базового .head-phone__ico{display:none},
   иначе иконка звонка остаётся скрытой и кнопка схлопывается в 0×0. */
@media (max-width: 640px) {
    .head-phone__txt { display: none; }
    .head-phone__ico { display: inline-flex; }
    /* тап-таргет не меньше 44×44: ночью жмут одной рукой */
    .head-phone { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
    .cart-link { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
}

/* поиск: ссылка на весь раздел; бесплатная доставка на карточке */
.headsearch__cat { border-bottom: 1px solid var(--line); font-weight: 600; }
.headsearch__cat b { color: var(--muted) !important; }
.card__ship--free { color: var(--ok); }
.cart__oos-note { color: var(--accent); font-size: 12px; }

/* ===================== ШАГ 2: визуал и мобильные дефекты =====================
   Правила ниже идут последними в файле сознательно: базовые сначала, мобильные
   медиазапросы в самом конце. Дописывать что-то после них — та же ловушка, из-за
   которой кнопка звонка на мобильном схлопывалась в 0×0. */

/* Пустая корзина. display:grid у .cart-page перебивал [hidden]: под надписью
   «Корзина пуста» показывались форма заказа, ETA и «Итого 0 ₽». */
.cart-page[hidden] { display: none; }
.cart-empty p { margin: 0 0 16px; }
/* .filter — чип, а не текстовая ссылка: браузер подчёркивал его по умолчанию. */
a.filter { text-decoration: none; }
.cart-empty__links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* Фото товара целиком, а не обрезанное по горлышку и дну.
   Исходники сняты на белом фоне, поэтому подложка медиа тоже белая: с тёмным
   градиентом contain дал бы белый прямоугольник фотографии в тёмной рамке. */
.card__media { height: auto; aspect-ratio: 1 / 1; background: #fff; }
.card__media img { object-fit: contain; padding: 10px; }
.product__media { background: #fff; }
.product__media img { object-fit: contain; padding: 18px; }
.headsearch__results img { object-fit: contain; background: #fff; padding: 2px; }
.cart__thumb { object-fit: contain; background: #fff; padding: 2px; }
.card__ph, .product__ph { color: #1b2030; }

/* Ссылки в тексте: без этого браузер рисовал их #0000EE на тёмном фоне,
   контраст около 2:1 — на /contacts не читались телефон и почта.
   Кнопки и чипы исключены: иначе .cart-empty a перекрашивает .btn--hero в оранжевый
   на оранжевом фоне и текст кнопки пропадает. */
.prose a:not(.btn):not(.filter),
.cart-empty a:not(.btn):not(.filter),
.grid__empty a:not(.btn):not(.filter),
.doc-note a:not(.btn) {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.prose a:not(.btn):not(.filter):hover,
.cart-empty a:not(.btn):not(.filter):hover,
.grid__empty a:not(.btn):not(.filter):hover { color: var(--txt); }

/* Cookie-баннер. Кнопке был дан .btn--primary с width:100%, из-за чего во flex-строке
   она растягивалась на 942px, а текст сжимался в столбик шириной 142px. */
.cookie__in .btn { width: auto; flex: 0 0 auto; padding: 10px 20px; font-size: 15px; }

/* Карточка товара: кнопки покупки в одну строку, чтобы sticky-панель на мобильном
   не занимала два ряда. */
.product__buy { flex-wrap: nowrap; }
.product__buy .btn { min-width: 0; }

@media (max-width: 640px) {
    /* Чипы категорий: 13 штук в 5 строк отодвигали первый товар на 1038px от H1.
       Горизонтальная лента, как в Лавке и Самокате. */
    .catnav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .catnav::-webkit-scrollbar { display: none; }
    .catnav .filter { white-space: nowrap; flex: 0 0 auto; }

    /* Меню в шапке не должно скроллиться по горизонтали: контейнер с overflow
       обрезал выпадающий список категорий до полоски скроллбара в 24px. */
    .mainnav { overflow: visible; }
    .drop, .drop.is-open, .mainnav__item.has-drop:hover .drop,
    .mainnav__item.has-drop:focus-within .drop { display: none; }

    /* Шапка уезжает при скролле вниз и возвращается при скролле вверх:
       иначе 149px sticky съедали 18% экрана на каждой странице. */
    .site-header { transition: transform .22s ease; will-change: transform; }
    body.nav-away .site-header { transform: translateY(-100%); }
    .headsearch input { padding-top: 8px; padding-bottom: 8px; }
    .mainnav { gap: 14px; }

    /* Строка корзины: 4 колонки не помещались в 360px, страница скроллилась
       вбок, значок рубля уходил за край. Две строки: фото с названием, ниже
       количество и сумма. */
    .cart__item {
        grid-template-columns: 46px minmax(0, 1fr);
        grid-template-areas: "img name" "qty sum";
        column-gap: 10px;
        row-gap: 8px;
    }
    .cart__thumb { grid-area: img; }
    .cart__item-name { grid-area: name; }
    .cart__item .qty { grid-area: qty; }
    .cart__item-sum { grid-area: sum; text-align: right; min-width: 0; }

    /* Sticky-кнопка покупки не должна прятаться под cookie-баннером. */
    body.has-cookie .product__buywrap { bottom: var(--cookie-h, 0px); }

    /* Баннер на всю треть экрана мешает смотреть каталог: делаем компактнее. */
    .cookie__in { flex-direction: row; align-items: center; gap: 10px; padding: 10px 0; }
    .cookie__in p { font-size: 12px; line-height: 1.35; }
    .cookie__in .btn { padding: 9px 14px; font-size: 14px; }
}

/* ---------- экран подтверждения заказа ----------
   Раньше номер жил только во всплывающем окне: после «Хорошо» человек видел
   «Корзина пуста», а состав, сумма и номер нигде не сохранялись и пропадали по F5. */
.order-done { background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--ok);
    border-radius: 14px; padding: 24px; margin-bottom: 24px; }
.order-done[hidden] { display: none; }
.order-done__h { margin: 0 0 6px; font-size: 22px; }
.order-done__num { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
.order-done__num b { color: var(--txt); font-size: 16px; }
.order-done__items { list-style: none; margin: 0 0 14px; padding: 0; }
.order-done__items li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0;
    border-bottom: 1px solid var(--line); font-size: 14px; }
.order-done__items li span:last-child { white-space: nowrap; font-weight: 600; }
.order-done__sum { display: flex; justify-content: space-between; align-items: baseline;
    font-size: 18px; padding: 10px 0 14px; }
.order-done__sum b { font-weight: 700; }
.order-done__next { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.order-done__call { font-size: 14px; margin: 0 0 16px; }
.order-done__call a { color: var(--accent); text-decoration: underline; }

/* степпер в карточке товара и в каталоге */
.stepper { display: inline-flex; align-items: center; gap: 8px; flex: 1;
    justify-content: center; border: 1px solid var(--line); border-radius: 999px;
    padding: 4px 8px; background: var(--card); }
.stepper[hidden] { display: none; }
.stepper__n { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.card__actions .stepper { padding: 2px 6px; }
.product__incart { margin: 0 0 20px; font-size: 14px; color: var(--muted); }
.product__incart[hidden] { display: none; }
.product__incart b { color: var(--txt); }
.product__incart a { color: var(--accent); text-decoration: underline; }
.product__buywrap { margin-bottom: 0; }

/* «Показать все результаты» в подсказке поиска */
.headsearch__all { border-top: 1px solid var(--line); font-weight: 600; }
.headsearch__all b { color: var(--accent); }

/* ---------- кнопка «Заказать звонок» (когда номера у магазина нет) ---------- */
.head-call {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent); border: 1px solid var(--accent); border-radius: 999px;
    padding: 9px 18px; color: #201400; font: inherit; font-size: 14px; font-weight: 700;
    cursor: pointer; white-space: nowrap;
    box-shadow: 0 4px 14px rgba(255, 179, 71, .28);
    transition: transform .06s ease, box-shadow .15s ease, filter .15s ease;
}
.head-call:hover { filter: brightness(1.05); box-shadow: 0 6px 18px rgba(255, 179, 71, .4); }
.head-call:active { transform: translateY(1px); }
.head-call__ico .icon { width: 18px; height: 18px; }
.footer__call {
    background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
    color: var(--accent); font: inherit; font-size: 14px; text-decoration: underline;
    text-underline-offset: 2px;
}
.footer__call:hover { color: var(--txt); }
@media (max-width: 640px) {
    /* В шапке на мобильном оставляем только иконку — как у телефона. */
    .head-call { min-width: 44px; min-height: 44px; justify-content: center; padding: 8px; }
    .head-call__txt { display: none; }
}

/* ---------- таблица характеристик товара ---------- */
.specs {
    display: grid; grid-template-columns: max-content 1fr; gap: 7px 20px;
    margin: 0 0 20px; padding: 14px 16px; font-size: 14px;
    background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
}
.specs dt { color: var(--muted); margin: 0; }
.specs dd { margin: 0; color: var(--txt); overflow-wrap: anywhere; }
@media (max-width: 640px) { .specs { gap: 6px 14px; font-size: 13.5px; } }

/* ---------- панель фильтров каталога ---------- */
.catbar { gap: 10px 14px; align-items: flex-end; }
.catbar__f { display: inline-flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.catbar__f select, .catbar__range input {
    background: var(--card); border: 1px solid var(--line); border-radius: 8px;
    padding: 8px 10px; color: var(--txt); font-size: 14px; min-height: 38px;
}
.catbar__range { display: inline-flex; gap: 6px; }
.catbar__range input { width: 92px; }
.catbar__check { align-self: center; padding-bottom: 2px; }
.catbar__go { padding: 9px 18px; font-size: 14px; min-height: 38px; }
.catbar__reset { color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; align-self: center; }
.catbar__reset:hover { color: var(--txt); }
.headsearch__oos { color: var(--accent); font-size: 11px; font-style: normal; margin-left: 6px; white-space: nowrap; }
@media (max-width: 640px) {
    .catbar { gap: 8px 10px; }
    /* min-width:0 обязателен: у flex-элемента по умолчанию min-width:auto,
       и обёртка не даёт полям цены ужаться — правое поле уезжало за край экрана. */
    .catbar__f { flex: 1 1 45%; min-width: 0; }
    .catbar__f select { width: 100%; }
    .catbar__f:has(.catbar__range) { flex: 1 1 100%; }
    .catbar__range { display: flex; width: 100%; }
    .catbar__range input { flex: 1 1 0; width: 0; min-width: 0; }
    .catbar__go { flex: 1 1 100%; }
}

/* ---------- карточка: кликабельна целиком, ровные цены, две колонки на мобильном ----------
   Базовые правила сначала, мобильный блок последним — порядок в этом файле важен. */
.card { position: relative; }
.card__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card__actions { position: relative; z-index: 2; }
/* Название в две строки, характеристики в одну: цена и кнопки у соседних карточек на одной высоте. */
.card__name {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; min-height: calc(1.3em * 2);
}
.card__note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.4em; }
@media (max-width: 640px) {
    /* minmax(0,1fr) и min-width:0 обязательны: nowrap у строки характеристик задаёт
       карточке min-content-ширину, и «1fr» растягивался под неё — правая колонка
       уезжала за экран, а квадраты фото у соседей получались разной высоты. */
    .grid, .crosssell .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .card { padding: 10px; min-width: 0; }
    .card__media { margin-bottom: 8px; }
    .card__name { font-size: 13.5px; }
    .card__note { font-size: 11px; margin-bottom: 8px; }
    .card__price { font-size: 15px; }
    .card__ship { display: none; }
    .card__actions .btn { font-size: 12px; padding: 9px 4px; min-height: 40px; }
    .card__actions .card__quick { display: none; }   /* «В 1 клик» остаётся на странице товара */
    .card__cat { font-size: 10px; padding: 2px 6px; }
}

/* ---------- доверие: тарифная таблица, FAQ, оплата под кнопкой ---------- */
.nowrap { white-space: nowrap; }
.tariff-wrap { overflow-x: auto; margin: 0 0 18px; }
.tariff { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tariff th, .tariff td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tariff tr:last-child th, .tariff tr:last-child td { border-bottom: 0; }
.tariff th { color: var(--muted); font-weight: 500; width: 38%; white-space: nowrap; }
.faq h3 { font-size: 16px; margin: 18px 0 6px; }
.faq p { margin: 0 0 8px; }
.form__hint--pay { margin-top: 8px; }
.form__hint--pay a { color: var(--accent); }
.product__delivery p + p { margin-top: 6px; }
.product__delivery b { color: var(--txt); }
@media (max-width: 640px) { .tariff th { white-space: normal; width: 42%; } }

/* ---------- 404: возврат в магазин, а не тупик ---------- */
.notfound__search { display: flex; gap: 8px; margin: 16px 0; max-width: 520px; }
.notfound__search input { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; color: var(--txt); font-size: 15px; }
.notfound__search .btn { padding: 10px 18px; font-size: 14px; }
.notfound__cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.is-404 .prose p:last-child { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- корзина: строка с удалением и ценой за штуку, поля адреса, sticky ----------
   Базовые правила сначала, мобильный блок последним. */
.cart__item { grid-template-columns: 56px minmax(0, 1fr) auto auto 32px; align-items: center; }
.cart__thumb { width: 56px; height: 56px; }
.cart__item-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cart__item-name a { color: var(--txt); text-decoration: none; }
.cart__item-name a:hover { color: var(--accent); }
.cart__unit { color: var(--muted); font-size: 12px; }
.cart__del { width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; border-radius: 8px; }
.cart__del:hover { color: var(--err); background: var(--bg-2); }
.field > label { font-size: 13px; color: var(--muted); }
.field--req > label { color: var(--txt); }
.field__err { color: var(--err); font-size: 12px; margin: 4px 0 0; }
.field__err[hidden] { display: none; }
.form input.is-invalid { border-color: var(--err); }
.field-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.form select { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; color: var(--txt); font-size: 15px; }
#f-change-wrap[hidden] { display: none; }
.cart-page__side { position: sticky; top: 84px; }
.cart-sticky { display: none; }
@media (max-width: 640px) {
    .cart__item { grid-template-columns: 56px minmax(0, 1fr) 32px; grid-template-areas: "img name del" "qty qty sum"; row-gap: 8px; }
    .cart__thumb { grid-area: img; }
    .cart__item-name { grid-area: name; }
    .cart__item .qty { grid-area: qty; }
    .cart__item-sum { grid-area: sum; }
    .cart__del { grid-area: del; }
    .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cart-page__side { position: static; }
    /* Итог и кнопка всегда под рукой; прячется, когда настоящая кнопка формы на экране. */
    .cart-sticky { position: fixed; left: 0; right: 0; bottom: var(--cookie-h, 0px); z-index: 35; display: flex; align-items: center; gap: 12px;
        padding: 10px 4%; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0,0,0,.35); }
    .cart-sticky[hidden], .cart-sticky.is-off { display: none; }
    .cart-sticky__sum { flex: 1; font-size: 15px; }
    .cart-sticky__sum b { font-size: 17px; }
    .cart-sticky__btn { width: auto; flex: 0 0 auto; padding: 12px 22px; }
}

/* ---------- доступность, контраст, размеры ----------
   Базовые правила сначала, мобильный блок последним. */
:root { --link: #a596ff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: #201400; padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
#main:focus { outline: none; }
/* Ссылки на тёмном фоне: accent2 давал 3,7:1 — ниже AA; --link ≈ 7:1. */
.product__meta a, .consent a, .toc a, .cookie__in a, .map-placeholder a, .footer__call { color: var(--link); }
/* Текст на фиолетовых кнопках и чипах: было 4,2:1, стало ≥4,7:1. */
.btn--add, .filter.is-active, .pager__cur { color: #0b0720; }
.filter.is-active span { color: #0b0720; opacity: .9; }
/* Кнопка раскрытия каталога рядом со ссылкой. */
.mainnav__item.has-drop { display: inline-flex; align-items: center; gap: 2px; }
.drop-toggle { background: none; border: 0; color: var(--txt); padding: 4px; cursor: pointer; border-radius: 6px; display: inline-flex; }
.drop-toggle .icon { width: 16px; height: 16px; }
.drop-toggle:hover { color: var(--accent); }
.drop-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
/* Поле поиска круглое — общая focus-рамка ставила ему радиус 6px. */
.headsearch input:focus-visible { border-radius: 999px; }
/* Мелкий текст: 11px читается плохо на телефоне. */
.card__ship, .head-phone__hint, .footer__pay span, .card__cat { font-size: 12px; }
.consent input[type="checkbox"], .catbar__check input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 auto; margin: 1px 0 0; }
.modal__x { width: 44px; height: 44px; top: 4px; right: 6px; display: inline-flex; align-items: center; justify-content: center; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 640px) {
    .drop-toggle { display: none; }
    /* Тап-цели не меньше 44px: пункты меню, чипы, степпер, ссылки подвала. */
    .mainnav a { padding: 10px 2px; display: inline-block; }
    .filter { min-height: 40px; display: inline-flex; align-items: center; }
    .qty__btn { width: 36px; height: 36px; }
    .footer__col a, .footer__contacts li { display: inline-block; padding: 6px 0; }
    /* Инпуты 16px: иначе iOS Safari приближает страницу при фокусе. */
    .form input[type="text"], .form input[type="tel"], .form select, .headsearch input,
    .catbar__f select, .catbar__range input, .notfound__search input { font-size: 16px; }
    .card__cat { font-size: 11px; }
}

/* ===================== ДИЗАЙН-ЯЗЫК «БАРНАЯ КАРТА» =====================
   Уход от типового набора «пилюли + фиолетовый + плавающие подписи»:
   заголовки серифом, категории — вкладки с янтарным подчёркиванием,
   фильтры — единая стойка с разделителями, один акцент вместо двух,
   в карточке точечная отбивка между ценой и доставкой, как в меню.
   Блок идёт последним в файле, свои мобильные правила — в его конце. */

:root {
    --font-display: Georgia, 'Times New Roman', serif;
    --radius: 10px;
    /* Нативные контролы в тёмной схеме: без этого попап выпадающего списка
       рисовался белым, а опции наследовали светлый цвет темы — белое на белом. */
    color-scheme: dark;
}
/* Страховка для браузеров, где color-scheme не красит попап: явные цвета опций. */
select option { background-color: #161a24; color: #eef1f7; }
select option:disabled { color: #9aa3b5; }

/* --- типографика: витринные заголовки серифом --- */
.hero__title, .page__h1, .product__h1, .post__h1, .section__title,
.blogcard__title h2, .order-done__h, .agegate__box h2, .prose h2 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: .01em;
}
.hero__title { letter-spacing: 0; }

/* --- шапка раздела каталога --- */
.cathead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 18px; flex-wrap: wrap; margin: 0 0 6px; }
.cathead .page__h1 { margin: 0; }
.cathead__meta { margin: 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.catalog__count { display: none; }

/* --- категории: вкладки вместо пилюль --- */
.catnav { gap: 4px 22px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.catnav .filter {
    background: none; border: 0; border-radius: 0; min-height: 0;
    padding: 8px 2px 11px; font-size: 14.5px; color: var(--muted); position: relative;
}
.catnav .filter:hover { color: var(--txt); border: 0; }
.catnav .filter span { font-size: 10.5px; color: var(--muted); vertical-align: super; margin-left: 1px; }
.catnav .filter.is-active { background: none; color: var(--txt); font-weight: 600; }
.catnav .filter.is-active span { color: var(--accent); }
.catnav .filter.is-active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent);
}

/* --- страница товара: доставка под фото, колонки одной высоты ---
   Левая колонка заканчивалась вместе с картинкой, и под ней оставалась пустота
   во всю высоту описания. Раскладка по областям ставит блок доставки туда. */
.product {
    grid-template-areas: "media info" "delivery info";
    grid-template-rows: auto 1fr;
    row-gap: 16px;
}
.product__media { grid-area: media; }
.product__info { grid-area: info; }
.product__delivery { grid-area: delivery; margin: 0; }

/* --- фильтры: одна стойка с разделителями ---
   nowrap и сжимаемые сегменты: при переносе кнопка «Показать» уезжала на вторую
   строку. Кнопка — плашка внутри стойки со своим скруглением, а не заподлицо
   с острыми углами. */
.catbar {
    display: flex; flex-wrap: nowrap; align-items: stretch; gap: 0;
    border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2);
    margin: 0 0 18px; padding: 6px; overflow: visible;
}
.catbar__seg {
    display: inline-flex; align-items: center; gap: 9px; flex: 0 1 auto; min-width: 0;
    padding: 0 16px; min-height: 44px; border-right: 1px solid var(--line);
    font-size: 14px; color: var(--txt);
}
.catbar__seg:first-child { padding-left: 12px; }
.catbar__lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); white-space: nowrap; }
.catbar__seg select {
    appearance: none; -webkit-appearance: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa3b5' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right center;
    border: 0; border-radius: 0; min-height: 0; padding: 4px 18px 4px 0;
    color: var(--txt); font-size: 14px; cursor: pointer; max-width: 200px;
}
.catbar__seg--price { gap: 7px; }
.catbar__seg--price input {
    background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    width: 58px; min-height: 0; padding: 3px 2px; color: var(--txt); font-size: 14px; text-align: center;
    -moz-appearance: textfield;
}
.catbar__seg--price input::placeholder { color: var(--muted); opacity: .75; }
.catbar__seg--price input::-webkit-outer-spin-button, .catbar__seg--price input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.catbar__seg--price input:focus { border-bottom-color: var(--accent); outline: none; }
.catbar__dash, .catbar__cur { color: var(--muted); }
/* align-self:center остался от прежней панели: сегмент не растягивался на ширину
   стойки, и его нижняя граница торчала обрубком над кнопкой. */
.catbar__check { gap: 9px; cursor: pointer; color: var(--muted); border-right: 0; white-space: nowrap; align-self: auto; padding-bottom: 0; }
/* Свой чекбокс: нативный в тёмной схеме — блёклый серый квадрат. */
.catbar__check input {
    appearance: none; -webkit-appearance: none;
    width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 5px;
    background: var(--card); cursor: pointer; position: relative; flex: 0 0 auto; margin: 0;
}
.catbar__check input:checked { background: var(--accent); border-color: var(--accent); }
.catbar__check input:checked::after {
    content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
    border: solid #201400; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.catbar__check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.catbar__reset { align-self: center; padding: 0 14px; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.catbar__reset:hover { color: var(--txt); }
/* Кнопка всегда последняя и прижата к правому краю стойки. */
.catbar__go {
    margin-left: auto; flex: 0 0 auto; align-self: stretch; border: 0; border-radius: 10px;
    background: var(--accent); color: #201400; font: inherit; font-size: 14px; font-weight: 700;
    padding: 0 24px; cursor: pointer; letter-spacing: .02em; white-space: nowrap;
}
.catbar__go:hover { filter: brightness(1.06); }
.catbar__go:active { transform: translateY(1px); }

/* Легаси-правило `.catbar label` (0,1,1) навязывает label-сегментам align-items:center и
   перебивает `.catbar__seg` (0,1,0). Из-за этого капсовая метка (10.5px) и значение (14px)
   не делили базовую линию — метка оптически «висела» выше, слова в стойке скакали. На
   десктопе (стойка горизонтальна) ровняем по базовой линии; специфичность (0,3,0) бьёт
   легаси. Мобильная колонка (≤900) не задета. */
@media (min-width: 901px) {
    .catbar .catbar__seg:not(.catbar__check) { align-items: baseline; }
    /* «в наличии» тоже по базовой линии, иначе его текст (центрирован в высокой стойке)
       висел на ~7px ниже остальных значений. Чекбокс при baseline всплывает над текстом —
       возвращаем к центру строки сдвигом на 3px (transform не влияет на раскладку). */
    .catbar .catbar__check { align-items: baseline; }
    .catbar .catbar__check input { transform: translateY(3px); }
}

/* Атрибут hidden сильнее любого нашего display: .btn{display:inline-block} перебивал
   UA-правило [hidden]{display:none}, и скрытая кнопка «В корзину» лезла под степпер.
   Тот же класс ошибки уже ловили на .cart-page и .toast. */
[hidden] { display: none !important; }

/* --- один акцент: янтарь вместо фиолетового в интерактиве ---
   Радиусы мягкие: после отказа от пилюль угловатость читалась как недоделка. */
.card, .cattile, .usp, .cart, .callback, .cart-page__side, .cart-empty,
.product__media, .card__media, .freeship, .product__delivery, .toast__box,
.modal__box, .specs, .tariff, .order-done, .blogcard, .toc, .author { border-radius: 14px; }
.btn { border-radius: var(--radius); }
.btn--add { background: var(--accent); color: #201400; }
.btn--added { background: var(--ok); color: #08260f; }
.filter { border-radius: 8px; }
.filter:hover { border-color: var(--accent); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: #201400; }
.filter.is-active span { color: rgba(32, 20, 0, .75); }
.pager a, .pager__cur, .pager__nav { border-radius: 8px; }
.pager a:hover { border-color: var(--accent); }
.pager__cur { background: var(--accent); border-color: var(--accent); color: #201400; }
.card:hover { border-color: var(--accent); }
.cattile:hover { border-color: var(--accent); }
.card__quick:hover { border-color: var(--accent); }
.form input:focus { outline-color: var(--accent); }
.stepper { border-radius: 8px; }
.head-call { border-radius: var(--radius); }
.headsearch input { border-radius: var(--radius); }
.headsearch input:focus-visible { border-radius: var(--radius); }
.post__cats a { border-radius: 8px; }
.post__cats a:hover { border-color: var(--accent); }

/* --- карточка: точечная отбивка между ценой и доставкой, ярлык капителью ---
   Грид вместо флекса: строка никогда не переполняет карточку, длинный бейдж
   переносится внутри своей ячейки, а не выталкивает цену. */
.card__priceline { display: grid; grid-template-columns: auto minmax(8px, 1fr) auto; align-items: baseline; }
.card__priceline::before {
    content: ''; grid-column: 2; border-bottom: 1px dotted var(--line);
    align-self: flex-end; margin: 0 6px 5px;
}
.card__price { grid-column: 1; white-space: nowrap; }
.card__ship { grid-column: 3; text-align: right; max-width: 110px; }
.card__cat {
    background: rgba(14, 16, 22, .66); border-radius: 4px;
    text-transform: uppercase; letter-spacing: .07em; font-size: 10px; font-weight: 600;
}

@media (max-width: 1100px) {
    .catbar { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; }
    .catbar__seg { border-right: 0; border-bottom: 1px solid var(--line); min-height: 50px; flex: 0 0 auto; }
    .catbar__seg:first-child { padding-left: 16px; }
    /* select тянется на остаток строки; rtl-трюки ломают отрисовку значения */
    .catbar__seg select { flex: 1 1 0; min-width: 0; max-width: none; margin-left: 8px; }
    .catbar__seg--price { justify-content: flex-start; }
    /* width:0 + min-width:0 обязательны: у number-инпута большая внутренняя
       минимальная ширина, и второе поле цены уезжало за край стойки */
    .catbar__seg--price input { flex: 1 1 0; width: 0; min-width: 0; font-size: 16px; }
    .catbar__check { border-bottom: 1px solid var(--line); justify-content: flex-start; padding-left: 16px; }
    .catbar__reset { margin: 0; padding: 12px 16px; align-self: auto; }
    .catbar__go { min-height: 50px; margin: 0; border-radius: 0; }
    .card__priceline::before { display: none; }
    .catnav { gap: 2px 16px; }
    .catnav .filter { min-height: 40px; }
    .catbar__seg select, .catbar__check { font-size: 16px; }
}

/* Мобильная раскладка страницы товара — в конце файла.
   Правило .product с областями стоит ниже старого медиазапроса и перебивало его:
   на телефоне сетка оставалась двухколоночной и уезжала за экран.
   Дописывать правила после этого блока — снова наступить на те же грабли. */
@media (max-width: 900px) {
    .product {
        grid-template-columns: 1fr;
        grid-template-areas: "media" "info" "delivery";
        grid-template-rows: auto auto auto;
    }
}
