/* Brafitius shop — the look of the old InSales theme (Manrope, pink header #FFB8B8, buttons #FF8084, accent #ED383E). */
:root {
    --accent: #FF8084;
    --accent-dark: #ED383E;
    --header: #FFB8B8;
    --header-glass: rgba(255, 184, 184, .5);
    --badge: #FF0216;
    --text: #2B2D30;
    --muted: #91959C;
    --line: #ececec;
    --soft: #f7f7f7;
    --radius: 10px;
    --wrap: 1360px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-size: 14px; line-height: 1.45; color: var(--text); background: #fff; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-weight: 600; line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; padding: 12px 22px; background: var(--accent); color: #fff; font-weight: 600; border-radius: 0; transition: filter .15s; }
.btn:hover { filter: brightness(.95); color: #fff; }
.btn-light { background: #f3f3f4; color: var(--text); }
.btn-light:hover { color: var(--text); background: #ebebec; }
.btn-outline { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.btn-outline:hover { color: var(--accent-dark); }
.btn[disabled] { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: none; cursor: pointer; padding: 6px; display: inline-flex; align-items: center; justify-content: center; position: relative; color: inherit; }
.icon-btn svg { width: 22px; height: 22px; }
.badge { position: absolute; top: -2px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--badge); color: #fff; font-size: 10px; line-height: 16px; text-align: center; font-weight: 700; }
.badge:empty, .badge[data-n="0"] { display: none; }

/* ---------- top menu and header ---------- */
.topmenu { background: var(--tm-bg, #fff); border-bottom: 1px solid var(--line); font-size: var(--tm-size, 12px); font-weight: var(--tm-weight, 400); color: var(--tm-color, var(--text)); }
.topmenu .wrap { display: flex; gap: 28px; justify-content: center; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.topmenu a { display: block; padding: 12px 0; }
.header { background: var(--hh-bg, var(--header)); position: relative; z-index: 20; transition: background .3s; }
.header .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 92px; gap: 16px; }
.header-links { display: flex; gap: 22px; font-size: var(--hh-size, 13px); font-weight: var(--hh-weight, 400); align-self: stretch; justify-content: var(--hd-justify, flex-start); transform: translateX(var(--hd-shift, 0px)); -webkit-text-stroke: var(--hh-stroke, 0 transparent); paint-order: stroke fill; }
.header-links a, .header-links span { color: var(--hh-color, var(--text)); cursor: pointer; }
.header-links a:hover { color: var(--accent-dark); }
.header:hover .header-links { font-weight: var(--hh-weight, 600); }

/* Header drop-downs: "Каталог" — sections and a picture across the whole width; "Меню", "Уголок потребителя" — a list. */
.hdrop { display: flex; align-items: center; position: relative; }
.hdrop.mega { position: static; }
.hdrop-panel { display: none; position: absolute; top: 100%; left: 0; z-index: 30; background: var(--header); box-shadow: 0 14px 24px rgba(0, 0, 0, .08); animation: fade-in .25s ease; font-weight: 500; }
.hdrop:hover > .hdrop-panel { display: block; }
.hdrop.mega .hdrop-panel { right: 0; padding: 18px 0 30px; }
.hdrop-panel.small { min-width: 290px; padding: 10px 20px 14px; }
.hdrop-panel.small a { display: block; padding: 7px 0; font-size: var(--hd-size, inherit); }
.mega-list a { font-size: var(--hd-size, 14px) !important; }
.mega-body { display: flex; gap: 40px; align-items: flex-start; }
.mega-list { flex: 0 0 260px; }
.mega-list a { display: block; padding: 7px 0; font-size: 14px; }
.mega-photo { margin: 0 auto; width: 250px; aspect-ratio: 7 / 10; overflow: hidden; }
.mega-photo img { width: 100%; height: 100%; object-fit: cover; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.header-logo img { width: 100px; height: auto; }
.header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: var(--hh-color, var(--text)); }
.header-search { position: relative; }
.header-search input { width: 260px; height: 34px; padding: 0 12px 0 34px; border: 1px solid var(--hh-color, var(--text)); background: rgba(255, 255, 255, .24); color: var(--hh-color, var(--text)); outline: none; }
.header-search input::placeholder { color: var(--hh-color, var(--text)); opacity: .8; }
.header-search svg { position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; color: var(--hh-color, var(--text)); }
.home .header:not(:hover) .header-tools, .home .header:not(:hover) .header-search svg { color: var(--hn-color, var(--accent-dark)); }
.home .header:not(:hover) .header-search input { color: var(--hn-color, var(--accent-dark)); border-color: var(--hn-color, rgba(237, 56, 62, .45)); }
.home .header:not(:hover) .header-search input::placeholder { color: var(--hn-color, var(--accent-dark)); }
.burger { display: none; }

/* The home page: the header lies on the slider, half transparent. */
.home .header { position: absolute; left: 0; right: 0; top: 41px; background: var(--hn-bg, var(--header-glass)); backdrop-filter: blur(2px); }
/* …red text while see-through; the mouse over it makes it solid with dark, bolder text (as on the old site). */
.home .header:not(:hover) .header-links { font-size: var(--hn-size, 13px); font-weight: var(--hn-weight, 400); -webkit-text-stroke: var(--hn-stroke, 0 transparent); }
.home .header:not(:hover) .header-links a, .home .header:not(:hover) .header-links span { color: var(--hn-color, var(--accent-dark)); }
.home .header:hover { background: var(--hh-bg, var(--header)); backdrop-filter: none; }
.header:hover .header-tools, .header:hover .header-search svg, .header:hover .header-search input, .header:hover .header-search input::placeholder { color: var(--hh-color, var(--text)); }
.header:hover .header-search input { border-color: var(--hh-color, var(--text)); background: rgba(255, 255, 255, .35); }

/* Catalogue drop-down (the "Каталог" link). */
.catalog-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--header); padding: 22px 0 30px; box-shadow: 0 12px 24px rgba(0, 0, 0, .08); }
.catalog-menu.open { display: block; }
.catalog-menu .cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px 28px; }
.catalog-menu .col b { display: block; margin-bottom: 6px; color: var(--accent-dark); }
.catalog-menu .col a { display: block; padding: 3px 0; }

/* ---------- home ---------- */
/* Pictures whole across the window: the slider's height follows the picture on show (shop.js sets it). */
.hero { position: relative; overflow: hidden; background: #fbe4e4; transition: height .4s ease; }
.hero-track { display: flex; align-items: flex-start; transition: transform .6s ease; }
.hero-slide { flex: 0 0 100%; display: block; }
.hero-slide img { width: 100%; height: auto; display: block; }
/* On computers every slide is 1920×768 in proportion: a taller picture loses its bottom part, never the sides. */
@media (min-width: 769px) {
    .hero-slide { position: relative; height: 0; padding-top: 40%; overflow: hidden; }
    .hero-slide img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
}
.hero-dots { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 8px; }
.hero-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .7); cursor: pointer; padding: 0; }
.hero-dots button.on { background: var(--accent-dark); }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255, 255, 255, .55); width: 42px; height: 42px; border-radius: 50%; cursor: pointer; color: var(--accent-dark); font-size: 20px; }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }

