/* ─── Masqucerade INC. — публичная витрина, тёмный люкс ─── */
:root {
  --bg:        #0b0a09;
  --bg2:       #141210;
  --surface:   #1a1714;
  --line:      rgba(212, 180, 131, .14);
  --line2:     rgba(212, 180, 131, .28);
  --gold:      #d4b483;
  --gold-hi:   #efd9ae;
  --text:      #f2ede4;
  --text2:     #a89f90;
  --text3:     #6f685c;
  --sale:      #e8b04b;
  --radius:    20px;
  --font-d:    'Cormorant Garamond', Georgia, serif;
  --font-b:    'Manrope', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-weight: 300;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Зерно и свечения фона */
.bg-grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .04 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-glow {
  position: fixed; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: 0;
}
.bg-glow-1 {
  width: 60vmax; height: 60vmax; top: -25vmax; right: -20vmax;
  background: radial-gradient(circle, rgba(212,180,131,.10), transparent 65%);
}
.bg-glow-2 {
  width: 50vmax; height: 50vmax; bottom: -22vmax; left: -18vmax;
  background: radial-gradient(circle, rgba(120,90,50,.12), transparent 65%);
}

/* ─── Лендинг: две половины ─── */
.split-wrap {
  position: relative;
  display: flex;
  min-height: 100dvh;
}
.split-half {
  position: relative; flex: 1 1 50%;
  display: flex; align-items: center;
  overflow: hidden;
  transition: flex-basis .55s cubic-bezier(.4, 0, .2, 1);
}
@media (hover: hover) and (min-width: 761px) {
  .split-half:hover { flex-basis: 58%; }
}
.split-half .bg-grain, .split-half .bg-glow { position: absolute; }
.half-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 480px;
  margin: 0 auto;
  padding: 60px clamp(26px, 5vw, 56px);
  animation: half-in .8s cubic-bezier(.22, 1, .36, 1) both;
}
.half-type .half-inner { animation-delay: .12s; }
@keyframes half-in { from { opacity: 0; transform: translateY(26px); } }
@media (prefers-reduced-motion: reduce) {
  .half-inner { animation: none; }
  .split-half { transition: none; }
}

.half-kicker {
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase;
}
.half-title { margin-top: 14px; }
.half-desc { margin-top: 16px; font-size: 14px; line-height: 1.7; max-width: 340px; }
.half-cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 34px; font-size: 13px; letter-spacing: .08em;
  transition: gap .3s;
}
.split-half:hover .half-cta { gap: 16px; }

/* Слева — Monarc: тёмный люкс */
.half-monarc { background: var(--bg); color: var(--text); }
.half-monarc .half-kicker { color: var(--gold); }
.half-monarc .half-title {
  font-family: var(--font-d); font-weight: 500; font-style: italic;
  font-size: clamp(46px, 6.5vw, 84px); letter-spacing: .03em; color: var(--gold-hi);
}
.half-monarc .half-desc { color: var(--text2); }
.half-monarc .half-cta { color: var(--gold); }

/* Справа — Type Clothes: светлый минимализм */
.half-type { background: #f2f0eb; color: #17150f; }
.half-type .half-kicker { color: #9b968a; }
.half-type .half-title {
  font-family: var(--font-b); font-weight: 600; text-transform: uppercase;
  font-size: clamp(30px, 4.2vw, 54px); letter-spacing: .1em; line-height: 1.1;
}
.half-type .half-desc { color: #6d685c; }
.half-type .half-cta {
  color: #17150f; border-bottom: 1px solid #17150f; padding-bottom: 5px;
}

/* Медальон на шве */
.split-seal {
  position: absolute; z-index: 5;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 78px; height: 78px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(90deg, var(--bg) 50%, #f2f0eb 50%);
  border: 1px solid rgba(150, 135, 105, .45);
  font-family: var(--font-d); font-style: italic; font-size: 32px; color: var(--gold);
  pointer-events: none;
}

.split-foot {
  position: fixed; z-index: 6;
  bottom: calc(14px + env(safe-area-inset-bottom)); left: 0; right: 0;
  text-align: center;
  font-size: 10.5px; letter-spacing: .18em;
  color: #918c80; pointer-events: none;
}

@media (max-width: 760px) {
  .split-wrap { flex-direction: column; }
  .split-half { min-height: 50dvh; }
  .half-inner { text-align: center; padding: 48px 26px; }
  .half-desc { margin-left: auto; margin-right: auto; }
  .split-seal { width: 64px; height: 64px; font-size: 26px;
    background: linear-gradient(180deg, var(--bg) 50%, #f2f0eb 50%); }
}

/* Медальон в шапке каталога */
.brand-mark {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line2); border-radius: 50%;
  font-family: var(--font-d); font-size: 26px; font-style: italic; color: var(--gold);
}

/* ─── Каталог: шапка ─── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px clamp(18px, 4vw, 44px);
  background: rgba(11,10,9,.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-logo {
  display: flex; align-items: center; gap: 12px; justify-self: start;
  font-family: var(--font-d); font-size: 19px; letter-spacing: .05em;
}
.site-logo em { font-style: italic; color: var(--gold); }
.brand-mark-sm { width: 34px; height: 34px; margin: 0; font-size: 17px; }
/* Шапка Monarc: без медальона, только надпись — чуть крупнее */
body.theme-monarc .site-logo .brand-mark { display: none; }
body.theme-monarc .site-logo { font-size: 23px; }
.site-nav {
  display: flex; align-items: center; flex-wrap: wrap; justify-content: center;
  gap: clamp(14px, 2vw, 30px); justify-self: center; max-width: min(66vw, 720px);
}
.site-nav a {
  padding: 4px 0; background: none; border-radius: 0;
  font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text2); white-space: nowrap; cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--text); border-bottom-color: currentColor; }

/* Мега-меню раздела — панель во всю ширину, выпадает из-под шапки */
.hnav-group { display: inline-flex; }
.hnav-group > .hnav { display: inline-flex; align-items: center; gap: 5px; }
.hnav-group.active > .hnav { color: var(--text); border-bottom-color: currentColor; }
.hnav-caret { font-size: 8px; line-height: 1; transition: transform .2s; }
.hnav-group.open .hnav-caret { transform: rotate(180deg); }
.hnav-drop {
  /* абсолют к .site-header (sticky) — на всю ширину экрана, сразу под шапкой */
  position: absolute; top: 100%; left: 0; right: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 97%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 26px 54px rgba(0,0,0,.28);
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  pointer-events: none;
  transition: opacity .22s ease, transform .24s ease, visibility .22s;
  max-height: calc(100dvh - var(--header-h, 56px) - 20px); overflow-y: auto;
}
.hnav-group.open .hnav-drop { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.mega-inner {
  display: flex; align-items: flex-start; gap: clamp(40px, 7vw, 100px);
  max-width: 1400px; margin: 0 auto;
  padding: 30px clamp(18px, 4vw, 44px) 38px;
}
.mega-head { min-width: 170px; }
.mega-kicker { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--text3); }
.mega-title {
  font-family: var(--font-d); font-weight: 500; font-size: 30px;
  letter-spacing: .02em; margin-top: 6px; color: var(--text);
}
.mega-all {
  display: inline-block; margin-top: 14px; cursor: pointer;
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); border-bottom: 1px solid transparent; transition: border-color .2s;
}
.mega-all:hover { border-bottom-color: currentColor; }
.mega-col-title { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--text3); margin-bottom: 10px; }
.mega-links { display: grid; grid-auto-flow: column; grid-template-rows: repeat(5, auto); gap: 2px clamp(28px, 4vw, 56px); }
.hnav-sub {
  padding: 6px 0; font-size: 12.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text2); white-space: nowrap; cursor: pointer; transition: color .15s;
}
.hnav-sub:hover { color: var(--text); }
.hnav-sub.active { color: var(--text); }

