/* =========================================================================
   ШАБЛОН 4 — «СТУДИЯ» (тёмный, модерн, левый сайдбар)
   Отличается от шаблонов 1 (тёмный индустриальный, верхняя панель, таблица),
   2 (светлый бирюзовый, карточки), 3 (кремовый editorial, аккордеон):
   фиксированный левый сайдбар вместо шапки, шрифт Space Grotesk, фиолетово-
   бирюзовый неон-акцент, прайс в виде «меню» с пунктирными лидерами.
   Данные те же (Quarry + prices).
   ========================================================================= */
:root {
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;

  --bg: #0e0f16;
  --panel: #171a26;
  --panel-2: #1e2230;
  --ink: #eaebf2;
  --ink-soft: #989bb2;
  --line: rgba(255,255,255,.09);
  --line-2: rgba(255,255,255,.14);

  --accent: #7c5cff;
  --accent-2: #2fe0c4;
  --accent-soft: rgba(124,92,255,.16);
  --on-accent: #ffffff;
  --good: #2fe0a8;

  --radius: 14px;
  --radius-lg: 20px;
  --sidebar: 264px;
  --shadow: 0 20px 50px -24px rgba(0,0,0,.7);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--ink); background: var(--bg); line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; color: var(--ink); letter-spacing: -.01em; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
section { scroll-margin-top: 30px; }

.eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .22em; font-size: 12px; font-weight: 600; color: var(--accent-2); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--accent-2); }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--font-head); font-weight: 600; font-size: 14px; padding: 13px 22px; border-radius: 11px; border: 1px solid transparent; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s, border-color .2s, color .2s; white-space: nowrap; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: linear-gradient(120deg, #8a6bff, #6b4dff); color: #fff; box-shadow: 0 14px 30px -14px var(--accent); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-glow { background: var(--accent-2); color: #06251f; }
.btn-glow:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; background: var(--accent-soft); }
.btn-lg { padding: 16px 28px; font-size: 15px; }
.btn-block { width: 100%; }

/* =========================================================================
   САЙДБАР
   ========================================================================= */
.sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar); height: 100vh; background: #12131d; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 28px 24px; z-index: 50; }
.s-brand { display: flex; align-items: center; gap: 12px; }
.s-brand .mark { width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #0e0f16; display: grid; place-items: center; flex: none; }
.s-brand .mark svg { width: 24px; height: 24px; }
.s-brand .name { font-family: var(--font-head); font-weight: 700; font-size: 18px; line-height: 1.05; }
.s-brand .sub { font-size: 12px; color: var(--ink-soft); }
.s-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 40px; }
.s-nav a { display: flex; align-items: center; gap: 12px; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); padding: 11px 12px; border-radius: 10px; transition: background .15s, color .15s; }
.s-nav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.s-nav a .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: background .15s; }
.s-nav a:hover .dot { background: var(--accent-2); }
.s-foot { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); }
.s-phone { display: block; font-family: var(--font-head); font-weight: 600; font-size: 19px; margin-bottom: 4px; }
.s-phone-label { font-size: 12px; color: var(--ink-soft); margin-bottom: 14px; }
.s-foot .btn { width: 100%; }

/* =========================================================================
   ОСНОВНОЙ СТОЛБЕЦ
   ========================================================================= */
.main { margin-left: var(--sidebar); }
.inner { width: min(1000px, 90%); margin: 0 auto; }
.section { padding: 70px 0; }
.section-head { margin-bottom: 36px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-top: 12px; }
.section-head p { color: var(--ink-soft); font-size: 16.5px; margin-top: 12px; max-width: 60ch; }

/* =========================================================================
   ГЕРОЙ
   ========================================================================= */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(620px 420px at 82% -8%, rgba(124,92,255,.32), transparent 60%),
    radial-gradient(540px 380px at 8% 110%, rgba(47,224,196,.14), transparent 60%),
    var(--bg); }