.marquee { overflow: hidden; border-bottom: 1px solid var(--line); background: #fff; }
.marquee-track { display: flex; gap: 40px; width: max-content; padding: 8px 0; animation: marquee 28s linear infinite; }
.marquee a { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.marquee img { width: 22px; height: 22px; object-fit: contain; }
@keyframes marquee { to { transform: translateX(-50%); } }

.section { padding: 34px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 20px; }
.row-arrows { display: flex; gap: 8px; }
.row-arrows button { border: 0; background: none; cursor: pointer; color: var(--accent-dark); font-size: 30px; font-weight: 700; line-height: 1; padding: 0 6px; }
.row-arrows button:hover { color: var(--accent); }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 14px; padding: 8px 16px; border: 1px solid var(--accent); color: var(--accent-dark); font-weight: 600; font-size: 14px; }
.back-link:hover { background: #fff1f1; }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 18px) / 5); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px; }
.scroller > * { scroll-snap-align: start; }
/* Whole pictures by default (as on the old site); "обрезать" in the constructor makes them all the same height. */
.tiles .tile img { width: 100%; height: auto; }
.tiles.tiles-crop .tile img { aspect-ratio: 4 / 5; object-fit: cover; }
.scroller.tiles { align-items: start; }
.tiles .tile span { display: block; text-align: center; margin-top: 8px; font-size: 13px; font-weight: var(--tw, 400); }
.new-row { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 18px; }
.new-row .promo img { width: 100%; height: 100%; object-fit: cover; }
.news { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 3fr); gap: 28px; align-items: stretch; }
.news.no-promo { grid-template-columns: 1fr; }
.news-promo { display: block; min-height: 300px; }
.news-promo img { width: 100%; height: 100%; object-fit: cover; }
.news-cards { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 30px 22px; }
.banners2 { display: grid; grid-template-columns: 2.07fr 1fr; gap: 18px; }
.banners2 img { width: 100%; height: 100%; object-fit: cover; }
.cloud { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cloud a { padding: 8px 16px; background: var(--soft); border-radius: 20px; font-size: 13px; }
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.benefit { display: flex; gap: 14px; align-items: flex-start; }
.benefit img { width: 54px; height: 54px; object-fit: contain; flex: none; }
.benefit b { display: block; margin-bottom: 4px; }
.benefit p { margin: 0; color: #5a5d63; font-size: 13px; }

/* ---------- product cards (as on the old site: hover — the card grows, sizes and photos appear) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 18px; }
.card { position: relative; }
.card-box { position: relative; background: #fff; border-radius: var(--radius); transition: box-shadow .2s; }
.card-photo { display: block; position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--radius); background: #fff; }
.card-photo img { width: 100%; height: 100%; object-fit: contain; transition: opacity .2s; }
.card-fav { position: absolute; top: 8px; right: 8px; z-index: 3; color: var(--text); }
.card-fav.on { color: var(--badge); }
.card-fav.on svg { fill: currentColor; }
.sticker { position: absolute; left: 8px; top: 8px; z-index: 3; background: var(--accent-dark); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; }
.card-info { padding: 10px 2px 2px; }
.card-price { display: flex; gap: 8px; align-items: baseline; font-weight: 700; font-size: 15px; }
.card-price s { color: var(--muted); font-weight: 400; font-size: 12px; }
.card-title { display: -webkit-box; margin-top: 4px; font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-na { color: var(--muted); font-size: 12px; margin-top: 2px; }
.card-more { display: none; }
.sizes-all .card-more { display: block; }
.sizes-toggle { display: inline-block; margin-top: 8px; padding: 3px 8px; border: 1px solid var(--accent-dark); background: #fff; color: var(--text); font-size: 11px; cursor: pointer; line-height: 1.4; }
.sizes-toggle:hover { background: #fff1f1; }
.sizes-toggle .st-hide, .sizes-all .sizes-toggle .st-show { display: none; }
.sizes-all .sizes-toggle .st-hide { display: inline; }
.sizes-all .card-more .sizes { margin-top: 6px; }
.card-thumbs { display: none; }
.sizes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.sizes span { border: 1px solid #e3e3e5; padding: 2px 6px; font-size: 11px; background: #fff; }
.sizes span.na { border: 0; color: var(--muted); padding-left: 0; }
.card-colors { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.card-colors button { border: 1px solid #d6d6da; background: #fff; color: var(--text); padding: 2px 8px; font-size: 11px; line-height: 1.4; cursor: pointer; border-radius: 10px; font-family: inherit; }
.card-colors button:hover { border-color: var(--accent-dark); }
.card-colors button.on { border-color: var(--accent-dark); background: #fff1f1; font-weight: 600; }

@media (hover: hover) and (min-width: 900px) {
    .card:hover { z-index: 10; }
    .card:hover .card-box { position: absolute; left: calc(-10% - 55px); width: calc(120% + 55px); top: -10px; padding: 10px 10px 14px 65px; box-shadow: 0 8px 30px rgba(0, 0, 0, .14); }
    .card.expand-right:hover .card-box { left: -10px; padding: 10px 65px 14px 10px; }
    .card.expand-left:hover .card-box { left: auto; right: -10px; padding: 10px 10px 14px 65px; }
    .card:hover .card-more { display: block; }
    .card:hover .card-thumbs { display: flex; flex-direction: column; gap: 6px; position: absolute; top: 10px; left: 10px; width: 45px; z-index: 12; }
    .card.expand-right:hover .card-thumbs { left: auto; right: 10px; }
    .card-thumbs img { width: 45px; height: 60px; object-fit: cover; border: 1px solid #eee; border-radius: 4px; opacity: .6; cursor: pointer; background: #fff; }
    .card-thumbs img.on, .card-thumbs img:hover { opacity: 1; border-color: var(--text); }
}

/* ---------- breadcrumbs, catalogue page ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #333; padding: 20px 0; }
.crumbs a:not(:last-child)::after { content: "/"; margin-left: 8px; color: #999; }
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 30px; align-items: start; }
.subsections { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.subsections a { padding: 7px 14px; border: 1px solid #e3e3e5; font-size: 13px; }
.subsections a.on { border-color: var(--accent); color: var(--accent-dark); }
.filters { position: sticky; top: 16px; font-size: 13px; }
.filters details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.filters summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.filters summary::after { content: "+"; color: var(--muted); }
.filters details[open] summary::after { content: "−"; }
.filters .opts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 260px; overflow-y: auto; }
.filters .opts.chips { flex-direction: row; flex-wrap: wrap; }
.filters label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.filters .chips label { border: 1px solid #e3e3e5; padding: 3px 8px; }
.filters .chips input { display: none; }
.filters .chips label:has(input:checked) { border-color: var(--accent); color: var(--accent-dark); }
.filters .price { display: flex; gap: 8px; margin-top: 10px; }
.filters .price input { width: 100%; padding: 6px 8px; border: 1px solid #ddd; }
.filters .actions { display: flex; gap: 8px; margin-top: 14px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar select { border: 1px solid #ddd; padding: 7px 10px; background: #fff; }
.count { color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 6px; justify-content: center; margin: 34px 0 10px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e3e3e5; padding: 0 10px; }
.pager .on { border-color: var(--accent); color: var(--accent-dark); font-weight: 700; }
.filters-toggle { display: none; }
.description-text { margin-top: 30px; color: #444; }

/* The catalogue across the whole screen, as on the old site. */
.wrap.wide { max-width: none; padding: 0 36px; }
.subtiles { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; padding: 6px 0 26px; }
/* Set in the constructor: N tiles in a row on a computer. */
.subtiles[style*="--per"] { display: grid; grid-template-columns: repeat(var(--per), minmax(0, 1fr)); overflow: visible; }
.subtiles[style*="--per"] .subtile { flex: none; }
.subtile { flex: 0 0 150px; text-align: center; }
.subtile-photo { display: block; aspect-ratio: 2 / 3; overflow: hidden; background: var(--soft); }
.subtile-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.subtile:hover .subtile-photo img { transform: scale(1.04); }
.subtile-title { display: block; margin-top: 10px; font-size: var(--ts, 15px); font-weight: var(--tw, 400); line-height: 1.3; }
.fbar-head { display: flex; gap: 30px; align-items: baseline; margin: 18px 0 14px; font-size: 12px; }
.fbar-head .reset { color: var(--accent-dark); font-weight: 600; }
.fbar { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-bottom: 34px; }
.fbar .fdrop { flex: 0 1 190px; min-width: 150px; }
.fdrop { position: relative; }
.fdrop summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; }
.fdrop summary::-webkit-details-marker { display: none; }
.fdrop summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -4px 4px 0 10px; flex: none; transition: transform .2s; }
.fdrop[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.fdrop.on summary { color: var(--accent-dark); font-weight: 600; }
.fdrop-panel { position: absolute; left: 0; top: calc(100% + 4px); z-index: 25; min-width: 100%; width: max-content; max-width: 340px; max-height: 360px; overflow-y: auto; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .14); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.fdrop-panel label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.fdrop-panel.chips { flex-direction: row; flex-wrap: wrap; max-width: 380px; }
.fdrop-panel.chips label { border: 1px solid #e3e3e5; padding: 4px 9px; }
.fdrop-panel.chips input { display: none; }
.fdrop-panel.chips label:has(input:checked) { border-color: var(--accent); color: var(--accent-dark); }
.fdrop-panel .price { display: flex; gap: 8px; }
.fdrop-panel .price input { width: 120px; padding: 7px 8px; border: 1px solid #ddd; }
.grid.wide-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 34px 22px; }
@media (min-width: 900px) { .grid.wide-grid[style*="--cols"] { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); } }
.wide-grid .card-photo { aspect-ratio: 3 / 4; }
.wide-grid .card-photo img { object-fit: cover; }
.wide-grid .card-title { font-size: 14px; }
.wide-grid .card-price { font-size: 17px; }

/* ---------- product page ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding-bottom: 30px; }
.gallery { display: grid; grid-template-columns: 1fr; gap: 12px; position: relative; }
.gallery-main { aspect-ratio: 3 / 4; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; }
.gallery-main img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.gallery-main { position: relative; }
.gm-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); color: var(--accent-dark); font-size: 30px; font-weight: 700; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .2s; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.gm-prev { left: 12px; }
.gm-next { right: 12px; }
.gallery-main:hover .gm-arrow { opacity: 1; }
@media (hover: none) { .gm-arrow { opacity: .9; } }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumbs img { width: 64px; height: 84px; object-fit: cover; border: 1px solid #eee; cursor: pointer; opacity: .65; }
.gallery-thumbs img.on { opacity: 1; border-color: var(--accent); }
.p-sku { color: var(--muted); font-size: 12px; }
.p-title { font-size: 22px; margin: 4px 0 8px; }
.p-price { display: flex; align-items: baseline; gap: 12px; font-size: 24px; font-weight: 700; margin-bottom: 14px; }
.p-price s { font-size: 14px; color: var(--muted); font-weight: 400; }
.opt-label { font-size: 13px; color: #555; margin: 12px 0 6px; }
.opt-values { display: flex; flex-wrap: wrap; gap: 6px; }
.opt-values button { border: 1px solid #e3e3e5; background: #fff; padding: 6px 12px; font-size: 12px; cursor: pointer; min-width: 52px; }
.opt-values button.on { border-color: var(--accent-dark); color: var(--accent-dark); }
.opt-values button.na { color: #b9bcc1; text-decoration: line-through; }
.brand-box { text-align: center; margin: 18px 0 8px; }
.brand-box img { max-height: 46px; margin: 0 auto 8px; }
.brand-box p { font-weight: 600; font-size: 12px; margin: 0; }
.brand-box a { color: var(--accent-dark); text-decoration: underline; }
.buy { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; margin: 16px 0; }
.buy .btn { padding: 14px 10px; }
.stock-note { font-size: 12px; color: var(--muted); }
.tabs { margin-top: 26px; }
.tabs details { border-top: 1px solid var(--line); padding: 14px 0; }
.tabs summary { font-weight: 600; cursor: pointer; }
.props { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin-top: 10px; font-size: 13px; }
.props dt { color: var(--muted); }
.props dd { margin: 0; }

/* ---------- home blocks: sizes from the constructor, shown on computers / phones ---------- */
.block[style*="--title-size"] h2 { font-size: var(--title-size); }
.block[style*="--text-size"] :is(.tiles .tile span, .tblock-text p, .gallery-block figcaption, .marquee a, .cloud a, .benefit p, .benefit b) { font-size: var(--text-size); }
.block[style*="--text-size"] .marquee img { width: calc(var(--text-size) * 1.5); height: calc(var(--text-size) * 1.5); }
.scroller.tiles { grid-auto-columns: calc((100% - (var(--per, 5) - 1) * 18px) / var(--per, 5)); }
/* Phones: all the section tiles at once, 3 in a row (no hidden ones to swipe to). */
@media (max-width: 899px) {
    .scroller.tiles { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(var(--mper, 3), minmax(0, 1fr)); gap: 16px 10px; overflow: visible; }
    .subtiles, .subtiles[style*="--per"] { display: grid; grid-template-columns: repeat(var(--mper, 3), minmax(0, 1fr)); gap: 16px 10px; overflow: visible; justify-content: center; }
    .subtiles .subtile { flex: none; min-width: 0; }
    .tiles .tile span, .subtile-title { font-size: var(--mts, 14px) !important; font-weight: var(--tw, 600); line-height: 1.25; }
}
@media (min-width: 769px) { .no-desktop { display: none !important; } }
@media (max-width: 768px) { .no-mobile { display: none !important; } }
/* The top menu switched off: the header over the home slider moves up into its place (in the constructor it stays shown). */
@media (min-width: 769px) { .home:not(.constructor) .topmenu.no-desktop + .header { top: 0; } }
@media (max-width: 768px) { .home:not(.constructor) .topmenu.no-mobile + .header { top: 0; } }
.constructor .no-desktop, .constructor .no-mobile { display: block !important; opacity: .4; }

/* ---------- home blocks added in the constructor: text with a picture, galleries ---------- */
.bg-soft { background: var(--soft); }
.bg-pink { background: #fff1f1; }
.tblock { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.tl-image-right .tblock-pic { order: 2; }
.tl-image-top, .tl-text { grid-template-columns: 1fr; }
.tl-text { max-width: 900px; }
.tl-image-top { text-align: center; }
.tl-image-top .tblock-pic img { margin: 0 auto; max-height: 520px; width: auto; max-width: 100%; }
.tblock-text p { margin: 0 0 12px; font-size: 15px; line-height: 1.65; color: #3a3d42; }
.tblock-text h2 { font-size: 24px; }
.tblock-text .btn { margin-top: 10px; }
.tblock-pic img { width: 100%; height: auto; border-radius: var(--radius); }
.gallery-block { display: grid; gap: 16px; }
.gallery-block figure { margin: 0; }
.gallery-block img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.gallery-block img[data-zoom] { cursor: zoom-in; }
.gallery-block figcaption { text-align: center; font-size: 13px; margin-top: 8px; }
.gal-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gal-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gal-carousel { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 16px) / 4); }
.gal-mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; }
.gal-mosaic figure:first-child { grid-column: span 2; grid-row: span 2; }
.gal-mosaic figure:first-child img { height: 100%; aspect-ratio: auto; }
@media (max-width: 899px) {
    .tblock { grid-template-columns: 1fr; gap: 20px; }
    .tl-image-right .tblock-pic { order: 0; }
    .gal-grid3, .gal-grid4, .gal-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gal-carousel { grid-auto-columns: 70%; }
}
/* Inside the constructor: hidden blocks stay visible, pale. */
.constructor .block-hidden { opacity: .4; }
.constructor .block { position: relative; min-height: 40px; }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20, 20, 22, .92); display: flex; align-items: center; justify-content: center; animation: fade-in .2s ease; }
.lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 60px); object-fit: contain; user-select: none; }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; border-radius: 50%; width: 52px; height: 52px; font-size: 30px; line-height: 1; }
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 18px; right: 18px; font-size: 22px !important; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; color: #ddd; font-size: 13px; }
@media (max-width: 768px) { .lightbox img { max-width: 100vw; } .lb-prev, .lb-next { width: 40px !important; height: 40px !important; } .lb-prev { left: 6px; } .lb-next { right: 6px; } }