/* ─── Фирменный скролл-бар: тонкий, золото на Monarc, чернила на Type ─── */
html { scrollbar-width: thin; scrollbar-color: rgba(212, 180, 131, .45) transparent; }
html:has(body.theme-type) { scrollbar-color: rgba(23, 21, 15, .35) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(212, 180, 131, .45);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(212, 180, 131, .7); background-clip: padding-box; }
html:has(body.theme-type) ::-webkit-scrollbar-thumb { background: rgba(23, 21, 15, .32); background-clip: padding-box; }
html:has(body.theme-type) ::-webkit-scrollbar-thumb:hover { background: rgba(23, 21, 15, .55); background-clip: padding-box; }

/* ─── Кнопки справа в шапке: поиск (всегда) + бургер (мобайл) ─── */
.header-side {
  grid-column: 3; justify-self: end;
  display: flex; align-items: center; gap: 2px; margin-right: -8px;
}
.search-btn {
  width: 42px; height: 42px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--text2);
  transition: color .2s;
}
.search-btn:hover { color: var(--text); }

/* ─── Поиск-оверлей ─── */
.search-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  opacity: 0; visibility: hidden; transform: translateY(-14px);
  transition: opacity .28s ease, transform .3s ease, visibility .28s;
}
.search-overlay.open { opacity: 1; visibility: visible; transform: none; }
.so-top {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.so-icon { flex-shrink: 0; color: var(--text3); }
.so-input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  color: var(--text); font-family: var(--font-b);
  font-size: 15px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
}
.so-input::placeholder { color: var(--text3); }
.so-label {
  padding: 20px 22px 4px;
  font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--text3);
}
.so-results { flex: 1; overflow-y: auto; padding: 4px 22px calc(26px + env(safe-area-inset-bottom)); }
.sr-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  color: var(--text);
}
.sr-thumb {
  width: 46px; height: 56px; flex-shrink: 0; overflow: hidden;
  background: var(--surface); border-radius: 6px;
}
.sr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sr-name {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.sr-meta { flex-shrink: 0; font-size: 13.5px; color: var(--text2); }
.sr-sold { font-style: normal; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text3); }
.sr-empty { padding: 34px 0; color: var(--text3); font-size: 14px; }

/* ─── Бургер и мобильное меню (≤640px) ─── */
.burger-btn {
  display: none; position: relative;
  width: 42px; height: 42px; padding: 0;
  background: none; border: none; cursor: pointer; color: var(--text);
}
.burger-btn span {
  position: absolute; left: 10px; right: 10px; height: 1.5px;
  background: currentColor; transition: transform .25s, top .25s;
}
.burger-btn span:nth-child(1) { top: 17px; }
.burger-btn span:nth-child(2) { top: 24px; }

.mob-menu {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  opacity: 0; visibility: hidden; transform: translateY(-14px);
  transition: opacity .28s ease, transform .3s ease, visibility .28s;
}
.mob-menu.open { opacity: 1; visibility: visible; transform: none; }
body.mob-lock { overflow: hidden; }

.mob-menu-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.mob-close {
  width: 42px; height: 42px; margin-right: -8px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--text2);
  transition: color .2s;
}
.mob-close:hover { color: var(--text); }

.mob-menu-body { flex: 1; overflow-y: auto; padding: 8px 22px 20px; }
.mob-acc-head, .mob-link {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 0; background: none; border: none; border-bottom: 1px solid var(--line);
  font-family: var(--font-d); font-size: 24px; font-weight: 500; letter-spacing: .02em;
  color: var(--text); text-align: left; cursor: pointer;
  transition: color .2s;
}
.mob-link.active { color: var(--gold); }
.mob-caret { flex-shrink: 0; color: var(--text3); transition: transform .28s; }
.mob-acc.open .mob-caret { transform: rotate(180deg); }
.mob-acc { border-bottom: 1px solid var(--line); }
.mob-acc .mob-acc-head { border-bottom: none; }
.mob-acc-body {
  max-height: 0; overflow: hidden;
  transition: max-height .32s ease;
}
.mob-acc.open .mob-acc-body { max-height: 520px; }
.mob-sub {
  display: block; padding: 11px 0 11px 16px;
  font-family: var(--font-b); font-size: 12.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text2); transition: color .15s;
}
.mob-sub:last-child { padding-bottom: 20px; }
.mob-sub.active { color: var(--gold); }
.mob-sub-all { color: var(--gold); }

