/* Е-Пептиды: общие токены, сброс, контейнер, кнопки. Шапка и подвал — ниже, их ведёт линия «Шапка и подвал».
   Референс вида: 1peptidmos.ru — обычный давно работающий магазин: светлый фон, тёмный текст, без скруглений и теней,
   один цвет — голубой Telegram (он же «ПЕПТИДЫ» в логотипе старого e-peptidi.ru). */

:root {
  --ep-bg: oklch(0.993 0.002 240);
  --ep-soft: oklch(0.968 0.004 240);
  --ep-line: oklch(0.905 0.006 240);
  --ep-muted: oklch(0.54 0.012 250);
  --ep-ink-2: oklch(0.42 0.01 250);
  --ep-ink: oklch(0.21 0.008 250);
  --ep-dark: oklch(0.18 0.006 250);
  --ep-on-dark: oklch(0.96 0.003 240);
  --ep-tg: oklch(0.52 0.125 240);
  --ep-tg-hover: oklch(0.45 0.115 242);
  --ep-ok: oklch(0.52 0.12 150);

  --ep-font: "PT Sans", Arial, "Helvetica Neue", sans-serif;
  --ep-fs: 17px;
  --ep-lh: 1.55;
  --ep-h1: 34px;
  --ep-h2: 27px;
  --ep-h3: 20px;
  --ep-small: 14px;

  --ep-wrap: 1200px;
  --ep-gap: 20px;
  --ep-radius: 3px;
  --ep-ease: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ep-bg);
  color: var(--ep-ink);
  font: var(--ep-fs)/var(--ep-lh) var(--ep-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; line-height: 1.2; text-wrap: balance; }
h1 { font-size: var(--ep-h1); }
h2 { font-size: var(--ep-h2); }
h3 { font-size: var(--ep-h3); }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ep-tg); outline-offset: 2px; }

.ep-wrap { width: 100%; max-width: calc(var(--ep-wrap) + 2 * var(--ep-gap)); margin: 0 auto; padding: 0 var(--ep-gap); }
.ep-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ep-muted { color: var(--ep-muted); }
.ep-ico { flex: none; display: inline-block; vertical-align: middle; }

/* Главная кнопка: «Заказать в Telegram». Одна на экран. */
.ep-btn-tg {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px;
  background: var(--ep-tg); color: var(--ep-on-dark);
  border-radius: var(--ep-radius);
  font-weight: 700; font-size: 17px; letter-spacing: .01em; text-decoration: none;
  transition: background-color .2s var(--ep-ease), transform .12s var(--ep-ease);
  -webkit-tap-highlight-color: transparent;
}
.ep-btn-tg:hover { background: var(--ep-tg-hover); }
.ep-btn-tg:active { transform: scale(.98); }
.ep-btn-tg .ep-ico { color: var(--ep-on-dark); --ep-bg: var(--ep-tg); }
.ep-btn-tg--wide { width: 100%; }

/* Второе действие: текстовая ссылка «Каталог →», не кнопка. */
.ep-link-more {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--ep-ink); text-decoration: underline; text-underline-offset: 4px;
  text-decoration-thickness: 1px; text-decoration-color: var(--ep-line);
  transition: text-decoration-color .2s var(--ep-ease);
}
.ep-link-more:hover { text-decoration-color: currentColor; }
.ep-link-more .ep-ico { transition: transform .2s var(--ep-ease); }
.ep-link-more:hover .ep-ico { transform: translateX(3px); }

.ep-price { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }

