/* iДжобс — стиль в духе pedant.ru: синий + жёлтый, крупные скругления, мягкие тени. */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-card: #ffffff;
  --navy: #051a3d;          /* заголовки */
  --text: #26334a;
  --text-soft: #6a7b92;
  --border: #d5dbe4;
  --blue: #0c5bb9;          /* основной акцент */
  --blue-hover: #0a4f9f;
  --blue-dark: #00309d;
  --yellow: #fec12a;        /* жёлтый акцент */
  --yellow-hover: #f0b016;
  --on-yellow: #051a3d;     /* тёмные чернила на жёлтом — фиксированы, не зависят от темы */
  --shadow: 0 6px 24px rgba(5, 26, 61, .08);
  --shadow-sm: 0 2px 10px rgba(5, 26, 61, .06);
  --radius: 20px;
  --radius-sm: 14px;
  --maxw: 1180px;
}
[data-theme="dark"] {
  --bg: #0d1526;
  --bg-soft: #131d33;
  --bg-card: #16213a;
  --navy: #eaf1fb;
  --text: #d6deea;
  --text-soft: #93a2ba;
  --border: #26324a;
  --blue: #3d8be0;
  --blue-hover: #59a0ec;
  --shadow: 0 6px 24px rgba(0, 0, 0, .4);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; color: var(--navy); font-weight: 700; letter-spacing: -.01em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.muted { color: var(--text-soft); }

/* ── Кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid transparent; border-radius: 40px;
  padding: 12px 26px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-accent { background: var(--yellow); color: var(--on-yellow); }
.btn-accent:hover { background: var(--yellow-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--navy); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-lg { padding: 15px 34px; font-size: 16px; }

/* ── Шапка (pedant-style): верхняя строка + панель категорий ── */
.site-header { background: var(--bg); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }

.topbar { border-bottom: 1px solid var(--border); position: relative; }
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 8px 0; }
.logo-img { height: 72px; width: auto; border-radius: 50%; }
.top-badge {
  background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 20px;
  border-radius: 14px; padding: 8px 15px; line-height: 1;
}
.top-tagline { color: var(--text-soft); font-size: 13px; line-height: 1.35; max-width: 300px; }
.top-tagline b { color: var(--navy); font-size: 14px; }
.top-spacer { flex: 1; }
.top-links { display: flex; gap: 18px; }
.top-links a { font-size: 14px; font-weight: 500; color: var(--text-soft); }
.top-links a:hover, .top-links a.active { color: var(--blue); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.top-phone { color: var(--blue); font-weight: 800; font-size: 18px; white-space: nowrap; }
.top-contacts { display: flex; gap: 26px; }
.top-contact { line-height: 1.3; }
.tc-addr { display: block; font-size: 12px; color: var(--text-soft); }
.tc-phone { display: block; font-size: 15px; font-weight: 800; color: var(--blue); white-space: nowrap; }
.tc-phone:hover { text-decoration: underline; }
.theme-toggle {
  background: var(--bg-soft); border: none; border-radius: 40px;
  cursor: pointer; font-size: 15px; padding: 7px 11px; color: var(--navy);
}
[data-theme="dark"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: none; }
.nav-burger { display: none; background: none; border: none; color: var(--navy); font-size: 26px; cursor: pointer; }

/* Панель категорий */
.catbar { background: var(--bg); }
.catnav { display: flex; }
.catnav-item { position: relative; }
.catnav-link { display: block; padding: 11px 24px; border-right: 1px solid var(--border); }
.catnav-item:first-child .catnav-link { border-left: 1px solid var(--border); }
.cat-sub { display: block; font-size: 12px; color: var(--text-soft); }
.cat-main { display: block; font-size: 16px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.cat-main .caret { color: var(--blue); font-size: 11px; }
.catnav-item:hover .catnav-link { background: var(--bg-soft); }
.catnav-drop {
  position: absolute; top: 100%; left: 0; min-width: 280px;
  background: var(--bg-card); border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 14px 14px; box-shadow: var(--shadow); padding: 8px; display: none; z-index: 60;
  max-height: 76vh; overflow-y: auto;
}
.drop-arrow { color: var(--text-soft); font-weight: 700; }
.drop-item:hover .drop-arrow { color: var(--blue); }
.catnav-item:hover .catnav-drop, .catnav-item:focus-within .catnav-drop, .catnav-item.open .catnav-drop { display: block; }
.drop-item {
  display: flex; justify-content: space-between; gap: 18px; align-items: baseline;
  padding: 10px 14px; border-radius: 8px; color: var(--navy); font-size: 14px;
}
.drop-item:hover { background: var(--bg-soft); color: var(--blue); }
.drop-item .price { color: var(--text-soft); font-weight: 600; white-space: nowrap; }
.drop-all { display: block; padding: 11px 14px; margin-top: 4px; border-top: 1px solid var(--border);
  color: var(--blue); font-weight: 600; font-size: 14px; }
.drop-all:hover { text-decoration: underline; }

/* ── Первый экран ── */
.hero {
  padding: 56px 0 48px;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.hero-inner { max-width: 720px; }
.hero-badge {
  display: inline-block; background: var(--yellow); color: var(--on-yellow);
  font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 40px; margin-bottom: 18px;
}
.hero-title { font-size: clamp(30px, 5vw, 46px); }
.hero-subtitle { font-size: 19px; color: var(--text-soft); margin: 14px 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-features {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 15px; font-weight: 500;
}
.hero-features li::before { content: "✓"; color: #fff; background: var(--blue); font-size: 11px;
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }

/* ── Лента брендов ── */
.brands { overflow: hidden; background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 16px 0; }
.brands-track { display: flex; gap: 44px; width: max-content; animation: marquee 55s linear infinite; }
.brands:hover .brands-track { animation-play-state: paused; }
.brand-item { font-size: 17px; font-weight: 700; color: var(--text-soft); white-space: nowrap; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Секции ── */
.section { padding: 52px 0; }
.section-title { font-size: clamp(24px, 3.4vw, 34px); }
.section-lead { color: var(--text-soft); font-size: 17px; margin: 0 0 28px; max-width: 660px; }
.page-head { padding: 40px 0 4px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); }
.page-head .section-lead { margin-bottom: 10px; }

/* Категории на главной */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 30px; }
.cat-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 20px; background: var(--bg-card); box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s, border-color .2s;
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 76px;
}
.cat-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--blue); }
.cat-name { font-size: 17px; font-weight: 700; color: var(--navy); }

