/* =========================================================
   biglesa.com.ua — design system
   ========================================================= */

:root {
  /* Цветовая палитра — индустриальная (сталь + hi-vis жёлтый) */
  --c-bg: #FAFAF9;
  --c-surface: #FFFFFF;
  --c-surface-2: #F4F4F2;
  --c-ink: #0F172A;
  --c-ink-2: #334155;
  --c-ink-3: #64748B;
  --c-border: #E2E8F0;
  --c-border-2: #CBD5E1;

  --c-brand: #0F172A;          /* slate-900 */
  --c-accent: #F59E0B;         /* amber-500 — hi-vis */
  --c-accent-dark: #B45309;
  --c-success: #16A34A;
  --c-danger: #DC2626;

  --c-dark-bg: #0B1220;
  --c-dark-surface: #111A2E;
  --c-dark-ink: #F8FAFC;

  /* Радиусы и тени */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.06);

  /* Размеры */
  --header-h: 76px;
  --container: 1280px;

  /* Типографика */
  --ff-display: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ff-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Тайминги */
  --t-fast: 150ms cubic-bezier(.4, 0, .2, 1);
  --t-med: 250ms cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--ff-body);
  background: var(--c-bg);
  color: var(--c-ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4, h5 {
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--c-ink);
}

h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 1.5vw, 1.375rem); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* Контейнер */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: transform var(--t-fast), background var(--t-fast), border var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--c-accent);
  color: var(--c-brand);
  border-color: var(--c-accent);
}
.btn--primary:hover { background: var(--c-accent-dark); color: #fff; border-color: var(--c-accent-dark); }

.btn--secondary {
  background: var(--c-brand);
  color: #fff;
  border-color: var(--c-brand);
}
.btn--secondary:hover { background: #1E293B; }

.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  border-color: var(--c-border-2);
}
.btn--ghost:hover { background: var(--c-surface-2); border-color: var(--c-ink-3); }

.btn--sm { padding: 10px 18px; font-size: 0.875rem; }
.btn--lg { padding: 16px 32px; font-size: 1rem; }

/* =========================================================
   Шапка
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--c-border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}
.header__logo { display: flex; align-items: center; gap: 10px; }
.header__logo img { height: 40px; width: auto; display: block; }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  margin-left: 24px;
  min-width: 0;
}
.nav__link {
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--c-ink-2);
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.nav__link:hover { background: var(--c-surface-2); color: var(--c-ink); }
.nav__link.is-active { background: var(--c-brand); color: #fff; }

.header__actions { display: flex; align-items: center; gap: 12px; }
.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--c-ink);
  white-space: nowrap;
}
.header__phone:hover { color: var(--c-accent-dark); }

.lang-switcher {
  display: inline-flex;
  background: var(--c-surface-2);
  border-radius: 999px;
  padding: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}
.lang-switcher a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--c-ink-3);
}
.lang-switcher a.is-active {
  background: var(--c-brand);
  color: #fff;
}

.burger {
  display: none;
  background: transparent;
  border: 0;
  padding: 10px;
  border-radius: 10px;
  color: var(--c-ink);
  align-items: center;
  justify-content: center;
}
.burger:hover { background: var(--c-surface-2); }
.burger svg { width: 24px; height: 24px; display: block; }
.burger[aria-expanded="true"] .burger__open { display: none; }
.burger__close { display: none; }
.burger[aria-expanded="true"] .burger__close { display: block; }

@media (max-width: 1200px) {
  .nav { display: none; }
  .header__phone span { display: none; }
  .burger { display: inline-flex; }
}

/* Мобильное меню */
.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 60;
  display: none;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu__link {
  padding: 18px 0;
  font-size: 1.125rem;
  font-weight: 600;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-ink);
  display: block;
}
.mobile-menu__link:active { color: var(--c-accent-dark); }
.mobile-menu__divider {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-ink-3);
  margin: 24px 0 8px;
}

