/* ============================================================
   «По домашнему вкусно» — стили сайта
   Стиль: белый фон + красные акценты (как у 5ka.ru)
   ============================================================ */

/* ---------- Переменные (цвета, радиусы) ---------- */
:root {
  --red: #F5112C;          /* фирменный красный */
  --red-dark: #D40E24;     /* красный при наведении */
  --red-soft: #FFF0F1;     /* светло-розовый фон */
  --dark: #1F2229;         /* почти чёрный текст */
  --gray: #7A7E87;         /* серый текст */
  --bg-alt: #F6F7F9;       /* светло-серый фон секций */
  --line: #ECEEF1;         /* границы карточек */
  --green: #00A746;        /* зелёный (успех) */
  --radius: 16px;          /* скругление карточек */
  --shadow: 0 8px 24px rgba(31, 34, 41, .08);
  --shadow-hover: 0 12px 32px rgba(31, 34, 41, .14);
}

/* ---------- Базовые стили ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Golos Text', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--dark);
  background: #fff;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 860px; }

.text-red { color: var(--red); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 26px;
  border: none; border-radius: 12px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 16px;
  text-decoration: none; white-space: nowrap;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn:active { transform: translateY(0); }

.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); }

.btn--ghost { background: #fff; color: var(--dark); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--red); color: var(--red); }

.btn--white { background: #fff; color: var(--red); }

.btn--small { padding: 9px 16px; font-size: 14px; border-radius: 10px; background: var(--red-soft); color: var(--red); }
.btn--small:hover { background: var(--red); color: #fff; box-shadow: none; }

.btn--big { width: 100%; padding: 16px 26px; font-size: 18px; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s, border-color .2s;
}
.header--scrolled { box-shadow: var(--shadow); border-color: var(--line); }

.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__icon {
  width: 42px; height: 42px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--red); border-radius: 12px;
}
.logo__text { font-size: 15px; font-weight: 500; color: var(--dark); line-height: 1.2; }
.logo__text b { color: var(--red); }
.logo--footer .logo__text { color: #fff; }

.nav { display: flex; align-items: center; gap: 22px; }
.nav__link { color: var(--dark); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav__link:hover { color: var(--red); }
.nav__phone { color: var(--dark); text-decoration: none; font-weight: 700; font-size: 15px; }
.nav__phone:hover { color: var(--red); }
.nav__cta { padding: 11px 20px; font-size: 15px; }

/* Кнопка-«бургер» видна только на телефоне */
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { width: 24px; height: 2.5px; background: var(--dark); border-radius: 2px; transition: .2s; }

/* ---------- Главный баннер ---------- */
.hero { background: linear-gradient(180deg, var(--red-soft) 0%, #fff 100%); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; padding-top: 48px; padding-bottom: 48px; }

.hero__badge {
  display: inline-block; padding: 7px 16px; margin-bottom: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 100px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
}
.hero__title { font-size: 46px; font-weight: 800; line-height: 1.12; letter-spacing: -.5px; margin-bottom: 16px; }
.hero__subtitle { font-size: 18px; color: var(--gray); margin-bottom: 26px; max-width: 480px; }

.hero__form { display: flex; gap: 10px; margin-bottom: 22px; max-width: 520px; }
.hero__form .input { flex: 1; }

.hero__chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.hero__chips li {
  padding: 8px 14px; background: #fff; border: 1px solid var(--line);
  border-radius: 100px; font-size: 14px; font-weight: 600;
}

.hero__pic img { border-radius: 24px; box-shadow: var(--shadow-hover); width: 100%; height: auto; }

/* ---------- Секции ---------- */
.section { padding: 72px 0; }
.section--gray { background: var(--bg-alt); }

.section__title { font-size: 34px; font-weight: 800; letter-spacing: -.4px; margin-bottom: 8px; }
.section__title--white { color: #fff; }
.section__subtitle { font-size: 17px; color: var(--gray); margin-bottom: 40px; }
.section__note { margin-top: 26px; font-size: 14px; color: var(--gray); text-align: center; }

/* ---------- Магазины ---------- */
.stores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.store-card {
  display: grid; grid-template-columns: 54px 1fr; grid-template-rows: auto auto;
  column-gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; transition: transform .15s, box-shadow .15s;
}
.store-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.store-card__logo {
  grid-row: 1 / 3;
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 12%, white); color: var(--c);
  font-size: 26px; font-weight: 800;
}
.store-card__name { font-weight: 700; font-size: 17px; }
.store-card__note { font-size: 13.5px; color: var(--gray); }

/* ---------- Как это работает ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.step-card {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px 22px;
  transition: transform .15s, box-shadow .15s;
}
.step-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.step-card__num {
  position: absolute; top: 20px; right: 20px;
  width: 30px; height: 30px; border-radius: 100px;
  background: var(--red-soft); color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.step-card__emoji { font-size: 40px; display: block; margin-bottom: 14px; }
.step-card__title { font-size: 17.5px; font-weight: 700; margin-bottom: 8px; }
.step-card__text { font-size: 14.5px; color: var(--gray); }

/* ---------- Тарифы ---------- */
.tariffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }

.tariff-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: transform .15s, box-shadow .15s;
}
.tariff-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.tariff-card--hit { border-color: var(--red); box-shadow: var(--shadow); }
.tariff-card__badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 5px 14px; border-radius: 100px; white-space: nowrap;
}