.mob-menu-foot {
  padding: 16px 22px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.mob-menu-foot a, .mob-foot-link {
  font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text2); transition: color .2s;
}
.mob-menu-foot a:hover, .mob-foot-link:hover { color: var(--text); }
.mob-foot-link {
  display: block; padding: 0 0 14px;
  background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font-b);
}

/* Светлая тема Type: пункты капсом DM Sans, как у Gurbich */
body.theme-type .mob-acc-head, body.theme-type .mob-link {
  font-family: var(--font-b); font-size: 14.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
}

/* ─── Каталог: контент ─── */
.catalog-wrap {
  position: relative; z-index: 2;
  max-width: 1180px; margin: 0 auto;
  padding: clamp(30px, 6vh, 60px) clamp(18px, 4vw, 44px) 60px;
}
.catalog-kicker {
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--text3);
}
.catalog-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.hero-titles { min-width: 0; }
.catalog-hero h1 {
  font-family: var(--font-d); font-weight: 500;
  font-size: clamp(38px, 6vw, 62px); letter-spacing: .03em; margin-top: 8px;
}
/* Кнопка «Фильтры» (как у Gurbich) — открывает старые фильтры (тип одежды) */
.filters-btn {
  flex-shrink: 0; align-self: center; cursor: pointer;
  padding: 9px 20px; border-radius: 99px;
  border: 1px solid var(--line2); background: transparent; color: var(--text);
  font-family: var(--font-b); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  transition: color .2s, background .2s, border-color .2s;
}
.filters-btn:hover, .filters-btn.open { border-color: var(--text); }
.filters-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.filters-btn[hidden] { display: none; }

.cat-chips {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0 30px;
}
.cat-chips:empty { margin: 20px 0; }
.cat-chip {
  padding: 8px 16px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line); background: transparent;
  color: var(--text2); font-family: var(--font-b); font-size: 12.5px; letter-spacing: .04em;
  transition: color .2s, border-color .2s, background .2s;
}
.cat-chip:hover { color: var(--text); border-color: var(--line2); }
.cat-chip.active { color: var(--gold-hi); border-color: var(--line2); background: rgba(212,180,131,.09); }

/* Фильтр по категориям — липкая полоса под шапкой, горизонтальный скролл на узких */
.cat-filter {
  position: sticky; top: var(--header-h, 56px); z-index: 15;
  display: flex; flex-direction: column; gap: 9px;
  margin: 0 0 8px; padding: 14px 0;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.cat-filter[hidden] { display: none; }
.cat-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-row .cat-chip { flex-shrink: 0; }
/* Второй уровень — подкатегории: компактнее и мягче */
.cat-subrow { padding-left: 2px; }
.cat-chip.sub { padding: 6px 13px; font-size: 12px; border-radius: 99px; opacity: .95; }
.cat-chip.sub:not(.active) { background: color-mix(in srgb, var(--gold) 6%, transparent); }
.grid-heading { scroll-margin-top: calc(var(--header-h, 56px) + 90px); }

.goods-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.good-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg2); overflow: hidden; cursor: pointer;
  transition: border-color .3s, transform .3s;
}
.good-card:hover { border-color: var(--line2); transform: translateY(-3px); }
.good-photo {
  aspect-ratio: 4 / 5; background: var(--surface);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  position: relative;
}
.good-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.good-card:hover .good-photo img { transform: scale(1.04); }