/* =========================================================
   BENTO — сетка
   ========================================================= */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.bento__cell {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 28px;
  overflow: hidden;
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.bento__cell:hover { box-shadow: var(--shadow-md); border-color: var(--c-border-2); }

/* Размеры ячеек bento */
.bento__cell--hero { grid-column: span 8; grid-row: span 2; min-height: 480px; padding: 48px; background: var(--c-brand); color: #fff; }
.bento__cell--hero h1 { color: #fff; }
.bento__cell--stat { grid-column: span 4; min-height: 232px; }
.bento__cell--feature { grid-column: span 4; min-height: 232px; }
.bento__cell--wide { grid-column: span 8; }
.bento__cell--full { grid-column: span 12; }
.bento__cell--accent { background: var(--c-accent); color: var(--c-brand); border-color: var(--c-accent); }
.bento__cell--dark { background: var(--c-brand); color: #fff; }
.bento__cell--dark h2, .bento__cell--dark h3 { color: #fff; }

@media (max-width: 1024px) {
  .bento__cell--hero { grid-column: span 12; min-height: 360px; padding: 32px; }
  .bento__cell--stat { grid-column: span 6; min-height: 180px; }
  .bento__cell--feature { grid-column: span 6; }
  .bento__cell--wide { grid-column: span 12; }
}
@media (max-width: 640px) {
  .bento { gap: 12px; }
  .bento__cell { padding: 20px; border-radius: var(--r-md); }
  .bento__cell--hero { padding: 24px; min-height: 320px; }
  .bento__cell--stat,
  .bento__cell--feature { grid-column: span 12; min-height: 160px; }
}

/* Hero внутренности */
.hero__eyebrow {
  display: inline-block;
  background: var(--c-accent);
  color: var(--c-brand);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 { margin-bottom: 20px; max-width: 18ch; }
.hero__lead {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 50ch;
  margin-bottom: 32px;
}
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Stat-блок */
.stat__value {
  font-family: var(--ff-display);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
.stat__label {
  font-size: 0.95rem;
  color: var(--c-ink-3);
  font-weight: 500;
}
.bento__cell--dark .stat__label { color: rgba(255,255,255,0.7); }
.bento__cell--accent .stat__label { color: rgba(15,23,42,0.7); }

/* Feature-блок */
.feature__icon {
  display: inline-flex;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--c-surface-2);
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature__icon svg { width: 26px; height: 26px; color: var(--c-brand); }
.bento__cell--dark .feature__icon { background: rgba(255,255,255,0.1); }
.bento__cell--dark .feature__icon svg { color: var(--c-accent); }
.bento__cell--accent .feature__icon { background: rgba(15,23,42,0.1); }
.feature__title { font-size: 1.125rem; margin-bottom: 8px; }
.feature__text { color: var(--c-ink-3); font-size: 0.95rem; line-height: 1.55; }
.bento__cell--dark .feature__text { color: rgba(255,255,255,0.7); }
.bento__cell--accent .feature__text { color: rgba(15,23,42,0.7); }

/* =========================================================
   Секции
   ========================================================= */
section { padding: 80px 0; }
@media (max-width: 640px) { section { padding: 56px 0; } }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.section__title { max-width: 24ch; }
.section__lead { color: var(--c-ink-3); max-width: 50ch; font-size: 1.05rem; }
.section__eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-accent-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* =========================================================
   Категории — большие плитки
   ========================================================= */
.categories {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 32px;
  min-height: 280px;
  overflow: hidden;
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
  cursor: pointer;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--c-border-2); }
.cat-tile--big { grid-column: span 6; min-height: 360px; }
.cat-tile--reg { grid-column: span 6; }

@media (max-width: 768px) {
  .cat-tile--big, .cat-tile--reg { grid-column: span 12; min-height: 240px; }
}

.cat-tile__title {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.cat-tile__lead { color: var(--c-ink-3); font-size: 0.95rem; margin-bottom: 20px; }
.cat-tile__meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-accent-dark);
}
.cat-tile__arrow {
  position: absolute;
  top: 28px; right: 28px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--c-surface-2);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
}
.cat-tile:hover .cat-tile__arrow { background: var(--c-accent); transform: rotate(-45deg); }

/* =========================================================
   Продукты — карточки
   ========================================================= */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--c-border-2); }
.product-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--c-surface-2);
  overflow: hidden;
  position: relative;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms cubic-bezier(.2,.6,.2,1);
}
.product-card:hover .product-card__media img { transform: scale(1.04); }
.product-card__body { padding: 20px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.product-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.product-card__title { font-size: 1rem; flex: 1; line-height: 1.3; }
.product-card__title-link { color: inherit; }
.product-card__title-link:hover { color: var(--c-accent-dark); }
.product-card__stock {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-success);
  background: #DCFCE7;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.product-card__prices { display: flex; align-items: baseline; gap: 12px; margin-top: auto; }
.price-old {
  font-size: 0.85rem;
  color: var(--c-ink-3);
  text-decoration: line-through;
}
.price-new {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--ff-display);
  letter-spacing: -0.02em;
  color: var(--c-ink);
}
.product-card__cta { width: 100%; }

