/* HeavyTech tuning grid: uniform, high-contrast brand marks. */
a[href^="/tuning/"] > div.absolute > div:first-child {
  box-sizing: border-box;
  flex: 0 0 4rem;
  width: 84%;
  min-height: 4rem;
  max-height: 4rem;
  margin: 0.125rem auto 0.25rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 0.7rem;
  background: linear-gradient(145deg, #ffffff 0%, #f3f6f9 100%);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.28);
}

a[href^="/tuning/"] > div.absolute > div:first-child > img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}

/* Bentley's official light mark needs a dark badge to retain its wing details. */
a[href="/tuning/bentley"] > div.absolute > div:first-child {
  border-color: #475569;
  background: linear-gradient(145deg, #202630 0%, #0e1116 100%);
}

a[href="/tuning/bentley"] > div.absolute > div:first-child > img {
  filter: none !important;
}

/* Silver-on-transparent originals need extra separation from the white badge. */
a[href="/tuning/iveco"] > div.absolute > div:first-child > img {
  filter: contrast(2.2) brightness(0.58) !important;
  transform: scale(1.08);
}

a[href="/tuning/pgo"] > div.absolute > div:first-child > img {
  filter: grayscale(1) contrast(2.8) brightness(0.42) !important;
}

@media (min-width: 768px) {
  a[href^="/tuning/"] > div.absolute > div:first-child {
    flex-basis: 4.5rem;
    min-height: 4.5rem;
    max-height: 4.5rem;
    padding: 0.55rem 0.75rem;
  }

  /* These marks have extra transparent margins; enlarge only where space allows. */
  a[href="/tuning/peugeot"] > div.absolute > div:first-child > img {
    transform: scale(1.45);
  }

  a[href="/tuning/pgo"] > div.absolute > div:first-child > img {
    transform: scale(1.25);
  }
}
