:root {
  --blue: #007FB4;
  --sky: #D8F3FF;
  --green: #0D8A40;
  --gold: #E1A238;
  --ink: #12324a;
  --muted: #4d6577;
  --card: #ffffff;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(0, 63, 90, 0.10);
  --wa: #25D366;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  min-height: 100vh;
  font-family: "Montserrat", system-ui, sans-serif;
  color: var(--ink);
  background: var(--sky) url("images/arkaplan-web.jpg") center top / cover no-repeat fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
body.no-scroll { overflow: hidden; }
a { color: inherit; }
ol, ul { list-style: none; }

/* ---------- Верхняя панель ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 127, 180, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  color: var(--blue);
}

.brand img { width: 40px; height: 40px; }

.topbar-right { display: flex; align-items: center; gap: 6px; }
.nav { display: flex; gap: 4px; }

.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  transition: background-color .15s ease, color .15s ease;
}

.nav a:hover { background: var(--sky); color: var(--blue); }

/* ---------- Меню ---------- */
.menu-wrap { position: relative; }

.menu-btn {
  display: grid;
  place-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--sky);
  cursor: pointer;
  transition: background-color .15s ease;
}

.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transition: transform .2s ease, opacity .2s ease;
}

.menu-btn:hover { background: #c4ebfd; }
.menu-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.is-open span:nth-child(2) { opacity: 0; }
.menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(0, 63, 90, 0.18);
  border: 1px solid rgba(0, 127, 180, 0.10);
}

.menu-user {
  display: flex;
  flex-direction: column;
  padding: 8px 12px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid #e6f1f7;
}
.menu-user strong { font-size: 15px; }
.menu-user span { font-size: 13px; color: var(--muted); }

.menu-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.menu-link:hover { background: var(--sky); color: var(--blue); }

.menu-sep { height: 1px; margin: 6px 4px; background: #e6f1f7; }

.menu-login, .menu-logout {
  display: block;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.menu-login:hover { background: #006a97; }
.menu-logout { margin-top: 6px; background: transparent; color: var(--muted); }
.menu-logout:hover { background: #f1f6f9; }

/* ---------- Окно входа ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 40, 60, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 28px 22px 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 40, 60, 0.3);
}

.modal-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.modal-x:hover { background: #f1f6f9; }

.modal-logo { margin: 0 auto 8px; }

.modal-card h2 {
  margin-bottom: 18px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--blue);
}

.field { display: block; margin-bottom: 14px; }
.field > span:first-child { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }

.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid #cfe3ee;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fbfdfe;
}
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,127,180,.15); }

.pass-wrap { position: relative; display: block; }
.pass-wrap input { padding-right: 96px; }
.pass-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.form-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecea;
  color: #a12a1c;
  font-size: 14px;
  font-weight: 600;
}

.btn-primary {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary:hover { background: #006a97; }
.btn-primary:disabled { opacity: .6; cursor: progress; }

/* ---------- Первый экран ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 16px 56px;
}

.hero-logo {
  width: min(62vw, 240px);
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 63, 90, 0.18));
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(34px, 9vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--blue);
  letter-spacing: -0.01em;
}

.hero-sub {
  max-width: 480px;
  margin-top: 10px;
  font-size: clamp(16px, 4.2vw, 19px);
  font-weight: 600;
  color: var(--green);
}

.hero-phone {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- Кнопка WhatsApp ---------- */
.btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  min-height: 58px;
  margin-top: 26px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--wa);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.35);
  transition: transform .15s ease, background-color .15s ease;
}

.btn-wa svg { width: 26px; height: 26px; flex-shrink: 0; }
.btn-wa:hover { background: #1EBE5A; transform: translateY(-1px); }
.btn-wa:active { transform: translateY(1px); }
.btn-wa:focus-visible, .wa-float:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.btn-wa-light { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18); }
.btn-wa-light:focus-visible { outline-color: #fff; }

/* ---------- Секции ---------- */
.section {
  padding: 48px 16px;
}

.section-alt {
  background: rgba(255, 255, 255, 0.55);
}

.section-head {
  max-width: 1080px;
  margin: 0 auto 26px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(225, 162, 56, 0.18);
  color: #9a6512;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.section-head h2 {
  margin-top: 10px;
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 800;
  color: var(--blue);
  line-height: 1.15;
}

.section-head p {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- Магазины ---------- */
.stores {
  display: grid;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
}

.store {
  display: flex;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.store-media {
  position: relative;
  flex: 0 0 38%;
  max-width: 180px;
  min-height: 140px;
  background: var(--sky);
}

.store-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-media.is-empty img {
  object-fit: contain;
  padding: 22px;
  opacity: .9;
}

.store-num {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.store-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 16px 18px;
}

.store-city {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(13, 138, 64, 0.12);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.store-name {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.store-address {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.store-phone {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  text-decoration: none;
}

.empty {
  grid-column: 1 / -1;
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Призыв ---------- */
.cta {
  margin: 48px 16px;
  padding: 36px 22px;
  border-radius: 28px;
  background: linear-gradient(140deg, var(--blue) 0%, #006a97 55%, var(--green) 130%);
  color: #fff;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 127, 180, 0.28);
}

.cta h2 {
  max-width: 560px;
  margin: 0 auto;
  font-size: clamp(22px, 5.6vw, 30px);
  font-weight: 800;
  line-height: 1.25;
}

.cta p {
  margin-top: 8px;
  opacity: .9;
  font-weight: 500;
}

/* ---------- Подвал ---------- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px calc(100px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

/* ---------- Плавающая кнопка ---------- */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  animation: wa-pulse 2.6s ease-in-out infinite;
  transition: transform .15s ease;
}

.wa-float svg { width: 32px; height: 32px; }
.wa-float:hover { transform: scale(1.06); }

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,.22), 0 0 0 0 rgba(37,211,102,.45); }
  60%      { box-shadow: 0 8px 24px rgba(0,0,0,.22), 0 0 0 14px rgba(37,211,102,0); }
}

/* ---------- Большие экраны ---------- */
@media (min-width: 640px) {
  .stores { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 24px; }
  .cta { margin: 64px auto; max-width: 1080px; padding: 48px 32px; }
}

@media (min-width: 960px) {
  .stores { grid-template-columns: repeat(3, 1fr); }
  .store { flex-direction: column; }
  .store-media { flex: none; max-width: none; aspect-ratio: 4 / 3; }
  .hero { padding: 64px 24px 72px; }
}

@media (max-width: 360px) {
  .brand span { display: none; }
}

@media (hover: none) {
  body { background-attachment: scroll; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wa-float { animation: none; }
  * { transition: none !important; }
}