/* =========================================================
   Город — спец-блоки
   ========================================================= */
.city-hero {
  padding: 60px 0 40px;
  background: linear-gradient(180deg, var(--c-surface) 0%, var(--c-bg) 100%);
  border-bottom: 1px solid var(--c-border);
}
.city-hero h1 { margin-bottom: 16px; }
.city-hero__breadcrumbs {
  font-size: 0.875rem;
  color: var(--c-ink-3);
  margin-bottom: 16px;
}
.city-hero__breadcrumbs a { color: var(--c-ink-3); }
.city-hero__breadcrumbs a:hover { color: var(--c-ink); }
.city-hero__usp { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.city-hero__usp-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.city-hero__usp-item svg { width: 16px; height: 16px; color: var(--c-success); }

.warehouse-card {
  background: var(--c-brand);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 32px;
}
.warehouse-card h3 { color: #fff; margin-bottom: 16px; }
.warehouse-card__address { font-size: 1.125rem; color: rgba(255,255,255,0.85); }

.np-offices { display: grid; gap: 12px; margin-top: 16px; }
.np-office {
  padding: 12px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.np-office svg { color: #DC2626; width: 18px; height: 18px; flex-shrink: 0; }

.frontline-note {
  margin-top: 16px;
  padding: 16px;
  background: #FEF3C7;
  border-left: 4px solid var(--c-accent);
  border-radius: 8px;
  font-size: 0.9rem;
}

/* =========================================================
   Кросс-линковка — блок похожих страниц
   ========================================================= */
.cross-links {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 32px;
}
.cross-links h2 { font-size: 1.25rem; margin-bottom: 20px; }
.cross-links__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cross-links__list a {
  display: inline-flex;
  padding: 8px 14px;
  background: var(--c-surface-2);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-ink-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.cross-links__list a:hover { background: var(--c-brand); color: #fff; }

/* =========================================================
   Футер
   ========================================================= */
.footer {
  background: var(--c-dark-bg);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 768px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }

.footer h4 { color: #fff; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.footer__about p { font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }
.footer__nav { display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; }
.footer__nav a:hover { color: #fff; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

/* =========================================================
   Sticky bottom CTA (mobile)
   ========================================================= */
.sticky-cta {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: var(--c-accent);
  color: var(--c-brand);
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  display: none;
  z-index: 40;
  text-align: center;
}
@media (max-width: 768px) { .sticky-cta { display: block; } }

/* =========================================================
   Лид-форма (модал)
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal.is-open { display: flex; }
.modal__box {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  position: relative;
}
.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--c-surface-2);
  border: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.modal h2 { margin-bottom: 8px; }
.modal__lead { color: var(--c-ink-3); margin-bottom: 24px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form__field {
  display: flex; flex-direction: column; gap: 6px;
}
.form__field label { font-size: 0.85rem; font-weight: 600; color: var(--c-ink-2); }
.form__field input,
.form__field textarea {
  padding: 12px 14px;
  border: 1px solid var(--c-border-2);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  transition: border-color var(--t-fast);
}
.form__field input:focus,
.form__field textarea:focus {
  outline: none;
  border-color: var(--c-brand);
}
.form__field textarea { min-height: 80px; resize: vertical; }
.form__honeypot { position: absolute; left: -9999px; opacity: 0; }
.form__consent { font-size: 0.75rem; color: var(--c-ink-3); }
.form__success {
  display: none;
  padding: 16px;
  background: #DCFCE7;
  border-radius: 10px;
  color: #166534;
  font-weight: 600;
}
.form.is-submitted .form__success { display: block; }
.form.is-submitted .form__field,
.form.is-submitted button { display: none; }

/* =========================================================
   Утилиты
   ========================================================= */
.text-accent { color: var(--c-accent-dark); }
.text-muted { color: var(--c-ink-3); }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-32 { margin-top: 32px; }
.flex { display: flex; }
.gap-12 { gap: 12px; }
.items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
