/* Тập học sinh Minh Gia Phát — восстановление из веб-архива (снимок 2021-04-23) */

:root {
  --brand: #0b4ea2;
  --brand-dark: #083a7a;
  --accent: #e8322b;
  --accent-text: #c2201a;   /* AA для мелкого текста */
  --ink: #222;
  --ink-soft: #666;
  --line: #e2e2e2;
  --panel: #fff;
  --bg: #f4f6f9;
  --font: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: 60px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.7 var(--font);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--accent);
}

h1, h2, h3 { font-weight: 700; line-height: 1.25; margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- шапка ---------- */

.site-header__top { background: var(--panel); border-bottom: 1px solid var(--line); }
.site-header__top-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 56px; width: auto; }
.site-header__slogan {
  margin: 0 0 0 auto;
  color: var(--accent-text);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.site-header__bar { background: var(--brand); position: sticky; top: 0; z-index: 40; }
.site-header__bar-inner { display: flex; align-items: center; min-height: 46px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle__bar { display: block; height: 2px; background: #fff; margin: 5px 0; }

.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0; padding: 0;
  list-style: none;
}
.primary-nav__list > li { position: relative; display: flex; align-items: center; }
.primary-nav__list > li > a {
  display: block;
  padding: 13px 16px;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
}
.primary-nav__list > li > a:hover,
.primary-nav__list > li:hover > a { background: var(--brand-dark); text-decoration: none; }

.has-dropdown > a::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 0; height: 0;
  margin-left: 6px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  border-bottom: 0;
}

.dropdown {
  position: absolute;
  top: 100%; left: 0;
  min-width: 240px;
  margin: 0; padding: 6px 0;
  background: var(--panel);
  border-top: 3px solid var(--accent);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
  list-style: none;
  display: none;
}
.dropdown--wide { min-width: 340px; }
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown { display: block; }
.dropdown a, .dropdown span {
  display: block;
  padding: 8px 16px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}
.dropdown a:hover { background: #f1f4f8; text-decoration: none; }

/* ---------- текстовые секции ---------- */

.intro, .vision, .products, .cats, .contact { padding: 42px 0; }
.intro { background: var(--panel); }
.intro h1 {
  font-size: clamp(22px, 3vw, 30px);
  color: var(--brand);
  margin-bottom: 18px;
}
.intro h2 { font-size: 19px; margin: 26px 0 8px; }
.intro__lead { font-size: 16px; font-weight: 500; }
.intro p { margin: 0 0 14px; max-width: 80ch; }
.intro__fields { margin: 0 0 14px; padding-left: 20px; }
.intro__fields li { margin-bottom: 4px; }

.vision { background: var(--brand); color: #fff; text-align: center; }
.vision h2 { font-size: clamp(20px, 2.6vw, 26px); text-transform: uppercase; }
.vision__motto {
  margin: 16px 0 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #ffd34d;
}
.vision p { max-width: 74ch; margin-inline: auto; }

/* ---------- товары ---------- */

.section-title {
  position: relative;
  margin-bottom: 26px;
  padding-bottom: 10px;
  font-size: clamp(19px, 2.4vw, 24px);
  text-transform: uppercase;
  color: var(--brand);
}
.section-title::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 62px; height: 3px;
  background: var(--accent);
}

.grid { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.grid--products { grid-template-columns: repeat(4, 1fr); }
.grid > * { min-width: 0; }

.product {
  height: 100%;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.product__media {
  margin: 0 0 12px;
  aspect-ratio: 235 / 250;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.product__media img { max-height: 100%; width: auto; object-fit: contain; }
.product__title {
  font-size: 15px;
  color: var(--brand);
  text-align: center;
  margin-bottom: 10px;
}
.product__specs {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 6px;
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.product__specs dt { font-weight: 500; color: var(--ink); }
.product__specs dt::after { content: ":"; }
.product__specs dd { margin: 0 0 3px; }

/* ---------- категории ---------- */

.cats { background: var(--panel); }
.cats__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0; padding: 0;
  list-style: none;
}
.cats__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  background: #f7f9fc;
  border-left: 3px solid var(--brand);
  font-size: 14px;
}
.cats__num { flex: none; font-weight: 700; color: var(--accent-text); }

/* ---------- контакты ---------- */

.contact__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 34px;
}
.contact__inner > * { min-width: 0; }
.contact h2 { font-size: clamp(19px, 2.4vw, 24px); color: var(--brand); margin-bottom: 16px; }
.contact h3 { font-size: 15px; margin: 18px 0 8px; }
.contact h3:first-child { margin-top: 0; }
.contact__company { margin: 0 0 10px; font-weight: 700; }
.contact__address { font-style: normal; }
.contact__address p { margin: 0 0 6px; }
.contact__label { display: inline-block; min-width: 92px; font-weight: 500; color: var(--ink-soft); }
.contact__support ul { margin: 0; padding: 0; list-style: none; }
.contact__support li { padding: 5px 0 5px 16px; position: relative; font-size: 14px; }
.contact__support li::before {
  content: "+";
  position: absolute; left: 0;
  color: var(--accent-text); font-weight: 700;
}

/* ---------- футер ---------- */

.site-footer { background: var(--brand-dark); color: #cdd9e8; }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.site-footer__company { margin: 0; color: #fff; font-weight: 500; }
.copyright { margin: 0; font-size: 13px; width: 100%; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .12); }

/* ---------- адаптив ---------- */

@media (max-width: 1024px) {
  .grid--products { grid-template-columns: repeat(3, 1fr); }
  .cats__list { grid-template-columns: repeat(2, 1fr); }
  .contact__inner { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .site-header__top-inner { flex-wrap: wrap; }
  .brand img { height: 44px; }
  .site-header__slogan { width: 100%; margin-left: 0; font-size: 12px; }

  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--brand);
    box-shadow: 0 12px 20px rgba(0, 0, 0, .2);
    display: none;
  }
  .primary-nav.is-open { display: block; }
  .no-js .primary-nav { position: static; display: block; box-shadow: none; }
  .no-js .nav-toggle { display: none; }
  .site-header__bar-inner { position: relative; }
  .primary-nav__list { flex-direction: column; align-items: stretch; }
  .primary-nav__list > li { flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .12); }
  .primary-nav__list > li > a { flex: 1; }
  .has-dropdown > a::after { display: none; }
  .dropdown, .dropdown--wide {
    position: static;
    display: block;
    width: 100%;
    min-width: 0;
    background: var(--brand-dark);
    border-top: 0;
    box-shadow: none;
  }
  .dropdown a, .dropdown span { color: #dfe8f4; }
  .dropdown a:hover { background: rgba(255, 255, 255, .08); }

  .grid--products { grid-template-columns: 1fr 1fr; gap: 14px; }
  .cats__list { grid-template-columns: 1fr; }
}

.site-footer__contact { margin: 0; font-size: 13.5px; font-style: normal; }
.site-footer__badge { margin: 12px 0 0; }
.site-footer__badge img { width: 160px; height: auto; opacity: .9; }
.site-footer__contact a { color: #fff; }