/* ---------- text pages, cart, checkout ---------- */
.page-text { max-width: 1240px; padding-bottom: 40px; }
.page-body::after { content: ""; display: block; clear: both; }

/* ---------- ready-made decorations for text pages (inserted from the page editor) ---------- */
.tbtn { display: inline-block; padding: 14px 30px; font-weight: 700; font-size: 16px; text-decoration: none; text-align: center; cursor: pointer; transition: transform .15s, box-shadow .2s, filter .2s; line-height: 1.2; margin: 6px 4px; }
.tbtn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .14); filter: brightness(1.04); }
.tbtn-round { border-radius: 40px; }
.tbtn-soft { border-radius: 10px; }
.tbtn-square { border-radius: 0; }
.tbtn-pink { background: #FF8084; color: #fff !important; }
.tbtn-red { background: #ED383E; color: #fff !important; }
.tbtn-dark { background: #2B2D30; color: #fff !important; }
.tbtn-white { background: #fff; color: #ED383E !important; box-shadow: 0 2px 10px rgba(0, 0, 0, .1); }
.tbtn-outline { background: transparent; color: #ED383E !important; border: 2px solid #ED383E; }
.tbtn-glass { background: rgba(255, 128, 132, .18); color: #ED383E !important; border: 1px solid rgba(237, 56, 62, .35); backdrop-filter: blur(4px); }
.tbtn-gradient { background: linear-gradient(90deg, #FF8084, #ED383E); color: #fff !important; }
.tbtn-telegram { background: #2AABEE; color: #fff !important; }
.tbtn-whatsapp { background: #25D366; color: #fff !important; }
.tbtn-vk { background: #0077FF; color: #fff !important; }
.tbtn-max { background: linear-gradient(135deg, #2F80FF 0%, #7A4DFF 55%, #B44DFF 100%); color: #fff !important; }
.tbtn-small { padding: 9px 18px; font-size: 14px; }
.tbtn-big { padding: 18px 40px; font-size: 19px; }
.tbtn-wide { display: block; width: 100%; max-width: 520px; }
/* animations */
.anim-pulse { animation: t-pulse 1.8s ease-in-out infinite; }
.anim-shake { animation: t-shake 3s ease-in-out infinite; }
.anim-glow { animation: t-glow 2s ease-in-out infinite; }
.anim-bounce { animation: t-bounce 2s ease-in-out infinite; }
.anim-shine { position: relative; overflow: hidden; }
.anim-shine::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .55), transparent); animation: t-shine 2.6s ease-in-out infinite; }
@keyframes t-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes t-shake { 0%, 86%, 100% { transform: rotate(0); } 88% { transform: rotate(-4deg); } 90% { transform: rotate(4deg); } 92% { transform: rotate(-3deg); } 94% { transform: rotate(3deg); } 96% { transform: rotate(0); } }
@keyframes t-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 128, 132, .55); } 50% { box-shadow: 0 0 0 12px rgba(255, 128, 132, 0); } }
@keyframes t-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes t-shine { 0% { left: -60%; } 60%, 100% { left: 130%; } }
/* boxes, highlights, dividers */
.tbox { padding: 18px 22px; border-radius: 14px; margin: 14px 0; }
.tbox-pink { background: #fff1f1; border-left: 5px solid #FF8084; }
.tbox-soft { background: #f6f7f9; }
.tbox-frame { border: 2px dashed #FF8084; }
.tbox-dark { background: #2B2D30; color: #fff; }
.tbox-gradient { background: linear-gradient(135deg, #ffe3e3, #fff6ee); }
.tmark { background: linear-gradient(transparent 55%, #ffc9cb 55%); padding: 0 2px; }
.tbadge { display: inline-block; background: #ED383E; color: #fff; border-radius: 20px; padding: 3px 12px; font-size: .85em; font-weight: 700; }
.tline { border: 0; height: 2px; background: linear-gradient(90deg, transparent, #FF8084, transparent); margin: 26px 0; }
.tline-dots { border: 0; border-top: 3px dotted #FF8084; margin: 26px auto; width: 40%; }
@media (prefers-reduced-motion: reduce) { .anim-pulse, .anim-shake, .anim-glow, .anim-bounce, .anim-shine::after { animation: none; } }
.page-text img { height: auto; }
.cart-list { display: flex; flex-direction: column; gap: 14px; }
.cart-line { display: grid; grid-template-columns: 90px 1fr auto auto 28px; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.cart-line img { width: 90px; height: 110px; object-fit: cover; }
.qty { display: inline-flex; border: 1px solid #ddd; }
.qty button { border: 0; background: #fff; width: 30px; cursor: pointer; }
.qty input { width: 40px; text-align: center; border: 0; }
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 36px; align-items: start; }
.summary { background: var(--soft); padding: 22px; }
.summary .total { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; margin: 12px 0; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 13px; color: #555; }
.form input, .form textarea, .form select { border: 1px solid #ddd; padding: 10px 12px; background: #fff; width: 100%; }
.form .check { display: flex; gap: 8px; align-items: flex-start; color: var(--text); }
.form .check input { width: auto; margin-top: 3px; }
.note { white-space: pre-line; background: #fff6f6; border-left: 3px solid var(--accent); padding: 14px 16px; font-size: 13px; color: #444; }
.hidden-field { position: absolute; left: -5000px; }
.msg { padding: 12px 14px; margin: 10px 0; }
.msg.ok { background: #e9f7ee; color: #1d6b39; }
.msg.err { background: #fdeaea; color: #a1262b; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* ---------- toast, footer, bottom bar ---------- */
.toast { position: fixed; right: 20px; top: 20px; z-index: 100; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); padding: 16px 18px; display: none; gap: 12px; align-items: center; max-width: 360px; }
.toast.show { display: flex; }
.toast img { width: 54px; height: 66px; object-fit: cover; }
.footer { background: #fff; border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 90px; font-size: 13px; }
.footer .cols { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr) 1.2fr; gap: 28px; }
.footer b { display: block; margin-bottom: 10px; }
.footer a { display: block; padding: 3px 0; color: #444; }
.footer .socials { display: flex; gap: 10px; margin: 10px 0; }
.footer .socials a { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--accent-dark); }
.footer .logo img { width: 90px; }
.bottombar { display: none; }
.to-top { position: fixed; right: 18px; bottom: 18px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; display: none; z-index: 30; }
.to-top.show { display: block; }

/* ---------- phones ---------- */
@media (max-width: 899px) {
    .wrap { padding: 0 16px; }
    .header .wrap { grid-template-columns: auto 1fr auto; min-height: 64px; }
    .header-links { display: none; }
    .burger { display: inline-flex; color: var(--accent-dark); }
    .header-logo { justify-self: center; }
    .header-logo img { width: 64px; }
    .header-search { display: none; }
    .header-tools .hide-mobile { display: none; }
    .home .header { top: 41px; }
}
/* Phones: the slider's own pictures for phones (taller), shown whole. */
@media (max-width: 768px) {
}
@media (max-width: 899px) {
    .scroller { grid-auto-columns: 46%; }
    .new-row { grid-template-columns: 1fr 1fr; }
    .new-row .promo { grid-column: 1 / -1; }
    .banners2 { grid-template-columns: 1fr; }
    .news { grid-template-columns: 1fr; gap: 18px; }
    .news-promo img { height: auto; }
    .news-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
    .benefits { grid-template-columns: 1fr; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
    .catalog { grid-template-columns: 1fr; }
    .wrap.wide { padding: 0 16px; }
    .fbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
    .fbar .fdrop { min-width: 0; }
    .fdrop:nth-of-type(even) .fdrop-panel { left: auto; right: 0; }
    .fdrop-panel { max-width: calc(100vw - 32px); }
    .grid.wide-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
    .grid.related-grid[style*="--mcols"] { grid-template-columns: repeat(var(--mcols), minmax(0, 1fr)); }
    .filters { display: none; position: static; }
    .filters.open { display: block; }
    .filters-toggle { display: inline-flex; }
    .product { grid-template-columns: 1fr; gap: 20px; }
    .buy { grid-template-columns: 1fr 1fr; }
    .buy .fav { display: none; }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-line { grid-template-columns: 70px 1fr auto; }
    .cart-line img { width: 70px; height: 86px; }
    .cart-line .line-sum { display: none; }
    .footer .cols { grid-template-columns: 1fr 1fr; }
    .bottombar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); font-size: 10px; text-align: center; }
    .bottombar a { display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
    .bottombar svg { width: 22px; height: 22px; }
    .bottombar .badge { right: calc(50% - 18px); }
    .to-top { bottom: 76px; }
    .mobile-search { display: block !important; padding: 10px 16px; background: var(--header); }
    .mobile-search input { width: 100%; }
}
.mobile-search { display: none; }

/* «Каталог / Меню» in the header drawn as buttons (constructor → Шапка): compact, in the header's own font size. */
.header-links .hbtn { padding: 7px 16px; margin: 0; font-size: inherit; font-weight: inherit; display: inline-flex; align-items: center; -webkit-text-stroke: 0; }
.header-links .hbtn-plain { display: inline-block; }
.header-links .hdrop { display: flex; align-items: center; }
.header-links .hb-fill { background: var(--hb-bg); color: var(--hb-fg) !important; }
.header-links .hb-outline { background: transparent; color: var(--hb-fg) !important; border: 2px solid var(--hb-bg); }
.header-links .hb-glass { background: color-mix(in srgb, var(--hb-bg) 22%, transparent); color: var(--hb-fg) !important; border: 1px solid color-mix(in srgb, var(--hb-bg) 45%, transparent); backdrop-filter: blur(4px); }
.header-links .hb-gradient { background: linear-gradient(90deg, var(--hb-bg), var(--hb-bg2)); color: var(--hb-fg) !important; }