.section-cta { padding: 20px 0 60px; }
.cta-box {
  border-radius: var(--radius); background: var(--blue); color: #fff;
  padding: 34px 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.cta-box h2 { color: #fff; font-size: 24px; margin-bottom: 6px; }
.cta-box p { margin: 0; color: rgba(255,255,255,.85); }

/* ── Прайс ── */
.price-search { max-width: 440px; margin: 16px 0 0; }
.price-search input {
  width: 100%; padding: 13px 18px; border: 1px solid var(--border); border-radius: 40px;
  background: var(--bg-card); color: var(--text); font-size: 15px;
}
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tab {
  padding: 9px 18px; border: 1px solid var(--border); border-radius: 40px;
  background: var(--bg-card); color: var(--navy); cursor: pointer; font-size: 14px; font-weight: 600;
  transition: all .15s;
}
.tab:hover { border-color: var(--blue); color: var(--blue); }
.tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.price-list { display: flex; flex-direction: column; gap: 10px; max-width: 800px; }
.price-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-card); box-shadow: var(--shadow-sm);
}
.price-photo { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; }
.price-info { flex: 1; }
.price-name { font-size: 16px; font-weight: 600; color: var(--navy); }
.price-desc { color: var(--text-soft); font-size: 14px; margin-top: 2px; }
.price-value { font-weight: 700; font-size: 18px; color: var(--blue); white-space: nowrap; }