/* Лента на фото: «Продано» (контраст) / «Зарезервировано» (акцент) */
.photo-ribbon {
  position: absolute; top: 38px; left: -58px; z-index: 2;
  width: 240px; padding: 6px 0; text-align: center;
  transform: rotate(-45deg);
  font-family: var(--font-b); font-size: 10px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  background: var(--text); color: var(--bg);
  box-shadow: 0 2px 12px rgba(0,0,0,.28);
  pointer-events: none;
}
.photo-ribbon.reserved { background: var(--gold); color: var(--bg); }
body.theme-type .photo-ribbon.reserved { background: var(--pink); color: #17150f; }
@media (max-width: 640px) {
  .photo-ribbon { top: 28px; left: -50px; width: 200px; font-size: 8.5px; letter-spacing: .1em; padding: 5px 0; }
}
.good-photo .no-photo { color: var(--text3); font-family: var(--font-d); font-style: italic; font-size: 15px; }

/* Фото — только витрина: без drag, лонг-тапа и «поиска по картинке» */
.good-photo img, .item-modal-photo img {
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.good-info { padding: 16px 18px 18px; }
.good-name {
  font-family: var(--font-d); font-size: 19px; font-weight: 500; letter-spacing: .02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.good-meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 7px;
}
.good-price { color: var(--gold-hi); font-size: 14px; font-weight: 500; letter-spacing: .03em; }
.good-sizes { color: var(--text3); font-size: 11.5px; letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.site-loader, .goods-empty {
  grid-column: 1 / -1; padding: 70px 0; text-align: center;
  color: var(--text3); font-family: var(--font-d); font-style: italic; font-size: 19px;
}

/* ─── Подборки ─── */
.collection-block { margin: 44px 0 10px; }
.collection-block:first-child { margin-top: 30px; }
.collection-kicker {
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--gold);
}
.week-kicker { font-weight: 600; color: var(--gold-hi); }
.week-block h2 { margin-top: 4px; }
.collection-block h2 {
  font-family: var(--font-d); font-weight: 500;
  font-size: clamp(26px, 4.5vw, 40px); letter-spacing: .03em; margin-top: 6px;
}
.collection-desc { color: var(--text2); font-size: 14px; line-height: 1.6; margin-top: 8px; max-width: 560px; }
/* Подборка — горизонтальная карусель: >4 товаров уезжают вправо, а не вниз */
.collection-grid {
  margin-top: 20px;
  display: flex; gap: 22px;
  overflow-x: auto; scroll-snap-type: x proximity;
  padding-bottom: 8px;
  /* системный скроллбар прячем полностью — в вебвью он рисуется огромным;
     о прокрутке говорят затухание у края и стрелка-шеврон */
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.collection-grid > .good-card { flex: 0 0 clamp(200px, 24%, 258px); scroll-snap-align: start; }
.collection-grid::-webkit-scrollbar { display: none; height: 0; }
/* ПК с мышью: карусель тянется перетаскиванием (ползунок спрятан) */
@media (hover: hover) and (pointer: fine) {
  .collection-grid { cursor: grab; }
  .collection-grid.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
  .collection-grid.dragging .good-card { pointer-events: none; }
}
.grid-heading {
  font-family: var(--font-d); font-weight: 500;
  font-size: clamp(26px, 4.5vw, 40px); letter-spacing: .03em;
  margin-top: 54px; padding-top: 40px;
  border-top: 1px solid var(--line);
}
.grid-heading[hidden] { display: none; }

/* ─── FAQ ─── */
.faq-section { margin-top: 70px; }
.faq-section h2 {
  font-family: var(--font-d); font-weight: 500; font-size: clamp(26px, 4vw, 36px);
  letter-spacing: .03em; margin-bottom: 22px;
}
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 4px; cursor: pointer; background: none; border: none;
  color: var(--text); font-family: var(--font-b); font-size: 15px; font-weight: 400;
  letter-spacing: .02em; text-align: left;
}
.faq-q svg { flex-shrink: 0; color: var(--gold); transition: transform .3s; }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .35s ease;
  color: var(--text2); font-size: 14px; line-height: 1.65;
}
.faq-a-inner { padding: 0 4px 20px; white-space: pre-wrap; }
.faq-a-inner b { color: var(--text); font-weight: 500; }
.faq-a-label { color: var(--gold); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin: 10px 0 4px; }

/* ─── Футер ─── */
.site-foot {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1180px; margin: 0 auto;
  padding: 22px clamp(18px, 4vw, 44px) calc(26px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--text3); font-size: 11.5px; letter-spacing: .1em;
}
.site-foot a { color: var(--gold); transition: color .2s; }
.site-foot a:hover { color: var(--gold-hi); }
.site-foot .foot-links { display: flex; gap: 20px; flex-shrink: 0; }
@media (max-width: 480px) {
  .site-foot { flex-direction: column; gap: 10px; align-items: flex-start; }
}

/* ─── Модалка товара ─── */
.item-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 18px; }
.item-modal[hidden] { display: none; }
.item-modal-backdrop { position: absolute; inset: 0; background: rgba(5,4,3,.72); backdrop-filter: blur(8px); }
.item-modal-card {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 380px);
  width: min(860px, 100%); max-height: min(640px, 92dvh);
  border: 1px solid var(--line2); border-radius: 24px; overflow: hidden;
  background: var(--bg2);
  animation: modal-in .3s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px); } }
.item-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(11,10,9,.6); backdrop-filter: blur(6px);
  border: 1px solid var(--line); color: var(--text2);
  transition: color .2s, border-color .2s;
}
.item-modal-close:hover { color: var(--text); border-color: var(--line2); }
.item-modal-photo {
  background: var(--surface); min-height: 300px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.item-modal-photo img { width: 100%; height: 100%; object-fit: cover; }
.item-modal-photo .no-photo { color: var(--text3); font-family: var(--font-d); font-style: italic; }
.item-modal-info { padding: 34px 30px 30px; overflow-y: auto; display: flex; flex-direction: column; }
.m-cat { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--text3); }
.item-modal-info h3 {
  font-family: var(--font-d); font-weight: 500; font-size: 30px; letter-spacing: .02em; margin-top: 8px;
}
.m-price { color: var(--gold-hi); font-size: 18px; font-weight: 500; margin-top: 12px; }
.m-sizes { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.m-sizes:empty { margin: 0; }
.m-size {
  padding: 6px 13px; border: 1px solid var(--line2); border-radius: 10px;
  font-size: 12.5px; letter-spacing: .05em; color: var(--text);
}
.m-desc { color: var(--text2); font-size: 14px; line-height: 1.7; margin-top: 18px; white-space: pre-wrap; }
.m-desc:empty { margin: 0; }
.tg-btn {
  margin-top: auto; padding: 14px 22px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 14px; background: var(--gold); color: #17130c;
  font-size: 14px; font-weight: 600; letter-spacing: .03em;
  transition: background .2s, transform .2s;
}
.tg-btn:hover { background: var(--gold-hi); transform: translateY(-1px); }
.m-desc + .tg-btn, .m-sizes + .tg-btn { margin-top: 26px; }

/* ─── Контент-блоки: промо / баннер / текст ─── */
.promo-bar {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 20px; text-align: center;
  background: var(--gold); color: var(--bg);
  font-family: var(--font-b); font-size: 12.5px; font-weight: 500; letter-spacing: .05em;
}
.promo-bar[hidden] { display: none; }   /* класс .promo-bar иначе перебивает [hidden] */
.promo-bar .promo-sep { opacity: .5; font-style: normal; }

#siteBlocks:not(:empty) { display: flex; flex-direction: column; gap: 30px; margin: 6px 0 46px; }

/* Универсальный баннер: высота задаётся классом banner-s/m/l/xl */
.block-banner {
  position: relative; display: flex; align-items: flex-end; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); text-decoration: none;
}
.block-banner img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transition: transform .5s ease;
}
a.block-banner:hover img { transform: scale(1.03); }
.banner-s  { min-height: clamp(150px, 24vw, 250px); }
.banner-m  { min-height: clamp(230px, 36vw, 400px); }
.banner-l  { min-height: clamp(320px, 50vw, 560px); }
.banner-xl { min-height: min(78vh, 800px); }
/* «Фото целиком» — без наезжающей плашки, подпись под фото не нужна тёмная */
.banner-contain img { transition: none; }
a.banner-contain:hover img { transform: none; }

