/* Site shell — header, mega menu, footer */

.fm-site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 300;
  isolation: isolate;
  border-bottom: 1px solid var(--fm-gray-200);
}
.fm-site-header__strip {
  background: var(--fm-red);
  color: #fff;
}
.fm-site-header__strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 8px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.2;
}
.fm-site-header__strip a { color: #fff; }
.fm-site-header__strip a:hover { opacity: .88; }
.fm-site-header__strip-links {
  display: flex;
  align-items: center;
  gap: 16px;
}
.fm-site-header__social { display: inline-flex; align-items: center; }
.fm-site-header__core { padding: 20px 0 0; }
.fm-site-header__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 28px;
  padding-bottom: 16px;
}
.fm-site-header__logo img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.fm-site-header__search {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
.fm-site-header__search input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--fm-gray-200);
  border-radius: 12px;
  padding: 0 48px 0 16px;
  font-size: 14px;
  font-family: inherit;
  color: var(--fm-gray-900);
  background: var(--fm-gray-100);
}
.fm-site-header__search input:focus {
  outline: none;
  border-color: var(--fm-red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(214, 40, 40, .08);
}
.fm-site-header__search button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--fm-gray-600);
}
.fm-site-header__search button svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.fm-site-header__nav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 14px;
  min-width: 0;
}
.fm-site-header__categories { position: relative; flex-shrink: 0; }
.fm-site-header__cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--fm-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.fm-site-header__cat-btn svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.fm-site-header__chevron { opacity: .85; transition: transform .2s; }
.fm-site-header__cat-btn[aria-expanded="true"] .fm-site-header__chevron {
  transform: rotate(180deg);
}
.fm-site-header__menu {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.fm-site-header__menu::-webkit-scrollbar { display: none; }
.fm-site-header__menu a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fm-gray-900);
  white-space: nowrap;
  border-radius: 6px;
}
.fm-site-header__menu a:hover {
  color: var(--fm-red);
  background: var(--fm-gray-100);
}
.fm-site-header__menu a.is-active { color: var(--fm-red); }
.fm-site-header__menu a.has-pill span {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: var(--fm-red);
  border-radius: 4px;
  padding: 2px 5px;
}
.fm-site-header__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-shrink: 0;
}
.fm-site-header__tool {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fm-gray-900);
  font-size: 12px;
  font-weight: 600;
}
.fm-site-header__tool svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fm-site-header__tool:hover { color: var(--fm-red); }
.fm-site-header__badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--fm-red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.fm-site-header__tool--cart .fm-site-header__badge {
  right: auto;
  left: 12px;
}
.fm-site-header__cart-val {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Mega */
.fm-mega-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 280;
}
.fm-mega-menu[hidden] { display: none; }
.fm-mega-menu__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, .32);
  backdrop-filter: blur(2px);
}
.fm-mega-menu__panel {
  position: relative;
  background: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .12);
  max-height: min(480px, calc(100vh - 140px));
  overflow-y: auto;
}
.fm-mega-menu__inner {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 320px;
}
.fm-mega-menu__sidebar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 12px;
  background: var(--fm-gray-100);
  border-right: 1px solid var(--fm-gray-200);
}
.fm-mega-menu__cat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fm-gray-900);
  text-align: left;
}
.fm-mega-menu__cat.is-active {
  background: #fff;
  color: var(--fm-red);
  box-shadow: var(--fm-shadow-sm);
}
.fm-mega-menu__content { padding: 24px 28px; }
.fm-mega-menu__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.fm-mega-menu__col h3 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fm-gray-600);
}
.fm-mega-menu__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.fm-mega-menu__col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 500;
}
.fm-mega-menu__col a:hover { color: var(--fm-red); }
.fm-mega-menu__all { color: var(--fm-red) !important; font-weight: 600 !important; }
body.is-mega-open { overflow: hidden; }

/* Footer (fm-foot) */
.fm-foot {
  background: #f3f4f6;
  padding-top: 40px;
  margin-top: 0;
  border-top: 1px solid var(--fm-gray-200);
}
.fm-foot__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 24px;
  padding-bottom: 40px;
  align-items: start;
}
.fm-foot__grid h3 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
}
.fm-foot__grid ul { list-style: none; margin: 0; padding: 0; }
.fm-foot__grid li + li { margin-top: 8px; }
.fm-foot__grid a { font-size: 13px; color: #444; text-decoration: none; }
.fm-foot__grid a:hover { color: var(--fm-red); }
.fm-foot__phone {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  display: inline-block;
  color: var(--fm-gray-900);
  text-decoration: none;
}
.fm-foot__mail {
  margin: 0 0 6px;
  font-size: 13px;
  color: #555;
}
.fm-foot__trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 28px 64px;
}
.fm-foot__trust-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.fm-foot__trust-block {
  width: 100%;
  max-width: 640px;
  text-align: center;
}
.fm-foot__logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 20px;
}
.fm-foot__logos img {
  height: 36px;
  width: auto;
  max-width: 88px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
}
.fm-foot__logos--text span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #333;
  background: #fff;
  white-space: nowrap;
}
.fm-foot__bottom {
  padding: 18px 0 28px;
  border-top: 1px solid var(--fm-gray-200);
  font-size: 12px;
  color: var(--fm-gray-600);
}

/* Footer (legacy) */
.fm-footer {
  margin-top: 64px;
  background: linear-gradient(180deg, #fafafa 0%, #f3f4f6 100%);
  border-top: 1px solid var(--fm-gray-200);
  color: var(--fm-gray-900);
}
.fm-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding: 56px 0 40px;
}
.fm-footer__brand p {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--fm-gray-600);
  max-width: 280px;
}
.fm-footer__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
}
.fm-footer__logo img {
  width: 40px;
  height: 40px;
}
.fm-footer__col h3 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.fm-footer__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.fm-footer__col li + li { margin-top: 8px; }
.fm-footer__col a {
  font-size: 14px;
  color: var(--fm-gray-600);
}
.fm-footer__col a:hover { color: var(--fm-red); }
.fm-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  padding: 18px 0 28px;
  border-top: 1px solid var(--fm-gray-200);
  font-size: 12px;
  color: var(--fm-gray-600);
}
.fm-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.fm-footer__legal a:hover { color: var(--fm-red); }

@media (max-width: 900px) {
  .fm-site-header__top {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "logo tools"
      "search search";
  }
  .fm-site-header__logo { grid-area: logo; }
  .fm-site-header__tools { grid-area: tools; }
  .fm-site-header__search { grid-area: search; max-width: none; }
  .fm-site-header__cart-val { display: none; }
  .fm-mega-menu__inner { grid-template-columns: 1fr; }
  .fm-mega-menu__sidebar { flex-direction: row; overflow-x: auto; }
  .fm-mega-menu__cols { grid-template-columns: 1fr 1fr; }
  .fm-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .fm-foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .fm-footer__grid { grid-template-columns: 1fr; }
  .fm-foot__grid { grid-template-columns: 1fr; }
  .fm-site-header__tool--text { display: none; }
}