.hero::before { content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px; mask: radial-gradient(600px 400px at 75% 0%, #000, transparent 75%); }
/* фото в герое (картинка уже содержит сетку и свечение) */
.hero.has-photo { background: var(--bg); }
.hero.has-photo::before { display: none; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center right; z-index: 0; }
.hero-veil { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 72%, transparent) 38%, color-mix(in srgb, var(--bg) 10%, transparent) 70%, transparent 100%); }
.hero-inner { position: relative; z-index: 2; padding: 86px 0 70px; }
.hero .pill { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--ink); background: rgba(255,255,255,.05); border: 1px solid var(--line-2); padding: 7px 14px; border-radius: 999px; }
.hero .pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.hero h1 { font-size: clamp(40px, 6vw, 76px); margin: 22px 0 0; font-weight: 700; max-width: 18ch; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-subtitle { color: var(--ink-soft); font-family: var(--font-head); font-weight: 600; font-size: clamp(18px, 2.1vw, 25px); margin: 12px 0 0; max-width: 42ch; }
.hero-lead { color: var(--ink-soft); font-size: clamp(16px, 1.7vw, 20px); max-width: 48ch; margin-top: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; max-width: 620px; }
.hero-stat { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.hero-stat b { display: block; font-family: var(--font-head); font-weight: 700; font-size: 30px; color: #fff; line-height: 1; }
.hero-stat span { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 8px; }

/* =========================================================================
   ПРАЙС — «МЕНЮ» С ПУНКТИРНЫМИ ЛИДЕРАМИ
   ========================================================================= */
.price-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.price-updated4 { font-size: 13.5px; color: var(--ink-soft); }
.dl4 { display: flex; gap: 10px; }

.menu-cat { margin-bottom: 38px; }
.menu-cat:last-child { margin-bottom: 0; }
.menu-cat-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.menu-cat-head .idx { font-family: var(--font-head); font-weight: 600; color: var(--accent-2); font-size: 14px; }
.menu-cat-head h3 { font-size: 22px; }
.menu-cat-head .cnt { font-size: 13px; color: var(--ink-soft); margin-left: auto; }
.menu-row { display: flex; align-items: baseline; gap: 12px; padding: 13px 0; }
.menu-row + .menu-row { border-top: 1px solid var(--line); }
.m-name { font-weight: 600; font-size: 16px; }
.m-name small { font-weight: 500; color: var(--ink-soft); font-size: 13px; margin-left: 8px; }
.m-bulk { display: block; font-size: 12px; color: var(--accent-2); margin-top: 2px; }
.m-mid { flex: 1; }
.m-lead { display: block; border-bottom: 1px dotted var(--line-2); transform: translateY(-5px); }
.m-stock { font-size: 12px; color: var(--good); white-space: nowrap; }
.m-stock.out { color: var(--ink-soft); }
.m-price { font-family: var(--font-head); font-weight: 600; font-size: 18px; white-space: nowrap; }
.m-price small { font-weight: 400; font-family: var(--font-body); font-size: 12.5px; color: var(--ink-soft); }
.price-note4 { font-size: 13px; color: var(--ink-soft); margin-top: 26px; }

/* =========================================================================
   ПРЕИМУЩЕСТВА / ДЕТАЛИ — панели
   ========================================================================= */
.panel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.panel .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; background: var(--accent-soft); color: var(--accent); }
.panel .ico svg { width: 23px; height: 23px; }
.panel h3 { font-size: 19px; margin-bottom: 12px; }
.kv4 { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv4:last-child { border-bottom: 0; }
.kv4 .k { color: var(--ink-soft); }
.kv4 .v { font-weight: 600; text-align: right; }
.tp4 { padding: 9px 0; border-bottom: 1px solid var(--line); }
.tp4:last-child { border-bottom: 0; }
.tp4 b { display: block; font-size: 14.5px; }
.tp4 span { font-size: 12.5px; color: var(--ink-soft); }

/* =========================================================================
   КАРТА
   ========================================================================= */
.map-frame { display: grid; grid-template-columns: 1.5fr 1fr; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); }
.map-canvas { position: relative; min-height: 420px; background-color: #10121b;
  background-image:
    linear-gradient(0deg, rgba(124,92,255,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,92,255,.10) 1px, transparent 1px),
    radial-gradient(circle at 64% 44%, rgba(47,224,196,.14), transparent 58%);
  background-size: 40px 40px, 40px 40px, 100% 100%; }
.map-road { position: absolute; background: rgba(255,255,255,.06); }
.map-road.a { top: 0; bottom: 0; left: 60%; width: 14px; transform: rotate(-7deg); }
.map-road.b { left: 0; right: 0; top: 50%; height: 11px; }
.map-road.c { left: 16%; right: 30%; top: 28%; height: 7px; transform: rotate(5deg); }
.map-pin { position: absolute; left: 60%; top: 50%; transform: translate(-50%,-100%); display: flex; flex-direction: column; align-items: center; z-index: 3; }
.map-pin .dot { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; background: var(--accent); transform: rotate(-45deg); box-shadow: 0 0 22px var(--accent); border: 3px solid #0e0f16; }
.map-pin .tag { margin-top: 13px; background: #0e0f16; color: #fff; border: 1px solid var(--line-2); font-family: var(--font-head); font-size: 13px; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.map-side { padding: 34px; display: flex; flex-direction: column; }
.map-side h3 { font-size: 24px; margin-bottom: 10px; }
.map-side .addr { color: var(--ink-soft); font-size: 15px; line-height: 1.6; margin-bottom: 18px; }
.map-side .map-kv { font-size: 14px; color: var(--ink-soft); padding: 8px 0; border-top: 1px solid var(--line); }
.map-side .map-kv b { color: var(--ink); }
.map-kv .copy-coords-btn {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: 8px; padding: 2px 7px;
  border: 1px solid currentColor; border-radius: 6px;
  background: transparent; color: inherit; opacity: .65;
  font: inherit; font-size: 12px; line-height: 1.2;
  vertical-align: middle; cursor: pointer;
  transition: opacity .15s ease, color .15s ease;
}
.map-kv .copy-coords-btn:hover { opacity: 1; }
.map-kv .copy-coords-btn:focus-visible { opacity: 1; outline: 2px solid currentColor; outline-offset: 1px; }
.map-kv .copy-coords-btn__icon { display: block; }
.map-kv .copy-coords-btn__done { display: none; }
.map-kv .copy-coords-btn.is-copied { opacity: 1; color: #4caf50; }
.map-kv .copy-coords-btn.is-copied .copy-coords-btn__icon { display: none; }
.map-kv .copy-coords-btn.is-copied .copy-coords-btn__done { display: inline; }
.map-side .btn-row { margin-top: auto; padding-top: 22px; display: flex; flex-direction: column; gap: 10px; }

/* =========================================================================
   ДОКУМЕНТЫ
   ========================================================================= */
.doc-list4 { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.doc-row4 { display: flex; align-items: center; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; transition: border-color .2s, transform .12s; }
.doc-row4:hover { border-color: var(--accent); transform: translateY(-2px); }
.doc-row4 .ft { width: 42px; height: 50px; border-radius: 8px; flex: none; display: grid; place-items: end center; padding-bottom: 6px; font-family: var(--font-head); font-weight: 700; font-size: 11px; color: var(--accent-2); background: rgba(47,224,196,.1); border: 1px solid rgba(47,224,196,.25); }
.doc-row4 .ft--img { padding: 0; overflow: hidden; }
.doc-row4 .ft--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doc-row4 .d-main { flex: 1; min-width: 0; }
.doc-row4 .d-main b { font-family: var(--font-head); font-weight: 600; font-size: 15.5px; display: block; }
.doc-row4 .d-main span { font-size: 12.5px; color: var(--ink-soft); }
.doc-row4 .dl { color: var(--ink-soft); }
.doc-row4:hover .dl { color: var(--accent-2); }
.doc-row4 .dl svg { width: 22px; height: 22px; }
/* документ-картинка: крупное превью на всю ширину карточки, имя под ним */
.doc-row4.is-image { flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; position: relative; }
.doc-row4.is-image:hover { transform: translateY(-2px); }
.doc-row4.is-image .ft--img { width: 100%; height: 200px; border-radius: 0; }
.doc-row4.is-image .d-main { padding: 14px 18px; }
.doc-row4.is-image .dl { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); box-shadow: 0 4px 12px rgba(0,0,0,.3); color: #0f1420; }
.doc-row4.is-image .dl svg { width: 18px; height: 18px; }

/* =========================================================================
   ЗАЯВКА + ПОДВАЛ
   ========================================================================= */
.cta4 { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: radial-gradient(600px 300px at 80% 0%, rgba(124,92,255,.3), transparent 60%), var(--panel); padding: 50px; text-align: center; }
.cta4 h2 { font-size: clamp(26px, 3.4vw, 40px); }
.cta4 p { color: var(--ink-soft); margin: 12px auto 26px; font-size: 16.5px; max-width: 52ch; }
.cta4 .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.foot { border-top: 1px solid var(--line); margin-top: 70px; padding: 34px 0; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-soft); }

/* =========================================================================
   ПЕЧАТНЫЙ ПРАЙС
   ========================================================================= */
.print-sheet { display: none; }
@media print {
  body > *:not(.print-sheet) { display: none !important; }
  .print-sheet { display: block !important; color: #111; background: #fff; font-family: Arial, sans-serif; }
  .print-sheet h1 { font-size: 22px; }
  .print-sheet .ps-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 3px solid #111; padding-bottom: 12px; margin-bottom: 6px; }
  .print-sheet .ps-sub { color: #555; font-size: 12px; margin: 4px 0 18px; }
  .print-sheet table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .print-sheet th { text-align: left; background: #efeaff; padding: 7px 10px; border: 1px solid #ccc; }
  .print-sheet td { padding: 6px 10px; border: 1px solid #ddd; }
  .print-sheet td.num, .print-sheet th.num { text-align: right; }
  .print-sheet .ps-cat td { background: #e6dfff; font-weight: 700; }
  .print-sheet .ps-foot { margin-top: 18px; font-size: 11px; color: #555; display: flex; justify-content: space-between; }
  @page { margin: 14mm; }
}

/* =========================================================================
   АДАПТИВ — сайдбар превращается в верхнюю панель
   ========================================================================= */
@media (max-width: 960px) {
  .sidebar { position: static; width: auto; height: auto; flex-direction: row; align-items: center; padding: 14px 18px; }
  .s-nav { display: none; }
  .s-foot { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; align-items: center; gap: 14px; }
  .s-phone-label { display: none; }
  .s-phone { margin: 0; font-size: 16px; }
  .s-foot .btn { width: auto; }
  .main { margin-left: 0; }
  .hero-stats { grid-template-columns: 1fr; max-width: none; }
  .panel-grid { grid-template-columns: 1fr; }
  .map-frame { grid-template-columns: 1fr; }
  .map-canvas { min-height: 300px; }
}
@media (max-width: 560px) {
  .s-foot .btn { display: none; }
  .cta4 { padding: 34px 22px; }
  .menu-cat-head .cnt { display: none; }
}