/* .block-banner-cap используется баннером и старым двойным (duo) */
.block-banner-cap {
  position: relative; z-index: 1; width: 100%; padding: 30px;
  background: linear-gradient(0deg, rgba(0,0,0,.68) 0%, rgba(0,0,0,.12) 65%, rgba(0,0,0,0) 100%);
}
.block-banner-cap h2 {
  font-family: var(--font-d); font-weight: 500; line-height: 1.08;
  font-size: clamp(24px, 3.6vw, 40px); color: #fff;
}
.block-banner-cap p {
  margin-top: 9px; max-width: 560px; line-height: 1.5;
  color: rgba(255,255,255,.82); font-size: 14px;
}

.block-text { border-left: 2px solid var(--line2); padding: 4px 0 4px 22px; }
.block-text h2 {
  font-family: var(--font-d); font-weight: 500; letter-spacing: .02em;
  font-size: clamp(22px, 3vw, 30px); color: var(--text);
}
.block-text-body {
  margin-top: 10px; max-width: 620px; line-height: 1.7;
  color: var(--text2); font-size: 14.5px;
}

/* Слоган — крупное центрированное заявление */
.block-statement { text-align: center; padding: 26px 16px; }
.statement-kicker { font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.statement-text {
  font-family: var(--font-d); font-weight: 500; line-height: 1.12; letter-spacing: .01em;
  color: var(--text); font-size: clamp(30px, 5.4vw, 60px); max-width: 900px; margin: 0 auto;
}

/* Бегущая строка */
.block-marquee {
  display: flex; overflow: hidden; padding: 16px 0; user-select: none;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.marquee-inner { display: flex; flex-shrink: 0; animation: marquee 30s linear infinite; }
.marquee-seg {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-family: var(--font-d); font-style: italic; color: var(--text);
  font-size: clamp(22px, 3vw, 34px);
}
.marquee-star { color: var(--gold); font-style: normal; margin: 0 26px; font-size: .7em; }
.block-marquee:hover .marquee-inner { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .marquee-inner { animation: none; } }

/* Двойной баннер */
.block-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.duo-tile {
  position: relative; display: flex; align-items: flex-end; overflow: hidden;
  min-height: 260px; border-radius: var(--radius); border: 1px solid var(--line);
  background: #17150f; text-decoration: none;
}
.duo-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
a.duo-tile:hover img { transform: scale(1.04); }
.duo-tile .block-banner-cap {
  position: relative; z-index: 1; width: 100%; padding: 24px;
  background: linear-gradient(0deg, rgba(0,0,0,.66) 0%, rgba(0,0,0,0) 100%);
}
.duo-tile .block-banner-cap h2 { font-family: var(--font-d); font-weight: 500; font-size: clamp(20px, 2.6vw, 30px); color: #fff; line-height: 1.1; }

/* Индикатор карусели — мягкое затухание + изящные шевроны по краям */
.collection-head { display: flex; align-items: center; gap: 12px; }
.collection-carousel { position: relative; }
.collection-carousel::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 8px; width: 80px;
  pointer-events: none; opacity: 0; transition: opacity .35s;
  background: linear-gradient(90deg, transparent, var(--bg) 78%);
}
.collection-block.scrollable:not(.at-end) .collection-carousel::after { opacity: 1; }
/* Затухание слева — когда карусель уже прокручена вправо */
.collection-carousel::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 8px; width: 80px; z-index: 1;
  pointer-events: none; opacity: 0; transition: opacity .35s;
  background: linear-gradient(270deg, transparent, var(--bg) 78%);
}
.collection-block.scrollable:not(.at-start) .collection-carousel::before { opacity: 1; }

.carousel-next, .carousel-prev {
  position: absolute; z-index: 2; top: 50%; margin-top: -21px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line2); color: var(--gold);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .35s, background .2s, transform .2s;
}
.carousel-next { right: 12px; }
.carousel-prev { left: 12px; }
.carousel-next svg { transform: translateX(1px); }
.carousel-prev svg { transform: translateX(-1px); }
.carousel-next:hover, .carousel-prev:hover { background: var(--bg); border-color: var(--gold); }
.collection-block.scrollable:not(.at-end) .carousel-next { opacity: 1; pointer-events: auto; }
.collection-block.scrollable:not(.at-start) .carousel-prev { opacity: 1; pointer-events: auto; }

@media (max-width: 640px) {
  .block-duo { grid-template-columns: 1fr; }
  .duo-tile { min-height: 220px; }
}

/* ─── Мобильные ─── */
@media (max-width: 640px) {
  .portal-cards { flex-direction: column; max-width: 420px; }
  .portal-num { margin-bottom: 26px; }
  .goods-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .good-info { padding: 12px 13px 14px; }
  .good-name { font-size: 16px; }
  .good-meta { flex-direction: column; align-items: flex-start; gap: 3px; }
  .item-modal { padding: 0; align-items: flex-end; }
  .item-modal-card {
    grid-template-columns: 1fr; width: 100%; max-height: 94dvh;
    border-radius: 24px 24px 0 0; border-bottom: none;
    animation: sheet-in .35s ease;
  }
  @keyframes sheet-in { from { transform: translateY(60px); opacity: 0; } }
  .item-modal-photo { aspect-ratio: 4 / 3; min-height: 0; }
  .item-modal-info { padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
  /* Шапка: логотип слева, бургер справа; навигация — в полноэкранном меню */
  .site-nav { display: none; }
  .burger-btn { display: block; }
  /* Мега-меню на мобильном: колонки в столбик, компактные отступы */
  .mega-inner { flex-direction: column; gap: 20px; padding: 20px 18px 26px; }
  .mega-title { font-size: 24px; }
  .mega-links { grid-auto-flow: row; grid-template-rows: none; }
  /* Затухание у карусели — заметно мягче, чем на десктопе */
  .collection-carousel::after {
    width: 34px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bg) 72%, transparent));
  }
}