.tariff-card__name { font-size: 18px; font-weight: 700; color: var(--gray); margin-bottom: 6px; }
.tariff-card__price { font-size: 44px; font-weight: 800; margin-bottom: 18px; }
.tariff-card__price span { font-size: 26px; }

.tariff-card__list { list-style: none; margin-bottom: 26px; flex: 1; }
.tariff-card__list li { padding: 7px 0 7px 28px; position: relative; font-size: 15px; }
.tariff-card__list li::before {
  content: "✓"; position: absolute; left: 0; top: 7px;
  color: var(--green); font-weight: 800;
}

/* ---------- Популярные товары ---------- */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.product-card {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.product-card__store {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: color-mix(in srgb, var(--c) 10%, white); color: var(--c);
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 100px;
}
.product-card__img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; margin-bottom: 14px; background: #F3F4F6; }
.product-card__name { font-size: 15.5px; font-weight: 600; margin-bottom: 12px; min-height: 44px; }
.product-card__bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product-card__price { font-size: 22px; font-weight: 800; }

/* ---------- FAQ (вопросы-ответы) ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }

.faq__item {
  background: var(--bg-alt); border-radius: 14px; padding: 0 22px;
  border: 1px solid var(--line);
}
.faq__item[open] { background: #fff; box-shadow: var(--shadow); border-color: transparent; }

.faq__item summary {
  list-style: none; cursor: pointer; padding: 20px 0;
  font-size: 17px; font-weight: 600; position: relative; padding-right: 40px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 400; color: var(--red); transition: .2s;
}
.faq__item[open] summary::after { content: "–"; }
.faq__item p { padding: 0 0 20px; color: var(--gray); font-size: 15.5px; }

/* ---------- Форма заказа ---------- */
.section--order { background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%); }

.order__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }

