:root {
    --yellow: #ffd400;
    --yellow-soft: #fff4b8;
    --blue: #1646a0;
    --blue-dark: #0e2f6e;
    --ink: #14213d;
    --muted: #5b6785;
    --line: #e2e7f2;
    --bg: #f5f7fc;
    --card: #fff;
    --green: #1f9d55;
    --radius: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
}
img, video { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2 { line-height: 1.2; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* шапка */
.topbar { background: var(--yellow); border-bottom: 4px solid var(--blue); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--blue-dark); min-width: 0; }
.brand__oval {
    flex: none; display: grid; place-items: center;
    width: 76px; height: 46px; border-radius: 50%;
    background: var(--blue); color: var(--yellow);
    font-weight: 800; font-size: 20px; letter-spacing: 1px;
    box-shadow: inset 0 0 0 3px var(--yellow), 0 0 0 3px var(--blue);
}
.brand__text { font-weight: 800; font-size: 18px; line-height: 1.2; }
.topbar__phone {
    flex: none; text-decoration: none; text-align: center;
    background: var(--blue); color: #fff; border-radius: 999px; padding: 8px 22px;
}
.topbar__phone-num { display: block; font-weight: 800; font-size: 18px; white-space: nowrap; }
.topbar__phone-note { display: block; font-size: 12px; color: var(--yellow); }
.tabs { display: flex; gap: 8px; padding-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs__item {
    flex: none; text-decoration: none; font-weight: 700; color: var(--blue-dark);
    border: 2px solid var(--blue); border-radius: 999px; padding: 6px 18px;
}
.tabs__item:hover, .tabs__item.is-active { background: var(--blue); color: var(--yellow); }

/* главная */
.hero { background: linear-gradient(180deg, var(--yellow-soft), var(--bg)); }
.hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; padding-top: 40px; padding-bottom: 32px; }
.hero h1 { font-size: clamp(26px, 4vw, 40px); margin: 0 0 16px; color: var(--blue-dark); }
.hero p { font-size: 18px; margin: 0 0 12px; }
.hero__accent { font-weight: 800; color: var(--blue); }
.hero__contacts { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin-top: 16px; color: var(--muted); }
.hero__phone { font-size: 24px; font-weight: 800; color: var(--blue-dark); text-decoration: none; }
.hero__addr { flex-basis: 100%; }
.hero__art { width: 100%; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 16px; padding-bottom: 40px; }
.tile {
    display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
    background: var(--card); border-radius: var(--radius); overflow: hidden;
    border: 2px solid var(--line); transition: transform .15s, border-color .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 12px 24px rgba(22, 70, 160, .15); }
.tile img { aspect-ratio: 400 / 260; object-fit: cover; width: 100%; }
.tile__name { font-size: 22px; font-weight: 800; padding: 14px 18px 0; color: var(--blue-dark); }
.tile__sub { padding: 2px 18px 0; color: var(--muted); }
.tile__count { padding: 6px 18px 16px; font-size: 14px; color: var(--muted); }

.contact-block { text-align: center; padding-bottom: 48px; }
.contact-block .contacts { justify-content: center; }

/* поиск */
.search { display: flex; gap: 8px; margin: 16px 0; }
.search input, .search select {
    font: inherit; font-size: 16px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
.search input { flex: 1; min-width: 0; }
.search input:focus, .search select:focus { outline: none; border-color: var(--blue); }
.search button {
    font: inherit; font-weight: 800; padding: 12px 22px; border: 0; border-radius: 12px;
    background: var(--blue); color: var(--yellow); cursor: pointer;
}
.search--hero { max-width: 560px; }

/* каталог */
.catalog { padding-top: 24px; padding-bottom: 48px; }
.catalog h1 { margin: 0; color: var(--blue-dark); }
.found { color: var(--muted); margin-top: 0; }
.list { display: grid; gap: 16px; }
.card {
    display: grid; grid-template-columns: 340px 1fr 230px; gap: 20px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.card__main { display: block; border-radius: 12px; overflow: hidden; background: #eef2fa; }
.card__main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.card__thumbs a { position: relative; display: block; border-radius: 8px; overflow: hidden; background: #0b1a3a; }
.card__thumbs img, .card__thumbs video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.play {
    position: absolute; inset: 0; margin: auto; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; background: var(--yellow); color: var(--blue); font-size: 14px; padding-left: 3px;
}
.card__title { margin: 0 0 8px; font-size: 20px; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--blue); }
.card__desc { color: var(--muted); font-size: 15px; margin-top: 8px; }
.card__side { display: flex; flex-direction: column; gap: 4px; }
.card__sku { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.price { font-size: 26px; font-weight: 800; color: var(--blue-dark); white-space: nowrap; }
.price--big { font-size: 34px; }
.stock { font-weight: 700; color: var(--green); font-size: 14px; }
.stock--no { color: #b7791f; }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 16px; margin: 0; }
.specs div { min-width: 0; }
.specs dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.specs dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.empty { background: var(--card); border-radius: var(--radius); padding: 24px; text-align: center; }
.empty .contacts { justify-content: center; }

/* кнопки связи */
.contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.contacts--compact { flex-direction: column; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-weight: 800; text-decoration: none; padding: 11px 18px; border-radius: 12px; color: #fff;
    transition: filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--wa { background: #25d366; }
.btn--tg { background: #229ed9; }
.btn--max { background: linear-gradient(135deg, #3d5afe, #8e2de2); }
.btn--call { background: var(--blue); color: var(--yellow); }
.btn--sms { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }

/* карточка товара */
.product { padding-top: 16px; padding-bottom: 48px; }
.crumbs { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.product__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.product__media { display: grid; gap: 12px; }
.product__media a, .product__media img, .product__media video { border-radius: 12px; overflow: hidden; width: 100%; background: #0b1a3a; }
.product__info h1 { margin: 0 0 12px; font-size: clamp(22px, 3vw, 30px); }
.product__info .specs { margin: 16px 0; }
.product__cta { color: var(--muted); }
.product__desc { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }

/* пагинация (pagination::bootstrap-4) */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 24px 0 0; justify-content: center; }
.pagination li > * { display: block; min-width: 40px; text-align: center; padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); text-decoration: none; }
.pagination .active > * { background: var(--blue); color: var(--yellow); border-color: var(--blue); }
.pagination .disabled > * { color: var(--muted); }

/* подвал */
.footer { background: var(--blue-dark); color: #d6def0; padding: 32px 0; }
.footer__inner { display: grid; grid-template-columns: 1.5fr 1fr auto; gap: 24px; align-items: start; }
.footer__title { color: var(--yellow); font-weight: 800; margin-bottom: 4px; }
.footer__phone { color: #fff; font-size: 22px; font-weight: 800; text-decoration: none; }
.footer .contacts--compact { flex-direction: row; }

/* просмотр фото */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(5, 12, 30, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__body img, .lightbox__body video { max-width: 94vw; max-height: 88vh; border-radius: 8px; }
.lightbox button { position: fixed; border: 0; background: rgba(255, 255, 255, .15); color: #fff; cursor: pointer; border-radius: 50%; width: 48px; height: 48px; font-size: 30px; line-height: 1; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 12px; top: 50%; }
.lightbox__next { right: 12px; top: 50%; }

.toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
    background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px;
}

@media (max-width: 960px) {
    .card { grid-template-columns: 260px 1fr; }
    .card__side { grid-column: 1 / -1; }
    .card__side .contacts--compact { flex-direction: row; }
    .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .hero__inner, .product__grid { grid-template-columns: 1fr; }
    .hero__art { order: -1; max-width: 420px; margin: 0 auto; }
    .tiles { grid-template-columns: 1fr; }
    .card { grid-template-columns: 1fr; }
    .brand__text { font-size: 14px; }
    .brand__oval { width: 60px; height: 38px; font-size: 16px; }
    .topbar__phone { padding: 6px 14px; }
    .topbar__phone-num { font-size: 14px; }
    .topbar__phone-note { display: none; }
    .search { flex-wrap: wrap; }
    .search input { flex-basis: 100%; }
    .search select { flex: 1; }
    .footer__inner { grid-template-columns: 1fr; }
    .btn { flex: 1 1 auto; }
}