@media (max-width: 767px) {
  :root { --ep-fs: 16px; --ep-h1: 27px; --ep-h2: 23px; --ep-h3: 18px; --ep-gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ===== Шапка и подвал (линия «Шапка и подвал») ===== */

/* PT Sans (ParaType, SIL OFL 1.1 — assets/fonts/OFL.txt), файлы Google Fonts. Кириллица и латиница грузятся по
   unicode-range; latin-ext нужен только ради знака ₽. Кириллица 400 предзагружается в header.php. */
@font-face { font-family: "PT Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/pt-sans-400-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/pt-sans-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/pt-sans-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "PT Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/pt-sans-700-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/pt-sans-700-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PT Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/pt-sans-700-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

html.ep-lock { overflow: hidden; }
#main:focus { outline: none; }
.ep-nw { white-space: nowrap; }

.ep-skip {
  position: absolute; left: 8px; top: 8px; z-index: 100;
  padding: 10px 16px; border-radius: var(--ep-radius);
  background: var(--ep-ink); color: var(--ep-on-dark); font-weight: 700; text-decoration: none;
  transform: translateY(-160%);
}
.ep-skip:focus { transform: none; }

/* Логотип текстом, как у старого e-peptidi.ru: «е-» тёмное, «ПЕПТИДЫ» голубое. */
.ep-logo {
  display: inline-flex; align-items: baseline; flex: none;
  font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: -.015em;
  text-decoration: none; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.ep-logo__e { color: var(--ep-ink); }
.ep-logo__p { color: var(--ep-tg); }
.ep-logo--dark .ep-logo__e { color: var(--ep-on-dark); }

/* Шапка: тёмная полоса */
.ep-hdr { background: var(--ep-bg); border-bottom: 1px solid var(--ep-line); }
.ep-hdr__bar { background: var(--ep-dark); color: oklch(0.84 0.005 250); font-size: 14px; line-height: 1.3; }
.ep-hdr__bar-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 40px; }
.ep-hdr__note { margin: 0; }
.ep-hdr__links { display: flex; align-items: center; gap: 24px; }
.ep-hdr__links a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  color: var(--ep-on-dark); text-decoration: none; white-space: nowrap;
  transition: color .2s var(--ep-ease);
}
.ep-hdr__links a:hover { color: var(--ep-tg); }
.ep-hdr__phone { font-variant-numeric: tabular-nums; }
.ep-hdr__tg .ep-ico { color: var(--ep-tg); --ep-bg: var(--ep-dark); }

/* Шапка: логотип, меню, поиск, «Заказать» */
.ep-hdr__row { display: flex; align-items: center; gap: 20px; min-height: 80px; }
.ep-hdr__logo { margin-right: 28px; }
/* Меню — отдельной строкой под логотипом и поиском */
.ep-nav { border-top: 1px solid var(--ep-line); }
.ep-nav__list { display: flex; flex-wrap: wrap; margin: 0 -13px; padding: 0; list-style: none; }
.ep-nav__link {
  position: relative; display: flex; align-items: center; min-height: 44px; padding: 0 13px;
  color: var(--ep-ink); font-size: 16px; text-decoration: none; white-space: nowrap;
}
.ep-nav__link::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 7px; height: 2px;
  background: var(--ep-tg); transform: scaleX(0); transform-origin: left center;
  transition: transform .25s var(--ep-ease);
}
.ep-nav__link:hover::after, .ep-nav__link[aria-current]::after, .ep-nav__link[data-section]::after { transform: none; }

.ep-search { position: relative; display: flex; align-items: center; }
.ep-search__in {
  width: 100%; height: 44px; margin: 0; padding: 0 46px 0 14px;
  border: 1px solid var(--ep-line); border-radius: var(--ep-radius);
  background: var(--ep-bg); color: var(--ep-ink); font: inherit; font-size: 15px;
  -webkit-appearance: none; appearance: none;
  transition: border-color .2s var(--ep-ease);
}
.ep-search__in::placeholder { color: var(--ep-muted); opacity: 1; }
.ep-search__in:hover { border-color: oklch(0.8 0.008 250); }
.ep-search__in:focus { outline: none; border-color: var(--ep-tg); box-shadow: inset 0 0 0 1px var(--ep-tg); }
.ep-search__in::-webkit-search-cancel-button { display: none; }
.ep-search__go {
  position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 46px; height: 44px;
  padding: 0; border: 0; background: none; color: var(--ep-ink-2); cursor: pointer;
  transition: color .2s var(--ep-ease);
}
.ep-search__go:hover { color: var(--ep-tg); }
.ep-hdr__search { flex: 1 1 auto; max-width: 560px; }
.ep-hdr__order { margin-left: auto; }

.ep-btn-tg--sm { min-height: 44px; padding: 0 18px; gap: 8px; font-size: 16px; }
.ep-btn-tg--sm .ep-ico { width: 20px; height: 20px; }

.ep-hdr__find {
  display: none; place-items: center; flex: none; width: 44px; height: 44px; margin-right: -6px;
  padding: 0; border: 0; background: none; color: var(--ep-ink); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ep-burger {
  display: none; place-items: center; flex: none; width: 44px; height: 44px; margin-right: -8px;
  padding: 0; border: 0; background: none; color: var(--ep-ink); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Выезжающая панель (до 1080 px) */
.ep-panel { position: fixed; inset: 0; z-index: 90; }
.ep-panel[hidden] { display: none; }
.ep-panel__backdrop {
  position: absolute; inset: 0; background: oklch(0.18 0.006 250 / .5);
  opacity: 0; transition: opacity .28s var(--ep-ease);
}
.ep-panel__sheet {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 88vw);
  display: flex; flex-direction: column; padding: 0 20px 24px;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--ep-bg); outline: none;
  transform: translateX(100%); transition: transform .28s var(--ep-ease);
}
.ep-panel.is-open .ep-panel__backdrop { opacity: 1; }
.ep-panel.is-open .ep-panel__sheet { transform: none; }
.ep-panel__head {
  display: flex; align-items: center; justify-content: space-between; flex: none;
  min-height: 60px; margin: 0 -20px 16px; padding: 0 8px 0 20px; border-bottom: 1px solid var(--ep-line);
}
.ep-panel__title { font-weight: 700; font-size: 18px; }
.ep-panel__close {
  display: grid; place-items: center; width: 44px; height: 44px;
  padding: 0; border: 0; background: none; color: var(--ep-ink); cursor: pointer;
}
.ep-panel__search { flex: none; margin-bottom: 8px; }
.ep-panel__search .ep-search__in { height: 48px; font-size: 16px; }
.ep-panel__search .ep-search__go { height: 48px; }
.ep-panel__nav { margin: 0 0 28px; padding: 0; list-style: none; }
.ep-panel__link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px;
  border-bottom: 1px solid var(--ep-line); color: var(--ep-ink); font-size: 18px; text-decoration: none;
}
.ep-panel__link .ep-ico { color: var(--ep-muted); }
.ep-panel__link[aria-current], .ep-panel__link[data-section] { font-weight: 700; }
.ep-panel__link[aria-current] .ep-ico, .ep-panel__link[data-section] .ep-ico { color: var(--ep-tg); }
.ep-panel__cats { margin: 0 0 28px; }
.ep-panel__cats-h { margin: 0 0 6px; color: var(--ep-muted); font-size: 14px; }
.ep-panel__cats ul { margin: 0; padding: 0; list-style: none; }
.ep-panel__cats a {
  display: flex; align-items: center; min-height: 44px;
  color: var(--ep-ink-2); font-size: 16px; text-decoration: none;
}
.ep-panel__cats a[aria-current] { color: var(--ep-ink); font-weight: 700; }
.ep-panel__contact { display: grid; gap: 2px; margin-top: auto; }
.ep-panel__contact .ep-btn-tg { margin-bottom: 10px; }
.ep-panel__line {
  display: flex; align-items: center; gap: 12px; min-height: 44px;
  color: var(--ep-ink); text-decoration: none; overflow-wrap: anywhere;
}
.ep-panel__line .ep-ico { color: var(--ep-muted); }

