:root {
 --green: #0f9d58;
 --green-dark: #0b7a44;
 --green-light: #e8f7ee;
 --blue: #1a73e8;
 --red: #d93025;
 --orange: #f29900;
 --ink: #16202a;
 --ink-soft: #5a6a78;
 --line: #e3e9ee;
 --bg: #f6f8fa;
 --white: #fff;
 --radius: 14px;
 --shadow: 0 2px 10px rgba(16, 32, 45, .07);
 --shadow-lg: 0 10px 34px rgba(16, 32, 45, .13);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
 margin: 0;
 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
 color: var(--ink);
 background: var(--bg);
 line-height: 1.55;
 font-size: 16px;
}

a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 24px; line-height: 1.25; margin: 40px 0 16px; }
h3 { font-size: 19px; margin: 0 0 8px; }
p { margin: 0 0 14px; }
small { color: var(--ink-soft); }

/* ---------- ШАПКА ---------- */
.topbar {
 background: var(--green);
 color: #fff;
 font-size: 13px;
 padding: 8px 0;
}
.topbar .wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.topbar .topbar-hide { display: none; }

header.site {
 background: var(--white);
 border-bottom: 1px solid var(--line);
 position: sticky; top: 0; z-index: 40;
 box-shadow: 0 1px 4px rgba(16,32,45,.04);
}
header.site .wrap { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }

.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark {
 width: 34px; height: 34px; border-radius: 0;
 background: none;
 display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 19px;
}
.logo small { display: block; font-size: 10px; font-weight: 600; color: var(--ink-soft); letter-spacing: .3px; }

/* Название + адрес сайта под ним (шапка) */
.logo-text { display: flex; flex-direction: column; line-height: 1.02; }
.logo-name { font-size: 20px; font-weight: 800; letter-spacing: -.2px; }
.logo-domain { font-size: 10.5px; font-weight: 700; color: var(--green-dark); letter-spacing: .35px; }

/* Три короткие выгоды справа от логотипа */
.logo-facts {
  list-style: none; margin: 0 0 0 2px; padding: 0 0 0 14px;
  border-left: 1px solid var(--line);
  font-size: 11.5px; line-height: 1.5; font-weight: 600; color: var(--ink-soft);
}
.logo-facts li::before { content: "✓"; color: var(--green-dark); font-weight: 800; margin-right: 5px; }
.logo-facts li { white-space: nowrap; }
@media (max-width: 1100px) {
  header.site .nav a { padding: 8px 9px; }
  header.site .nav { gap: 2px; }
}
@media (max-width: 900px) { .logo-facts { display: none; } }

/* Подпись перед поиском */
.search-lead {
  margin: 22px 0 0; font-size: 16px; font-weight: 800; color: inherit;
}
.search-lead + .searchbox { margin-top: 10px; }

.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a {
 padding: 8px 12px; border-radius: 9px; color: var(--ink);
 font-size: 14px; font-weight: 600;
}
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a.active { background: var(--green-light); color: var(--green-dark); }