/* ─── Тема Type Clothes: светлый минимализм (COS-подход) ───
   Переопределяем токены — вся разметка остаётся общей. */
body.theme-type {
  --bg:      #fafafa;
  --bg2:     #ffffff;
  --surface: #f2f1ee;
  --line:    rgba(23, 21, 15, .10);
  --line2:   rgba(23, 21, 15, .22);
  --gold:    #17150f;   /* акцент — чернила вместо золота */
  --gold-hi: #0f0f0f;
  --text:    #17150f;
  --text2:   #6d685c;
  --text3:   #9b968a;
  --pink:    #ffc6d4;   /* акцент-тег наличия (в стиле Gurbich) */
  --radius:  10px;
  --font-b:  'DM Sans', 'Manrope', -apple-system, sans-serif;
  font-family: var(--font-b);
}
body.theme-type .bg-grain { display: none; }
body.theme-type .site-header {
  background: rgba(246, 245, 241, .86);
  border-bottom-color: rgba(23, 21, 15, .08);
}
body.theme-type .catalog-hero h1,
body.theme-type .grid-heading,
body.theme-type .collection-block h2,
body.theme-type .faq-section h2 {
  font-family: var(--font-b);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: clamp(26px, 4.2vw, 44px);
}
body.theme-type .good-name {
  font-family: var(--font-b);
  font-size: 13.5px; font-weight: 500; letter-spacing: .03em;
}
body.theme-type .good-card { background: #ffffff; }
body.theme-type .good-photo .no-photo,
body.theme-type .item-modal-photo .no-photo { color: #c4c0b4; }
body.theme-type .item-modal-info h3 {
  font-family: var(--font-b); font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; font-size: 22px;
}
body.theme-type .item-modal-backdrop { background: rgba(40, 38, 32, .45); }
body.theme-type .tg-btn { background: #17150f; color: #f6f5f1; }
body.theme-type .tg-btn:hover { background: #000; }
body.theme-type .site-nav a.active { background: none; color: var(--text); border-bottom-color: currentColor; }
body.theme-type .cat-chip.active { background: #17150f; color: #f6f5f1; border-color: #17150f; }

/* ─── Gurbich-стиль для Type: галерея + теги наличия ─── */
/* Просторный грид как у Gurbich (3 колонки, разделение воздухом) */
body.theme-type .goods-grid { grid-template-columns: repeat(3, 1fr); gap: 30px 24px; background: transparent; }
body.theme-type .good-card {
  background: transparent; border: none; border-radius: 0; transition: none;
}
body.theme-type .good-card:hover { transform: none; }
body.theme-type .good-photo { background: #fff; }
body.theme-type .good-card:hover .good-photo img { transform: scale(1.03); }
body.theme-type .good-info { padding: 14px 16px 20px; }
/* Название — КАПС DM Sans, как у Gurbich */
body.theme-type .good-name {
  text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
  font-size: 13px; line-height: 1.35;
}
body.theme-type .good-price { color: var(--text); font-weight: 600; }
body.theme-type .good-sizes { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }

/* Тег наличия — виден только на Type */
.good-tag { display: none; }
body.theme-type .good-tag {
  display: inline-flex; align-items: center; margin-top: 9px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 4px;
}
body.theme-type .good-tag.in-stock { background: #17150f; color: #faf9f6; }
body.theme-type .good-tag.preorder { background: #e7e5e0; color: #6d685c; }

@media (max-width: 720px) {
  body.theme-type .goods-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Обложка раздела: полноэкранное превью над каталогом ─── */
.site-cover {
  position: relative;
  /* svh, не dvh: высота не «дышит» при скролле на мобильных
     (динамический viewport дёргал страницу — скролл казался сломанным) */
  height: calc(100vh - var(--header-h, 56px));
  height: calc(100svh - var(--header-h, 56px));
  min-height: 420px;
  overflow: hidden;
  background: var(--bg2);
}
.site-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none; -webkit-user-drag: none; user-select: none;
}
/* Режим «Фото целиком»: во всю ширину экрана, высота по самому фото */
.site-cover.fit-auto { height: auto; min-height: 0; }
.site-cover.fit-auto img { height: auto; }
/* Есть обложка → заголовок раздела не дублируем, а кнопка «Фильтры»
   переезжает в строку заголовка «Все товары» (как у Gurbich) */
body.has-cover .catalog-hero { display: none; }
body.has-cover .catalog-wrap { padding-top: clamp(18px, 3.4vh, 34px); }

/* Строка заголовка грида: слева «Все товары», справа кнопка «Фильтры».
   Вертикальные отступы заголовка переезжают на строку — иначе
   flex-центрирование кнопки сбивается его margin/padding. */
.grid-head-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 94px;   /* 54 + бывший padding 40 заголовка */
}
.grid-head-row .grid-heading { margin-top: 0; padding-top: 0; }
.grid-head-row .catalog-tools { flex-shrink: 0; }
/* Заголовок скрыт (пусто без фильтра) — строка не занимает место без кнопки */
.grid-head-row:not(:has(.filters-btn:not([hidden]))):has(.grid-heading[hidden]) { display: none; }
.sc-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--bg) 78%, transparent) 100%);
}
.sc-caption {
  position: absolute; left: 0; right: 0; bottom: 64px;
  padding: 0 clamp(18px, 4vw, 44px);
  text-align: center; color: var(--text);
}
.sc-caption h2 {
  font-family: var(--font-d); font-weight: 500;
  font-size: clamp(34px, 6vw, 64px); letter-spacing: .03em; line-height: 1.1;
}
body.theme-type .sc-caption h2 {
  font-family: var(--font-b); font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; font-size: clamp(26px, 4.6vw, 48px);
}
.sc-caption p {
  margin-top: 10px;
  font-size: 12.5px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text2);
}
.sc-scroll {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--text2);
  animation: sc-bounce 2.2s ease-in-out infinite;
  transition: color .2s;
}
.sc-scroll:hover { color: var(--text); }
@keyframes sc-bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(7px); } }
@media (prefers-reduced-motion: reduce) { .sc-scroll { animation: none; } }

