:root {
  --sm-blue: #0d6efd;
  --sm-blue-dark: #084298;
  --sm-gold: #d4af37;
  --sm-ink: #1f2933;
  --sm-muted: #64707d;
  --sm-line: #dfe4e8;
  --sm-surface: #ffffff;
  --sm-surface-soft: #f8f9fa;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.sm-site-header,
.sm-site-header *,
.sm-site-footer,
.sm-site-footer * {
  box-sizing: border-box;
}

.sm-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  border-bottom: 1px solid var(--sm-line);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 2px 8px rgba(31, 41, 51, .07);
}

.sm-header-layout {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  align-items: center;
  min-height: 68px;
  gap: 28px;
}

.sm-header-logo {
  min-width: 0;
}

.sm-header-logo a {
  display: inline-flex;
  align-items: center;
  color: var(--sm-ink);
  text-decoration: none;
}

.sm-header-logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 180px;
  max-height: 34px;
}

.sm-header-name {
  font-size: 1.35rem;
  font-weight: 700;
}

.sm-primary-navigation {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  min-width: 0;
}

.sm-primary-link,
.sm-products-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 68px;
  padding: 0 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--sm-ink);
  font: inherit;
  font-size: .96rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.sm-primary-link:hover,
.sm-primary-link:focus-visible,
.sm-products-toggle:hover,
.sm-products-toggle:focus-visible,
.sm-products-menu.is-open > .sm-products-toggle {
  border-bottom-color: var(--sm-gold);
  color: var(--sm-blue-dark);
  outline: 0;
}

.sm-contact-link {
  gap: 8px;
  margin-left: 10px;
  color: var(--sm-blue-dark);
}

.sm-products-menu {
  position: relative;
}

.sm-products-toggle {
  gap: 8px;
  cursor: pointer;
}

.sm-products-toggle i {
  font-size: .7rem;
  transition: transform .18s ease;
}

.sm-products-menu.is-open > .sm-products-toggle i {
  transform: rotate(180deg);
}

.sm-products-list,
.sm-product-children {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sm-products-list {
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  display: none;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  width: min(560px, calc(100vw - 32px));
  max-height: min(68vh, 560px);
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--sm-line);
  border-top: 3px solid var(--sm-gold);
  border-radius: 0 0 6px 6px;
  background: var(--sm-surface);
  box-shadow: 0 16px 32px rgba(31, 41, 51, .16);
}

.sm-products-menu.is-open > .sm-products-list {
  display: grid;
}

.sm-product-category {
  min-width: 0;
  padding: 8px 12px 12px;
}

.sm-product-category > a {
  display: block;
  padding: 6px 0 8px;
  color: var(--sm-ink);
  font-weight: 700;
  text-decoration: none;
}

.sm-product-category > a:hover,
.sm-product-category > a:focus-visible,
.sm-product-category.is-active > a,
.sm-product-children .is-active > a {
  color: var(--sm-blue-dark);
  text-decoration: underline;
  text-decoration-color: var(--sm-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.sm-product-children {
  border-left: 2px solid var(--sm-line);
}

.sm-product-children a {
  display: block;
  padding: 5px 10px;
  color: var(--sm-muted);
  font-size: .88rem;
  line-height: 1.35;
  text-decoration: none;
}

.sm-product-children a:hover,
.sm-product-children a:focus-visible {
  color: var(--sm-blue-dark);
  background: var(--sm-surface-soft);
}

.sm-product-all {
  margin-top: 4px;
}

.sm-product-all a {
  color: var(--sm-blue-dark);
  font-weight: 600;
}

.sm-menu-toggle,
.sm-menu-close,
.sm-menu-overlay {
  display: none;
}

.sm-site-footer {
  margin-top: auto;
  padding: 20px 0 14px;
  border-top: 4px solid var(--sm-gold);
  background: #17212b;
  color: #ffffff;
}

.sm-footer-bottom {
  margin-top: 0;
  padding-top: 0;
  color: rgba(255, 255, 255, .64);
  font-size: .82rem;
  line-height: 1.5;
}

.sm-footer-bottom a {
  color: rgba(255, 255, 255, .82);
}

@media (max-width: 991.98px) and (min-width: 768px) {
  .sm-header-layout {
    gap: 12px;
  }

  .sm-primary-link,
  .sm-products-toggle {
    padding-inline: 12px;
  }
}

@media (max-width: 767.98px) {
  body.sm-menu-open {
    overflow: hidden;
  }

  .sm-header-layout {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 62px;
    gap: 14px;
  }

  .sm-header-logo img {
    max-width: min(150px, 52vw);
    max-height: 30px;
  }

  .sm-menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--sm-line);
    border-radius: 6px;
    background: var(--sm-surface);
    color: var(--sm-ink);
  }

  .sm-menu-toggle:hover,
  .sm-menu-toggle:focus-visible {
    border-color: var(--sm-blue);
    outline: 3px solid rgba(13, 110, 253, .2);
  }

  .sm-menu-icon,
  .sm-menu-icon::before,
  .sm-menu-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
  }

  .sm-menu-icon {
    position: relative;
  }

  .sm-menu-icon::before {
    position: absolute;
    top: -6px;
  }

  .sm-menu-icon::after {
    position: absolute;
    top: 6px;
  }

  .sm-primary-navigation {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1002;
    display: block;
    width: min(88vw, 360px);
    height: 100dvh;
    max-width: 100%;
    padding: 70px 18px 28px;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--sm-surface);
    box-shadow: -16px 0 36px rgba(31, 41, 51, .18);
    opacity: 0;
    clip-path: inset(0 0 0 100%);
    visibility: hidden;
    transition: clip-path .2s ease, opacity .2s ease, visibility 0s linear .2s;
  }

  .sm-primary-navigation.is-open {
    opacity: 1;
    clip-path: inset(0);
    visibility: visible;
    transition-delay: 0s;
  }

  .sm-menu-close {
    position: absolute;
    top: 13px;
    right: 16px;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--sm-line);
    border-radius: 6px;
    background: var(--sm-surface);
    color: var(--sm-ink);
  }

  .sm-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(18, 26, 34, .56);
  }

  .sm-menu-overlay[hidden] {
    display: none;
  }

  .sm-primary-link,
  .sm-products-toggle {
    width: 100%;
    min-height: 48px;
    padding: 12px 4px;
    border-bottom: 1px solid var(--sm-line);
    color: var(--sm-ink);
    text-align: left;
  }

  .sm-contact-link {
    margin-left: 0;
  }

  .sm-products-toggle {
    justify-content: space-between;
  }

  .sm-products-list {
    position: static;
    grid-template-columns: 1fr;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 7px 0 12px 12px;
    border: 0;
    border-left: 3px solid var(--sm-gold);
    border-radius: 0;
    box-shadow: none;
  }

  .sm-product-category {
    padding: 5px 0 7px 10px;
  }

  .sm-product-category > a {
    min-height: 40px;
    padding: 9px 4px;
  }

  .sm-product-children {
    margin-left: 4px;
  }

  .sm-product-children a {
    min-height: 38px;
    padding: 9px 10px;
  }

}

@media (max-width: 479.98px) {
  .sm-site-footer {
    padding-top: 18px;
  }

  .sm-footer-bottom {
    margin-top: 0;
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sm-primary-navigation,
  .sm-products-toggle i {
    transition: none;
  }
}