.btn {
 display: inline-flex; align-items: center; justify-content: center; gap: 8px;
 padding: 11px 18px; border-radius: 11px; border: 0; cursor: pointer;
 font-size: 15px; font-weight: 700; font-family: inherit;
 background: var(--green); color: #fff; text-decoration: none;
 transition: background .15s, transform .05s;
}
.btn:hover { background: var(--green-dark); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--white); color: var(--green-dark); border: 1.5px solid var(--green); }
.btn.ghost:hover { background: var(--green-light); }
.btn.dark { background: var(--ink); }
.btn.dark:hover { background: #000; }
.btn.orange { background: var(--orange); }
.btn.orange:hover { background: #d48700; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn-phone { background: #fff; color: var(--green-dark); }

/* ---------- БЛОКИ ---------- */
.card {
 background: var(--white); border: 1px solid var(--line);
 border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 16px; }
.grid.g2 { grid-template-columns: repeat(2, 1fr); }
.grid.g3 { grid-template-columns: repeat(3, 1fr); }
.grid.g4 { grid-template-columns: repeat(4, 1fr); }
.grid.g5 { grid-template-columns: repeat(5, 1fr); }

.hero {
 background: linear-gradient(135deg, #0b7a44 0%, #0f9d58 55%, #16a34a 100%);
 color: #fff; padding: 44px 0 48px;
}
.hero h1 { color: #fff; max-width: 760px; }
.hero p { color: #dcfce7; font-size: 18px; max-width: 680px; }
.hero .searchbox { margin-top: 24px; max-width: 680px; }
.hero .search-lead { color: #fff; font-size: 17px; font-weight: 800; margin: 26px 0 0; }
.hero .search-lead + .searchbox { margin-top: 10px; }

.searchbox { display: flex; gap: 8px; background: #fff; padding: 8px; border-radius: 14px; box-shadow: var(--shadow-lg); }
.searchbox input {
 flex: 1; border: 0; outline: 0; font-size: 16px; padding: 12px 12px;
 font-family: inherit; border-radius: 9px; background: transparent;
}
.searchbox button { border: 0; }

.badge {
 display: inline-block; padding: 4px 10px; border-radius: 999px;
 font-size: 12px; font-weight: 700; background: var(--green-light); color: var(--green-dark);
}
.badge.red { background: #fde8e6; color: var(--red); }
.badge.orange { background: #fff3e0; color: #b26a00; }
.badge.grey { background: #eef2f5; color: var(--ink-soft); }
.badge.blue { background: #e8f0fe; color: var(--blue); }

.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi .num { font-size: 30px; font-weight: 800; line-height: 1.1; }
.kpi .lbl { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.kpi.good .num { color: var(--green); }
.kpi.warn .num { color: var(--orange); }

.feature { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature .ico { font-size: 26px; }
.feature h3 { margin-top: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #eef2f5; font-weight: 700; font-size: 13px; white-space: nowrap; }
tbody tr:hover { background: #fafcfe; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }

.steps { counter-reset: step; }
.step { position: relative; padding-left: 44px; margin-bottom: 22px; }
.step::before {
 counter-increment: step; content: counter(step);
 position: absolute; left: 0; top: 0;
 width: 30px; height: 30px; border-radius: 50%;
 background: var(--green); color: #fff; font-weight: 800;
 display: grid; place-items: center; font-size: 15px;
}

.steps-2 { display: grid; gap: 14px; }
.stepbox { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stepbox .stepnum { font-size: 12px; font-weight: 800; color: var(--green); letter-spacing: 1px; }

/* ---------- ФОРМЫ ---------- */
label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=email], input[type=number], select, textarea {
 width: 100%; padding: 12px 13px; border: 1.5px solid var(--line);
 border-radius: 10px; font-size: 16px; font-family: inherit; background: #fff;
 outline: none; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); }
textarea { min-height: 88px; resize: vertical; }
.field { margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--ink-soft); margin-top: 5px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 500; }
.check input { width: auto; margin-top: 3px; }

.alert { padding: 13px 16px; border-radius: 11px; margin-bottom: 16px; font-size: 14px; }
.alert.ok { background: var(--green-light); color: var(--green-dark); border: 1px solid #a7e3c2; }
.alert.err { background: #fde8e6; color: #9c1c12; border: 1px solid #f5c2bd; }
.alert.info { background: #e8f0fe; color: #10457f; border: 1px solid #bcd3f7; }
.alert.warn { background: #fff3e0; color: #8a5200; border: 1px solid #ffd9a0; }
.alert:empty { display: none; }

/* ---------- ТАБЫ ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button {
 border: 0; background: none; padding: 11px 14px; cursor: pointer;
 font-size: 15px; font-weight: 700; color: var(--ink-soft); font-family: inherit;
 border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--green-dark); border-bottom-color: var(--green); }

/* ---------- ПРОЧЕЕ ---------- */
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.price { font-weight: 800; }
.price-old { color: var(--ink-soft); text-decoration: line-through; font-weight: 500; font-size: 14px; }
.strike { text-decoration: line-through; }
.lead-form { max-width: 560px; }
.divider { height: 1px; background: var(--line); margin: 32px 0; }

.ticker { overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); }
.ticker-track { display: inline-flex; gap: 34px; padding: 9px 0; white-space: nowrap; animation: slide 40s linear infinite; font-size: 13px; color: var(--ink-soft); }
.ticker-track span::before { content: "●"; color: var(--green); margin-right: 7px; font-size: 8px; vertical-align: middle; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 16px; }
.faq details p { margin: 12px 0 0; color: var(--ink-soft); }

.compare { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.compare > div { background: var(--white); padding: 12px 14px; }
.compare .head { font-weight: 800; background: #eef2f5; }
.compare .us { background: var(--green-light); font-weight: 600; }

footer.site { background: var(--ink); color: #b7c4cf; padding: 34px 0 24px; margin-top: 50px; font-size: 14px; }
footer.site a { color: #d6e2ea; }
footer.site h4 { color: #fff; font-size: 14px; margin: 0 0 10px; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin-bottom: 6px; }
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 26px; }

.chip { display: inline-block; background: #eef2f5; border-radius: 8px; padding: 3px 9px; font-size: 12px; margin: 0 4px 5px 0; color: var(--ink-soft); }

.brand-mini { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.brand-mini .lg {
 width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
 background: var(--green-light); color: var(--green-dark); font-weight: 800; font-size: 13px; flex: 0 0 auto;
}

progress { width: 100%; height: 9px; }

.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

.stat-line { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.stat-line:last-child { border-bottom: 0; }

@media (max-width: 900px) {
 .grid.g3, .grid.g4, .grid.g5 { grid-template-columns: repeat(2, 1fr); }
 footer .cols { grid-template-columns: 1fr 1fr; }
 .compare { grid-template-columns: 1fr; }
 .compare .head { display: none; }
 .compare > div::before { content: attr(data-lbl) " "; font-weight: 700; color: var(--ink-soft); }
}

@media (max-width: 640px) {
 body { font-size: 15px; }
 h1 { font-size: 24px; }
 h2 { font-size: 20px; margin: 30px 0 12px; }
 .grid.g2, .grid.g3, .grid.g4, .grid.g5 { grid-template-columns: 1fr; }
 /* На телефоне вкладки не прячем: они видны и открываются одним нажатием */
 header.site .wrap { flex-wrap: wrap; gap: 8px 10px; padding: 10px 16px; }
 header.site [data-menu-toggle] { display: none !important; }
 header.site .nav {
 display: flex; width: 100%; margin-left: 0; gap: 4px;
 flex-wrap: wrap; overflow: visible;
 padding-bottom: 2px;
 }
 header.site .nav a { padding: 7px 9px; font-size: 13px; white-space: nowrap; }
 header.site .nav .btn { flex: 0 0 auto; white-space: nowrap; }
 .topbar .topbar-hide { display: none; }
 .hero { padding: 28px 0 32px; }
 .hero p { font-size: 16px; }
 .searchbox { flex-direction: column; }
 .searchbox button { width: 100%; }
 footer .cols { grid-template-columns: 1fr; }
}

/* ---------- КАТЕГОРИИ ТОВАРОВ ---------- */
.only-mobile { display: none; }

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cat-card {
 display: flex; align-items: center; gap: 12px;
 background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
 padding: 14px 16px; color: var(--ink); font-weight: 700;
 transition: border-color .15s, box-shadow .15s;
}
.cat-card:hover { border-color: var(--green); box-shadow: var(--shadow); text-decoration: none; }
.cat-card .ico { font-size: 26px; line-height: 1; }
.cat-card b { display: block; font-size: 15px; }
.cat-card small { display: block; font-weight: 500; color: var(--ink-soft); font-size: 12px; margin-top: 2px; }

.cat-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; -webkit-overflow-scrolling: touch; }
.cat-chip {
 display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
 padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line);
 background: var(--white); color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap;
}
.cat-chip:hover { border-color: var(--green); text-decoration: none; }
.cat-chip.active { background: var(--green); border-color: var(--green); color: #fff; }
.cat-chip small { font-weight: 600; opacity: .75; }

/* Популярные категории внутри зелёного поиска — только на телефоне */
.popular-cats .cat-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.popular-cats .cat-chip { background: #fff; border-color: #fff; color: var(--green-dark); }
.popular-cats .cat-chip:hover { background: var(--green-light); }

/* Платные размещения — строка выше категорий */
.paid-slot { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.promo-card {
 display: flex; flex-direction: column; gap: 3px;
 background: #fff8e6; border: 1px solid #f3d48a; border-radius: var(--radius); padding: 12px 16px;
 color: var(--ink);
}
.promo-card:hover { text-decoration: none; border-color: var(--orange); }
.promo-card b { font-size: 15px; }
.promo-card small { color: var(--ink-soft); font-size: 12px; }

@media (max-width: 900px) {
 .cat-grid { grid-template-columns: repeat(2, 1fr); }
 .paid-slot { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
 .only-desktop { display: none !important; }
 .only-mobile { display: block; }
 .cat-grid { grid-template-columns: 1fr; }
}

/* ---------- ПОИСК АПТЕК ПО АДРЕСУ ---------- */
.addr-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.addr-form .field { margin-bottom: 0; }
.addr-form .field.grow { flex: 1 1 320px; }
.addr-form .btn { min-height: 44px; }
.sr-only {
 position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
 overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ===================== ВИДЖЕТ СВЯЗИ (вместо телефона) ===================== */
.mm-contact { position: fixed; right: 18px; bottom: 18px; z-index: 80; }
.mm-contact-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green); color: #fff; border: 0; cursor: pointer;
  padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 700;
  font-family: inherit; box-shadow: 0 6px 20px rgba(11,122,68,.35);
}
.mm-contact-btn:hover { background: var(--green-dark); }
.mm-contact-form {
  position: absolute; right: 0; bottom: 58px; width: 300px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; box-shadow: 0 12px 40px rgba(16,32,45,.22);
}
.mm-contact-form b { display: block; margin-bottom: 6px; font-size: 15px; }
.mm-contact-form input, .mm-contact-form textarea { margin-bottom: 9px; font-size: 14px; padding: 10px 11px; }
.mm-contact-form textarea { min-height: 74px; }
.mm-muted { font-size: 12px; color: var(--ink-soft); margin: 0 0 12px; }
.mm-close { position: absolute; right: 10px; top: 10px; background: none; border: 0; cursor: pointer; font-size: 15px; color: var(--ink-soft); }
@media (max-width: 480px) {
  .mm-contact-form { width: calc(100vw - 36px); right: 0; }
}

/* ---------- КРУПНЫЙ ПОИСК НА ТЕЛЕФОНЕ (08.11.2026) ---------- */
@media (max-width: 640px) {
  /* Надпись «Купить в аптеке» — крупная, жирная, красным по белому */
  .hero .search-lead-main {
    display: inline-block;
    margin: 20px 0 0;
    padding: 8px 18px;
    border-radius: 999px;
    background: #ffffff;
    color: #c62828;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: .2px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  }

  /* Само окно поиска — крупное, с белой рамкой и заметной тенью */
  .hero .searchbox {
    margin-top: 14px;
    padding: 10px;
    border: 3px solid #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .30);
  }

  .hero .searchbox input {
    min-height: 64px;
    padding: 18px 14px;
    font-size: 19px;
    font-weight: 600;
    color: var(--ink);
    background: #f7fbf8;
    border: 2px solid #cfe8d8;
    border-radius: 12px;
  }

  .hero .searchbox input::placeholder {
    color: #5b6b62;
    font-weight: 500;
    font-size: 16px;
  }

  .hero .searchbox button {
    min-height: 58px;
    padding: 16px 18px;
    font-size: 19px;
    border-radius: 12px;
  }
}