@media (max-width: 1199px) {
  .ep-hdr__logo { margin-right: 12px; }
  .ep-nav__list { margin: 0 -10px; }
  .ep-nav__link { padding: 0 10px; }
  .ep-nav__link::after { left: 10px; right: 10px; }
}
@media (max-width: 1079px) {
  .ep-nav { display: none; }
  .ep-burger { display: grid; }
  .ep-hdr__search { flex: 1 1 auto; max-width: 340px; }
  .ep-hdr__row { gap: 16px; min-height: 72px; }
}
@media (max-width: 767px) {
  .ep-hdr__bar { font-size: 13px; }
  .ep-hdr__bar-in { justify-content: center; min-height: 34px; text-align: center; }
  .ep-hdr__links, .ep-hdr__search { display: none; }
  .ep-hdr__find { display: grid; }
  .ep-hdr__row { gap: 8px; min-height: 60px; }
  .ep-hdr__order { margin-left: auto; padding: 0 14px; }
  .ep-logo { font-size: 24px; }
}
@media (max-width: 389px) {
  /* 360–389: логотип, «Заказать», поиск и меню в один ряд без прокрутки вбок */
  .ep-hdr__row { gap: 4px; }
  .ep-logo { font-size: 22px; }
  .ep-hdr__order { gap: 6px; padding: 0 10px; font-size: 15px; }
  .ep-hdr__order .ep-ico { width: 18px; height: 18px; }
  .ep-hdr__find, .ep-burger { width: 42px; }
}
@media (max-width: 359px) {
  /* Узкий экран: от «Заказать» остаётся знак Telegram, подпись — для экранного диктора. */
  .ep-hdr__row { gap: 10px; }
  .ep-logo { font-size: 22px; }
  .ep-hdr__order { width: 48px; padding: 0; }
  .ep-hdr__order span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ep-hdr__order .ep-ico { width: 22px; height: 22px; }
}