/* ─── Scroll-reveal: контент всплывает при входе в вьюпорт ─── */
.rv {
  opacity: 0; transform: translateY(22px);
  transition: opacity .6s ease, transform .65s cubic-bezier(.2, .6, .2, 1);
}
.rv-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
}

/* ─── Скидка: перечёркнутая старая цена + бейдж −N% ─── */
.old-price {
  margin-left: 6px;
  color: var(--text3); font-size: .85em; font-weight: 400;
  text-decoration-thickness: 1px;
}
.disc-badge {
  display: inline-block; vertical-align: 2px; margin-left: 7px;
  padding: 2px 7px; border-radius: 5px;
  font-style: normal; font-family: var(--font-b);
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  background: var(--gold); color: var(--bg);
}
body.theme-type .disc-badge { background: var(--pink); color: #17150f; }

/* ─── Попап при заходе на сайт ─── */
.site-popup {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 22px;
  background: rgba(8, 7, 6, .58);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.site-popup.open { opacity: 1; pointer-events: auto; }
.sp-card {
  position: relative; width: min(430px, 100%);
  background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 34px 90px rgba(0, 0, 0, .45);
  transform: translateY(16px) scale(.98); transition: transform .35s ease;
}
.site-popup.open .sp-card { transform: none; }
.sp-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  color: var(--text); border: 1px solid var(--line); cursor: pointer;
  transition: border-color .2s;
}
.sp-close:hover { border-color: var(--line2); }
.sp-img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.sp-body { padding: 26px 24px 28px; text-align: center; }
.sp-head { font-family: var(--font-d); font-size: 26px; font-weight: 500; color: var(--text); line-height: 1.2; }
body.theme-type .sp-head {
  font-family: var(--font-b); font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; font-size: 19px;
}
.sp-text { margin-top: 10px; color: var(--text2); font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.sp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 18px; padding: 12px 26px; border-radius: 99px;
  background: var(--gold); color: var(--bg);
  font-family: var(--font-b); font-size: 12.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  transition: opacity .2s;
}
.sp-btn:hover { opacity: .88; }
body.theme-type .sp-btn { background: #17150f; color: #f6f5f1; }

/* ─── Мультифото ─── */
.item-modal-photo { position: relative; }
.m-thumbs {
  position: absolute; left: 0; right: 0; bottom: 10px; z-index: 2;
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
  padding: 0 10px;
}
.m-thumb {
  width: 44px; height: 44px; border-radius: 10px; overflow: hidden;
  padding: 0; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.35); background: var(--surface);
  opacity: .75; transition: opacity .2s, border-color .2s;
}
.m-thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.m-thumb.active { opacity: 1; border-color: var(--gold-hi); }

/* ─── Замеры и посадка ─── */
.m-fit { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.m-fit[hidden] { display: none; }
.m-fit-head {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 12px 14px; cursor: pointer;
  background: none; border: none; text-align: left;
  color: var(--text); font-family: var(--font-b); font-size: 13px; letter-spacing: .04em;
}
.m-fit-head svg:first-child { color: var(--gold); }
.m-fit-chevron { margin-left: auto; color: var(--text3); transition: transform .25s; }
.m-fit.open .m-fit-chevron { transform: rotate(180deg); }
.m-fit-body {
  display: none; padding: 0 14px 13px;
  color: var(--text2); font-size: 13.5px; line-height: 1.65; white-space: pre-wrap;
}
.m-fit.open .m-fit-body { display: block; }

/* ─── Большие экраны (ПК-мониторы): шире контейнер, крупнее сетка ─── */
@media (min-width: 1560px) {
  .catalog-wrap, .site-foot, .mega-inner { max-width: 1440px; }
  .goods-grid { grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 26px; }
  body.theme-type .goods-grid { grid-template-columns: repeat(4, 1fr); }
  .collection-grid > .good-card { flex-basis: clamp(232px, 19%, 292px); }
  .item-modal-card {
    grid-template-columns: minmax(0, 560px) minmax(0, 440px);
    width: min(1020px, 100%); max-height: min(760px, 92dvh);
  }
}

/* ─── Карточка-ссылка и «Продано» ─── */
.good-card { display: block; color: inherit; text-decoration: none; }
.good-card.sold .good-price { color: var(--text3); }
.good-tag.sold { background: transparent; }
body.theme-type .good-tag.sold { background: #e7e5e0; color: #9b968a; }

/* ─── Панель фильтров: тип / бренд / цена ─── */
.cat-row { align-items: center; }
.cat-row + .cat-row { margin-top: 10px; }
.cat-row-label {
  flex-shrink: 0; min-width: 44px;
  font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text3);
}
.price-range { display: inline-flex; align-items: center; gap: 7px; margin-left: 6px; }
.price-range i { font-style: normal; color: var(--text3); }
.price-range input {
  width: 96px; padding: 7px 12px; border-radius: 99px;
  border: 1px solid var(--line2); background: transparent; color: var(--text);
  font-family: var(--font-b); font-size: 12.5px; outline: none;
  transition: border-color .2s;
  -moz-appearance: textfield;
}
.price-range input::-webkit-outer-spin-button,
.price-range input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.price-range input:focus { border-color: var(--text); }
.price-range input::placeholder { color: var(--text3); }

/* ─── Кнопки каталога: «Фильтры» + мини-кнопка сортировки ─── */
.catalog-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; align-self: center; }
.sort-wrap { position: relative; display: flex; }
.sort-wrap[hidden] { display: none; }
.sort-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 99px; cursor: pointer; padding: 0;
  border: 1px solid var(--line2); background: transparent; color: var(--text);
  transition: color .2s, background .2s, border-color .2s;
}
.sort-btn:hover, .sort-btn.open { border-color: var(--text); }
.sort-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.sort-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  min-width: 186px; padding: 6px; border-radius: 14px;
  border: 1px solid var(--line2); background: var(--bg2);
  box-shadow: 0 12px 34px rgba(0,0,0,.35);
  display: flex; flex-direction: column; gap: 2px;
  animation: sort-pop .16s ease;
}
.sort-menu[hidden] { display: none; }
@keyframes sort-pop { from { opacity: 0; transform: translateY(-4px); } }
.sort-item {
  padding: 9px 13px; border: 0; border-radius: 9px; cursor: pointer; text-align: left;
  background: transparent; color: var(--text2);
  font-family: var(--font-b); font-size: 12.5px; letter-spacing: .04em;
  transition: background .15s, color .15s;
}
.sort-item:hover { background: rgba(255,255,255,.06); color: var(--text); }
.sort-item.active { color: var(--gold-hi); background: rgba(212,180,131,.09); }
body.theme-type .sort-menu { box-shadow: 0 12px 34px rgba(0,0,0,.12); }
body.theme-type .sort-item:hover { background: rgba(0,0,0,.05); }
body.theme-type .sort-item.active { background: #17150f; color: #f6f5f1; }

/* ─── Износ вещи: подпись на странице товара ─── */
.p-cond {
  margin: -2px 0 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text2);
}
.p-cond.cond-new { color: var(--gold-hi); }
body.theme-type .p-cond.cond-new { color: #17150f; }

/* ─── Подсказка-стрелка «вниз» (как .sc-scroll на обложке) ─── */
.scroll-hint {
  position: fixed; left: 50%; bottom: 18px; z-index: 40;
  transform: translateX(-50%); opacity: 0; pointer-events: none;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--text3);
  transition: opacity .4s, color .2s;
}
.scroll-hint.visible { opacity: .85; pointer-events: auto; }
.scroll-hint[hidden] { display: none; }
.scroll-hint:hover { color: var(--text2); }
.scroll-hint svg {
  animation: sc-bounce-y 2.2s ease-in-out infinite;
  /* Лёгкая тень — чтобы стрелка не терялась на светлом фото */
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.35));
}
@keyframes sc-bounce-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint svg { animation: none; } }

