@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Oswald:wght@500;600&display=swap");

/* ============================================================
   Вода и Молоко — главная. Гибкая (flow) адаптивная вёрстка.
   Базовый макет течёт сам; брейкпоинты лишь меняют колонки.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; }

:root {
  --ink: #2d3142;
  --muted: #4b5563;
  --soft: #6b7280;
  --blue: #1764E8;
  --line: #e5e7eb;
  --bg: #f8f9fa;
  --pad: 24px;          /* боковые поля контейнера */
  --maxw: 1336px;       /* ширина контента */
}

.home-body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.home-frame { width: 100%; overflow-x: clip; }

h1, h2, h3, h4 { font-family: Oswald, Arial, sans-serif; font-weight: 500; margin: 0; }

/* Контейнер: центрированный, с боковыми полями */
.home-header__inner,
.home-hero,
.home-catalog,
.home-about,
.home-faq,
.home-footer__top,
.home-footer__bottom {
  width: 100%;
  max-width: calc(var(--maxw) + var(--pad) * 2);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ===================== Header ===================== */
.home-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #f0f1f3;
}
.home-header__inner { display: flex; align-items: center; gap: 0; height: 70px; }
.home-brand img { width: 237px; height: 52px; }
.home-nav { display: flex; align-items: center; gap: 28px; margin-left: 61px; font-size: 14px; font-weight: 500; }
.home-nav > a { color: var(--ink); white-space: nowrap; }
.home-nav > a:hover { color: var(--blue); }
.home-catalog-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px;
  border: 1px solid #e7ebef; border-radius: 999px; background: #f2f4f6; color: var(--ink); font-weight: 600;
}
.home-catalog-btn img { width: 12px; height: auto; filter: brightness(0) saturate(100%) invert(17%) sepia(13%) saturate(782%) hue-rotate(191deg) brightness(91%) contrast(89%); opacity: .78; }
.home-catalog-btn img:last-child { width: 11px; }
.home-search {
  display: flex; align-items: center; gap: 8px; height: 40px; width: 155px; padding: 0 4px 0 16px;
  margin-left: auto; border-radius: 999px; background: #f2f4f6; color: var(--soft); font-size: 14px;
}
.home-search span { flex: 1; white-space: nowrap; overflow: hidden; }
.home-search b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: #fff; }
.home-search b img { width: 13px; height: 13px; }
.home-phone { display: inline-flex; align-items: center; height: 32px; margin-left: 18px; padding: 0 20px; border-radius: 999px; background: #f2f4f6; color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.home-cart { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: #f2f4f6; flex: none; margin-left: 16px; }
.home-cart img { width: 16px; height: 16px; object-fit: contain; }
.home-cart span { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border: 2px solid #fff; border-radius: 999px; background: var(--blue); color: #fff; font-size: 10px; font-weight: 700; }

/* Burger + mobile menu (скрыты на десктопе) */
.home-burger, .home-mobile-menu { display: none; }

/* ===================== Main ===================== */
.home-main { display: block; padding-top: 28px; padding-bottom: 8px; }
section { scroll-margin-top: 80px; }

/* ===================== Hero ===================== */
.home-hero {
  position: relative;
  margin-top: 8px;
  margin-bottom: 56px;
  padding: clamp(40px, 6vw, 88px) var(--pad);
  border-radius: 32px;
  background: #F2F2F2;
  box-shadow: 0 18px 50px rgba(45,49,66,.06);
  overflow: hidden;
  text-align: center;
}
.home-hero__content { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }
.home-hero h1 { margin: 0; font-size: clamp(30px, 6.2vw, 72px); line-height: 1.06; text-transform: uppercase; }
.home-discount { margin: 16px 0 0; color: var(--blue); font-size: clamp(15px, 2.2vw, 20px); font-weight: 600; }
.home-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
.home-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 30px; border-radius: 999px; font-size: 16px; font-weight: 600; }
.home-btn--dark { background: var(--ink); color: #fff; }
.home-btn--dark img { width: 14px; height: auto; }
.home-btn--light { border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.home-btn--light:hover { border-color: var(--blue); color: var(--blue); }

/* ===================== Section head ===================== */
.home-section-head, .home-faq__head { margin-bottom: 26px; }
.home-section-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; }
.home-section-head h2, .home-faq__head h2 { font-size: clamp(28px, 4.5vw, 48px); line-height: 1.02; text-transform: uppercase; }
.home-section-head > div { height: 1px; background: var(--line); }
.home-section-head p { color: var(--soft); font-size: 14px; text-align: right; }
.home-faq__head { text-align: center; }
.home-faq__head p { margin: 8px 0 0; color: var(--soft); font-size: 15px; }

/* ===================== Catalog (bento) ===================== */
.home-catalog { margin-bottom: 64px; }
.home-catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: minmax(300px, 360px) minmax(180px, 200px);
  gap: 24px;
}
.home-cat {
  position: relative; overflow: hidden; border-radius: 28px; padding: 32px;
  display: flex; flex-direction: column; color: var(--ink);
  min-height: 200px;
  isolation: isolate;
  background: #dcebf4;
  box-shadow: 0 18px 46px rgba(45,49,66,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
.home-cat:hover { transform: translateY(-4px); box-shadow: 0 24px 56px rgba(45,49,66,.12); }
.home-cat::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(20,25,38,.22); pointer-events: none; }
.home-cat h3 { position: relative; z-index: 2; max-width: 70%; color: #fff; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.12; text-transform: uppercase; text-shadow: 0 2px 18px rgba(0,0,0,.32); }
.home-cat p { display: none; }
.home-cat i { position: absolute; z-index: 3; right: 24px; top: 24px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: rgba(255,255,255,.82); box-shadow: 0 8px 20px rgba(20,25,38,.12); }
.home-cat i img { width: 13px; height: 15px; }
/* catalog photos */
.home-cat > img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; pointer-events: none; transition: transform .35s ease; }
.home-cat:hover > img { transform: scale(1.04); }
.home-cat > div { position: absolute; right: 9%; bottom: 18px; z-index: 0; display: flex; align-items: flex-end; gap: 6px; }
.home-cat > div img { width: auto; height: clamp(110px, 24vw, 200px); }

.home-cat--milk  { grid-column: 1 / 3; grid-row: 1; }
.home-cat--coffee{ grid-column: 3; grid-row: 1; }
.home-cat--plant { grid-column: 4; grid-row: 1; }
.home-cat--water { grid-column: 1; grid-row: 2; }
.home-cat--syrup { grid-column: 2; grid-row: 2; }
.home-cat--ice   { grid-column: 3; grid-row: 2; }
.home-cat--cups  { grid-column: 4; grid-row: 2; }
.home-cat--milk h3 { font-size: clamp(26px, 3.2vw, 36px); }
.home-cat--coffee h3 { font-size: clamp(22px, 2.6vw, 30px); }
.home-cat--plant h3 { font-size: clamp(20px, 2.2vw, 24px); }
.home-cat--water h3, .home-cat--syrup h3, .home-cat--ice h3, .home-cat--cups h3 { font-size: clamp(18px, 2vw, 20px); }
.home-cat--milk i { width: 48px; height: 48px; }
.home-cat--coffee > img { object-position: 52% center; }
.home-cat--plant > img { object-position: 55% center; }
.home-cat--water > img { object-position: 52% center; }
.home-cat--syrup > img { object-position: 52% center; }
.home-cat--ice > img { object-position: center; }
.home-cat--cups > img { object-position: center; }

/* ===================== About ===================== */
.home-about { margin-bottom: 64px; }
.home-about-layout {
  display: grid;
  gap: 24px;
}
.home-about-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  min-height: 520px;
}
.home-about-cards {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.home-about article {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 248px;
  padding: 32px;
  border: 1px solid #eef0f2;
  border-radius: 28px;
  background: #fff;
}
.home-about h3 { max-width: 560px; font-size: clamp(18px, 2vw, 22px); line-height: 1.25; }
.home-about p { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.home-about-image {
  position: relative;
  margin: 0;
  min-height: 520px;
  height: 100%;
  overflow: hidden;
  border-radius: 32px;
  background: #e8eaed;
}
.home-about-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}
.home-about-image--barista img { object-position: center 44%; }
.home-about-image--logistics img { object-position: center center; }

/* ===================== FAQ ===================== */
.home-faq { margin-bottom: 64px; }
.home-faq__list { display: flex; flex-direction: column; gap: 12px; max-width: 880px; margin: 0 auto; }
.home-faq button { position: relative; display: block; width: 100%; text-align: left; padding: 22px 56px 22px 24px; border: 1px solid #eef0f2; border-radius: 16px; background: #fff; }
.home-faq button b { display: block; font-family: Inter, Arial, sans-serif; font-size: 16px; font-weight: 600; color: var(--ink); }
.home-faq button em { display: block; overflow: hidden; max-height: 0; margin-top: 0; color: var(--muted); font-style: normal; font-size: 14px; line-height: 1.6; transition: max-height .3s ease, margin-top .3s ease; }
.home-faq button.is-open em { max-height: 720px; margin-top: 12px; }
.home-faq button span { position: absolute; right: 20px; top: 20px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: #f2f4f6; color: var(--ink); font-size: 18px; }

/* ===================== Footer ===================== */
.home-footer { background: #fff; border-top: 1px solid #f0f1f3; margin-top: 24px; }
.home-footer__top { display: grid; grid-template-columns: 1.7fr 1fr 1.2fr 1.2fr 1fr; gap: 28px; padding-top: 48px; padding-bottom: 26px; }
.home-footer__brand img { width: 220px; height: auto; margin-bottom: 14px; }
.home-footer__brand p { margin: 0; color: var(--soft); font-size: 13px; max-width: 240px; }
.home-footer h4 { font-size: 13px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 14px; }
.home-footer__top section > a { display: block; margin-bottom: 10px; color: var(--soft); font-size: 14px; }
.home-footer__top section > a:hover { color: var(--blue); }
.home-footer__top section > a.home-footer__social { display: inline-flex !important; }
.home-footer__social { display: inline-flex !important; align-items: center; justify-content: flex-start; gap: 9px; width: 100%; min-height: 32px; margin-bottom: 10px; color: var(--soft); font-size: 14px; font-weight: 500; line-height: 1.25; text-decoration: none; white-space: nowrap; }
.home-footer__social:hover { color: var(--blue); }
.home-footer__social img { width: 22px; height: 22px; flex: 0 0 22px; }
.home-footer__social span { display: inline-block; min-width: 0; }
.home-footer__social b { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 7px; background: #111827; color: #fff; font-size: 8px; font-weight: 800; letter-spacing: -.3px; }
.home-footer__actions { width: 100%; max-width: calc(var(--maxw) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad) 4px; display: flex; flex-wrap: wrap; gap: 12px; }
.home-footer__phone, .home-footer__cta { display: inline-flex; align-items: center; height: 38px; padding: 0 22px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.home-footer__phone { background: #f9f9f9; color: var(--ink); }
.home-footer__cta { background: var(--blue); color: #fff; }
.home-footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid #f0f1f3; color: var(--soft); font-size: 12px; }
.home-footer__bottom div { display: flex; gap: 24px; }

/* ============================================================
   ADAPTIVE BREAKPOINTS
   ============================================================ */

/* — планшет: каталог 2 колонки, about 1 колонка — */
@media (max-width: 1000px) {
  .home-catalog-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: none; grid-auto-rows: minmax(170px, auto); }
  .home-cat--milk { grid-column: 1 / 3; grid-row: auto; min-height: 240px; }
  .home-cat--coffee, .home-cat--plant, .home-cat--water, .home-cat--syrup, .home-cat--ice, .home-cat--cups { grid-column: auto; grid-row: auto; }
  .home-about-row { grid-template-columns: 1fr; min-height: 0; }
  .home-about-row--reverse .home-about-image { order: 2; }
  .home-about-row--reverse .home-about-cards { order: 1; }
  .home-about-image { min-height: 460px; }
  .home-footer__top { grid-template-columns: 1fr 1fr; gap: 22px 28px; }
  .home-footer__brand { grid-column: 1 / -1; }
}

/* — мобильный хедер: бургер вместо меню — */
@media (max-width: 760px) {
  .home-header { position: fixed; left: 0; right: 0; }
  .home-main { padding-top: 70px; }
  .home-header__inner { height: 58px; gap: 10px; }
  .home-brand img { width: 150px; }
  .home-nav, .home-search, .home-phone { display: none !important; }
  .home-cart { margin-left: auto; }
  .home-burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 9px; }
  .home-burger span { display: block; width: 100%; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
  body.menu-open .home-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .home-burger span:nth-child(2) { opacity: 0; }
  body.menu-open .home-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .home-mobile-menu { position: fixed; left: 0; right: 0; top: 58px; z-index: 99; display: none; flex-direction: column; padding: 6px 20px 18px; background: #fff; border-bottom: 1px solid #eef0f3; box-shadow: 0 16px 30px rgba(0,0,0,.08); }
  body.menu-open .home-mobile-menu { display: flex; }
  .home-mobile-menu a { display: flex; align-items: center; gap: 10px; padding: 14px 2px; border-bottom: 1px solid #f3f4f6; color: var(--ink); font-size: 16px; font-weight: 500; }
  .home-mobile-menu a:last-child { border-bottom: 0; }
  .home-mobile-menu a img { display: none; }
  .home-mobile-menu__phone { color: var(--blue) !important; font-weight: 700 !important; }
}

/* — телефон: всё в одну колонку — */
@media (max-width: 640px) {
  :root { --pad: 16px; }
  .home-hero { margin-bottom: 36px; border-radius: 22px; padding: 32px 18px; }
  .home-hero__actions { flex-direction: column; gap: 10px; }
  .home-btn { width: 100%; height: 52px; }
  .home-section-head { grid-template-columns: 1fr; gap: 6px; }
  .home-section-head > div { display: none; }
  .home-section-head p { text-align: left; }

  .home-catalog-grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 14px; }
  .home-cat { grid-column: auto !important; min-height: 124px; padding: 22px; }
  .home-cat i, .home-cat--milk i { top: 16px; right: 16px; left: auto; bottom: auto; transform: none; width: 36px; height: 36px; }
  .home-cat > img, .home-cat--milk > img, .home-cat--coffee > img,
  .home-cat--water > img, .home-cat--syrup > img, .home-cat--ice > img {
    inset: 0; width: 100%; height: 100%; max-width: none; right: auto; top: auto; bottom: auto; transform: none; object-fit: cover;
  }
  .home-cat h3 { max-width: calc(100% - 58px); }

  .home-about-layout, .home-about-row, .home-about-cards { gap: 14px; }
  .home-about article { min-height: 0; padding: 22px; border-radius: 18px; }
  .home-about-image { min-height: 280px; border-radius: 22px; }
  .home-about-image img { min-height: 0; }
  .home-faq button { padding: 18px 50px 18px 18px; }

  .home-footer__top { grid-template-columns: 1fr 1fr; gap: 20px; }
  .home-footer__bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .home-footer__bottom div { flex-direction: column; gap: 6px; }
}

/* — узкий телефон — */
@media (max-width: 380px) {
  .home-footer__top { grid-template-columns: 1fr; }
}