.order__text { color: rgba(255,255,255,.92); font-size: 17px; margin: 14px 0 24px; max-width: 420px; }
.order__phone { font-size: 34px; font-weight: 800; color: #fff; text-decoration: none; display: inline-block; }
.order__phone:hover { text-decoration: underline; }
.order__hours { color: rgba(255,255,255,.75); margin: 6px 0 22px; }
.order__messengers { display: flex; gap: 12px; flex-wrap: wrap; }

.order__card { background: #fff; border-radius: 20px; padding: 30px; box-shadow: var(--shadow-hover); }

/* ---------- Поля формы ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }

.form__label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.form__label b { color: var(--red); }

.input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 15.5px; color: var(--dark); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(245, 17, 44, .12); }
textarea.input { resize: vertical; min-height: 90px; }

.form__agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--gray); }
.form__agree input { margin-top: 3px; accent-color: var(--red); }

.form__hint { font-size: 13px; color: var(--gray); text-align: center; }

.form-errors {
  background: var(--red-soft); border: 1px solid #FFC9D0;
  border-radius: 12px; padding: 12px 16px; margin-bottom: 16px;
}
.form-errors p { color: var(--red-dark); font-size: 14.5px; font-weight: 600; }

/* ---------- Страница «Спасибо» ---------- */
.thanks { background: linear-gradient(180deg, var(--red-soft) 0%, #fff 100%); padding: 90px 0 110px; }
.thanks__inner { max-width: 560px; margin: 0 auto; text-align: center; }
.thanks__circle {
  width: 92px; height: 92px; margin: 0 auto 26px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 46px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 167, 70, .35);
}
.thanks__title { font-size: 34px; font-weight: 800; margin-bottom: 16px; }
.thanks__text { color: var(--gray); font-size: 17px; margin-bottom: 12px; }
.thanks__btn { margin-top: 28px; }

/* ---------- Подвал ---------- */
.footer { background: var(--dark); color: #fff; padding: 54px 0 0; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer__tagline { color: #B9BCC3; font-size: 14.5px; margin-top: 14px; max-width: 320px; }
.footer__title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.footer__col { display: flex; flex-direction: column; gap: 9px; }
.footer__col a, .footer__col span { color: #B9BCC3; text-decoration: none; font-size: 14.5px; }
.footer__col a:hover { color: #fff; }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 22px; padding-bottom: 22px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: #8A8E96; font-size: 13px;
}

/* ---------- Всплывающее уведомление (toast) ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 80px);
  background: var(--dark); color: #fff; padding: 14px 24px;
  border-radius: 12px; font-size: 15px; font-weight: 600;
  box-shadow: var(--shadow-hover); opacity: 0; pointer-events: none;
  transition: transform .25s, opacity .25s; z-index: 200; max-width: 90%;
}
.toast--show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Админка (/admin) ---------- */
.admin-body { background: var(--bg-alt); }
.admin { padding: 40px 20px; }
.admin__title { font-size: 28px; font-weight: 800; margin-bottom: 18px; }
.admin__login { max-width: 420px; margin: 40px auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.admin__hint { margin-top: 16px; font-size: 13.5px; color: var(--gray); }
.admin__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin__count { color: var(--gray); margin-bottom: 16px; }
.admin__table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.admin__table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 900px; }
.admin__table th { text-align: left; padding: 14px 16px; background: #F0F1F4; font-size: 13px; text-transform: uppercase; letter-spacing: .3px; }
.admin__table td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.admin__table tr:hover td { background: #FAFBFC; }
.admin__empty { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 48px; text-align: center; color: var(--gray); }

/* ============================================================
   АДАПТИВНОСТЬ (телефоны и планшеты)
   ============================================================ */

@media (max-width: 1024px) {
  .hero__title { font-size: 38px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stores, .products { grid-template-columns: repeat(2, 1fr); }
  .tariffs { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .order__grid { grid-template-columns: 1fr; gap: 32px; }
  .order__info { text-align: center; }
  .order__text { margin-left: auto; margin-right: auto; }
  .order__messengers { justify-content: center; }
}

@media (max-width: 768px) {
  .section { padding: 52px 0; }
  .section__title { font-size: 27px; }
  .hero__inner { grid-template-columns: 1fr; padding-top: 34px; }
  .hero__pic { order: -1; }
  .hero__pic img { max-height: 300px; object-fit: cover; }
  .hero__title { font-size: 31px; }

  /* Мобильное меню */
  .burger { display: flex; }
  .nav {
    position: fixed; top: 72px; left: 0; right: 0; z-index: 99;
    flex-direction: column; align-items: stretch; text-align: center;
    background: #fff; padding: 20px; gap: 16px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-130%); transition: transform .25s;
  }
  .nav--open { transform: translateY(0); }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .stores, .products, .steps { grid-template-columns: 1fr; }
  .hero__form { flex-direction: column; }
  .order__card { padding: 20px; }
  .order__phone { font-size: 27px; }
  .header__inner { height: 64px; }
}
