/* ======================================================
   OVERLAY MARCAS OMMVISHOP
====================================================== */

body.overlay-open {
  overflow: hidden;
}

.om-brands-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}

.om-brands-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.om-brands-overlay__content {
  position: relative;
  width: calc(100% - 28px);
  height: calc(100vh - 28px);
  margin: 14px auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
}

.om-brands-overlay__header {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(211, 22, 58, .08), transparent 32%),
    #ffffff;
  border-bottom: 1px solid #eef2f7;
}

.om-brands-overlay__header h3 {
  margin: 0 0 8px;
  text-align: center;
  color: #0f172a;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 900;
}

.om-brands-overlay__subtitle {
  max-width: 560px;
  margin: 0 auto 18px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}

.om-brands-overlay__search {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.om-brands-overlay__search:focus {
  border-color: rgba(211, 22, 58, .45);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(211, 22, 58, .10);
}

.om-brands-overlay__close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 6;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, .06);
  color: #0f172a;
  font-size: 32px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.om-brands-overlay__close:hover {
  background: #d3163a;
  color: #ffffff;
  transform: rotate(90deg);
}

.om-brands-overlay__grid {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  background: #f8fafc;
  align-items: start;
  align-content: start;
}

.om-brands-overlay__loader {
  width: 42px;
  height: 42px;
  margin: 48px auto;
  border-radius: 50%;
  border: 4px solid #e5e7eb;
  border-top-color: #d3163a;
  animation: omBrandSpin 1s linear infinite;
}

.om-brand-card {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.om-brand-card:hover {
  transform: translateY(-4px);
  border-color: rgba(211, 22, 58, .22);
  box-shadow: 0 20px 46px rgba(15, 23, 42, .10);
}

.om-brand-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(211, 22, 58, .05), transparent 45%);
  opacity: 0;
  transition: opacity .25s ease;
}

.om-brand-card:hover::before {
  opacity: 1;
}

.om-brand-card__header {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 110px;
  text-align: center;
  margin-bottom: 0;
  text-decoration: none;
}

.om-brand-card__logo {
  display: block;
  max-width: 210px;
  max-height: 118px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.om-brand-card__name {
  display: block;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
}

.om-brand-card__models {
  position: relative;
  z-index: 2;
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  text-align: center;
}

.om-brand-card__models li {
  display: inline-flex;
  margin: 4px;
}

.om-brand-card__models li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}

.om-brand-card__models li a:hover {
  background: #d3163a;
  color: #ffffff;
  text-decoration: none;
}

@keyframes omBrandSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 768px) {
  .om-brands-overlay__content {
    width: min(92vw, 1080px);
    height: min(82vh, 760px);
    margin: 6vh auto;
  }

  .om-brands-overlay__header {
    padding: 28px 34px 24px;
  }

  .om-brands-overlay__grid {
    padding: 32px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
  }

  .om-brand-card__models {
    display: block;
  }
}

@media (max-width: 767px) {
  .om-brands-overlay__content {
    width: calc(100% - 24px);
    height: calc(100vh - 24px);
    margin: 12px auto;
    border-radius: 18px;
  }

  .om-brands-overlay__header {
    padding: 24px 24px 20px;
  }

  .om-brands-overlay__header h3 {
    padding: 0 28px;
    font-size: 22px;
  }

  .om-brands-overlay__subtitle {
    font-size: 14px;
  }

  .om-brands-overlay__close {
    top: 12px;
    right: 14px;
    width: 38px;
    height: 38px;
    font-size: 28px;
  }

  .om-brands-overlay__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
  }

  .om-brand-card {
    min-height: 126px;
    padding: 14px 10px;
    border-radius: 16px;
  }

  .om-brand-card__header {
    min-height: 92px;
  }

  .om-brand-card__logo {
    max-width: 125px;
    max-height: 78px;
  }

  .om-brand-card__name {
    font-size: 14px;
  }
}
