/* Роса — фирменный стиль: синий #005BFF, красный акцент, капля, скруглённые формы */
:root {
  --blue: #005bff; --blue-dark: #0046c4; --sky: #2ad4ff;
  --red: #ff3b30;
  --ink: #0b1a33; --paper: #ffffff; --soft: #f2f6ff; --mute: #6b7a94; --line: #dfe7f5;
  --ok: #0a8f4f; --bad: #d62a1f;
  --r-lg: 22px; --r-md: 14px; --r-sm: 10px;
  --f: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --drop: linear-gradient(180deg, #2ad4ff 0%, #0a8cff 100%);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--f); }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--blue); }
h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; margin: 18px 0 14px; }
h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin: 28px 0 12px; }
h3 { font-size: 15px; font-weight: 700; margin: 4px 0 6px; line-height: 1.3; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.gap { gap: 12px; margin-top: 28px; }
.muted { color: var(--mute); }
.small { font-size: 13px; }
.meta { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); font-weight: 700; }
.inline { display: inline; }
.hide-m { display: inline; }

/* верхняя полоска */
.topbar { background: var(--blue); color: #fff; font-size: 13px; }
.topbar .wrap { padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: #fff; font-weight: 700; }

/* шапка */
.top { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 2px 16px rgba(0, 91, 255, .06); }
.head { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; flex-shrink: 0; }
.brand img { height: 40px; width: auto; }
.brand.small { font-size: 20px; font-weight: 800; color: var(--blue); }
.search { flex: 1; display: flex; max-width: 620px; background: var(--soft); border-radius: 999px; padding: 4px 4px 4px 18px; border: 2px solid transparent; transition: border-color .15s, background .15s; }
.search:focus-within { border-color: var(--blue); background: var(--paper); }
.search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 15px; padding: 8px 0; outline: none; color: var(--ink); min-width: 0; }
.search button { border: 0; background: var(--blue); color: #fff; font: inherit; font-weight: 700; cursor: pointer; padding: 9px 20px; border-radius: 999px; }
.search button:hover { background: var(--blue-dark); }
.cart-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; margin-left: auto; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; padding: 0 7px; }
.cats { border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.cats .wrap { display: flex; gap: 6px; padding-top: 8px; padding-bottom: 8px; white-space: nowrap; font-size: 14px; }
.cats a { color: var(--ink); padding: 6px 12px; border-radius: 999px; font-weight: 600; }
.cats a:hover { background: var(--soft); color: var(--blue); }
.cats a:first-child { background: var(--blue); color: #fff; }
.cats a:first-child:hover { background: var(--blue-dark); color: #fff; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--blue); color: #fff; border: 0; border-radius: var(--r-md); padding: 13px 22px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; transition: background .15s, transform .1s; }
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: var(--soft); color: var(--blue); }
.btn.ghost:hover { background: #e3ecff; color: var(--blue-dark); }
.btn.block { width: 100%; }
.btn.big { font-size: 17px; padding: 16px 28px; }
.btn:disabled { background: var(--line); color: var(--mute); cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--mute); cursor: pointer; padding: 0; font: inherit; font-size: 13px; text-decoration: underline; }
button.link:hover { color: var(--red); }

/* главная */
.hero { position: relative; overflow: hidden; margin-top: 20px; background: var(--blue); color: #fff; border-radius: var(--r-lg); padding: 56px 48px; }
.hero::after { content: ""; position: absolute; right: 6%; top: 50%; width: 220px; height: 280px; background: var(--drop); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; transform: translateY(-50%) rotate(180deg); opacity: .9; box-shadow: inset -20px -30px 60px rgba(0,0,0,.12); }
.hero::before { content: ""; position: absolute; right: 2%; top: 14%; width: 62px; height: 62px; background: var(--red); border-radius: 50%; opacity: .95; }
.hero h1 { color: #fff; font-size: clamp(38px, 6.5vw, 76px); line-height: 1.02; letter-spacing: -0.03em; margin: 0; font-weight: 800; max-width: 700px; position: relative; z-index: 1; }
.hero p { position: relative; z-index: 1; font-size: 18px; max-width: 520px; margin: 20px 0 0; opacity: .92; }
.hero .btn { position: relative; z-index: 1; }
.hero .btn { background: #fff; color: var(--blue); }
.hero .btn:hover { background: var(--soft); color: var(--blue-dark); }
.hero .btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 28px 0 8px; }
.tile { display: flex; flex-direction: column; gap: 26px; padding: 20px; min-height: 150px; border-radius: var(--r-md); background: var(--soft); transition: background .15s, transform .15s; }
.tile:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }
.tile .num { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--paper); color: var(--blue); font-size: 12px; font-weight: 800; }
.tile:hover .num { color: var(--blue); }
.tile-name { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; margin-top: auto; }
.tile-cnt { font-size: 13px; color: var(--mute); }
.tile:hover .tile-cnt { color: #d6e5ff; }
.sechead { display: flex; justify-content: space-between; align-items: baseline; margin: 40px 0 16px; }
.sechead h2 { margin: 0; font-size: 26px; }
.sechead a { font-size: 14px; font-weight: 700; color: var(--blue); }
.promo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 40px 0; }
.promo > div { padding: 24px; border-radius: var(--r-md); border: 1px solid var(--line); }
.promo b { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; }
.promo h3 { font-size: 18px; font-weight: 800; margin: 14px 0 6px; }
.promo p { color: var(--mute); margin: 0; }

/* сетка товаров */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.pcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s, transform .2s; }
.pcard:hover { box-shadow: 0 12px 32px rgba(0, 91, 255, .12); border-color: #c7d9ff; transform: translateY(-2px); }
.pcard-img { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: var(--soft); padding: 18px; }
.pcard-img img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; transition: transform .25s; }
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard-body h3 { min-height: 40px; }
.pcard-body h3 a { color: var(--ink); }
.pcard-body form { margin-top: auto; padding-top: 12px; }
.price { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.price s { color: var(--mute); font-weight: 500; font-size: 14px; margin-left: 4px; }
.price.big { font-size: 34px; letter-spacing: -0.02em; margin: 14px 0 8px; color: var(--blue); }
.avail { font-size: 13px; font-weight: 700; }
.avail.yes { color: var(--ok); }
.avail.yes::before { content: "● "; }
.avail.no { color: var(--mute); }
.avail.no::before { content: "○ "; }
.tag { position: absolute; top: 10px; left: 10px; font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 999px; }
.tag.sale { background: var(--red); color: #fff; }

/* каталог */
.crumbs { font-size: 13px; color: var(--mute); margin: 16px 0 0; }
.crumbs a { color: var(--mute); }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cat-head h1 { margin: 10px 0 8px; }
.cat-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; margin-top: 16px; align-items: start; }
.filters { position: sticky; top: 120px; background: var(--soft); border-radius: var(--r-md); padding: 6px 18px 18px; }
.f-block { border-bottom: 1px solid var(--line); padding: 14px 0; }
.f-block:last-of-type { border-bottom: 0; }
.f-block h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); font-weight: 800; }
.f-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.f-list a { display: block; padding: 5px 8px; margin: 0 -8px; border-radius: 8px; }
.f-list a:hover { background: var(--paper); }
.f-list a.on { font-weight: 800; color: var(--blue); background: var(--paper); }
.f-list i { font-style: normal; color: var(--mute); font-size: 12px; margin-left: 4px; }
.f-list.checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 0; }
.f-list.checks input, .check input { accent-color: var(--blue); width: 16px; height: 16px; margin: 0; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; font-weight: 600; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
input[type=number], input[type=text], input[type=search], input[type=tel], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: transparent; }
.f-actions { padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.reset { font-size: 13px; color: var(--mute); text-align: center; text-decoration: underline; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 13px; background: var(--soft); color: var(--blue); padding: 5px 12px; border-radius: 999px; font-weight: 700; }
.chip:hover { background: var(--blue); color: #fff; }
.sort label { font-size: 13px; color: var(--mute); display: flex; gap: 8px; align-items: center; font-weight: 600; }
.sort select { width: auto; border-radius: 999px; padding: 6px 14px; color: var(--ink); font-weight: 700; }
.pager { display: flex; justify-content: center; gap: 22px; align-items: center; padding: 24px 0 40px; font-size: 14px; font-weight: 600; }
.pager a { color: var(--blue); }
.empty { padding: 60px 0; color: var(--mute); text-align: center; }
.empty p { margin: 8px 0; }

/* товар */
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; margin-top: 16px; }
.gallery { position: relative; display: flex; align-items: center; justify-content: center; background: var(--soft); border-radius: var(--r-lg); aspect-ratio: 1 / 1; padding: 36px; }
.gallery img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.gallery .tag { top: 16px; left: 16px; font-size: 14px; padding: 6px 12px; }
.info h1 { margin-top: 8px; }
.info .price { margin-top: 0; }
.avail { margin-top: 6px; }
.buy { display: flex; gap: 12px; align-items: stretch; margin-top: 22px; flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.stepper button { width: 42px; border: 0; background: var(--soft); font: inherit; font-size: 18px; font-weight: 700; color: var(--blue); cursor: pointer; }
.stepper button:hover { background: var(--blue); color: #fff; }
.stepper input { width: 58px; border: 0; border-radius: 0; text-align: center; font-weight: 800; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper span { min-width: 42px; text-align: center; line-height: 40px; font-weight: 800; }
.buy .btn { flex: 1; min-width: 180px; }
.ship { list-style: none; padding: 16px; margin: 24px 0 0; background: var(--soft); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.ship b { font-weight: 800; }
.tabs { margin-top: 40px; }
.tabs details { border-bottom: 1px solid var(--line); }
.tabs summary { cursor: pointer; padding: 18px 0; font-size: 17px; font-weight: 800; list-style: none; display: flex; justify-content: space-between; }
.tabs summary::after { content: "+"; color: var(--blue); font-weight: 700; }
.tabs details[open] summary::after { content: "−"; }
.tab-body { padding: 0 0 22px; max-width: 760px; color: #33415c; }
table.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
table.specs th, table.specs td { padding: 11px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.specs th { width: 40%; font-weight: 600; color: var(--mute); padding-right: 16px; }
table.specs td { font-weight: 700; }

/* корзина */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; margin-top: 16px; }
.line { display: grid; grid-template-columns: 96px minmax(0, 1fr) 120px 110px; gap: 18px; align-items: center; padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--r-md); }
.line-img { background: var(--soft); border-radius: var(--r-sm); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; padding: 8px; }
.line-img img { max-height: 100%; object-fit: contain; }
.line-name { font-weight: 700; }
.line-info form { margin-top: 6px; }
.line-sum { text-align: right; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--blue); }
.line .stepper { justify-self: start; }
.summary { background: var(--soft); border-radius: var(--r-lg); padding: 22px; position: sticky; top: 120px; }
.summary h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); margin: 0 0 12px; font-weight: 800; }
.sum-row, .sum-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sum-row { font-size: 16px; font-weight: 800; border-bottom: 0; }
.sum-line.total { font-weight: 800; border-bottom: 0; }
.summary .btn { margin-top: 14px; }
.warn { color: var(--red); font-size: 13px; margin-top: 4px; font-weight: 600; }
.alert { background: #ffeceb; color: var(--bad); padding: 14px 16px; margin: 12px 0; border-radius: var(--r-md); font-weight: 600; }
.alert.ok { background: #e8f8ef; color: var(--ok); }
.hint { background: var(--soft); padding: 12px; overflow-x: auto; font-size: 13px; border-radius: var(--r-sm); }

/* оформление */
.checkout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr); gap: 32px; align-items: start; margin-top: 16px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form h2 { margin: 24px 0 2px; font-size: 18px; }
.form h2:first-child { margin-top: 0; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mute); font-weight: 600; }
.form.wide { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form.wide .full { grid-column: 1 / -1; }
.form.wide label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.form.wide label.check input { width: auto; }
.opt { flex-direction: row !important; align-items: flex-start !important; gap: 12px !important; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; cursor: pointer; color: var(--ink) !important; font-size: 14px !important; font-weight: 500 !important; }
.opt:has(input:checked) { border-color: var(--blue); background: #f3f7ff; box-shadow: inset 0 0 0 1px var(--blue); }
.opt input { margin-top: 3px; accent-color: var(--blue); }
.opt small { display: block; color: var(--mute); margin-top: 2px; }
.form .btn { align-self: flex-start; margin-top: 12px; }
.form .muted { margin: 0; }

/* тексты */
ul.plain { padding-left: 18px; }
ul.plain li { margin-bottom: 8px; }

/* админка */
.adminnav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: auto; font-size: 14px; font-weight: 700; }
.adminnav a { color: var(--ink); padding: 6px 12px; border-radius: 999px; }
.adminnav a:hover { background: var(--soft); color: var(--blue); }
form.inline { display: inline; }
table.admin-table th, table.admin-table td { font-size: 13px; }
.narrow { max-width: 380px; margin: 0 auto; }

/* подвал */
.foot { background: var(--soft); margin-top: 56px; padding: 36px 0; font-size: 14px; }
.foot-logo { height: 34px; width: auto; margin-bottom: 8px; }
.foot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot p { margin: 0 0 12px; }
.foot a { font-weight: 600; }

/* мобильная версия */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .cat-layout, .cart-layout, .product, .checkout { grid-template-columns: 1fr; gap: 20px; }
  .filters, .summary { position: static; }
  .line { grid-template-columns: 76px minmax(0, 1fr); }
  .line .stepper, .line-sum { grid-column: 2; justify-self: start; text-align: left; }
  .promo { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .hero::after { width: 150px; height: 190px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hide-m { display: none; }
  .head { flex-wrap: wrap; gap: 10px; }
  .brand img { height: 34px; }
  .cart-link { margin-left: auto; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard-body { padding: 10px 12px 12px; }
  .pcard-body h3 { font-size: 14px; min-height: 0; }
  .price { font-size: 16px; }
  .tile { min-height: 120px; padding: 14px; gap: 22px; }
  .tile-name { font-size: 16px; }
  .hero { padding: 36px 24px; border-radius: var(--r-md); }
  .hero::after { display: none; }
  .form.wide { grid-template-columns: 1fr; }
  .price.big { font-size: 28px; }
  .buy .btn { min-width: 100%; }
  table.specs th { width: 45%; }
}

/* Подкатегории, быстрые подборки, сердечко, SEO-блок */
.topbar .row.gap-s { gap: 18px; }
.sale-link { color: var(--red) !important; }
.pcard-img { position: relative; }
.heart { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 2px 8px rgba(11,26,51,.1); }
.subcats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 8px; }
.subcat { padding: 14px 16px; border-radius: var(--r-md); background: var(--soft); font-weight: 700; font-size: 14px; }
.subcat:hover { background: var(--blue); color: #fff; }
.popular { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.popular .chip { background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.popular .chip:hover { border-color: var(--blue); color: var(--blue); background: var(--paper); }
.seo { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 860px; }
.seo h2 { font-size: 24px; }
.seo p { color: #33415c; }
.seo details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.seo summary { cursor: pointer; font-weight: 700; }
.seo details p { margin: 8px 0 0; }

/* Плавающие кнопки мессенджеров */
.msg-float { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; z-index: 30; }
.msg-float.with-chat { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.msg-btn { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff !important; font-weight: 800; font-size: 13px; box-shadow: 0 6px 18px rgba(11,26,51,.22); transition: transform .15s; }
.msg-btn:hover { transform: scale(1.06); }
.msg-max { background: linear-gradient(135deg, #2ad4ff, #7b3cff); }
.msg-vk { background: #0077ff; }

/* Заглушка, пока у товара нет фото */
.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%; color: #9db4d9; font-size: 13px; font-weight: 600; }
.ph svg { width: 34%; max-width: 72px; fill: currentColor; opacity: .55; }
.line-img .ph span { display: none; }
.line-img .ph svg { width: 60%; }