/* ── Формы ── */
.form-wrap { max-width: 680px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.form button[type="submit"] { display: block; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field span { font-size: 14px; color: var(--text-soft); }
.field input, .field select, .field textarea {
  padding: 12px 15px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font-size: 15px; font-family: inherit; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(12,91,185,.12); }
.field-file input { padding: 9px; }
.consent { display: flex; align-items: center; gap: 9px; margin: 18px 0; font-size: 14px; color: var(--text-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { border: 1px solid; border-radius: var(--radius-sm); padding: 18px 20px; margin-bottom: 18px; }
.alert-ok { border-color: #7fc242; background: #f1f9e9; color: #2f5411; }
.alert-err { border-color: #dd2c37; background: #fdeef0; color: #7a1f26; }
[data-theme="dark"] .alert-ok { background: #1c2c17; color: #bfe39a; }
[data-theme="dark"] .alert-err { background: #2f1a1c; color: #f0b3b8; }
.alert h2 { margin-top: 0; }

/* ── Контакты ── */
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 26px; }
.contact-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; background: var(--bg-card); box-shadow: var(--shadow-sm); }
.contact-card h3 { font-size: 19px; }
.contact-card a { color: var(--blue); }
.contact-card a:hover { text-decoration: underline; }
.contact-addr { color: var(--text-soft); margin: 4px 0; }
.contact-hours { margin-top: 10px; color: var(--text-soft); font-size: 14px; line-height: 1.7; }
.general-contacts { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 28px; }
.map-block {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); width: fit-content; max-width: 100%; margin: 0 auto;
}
.map-block iframe { max-width: 100%; border: 0; display: block; }
.map-placeholder { padding: 64px 20px; text-align: center; background: var(--bg-soft); color: var(--text-soft); }

/* ── 404 ── */
.error-page { padding: 80px 0; }
.error-code { font-size: 84px; font-weight: 800; color: var(--blue); }

/* ── Подвал ── */
.site-footer { background: var(--navy); color: #cdd7e6; border-top: 4px solid var(--yellow); padding: 44px 0 22px; margin-top: 40px; }
.site-footer h4 { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 28px; }
.footer-logo { width: 128px; height: 128px; border-radius: 50%; margin-bottom: 14px; }
.footer-note { color: #9fb0c8; font-size: 14px; max-width: 320px; }
.footer-col h4 { font-size: 15px; margin-bottom: 12px; }
.footer-col a, .footer-addr { display: block; color: #9fb0c8; font-size: 14px; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 16px;
  color: #8093ad; font-size: 13px;
}
.footer-admin:hover { color: #fff; }

/* ── Плавающие кнопки ── */
.float-actions { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.fab {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; border: none; box-shadow: var(--shadow);
}
.fab-wa { background: #25d366; }
.fab-call { background: var(--blue); }
.to-top {
  position: fixed; left: 18px; bottom: 18px; z-index: 90;
  width: 46px; height: 46px; border: 1px solid var(--border); border-radius: 50%;
  background: var(--bg-card); color: var(--navy); font-size: 20px; cursor: pointer;
  opacity: 0; pointer-events: none; box-shadow: var(--shadow-sm); transition: opacity .3s;
}
.to-top.show { opacity: 1; pointer-events: auto; }

.reveal { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .brands-track { animation: none; } html { scroll-behavior: auto; } }

/* ── Адаптив ── */
@media (max-width: 900px) {
  .topbar-inner { min-height: 66px; gap: 10px; }
  .logo-img { height: 52px; }
  .top-badge, .top-tagline, .top-phone, .top-contacts { display: none; }
  .nav-burger { display: block; }
  .top-links {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 70;
    flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 12px 20px; gap: 14px; display: none; box-shadow: var(--shadow);
  }
  .top-links.open { display: flex; }
  .catnav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .catnav-link { padding: 9px 16px; }
  .cat-sub { font-size: 11px; }
  .cat-main { font-size: 14px; }
  .cat-main .caret { display: none; }
  .catnav-drop { display: none !important; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-box { text-align: left; }
}
