/* Палитра и пропорции — по мотивам шаблона Neo (AdvantShop). */
:root {
  --ink: #2c2c2c;
  --ink-2: #595959;
  --muted: #94969b;
  --line: #e5e2e0;
  --soft: #f3f3f3;
  --soft-2: #f9f9f9;
  --white: #fff;
  --blue: #3375f2;
  --blue-dark: #2361d6;
  --blue-soft: #eaf1fe;
  --yellow: #f8b643;
  --red: #e5484d;
  --green: #2e9e5b;
  --violet: #7c5cf0;
  --ok-bg: #e6f5ec;
  --bad-bg: #fdecec;
  --warn-bg: #fff4dc;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--white); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
button { font: inherit; color: inherit; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 20px; font-weight: 700; }
h2 { font-size: 24px; margin: 0; font-weight: 700; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border: 0; border-radius: 12px;
  font-weight: 600; cursor: pointer; background: var(--soft); transition: background .15s, color .15s; white-space: nowrap; }
.btn:hover { background: #e9e9e9; color: var(--ink); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-light { background: var(--blue-soft); color: var(--blue); }
.btn-light:hover { background: #dce8fd; color: var(--blue); }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: wait; }

/* Верхняя строка */
.topbar { background: var(--soft-2); border-bottom: 1px solid var(--line); font-size: 13px; }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 40px; }
.toplinks { display: flex; gap: 20px; color: var(--ink-2); }
.gw { margin-left: auto; padding: 2px 10px; border-radius: 20px; background: var(--yellow); color: #3a2a00; font-weight: 600; font-size: 12px; }
.phone { font-weight: 600; }

/* Шапка */
.header { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 20px; height: 78px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; letter-spacing: -.5px; color: var(--ink); }
.logo:hover { color: var(--ink); }
.catalog-wrap { position: relative; }
.catalog-btn { padding: 12px 20px; }
.catalog-drop { position: absolute; top: calc(100% + 10px); left: 0; width: 300px; padding: 10px; background: #fff; border-radius: var(--radius);
  box-shadow: 0 12px 40px #0002; }
.catalog-drop a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; }
.catalog-drop a:hover { background: var(--soft); color: var(--ink); }
.catalog-drop .e { font-size: 22px; }
.search { flex: 1; display: flex; height: 46px; background: var(--soft); border-radius: 12px; overflow: hidden; }
.search input { flex: 1; border: 0; background: transparent; padding: 0 16px; font: inherit; outline: none; min-width: 0; }
.search button { width: 52px; border: 0; background: transparent; cursor: pointer; color: var(--ink-2); }
.search:focus-within { box-shadow: 0 0 0 2px var(--blue); }
.hactions { display: flex; gap: 22px; }
.hact { position: relative; display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--ink-2); min-width: 64px; }
.hact svg { color: var(--ink); }
.count { position: absolute; top: -6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--blue);
  color: #fff; font-size: 11px; font-style: normal; font-weight: 700; line-height: 18px; text-align: center; }
.menu { display: flex; gap: 28px; height: 46px; align-items: center; font-weight: 500; overflow-x: auto; scrollbar-width: none; }
.menu a { white-space: nowrap; }
.menu a.active { color: var(--blue); }

main.container { padding-top: 24px; padding-bottom: 64px; min-height: 60vh; }

/* Слайдер */
.hero { position: relative; border-radius: 24px; overflow: hidden; height: 420px; margin-bottom: 36px; }
.slide { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 64px; opacity: 0; transition: opacity .6s; }
.slide.on { opacity: 1; z-index: 1; }
.slide .txt { max-width: 520px; position: relative; z-index: 1; }
.slide h2 { font-size: 46px; line-height: 1.1; margin-bottom: 16px; }
.slide p { font-size: 17px; margin: 0 0 28px; opacity: .85; }
.slide .art { position: absolute; right: 8%; top: 50%; transform: translateY(-50%); font-size: 220px; line-height: 1; filter: drop-shadow(0 30px 30px #0002); }
.s1 { background: linear-gradient(120deg, #efe6da 0%, #e3d4c1 100%); }
.s2 { background: linear-gradient(120deg, #1f2b3d 0%, #34507a 100%); color: #fff; }
.s3 { background: linear-gradient(120deg, #e3eee5 0%, #c8dccd 100%); }
.dots { position: absolute; z-index: 2; left: 64px; bottom: 28px; display: flex; gap: 8px; }
.dots button { width: 28px; height: 4px; border: 0; border-radius: 2px; background: #0003; cursor: pointer; padding: 0; }
.s2.on ~ .dots button { background: #fff6; }
.dots button.on { background: var(--blue); }

/* Истории */
.stories { display: flex; gap: 24px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 40px; scrollbar-width: none; }
.story { flex: 0 0 auto; width: 110px; text-align: center; font-size: 13px; font-weight: 500; }
.story .ring { width: 96px; height: 96px; margin: 0 auto 8px; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, var(--blue), var(--violet)); }
.story .in { width: 100%; height: 100%; border-radius: 50%; border: 3px solid #fff; display: grid; place-items: center; font-size: 40px; background: var(--soft); }

/* Секции и карусели */
.section { margin-bottom: 48px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sec-head a { color: var(--blue); font-weight: 500; font-size: 14px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 72px) / 5); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 18px; }

/* Карточка товара в списке */
.pcard { display: flex; flex-direction: column; min-width: 0; }
.pwrap { position: relative; }
.pimg { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--radius); font-size: 96px; margin-bottom: 12px;
  transition: transform .2s; }
.pcard:hover .pimg { transform: translateY(-3px); }
.badges { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.badge { padding: 3px 9px; border-radius: 8px; font-size: 11px; font-weight: 600; color: #fff; line-height: 1.4; }
.b-new { background: var(--blue); }
.b-hit { background: var(--yellow); color: #3a2a00; }
.b-sale { background: var(--red); }
.b-recommend { background: var(--violet); }
.fav { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fffc; cursor: pointer; display: grid; place-items: center; }
.fav svg { fill: none; stroke: var(--ink); }
.fav.on svg { fill: var(--red); stroke: var(--red); }
.pprice { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 4px; }
.pprice b { font-size: 18px; }
.pprice.sale b { color: var(--red); }
.pprice s { color: var(--muted); font-size: 13px; }
.ptitle { font-size: 14px; line-height: 1.4; color: var(--ink-2); flex: 1; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .btn { padding: 10px 16px; }

/* Преимущества, отзывы */
.adv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.adv div { padding: 22px; background: var(--soft-2); border-radius: var(--radius); }
.adv b { display: block; margin: 10px 0 4px; }
.adv .i { font-size: 28px; }
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.review { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.stars { color: var(--yellow); letter-spacing: 2px; }
.review p { margin: 8px 0 12px; color: var(--ink-2); }

/* Хлебные крошки */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--blue); }
.crumbs span::before { content: '/'; margin-right: 6px; }

/* Каталог: фильтр-чипсы */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { padding: 8px 16px; border-radius: 20px; background: var(--soft); font-size: 14px; font-weight: 500; }
.chip.on { background: var(--ink); color: #fff; }

/* Страница товара */
.product { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; }
.gallery { display: grid; grid-template-columns: 80px 1fr; gap: 14px; align-self: start; position: sticky; top: 150px; }
.thumbs { display: flex; flex-direction: column; gap: 10px; }
.thumbs button { aspect-ratio: 1; border: 2px solid transparent; border-radius: 12px; font-size: 32px; cursor: pointer; display: grid; place-items: center; }
.thumbs button.on { border-color: var(--blue); }
.gallery .main { position: relative; aspect-ratio: 1; border-radius: 20px; display: grid; place-items: center; font-size: 220px; }
.pinfo h1 { font-size: 26px; margin-bottom: 12px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.instock { color: var(--green); font-weight: 500; }
.buybox { padding: 24px; border-radius: var(--radius); background: var(--soft-2); margin-bottom: 20px; }
.bigprice { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.bigprice b { font-size: 32px; }
.bigprice s { color: var(--muted); font-size: 18px; }
.bigprice .badge { font-size: 13px; }
.bonus { font-size: 13px; color: var(--green); margin-bottom: 18px; }
.buyrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qty { display: inline-flex; align-items: center; border-radius: 12px; background: var(--soft); }
.qty button { width: 38px; height: 42px; border: 0; background: none; cursor: pointer; font-size: 18px; }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.giftsum { margin-bottom: 14px; }
.facts-mini { display: grid; gap: 10px; font-size: 14px; }
.facts-mini div { display: flex; gap: 10px; align-items: center; }
.tabs { margin-top: 48px; }
.tabbar { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabbar button { padding: 0 0 12px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabbar button.on { color: var(--ink); border-color: var(--blue); }
.specs { max-width: 640px; }
.specs div { display: flex; gap: 12px; padding: 8px 0; }
.specs span:first-child { color: var(--muted); flex: 0 0 auto; }
.specs .leader { flex: 1; border-bottom: 1px dotted var(--line); }
.specs span:last-child { flex: 0 0 auto; text-align: right; }

/* Формы */
label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 14px; }
input[type=text], input[type=tel], input[type=number], input[type=password], input.inp { display: block; width: 100%; margin-top: 6px; padding: 13px 14px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; outline: none; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #3375f222; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.err { color: var(--red); font-size: 14px; min-height: 20px; margin: 4px 0 10px; }

/* Корзина и оформление */
.layout2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.box { border: 1px solid var(--line); border-radius: 20px; padding: 24px; margin-bottom: 20px; }
.box h3 { margin: 0 0 18px; font-size: 18px; }
.box h3 .n { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; }
.cline { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto auto 32px; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cline:last-child { border-bottom: 0; }
.cline .pimg { margin: 0; font-size: 44px; border-radius: 12px; }
.cline .t { font-size: 14px; }
.cline .sum { font-weight: 700; min-width: 100px; text-align: right; }
.rm { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 20px; }
.rm:hover { color: var(--red); }
.summary { position: sticky; top: 150px; background: var(--soft-2); border-radius: 20px; padding: 24px; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.summary .row span:first-child { color: var(--ink-2); }
.summary .row span:last-child, .facts .row > :last-child { white-space: nowrap; }
.summary .total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 14px; font-size: 20px; font-weight: 700; }
.summary .total span:first-child { color: var(--ink); }
.radio { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; cursor: pointer; color: var(--ink); font-size: 15px; }
.radio:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.radio input { accent-color: var(--blue); width: 18px; height: 18px; margin: 0; }
.radio .p { margin-left: auto; font-weight: 600; }
.radio small { display: block; color: var(--muted); }
.bankcard { position: relative; max-width: 420px; aspect-ratio: 1.586; padding: 22px; border-radius: 18px; color: #fff;
  background: radial-gradient(circle at 85% 0%, #5b8ff7 0%, transparent 55%), linear-gradient(135deg, #2361d6, #1b2f63); box-shadow: 0 16px 36px #2361d633;
  display: flex; flex-direction: column; justify-content: flex-end; }
.bankcard .chip-ic { position: absolute; top: 22px; left: 22px; width: 42px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #f6d68b, #c79a3d); }
.bankcard label { color: #ffffffb3; font-size: 12px; margin-bottom: 10px; }
.bankcard input { background: #ffffff1c; border-color: #ffffff38; color: #fff; padding: 10px 12px; letter-spacing: 1px; }
.bankcard input::placeholder { color: #ffffff70; }
.bankcard input:focus { border-color: #fff; box-shadow: none; }
.secure { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 14px; }
.empty { text-align: center; padding: 64px 0; }
.empty .e { font-size: 72px; }

/* Статус */
.status { max-width: 560px; margin: 0 auto; text-align: center; }
.status .icon { width: 84px; height: 84px; margin: 8px auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 40px; font-weight: 700; }
.st-success .icon { background: var(--ok-bg); color: var(--green); }
.st-declined .icon, .st-error .icon { background: var(--bad-bg); color: var(--red); }
.st-challenge .icon, .st-pending .icon { background: var(--warn-bg); color: #9a6400; }
.status .msg { color: var(--ink-2); margin: -8px 0 20px; }
.status .box { text-align: left; }
.facts .row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts .row:last-child { border-bottom: 0; }
.facts .row span:first-child { color: var(--muted); }
.facts code { font-size: 12px; word-break: break-all; }
.otp { max-width: 280px; margin: 0 auto 20px; }
.otp input { text-align: center; letter-spacing: 8px; font-size: 24px; }
.status .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.spinner { width: 40px; height: 40px; border: 4px solid #f5dfae; border-top-color: #9a6400; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
details { margin-top: 12px; }
summary { cursor: pointer; color: var(--muted); font-size: 14px; }
pre { overflow: auto; background: #1e1e1e; color: #d4d4d4; padding: 14px; border-radius: 12px; font-size: 12px; text-align: left; }
pre.log { max-height: 70vh; }

/* Текстовые страницы */
.page { max-width: 760px; }
.page table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 14px; }
.page th, .page td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.page th { color: var(--muted); font-weight: 500; }

/* Подвал */
.footer { background: var(--soft-2); border-top: 1px solid var(--line); padding: 40px 0 20px; font-size: 14px; }
.footer-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { margin: 0 0 12px; font-size: 15px; }
.footer-in a, .footer-in > div > span { display: block; margin-bottom: 8px; }
.logo-footer { font-size: 22px; margin-bottom: 8px; }
.paylogos { display: flex; gap: 6px; margin-top: 12px; }
.paylogos span { padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.copy { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 14px 22px; border-radius: 14px; background: var(--ink); color: #fff;
  box-shadow: 0 10px 30px #0003; transition: transform .25s, opacity .25s, visibility .25s; z-index: 50; font-size: 14px;
  opacity: 0; visibility: hidden; }
.toast.on { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast a { color: #8fb3ff; margin-left: 10px; font-weight: 600; }

/* Фото товаров: белый фон снимков «растворяется» в светло-сером фоне карточки. */
.pimg, .gallery .main, .thumbs button, .story .in, .mini { background: #f5f5f4; }
.pimg img, .gallery .main img, .thumbs button img, .story .in img, .mini img {
  width: 84%; height: 84%; object-fit: contain; mix-blend-mode: multiply; }
.gallery .main #mainPic { display: grid; place-items: center; width: 100%; height: 100%; }
.gallery.single { grid-template-columns: 1fr; }
.gallery.single .thumbs { display: none; }
.mini { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; margin-right: 10px; vertical-align: middle;
  font-size: 18px; font-style: normal; overflow: hidden; }
.facts .row.line span:first-child { color: var(--ink); }

/* Фото-слайды */
.slide.photo { background-size: cover; background-position: center; color: #fff; }
.slide.photo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #000a 0%, #0006 45%, #0000 80%); }
.slide.photo.on ~ .dots button { background: #fff6; }
.slide.photo.on ~ .dots button.on { background: #fff; }

/* Адаптив */
@media (max-width: 1100px) {
  .rail { grid-auto-columns: calc((100% - 54px) / 4); }
  .adv { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .container { padding: 0 16px; }
  .toplinks { display: none; }
  .header-in { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 12px; }
  .search { order: 5; flex-basis: 100%; }
  .hactions { margin-left: auto; gap: 8px; }
  .hact span { display: none; }
  .hact { min-width: 40px; }
  .rail { grid-auto-columns: 46%; }
  .hero { height: 360px; }
  .slide { padding: 0 24px; }
  .slide h2 { font-size: 30px; }
  .slide .art { font-size: 120px; right: 4%; top: auto; bottom: 10px; transform: none; opacity: .5; }
  .dots { left: 24px; }
  .product, .layout2 { grid-template-columns: 1fr; gap: 24px; }
  .gallery { position: static; grid-template-columns: 1fr; }
  .thumbs { flex-direction: row; order: 2; }
  .thumbs button { width: 64px; }
  .gallery .main { font-size: 160px; }
  .summary { position: static; }
  .reviews { grid-template-columns: 1fr; }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .cline { grid-template-columns: 64px minmax(0, 1fr) 32px; }
  .cline .qty, .cline .sum { grid-column: 2; }
  .cline .sum { text-align: left; }
}
@media (max-width: 520px) {
  .adv, .footer-in { grid-template-columns: 1fr; }
  .buyrow { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
}