/* Подвал: тёмный, 4 колонки */
.ep-ftr {
  --ep-ftr-muted: oklch(0.74 0.007 250);
  --ep-ftr-line: oklch(0.31 0.008 250);
  background: var(--ep-dark); color: var(--ep-on-dark); font-size: 15px; line-height: 1.45;
}
.ep-ftr__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.15fr; gap: 40px; padding: 56px 0 48px; }
.ep-ftr__grid--3 { grid-template-columns: 1.3fr 1fr 1.15fr; }
.ep-ftr__logo { font-size: 26px; }
.ep-ftr__req {
  display: grid; gap: 3px; max-width: 34ch; margin-top: 22px;
  color: var(--ep-ftr-muted); font-size: 14px; font-style: normal; line-height: 1.5;
}
.ep-ftr__h { margin: 0 0 14px; color: var(--ep-on-dark); font-size: 18px; font-weight: 700; line-height: 1.3; }
.ep-ftr__list { margin: 0; padding: 0; list-style: none; }
.ep-ftr__list a {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 0;
  color: var(--ep-on-dark); text-decoration: none; transition: color .2s var(--ep-ease);
}
.ep-ftr__list a:hover { color: var(--ep-tg); }
.ep-ftr__list--docs { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ep-ftr-line); }
.ep-ftr__list--docs a { color: var(--ep-ftr-muted); font-size: 14px; }
.ep-ftr__list--contact { margin-top: 12px; }
.ep-ftr__list--contact .ep-ico { color: var(--ep-ftr-muted); }
.ep-ftr__list--contact a { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ep-ftr__tg { margin-top: 2px; }
.ep-ftr__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  padding: 20px 0 26px; border-top: 1px solid var(--ep-ftr-line); color: var(--ep-ftr-muted); font-size: 14px;
}
.ep-ftr__bottom p { margin: 0; }
.ep-ftr__legal {
  padding: 22px 0 14px; border-top: 1px solid var(--ep-ftr-line);
  color: var(--ep-ftr-muted); font-size: 13px; line-height: 1.6; text-wrap: pretty;
}
.ep-ftr__legal p { max-width: 120ch; margin: 0 0 8px; }
.ep-ftr__legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ep-ftr__legal a:hover { color: var(--ep-on-dark); }
.ep-ftr__legal + .ep-ftr__bottom { border-top: 0; padding-top: 6px; }

@media (max-width: 1023px) {
  .ep-ftr__grid, .ep-ftr__grid--3 { grid-template-columns: 1fr 1fr; gap: 40px 28px; }
}
@media (max-width: 767px) {
  .ep-ftr__grid, .ep-ftr__grid--3 { gap: 32px 20px; padding: 40px 0 32px; }
  .ep-ftr__col--ask, .ep-ftr__col--brand, .ep-ftr__grid--3 > .ep-ftr__col { grid-column: 1 / -1; }
  .ep-ftr__col--brand { order: 1; padding-top: 28px; border-top: 1px solid var(--ep-ftr-line); }
  .ep-ftr__list a { min-height: 40px; padding: 4px 0; }
  .ep-ftr__tg { width: 100%; }
  .ep-ftr__bottom { flex-direction: column; padding: 18px 0 24px; }
}

/* Вопросы и ответы: аккордеон <details> на главной (ep-home.css — раскладка) и в карточке товара. */
.ep-faq__list { border-top: 1px solid var(--ep-line); }
.ep-faq__item { border-bottom: 1px solid var(--ep-line); }
.ep-faq__q {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding: 20px 0; cursor: pointer; list-style: none;
  font-size: 18px; font-weight: 700; line-height: 1.35;
  -webkit-tap-highlight-color: transparent;
}
.ep-faq__q::-webkit-details-marker { display: none; }
.ep-faq__q:hover .ep-faq__ico { color: var(--ep-ink); }
.ep-faq__ico { flex: none; margin-top: 2px; color: var(--ep-muted); transition: transform .2s var(--ep-ease), color .2s var(--ep-ease); }
.ep-faq__item[open] .ep-faq__ico { transform: rotate(45deg); color: var(--ep-ink); }
.ep-faq__a { padding: 0 44px 22px 0; color: var(--ep-ink-2); }
.ep-faq__a p { margin: 0 0 .6em; max-width: 68ch; }
.ep-faq__a p:last-child { margin-bottom: 0; }
.ep-faq__a a { color: var(--ep-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
@media (max-width: 767px) {
  .ep-faq__q { font-size: 17px; padding: 16px 0; }
  .ep-faq__a { padding-right: 0; }
}
