/* HS PRO Global Components
   Header, navigation, mega menu and language switcher. */

/* HEADER */

.hs-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: grid;
  grid-template-columns: minmax(160px, 260px) 1fr minmax(120px, 260px);
  align-items: center;
  gap: 24px;
  padding: 19px 28px;
  background: #000000;
  border-bottom: 1px solid var(--hs-line);
}

.hs-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: max-content;
  color: #ffffff;
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.055em;
  white-space: nowrap;
  /* height: 0.6em; */
}

.hs-brand img {
    display: block;
    width: 240px;
    height: auto;
    max-width: 100%;
}

@media (max-width: 620px) {
    .hs-brand img {
        width: 190px;
        height: auto;
    }
}

.hs-brand span {
  color: #ffffff;
}

.hs-brand strong {
  color: var(--hs-red);
  font-weight: 900;
}

.hs-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.hs-nav-item {
  position: relative;
}

.hs-nav-link,
.hs-nav a,
.hs-mega-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #dddddd;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.hs-nav-link:hover,
.hs-nav-link.active,
.hs-nav a:hover,
.hs-nav a.active,
.hs-mega-holder:hover .hs-mega-toggle,
.hs-mega-holder:focus-within .hs-mega-toggle {
  color: #ffffff;
  background: rgba(209, 19, 40, 0.2);
  border-color: rgba(209, 19, 40, 0.65);
  transform: translateY(-1px);
}

.hs-mega-toggle::after {
  content: "⌄";
  margin-left: 8px;
  color: var(--hs-red);
  font-size: 12px;
  font-weight: 900;
}

.hs-mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  display: none;
  width: min(920px, calc(100vw - 48px));
  transform: translateX(-50%);
  padding-top: 16px;
  z-index: 5000;
}

.hs-mega-holder:hover .hs-mega-menu,
.hs-mega-holder:focus-within .hs-mega-menu {
  display: block;
}

.hs-mega-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--hs-line);
  background: black;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
}

.hs-mega-inner a {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px;
  border: 0;
  border-radius: 0;
  background: black;
  color: #ffffff;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.hs-mega-inner a:hover {
  background: black;
  transform: none;
}

.hs-mega-inner span {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.hs-mega-inner small {
  color: #9b9b9b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hs-mega-inner em {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-top: 12px;
  padding: 5px 8px;
  border: 1px solid rgba(209, 19, 40, 0.62);
  border-radius: 999px;
  background: black;
  color: var(--hs-red);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}


@media (max-width: 980px) {
  .hs-topbar {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .hs-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hs-language {
    grid-column: 2;
    grid-row: 1;
  }

  .hs-mega-menu {
    left: 0;
    width: min(760px, calc(100vw - 32px));
    transform: none;
  }

  .hs-mega-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .hs-mega-inner {
    grid-template-columns: 1fr;
  }

  .hs-mega-inner a {
    min-height: 84px;
    padding: 18px;
  }
}

/* LANGUAGE SWITCHER */

.hs-language {
  position: relative;
  justify-self: end;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 76px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.language-toggle:hover {
  border-color: rgba(209, 19, 40, 0.7);
  background: rgba(209, 19, 40, 0.18);
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  min-width: 110px;
  padding: 8px;
  border: 1px solid var(--hs-line);
  border-radius: 16px;
  background: #080808;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.hs-language.open .language-menu {
  display: grid;
  gap: 6px;
}

.language-menu button {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #d8d8d8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.language-menu button:hover,
.language-menu button.active {
  color: #ffffff;
  background: rgba(209, 19, 40, 0.18);
  border-color: rgba(209, 19, 40, 0.45);
}


/* SHARED PRODUCT CARD SYSTEM
   Used by series pages and homepage ranking modules. Page modules may only tune
   grid column counts or spacing through modifier classes. */

.product-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid #dedede;
  border-left: 1px solid #dedede;
  align-self: start;
  align-content: start;
}

.product-grid--home {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.product-card {
  min-width: 0;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 22px;
  background: rgba(255, 255, 255, 0.62);
  color: #111111;
  border-right: 1px solid #dedede;
  border-bottom: 1px solid #dedede;
  cursor: pointer;
  overflow: hidden;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.product-card:hover,
.product-card.active {
  z-index: 2;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.product-image-wrap {
  position: relative;
  height: 150px;
  flex: 0 0 150px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  min-width: 0;
}

.product-info {
  flex: 0 0 auto;
  min-width: 0;
}

.product-image {
  position: absolute;
  max-width: 88%;
  max-height: 140px;
  object-fit: contain;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.hover-image {
  opacity: 0;
}

.product-card:hover .default-image,
.product-card.active .default-image {
  opacity: 0;
}

.product-card:hover .hover-image,
.product-card.active .hover-image {
  opacity: 1;
  transform: scale(1.04);
}

.product-info span {
  display: block;
  margin-bottom: 7px;
  color: #8d8d8d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.product-info h3 {
  margin: 0 0 6px;
  color: #111111;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.product-info p {
  margin: 0;
  color: #666666;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.product-card--home {
  min-height: 270px;
  background: transparent;
}

.product-card--home .product-image-wrap {
  height: auto;
  flex-basis: auto;
  aspect-ratio: 1 / 1;
}

.product-card--home .product-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

/* SHARED DEALER RESULT CARD SYSTEM
   Homepage top dealers intentionally reuses the same class names as store locator. */

.locator-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #dedede;
  border-left: 1px solid #dedede;
}

.dealer-card {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  background: #ffffff;
  color: #111111;
  border-right: 1px solid #dedede;
  border-bottom: 1px solid #dedede;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.dealer-card:hover {
  z-index: 2;
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.08);
}

.dealer-badge {
  display: none;
  align-items: center;
  width: max-content;
  margin-bottom: 18px;
  padding: 6px 9px;
  background: rgba(209, 19, 40, 0.11);
  color: var(--hs-red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dealer-card h2 {
  margin: 0 0 12px;
  color: #000000;
  font-size: 28px;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.dealer-address,
.dealer-contact {
  margin: 0;
  color: #5f646a;
  font-size: 14px;
  line-height: 1.55;
}

.dealer-distance {
  margin-top: 16px;
  color: #111111;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dealer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.dealer-actions a {
  padding: 10px 12px;
  border: 1px solid #d7d7d7;
  color: #111111;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dealer-actions a:hover {
  border-color: var(--hs-red);
  color: var(--hs-red);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 44px;
  background: #ffffff;
  border-right: 1px solid #dedede;
  border-bottom: 1px solid #dedede;
  color: #666666;
  font-weight: 800;
}

@media (max-width: 1050px) {
  .locator-results {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 980px) {
  .product-grid--home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .locator-results {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .product-grid--home {
    grid-template-columns: 1fr;
  }
}

/* Harden shared product image swap against late image loading/layout race. */
.product-image-wrap {
  position: relative;
  overflow: hidden;
}
.product-image {
  position: absolute;
  inset: 0;
  display: block;
  margin: auto;
}
.product-card--home .product-image {
  object-fit: contain;
}
.product-info span,
.product-meta {
  display: block;
  margin-bottom: 7px;
  color: #8d8d8d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