/* ─── Страница товара /product/:id ─── */
.product-wrap {
  position: relative; z-index: 2;
  max-width: 1180px; margin: 0 auto;
  padding: clamp(26px, 5vh, 50px) clamp(18px, 4vw, 44px) 70px;
}
.product-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 4vw, 56px); align-items: start;
}
.product-gallery { position: sticky; top: calc(var(--header-h, 56px) + 22px); }
.p-photo-main {
  position: relative; overflow: hidden; cursor: zoom-in;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); aspect-ratio: 4 / 5;
  display: flex; align-items: center; justify-content: center;
}
.p-photo-main img { width: 100%; height: 100%; object-fit: cover; }
.p-photo-main .no-photo { color: var(--text3); font-family: var(--font-d); font-style: italic; font-size: 17px; }
.sold-overlay {
  position: absolute; left: 14px; bottom: 14px; z-index: 1;
  padding: 7px 16px; border-radius: 99px;
  background: rgba(10,9,8,.78); color: #f5f3ee;
  font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.p-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.p-thumb {
  width: 62px; height: 62px; border-radius: 10px; overflow: hidden; padding: 0;
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
  opacity: .65; transition: opacity .2s, border-color .2s;
}
.p-thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.p-thumb.active { opacity: 1; border-color: var(--gold-hi); }
.product-info { min-width: 0; }
.p-name {
  font-family: var(--font-d); font-weight: 500; line-height: 1.12;
  font-size: clamp(28px, 4vw, 42px); letter-spacing: .02em; margin: 8px 0 10px;
}
.p-sold-tag {
  display: inline-block; margin: 4px 0 6px; padding: 7px 16px; border-radius: 99px;
  border: 1px solid var(--line2); color: var(--text2);
  font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
}
.p-sold-note { margin-top: 16px; color: var(--text2); font-size: 14px; line-height: 1.6; }
.p-note { margin-top: 12px; color: var(--text3); font-size: 11.5px; letter-spacing: .08em; }
.tg-btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line2); }
.tg-btn.ghost:hover { border-color: var(--text); }
.related-sec { margin-top: clamp(50px, 8vh, 90px); }
.related-sec h2 {
  font-family: var(--font-d); font-weight: 500;
  font-size: clamp(24px, 3.6vw, 34px); letter-spacing: .03em; margin-bottom: 22px;
  padding-top: 36px; border-top: 1px solid var(--line);
}

/* ─── Полноэкранный просмотр фото ─── */
.photo-zoom {
  position: fixed; inset: 0; z-index: 90; cursor: zoom-out;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5,4,3,.92); backdrop-filter: blur(10px);
  padding: 4vh 4vw; animation: zoom-in .2s ease;
}
.photo-zoom[hidden] { display: none; }
.photo-zoom img { max-width: 100%; max-height: 100%; border-radius: 8px; }
@keyframes zoom-in { from { opacity: 0; } }

@media (max-width: 760px) {
  .product-grid { grid-template-columns: 1fr; gap: 22px; }
  .product-gallery { position: static; }
  .price-row { flex-wrap: wrap; }
  .price-range { margin-left: 0; }
}
@media (min-width: 1560px) {
  .product-wrap { max-width: 1320px; }
}
