/* =======================================
   MODELOS GEELY – styles (CORREGIDO)
======================================= */

.mg-models {
  padding: 72px 24px 80px;
  background: #fff;
  color: #03050f;
  margin-top: 0 !important;
  overflow: hidden;
}

.mg-models__inner {
  max-width: 1280px;
  margin: 0 auto;
}

/* Header */
.mg-models__header {
  text-align: center;
  margin-bottom: 40px;
}

.mg-models__title {
  margin: 0 0 16px;
  font-family: var(--font-geely);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 48px;
  line-height: 44px;
  color: #0B0C0C;
}

.mg-models__desc {
  margin: 0 auto;
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 20px;
  line-height: 30px;
  color: #0B0C0C;
}

/* Tabs full width (desktop) */
.mg-models__tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  width: 100%;
  margin-bottom: 40px;
  border-top: 1px solid rgba(0, 0, 0, 0.14);
}

.mg-models__tab {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;

  padding: 12px 16px 24px;
  text-align: start;

  font-family: var(--font-geely);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;

  font-size: 20px;
  line-height: 24px;

  color: #afb6b9;
  position: relative;
}

.mg-models__tab.is-active {
  color: #027bff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
}

.mg-models__tab.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 2px;
  background: #027bff;
}

.mg-models__tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18px;
  background: linear-gradient(
    180deg,
    rgba(2, 123, 255, 0.14) 0%,
    rgba(2, 123, 255, 0) 100%
  );
  pointer-events: none;
}

/* Panels */
.mg-models__panels {
  margin: 0 70px;
}

.mg-models__panel {
  display: none;
}
.mg-models__panel.is-active {
  display: block;
}

.mg-models__empty {
  font-family: var(--font-inter);
  font-size: 14px;
  opacity: 0.7;
}

/* Swiper wrappers */
.mg-models__swiper-wrap--mobile {
  display: none;
}
.mg-models__swiper-wrap--desktop {
  display: block;
}

/* Desktop: 2x2 */
.mg-models__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

/* Card */
.mg-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.mg-card__media {
  position: relative;
  border-radius: 18px;
  padding: 18px 18px 0px;
  overflow: hidden;
}

/* fondo verde sólo en la parte superior */
.mg-card__media::after {
  background: var(--bg-card);
  position: absolute;
  content: "";
  z-index: -1;
  width: 100%;
  height: 69%;
  top: 0;
  border-radius: 24px;
  left: 0;
}

/* meta dentro del recuadro */
.mg-card__meta {
  position: absolute;
  left: 40px;
  top: 24px;
  z-index: 2;
}

.mg-card__year {
  font-family: var(--font-inter);
  font-size: 16px;
  line-height: 22px;
  color: #212529;
  margin-bottom: 6px;
}

.mg-card__name {
  font-family: var(--font-geely);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 24px;
  line-height: 24px;
  color: #027bff;
}

/* flecha (desktop) */
.mg-card__arrow {
  position: absolute;
  top: 32px;
  right: 40px;
  width: 48px;
  height: 49px;
  z-index: 2;
}

/* imagen */
.mg-card__picture {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 246px;
  padding-top: 50px;
}

.mg-card__img {
  width: 100%;
  max-width: 460px;
  height: 190px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.18));
}

.mg-card__body {
  padding: 0px 29px 0;
}

.mg-card__priceLabel {
  font-family: var(--font-inter);
  font-size: 16px;
  line-height: 22px;
  color: #212529;
  margin-top: 2px;
}

.mg-card__prices {
  margin-top: 8px;
  font-family: var(--font-geely);
  font-weight: 800;
  font-size: 24px;
  line-height: 24px;
  color: #212529;
}

.mg-card__dot {
  margin: 0 8px;
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 16px;
  line-height: 22px;
  color: #212529;
}

/* Controls (base) */
.mg-models__controls {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 18px;
  margin-top: 40px;
}

.mg-models__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mg-models__pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  opacity: 0.35;
  background: #7c8693;
  margin: 0 4px !important;
}
.mg-models__pagination .swiper-pagination-bullet-active {
  opacity: 1;
  background: #027bff;
}

/* Botones nav (cuando son imágenes) */
.mg-models__nav {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.mg-models__nav img {
  width: 35px;
  height: 40px;
  display: block;
}

/* Rotación prev/next (asumiendo icon-arrow.png apunta a la derecha) */
.mg-models__nav--prev img {
  transform: rotate(180deg);
}
.mg-models__nav--next img {
  transform: rotate(0deg);
}

.mg-models__nav.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ==========================
   RESPONSIVE
========================== */

@media (max-width: 1280px) {
  .mg-models__panels {
    margin: 0px;
  }
  .mg-models__grid {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .mg-models {
    padding: 36px 16px 16px;
  }

  .mg-models__header {
    text-align: left;
    margin-bottom: 18px;
  }

  .mg-models__title {
    font-size: 32px;
    line-height: 40px;
    text-align: center;
    margin-bottom: 24px;
  }

  .mg-models__desc {
    text-align: center;
    font-size: 16px;
    line-height: 22px;
    margin: 10px 0 24px;
    max-width: none;
  }

  .mg-models__tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;

    white-space: nowrap;
    gap: 0;
    margin: 16px 0 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.14);
  }
  .mg-models__tabs::-webkit-scrollbar {
    display: none;
  }

  .mg-models__tab {
    flex: 0 0 auto;
    min-width: 240px; /* hace que SUV/CROSSOVER "llene" */
    max-width: 80%;
    padding: 16px 14px 18px;

    font-size: 16px;
    line-height: 20px;
    letter-spacing: 0.22em;
    text-align: left;
  }

  /* IMPORTANTE: la línea azul debe respetar el ancho del tab */
  .mg-models__tab.is-active::before {
    left: 0;
    right: 0;
  }

  .mg-models__swiper-wrap--desktop {
    display: none;
  }
  .mg-models__swiper-wrap--mobile {
    display: block;
  }

  /* 4 cards en columna dentro del slide */
  .mg-models__mcol {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  /* Card compacta en mobile para que entren 4 */
  .mg-card--mobile .mg-card__media {
    padding: 14px 14px 10px;
    border-radius: 18px;
  }

  .mg-card--mobile .mg-card__media::after {
    height: 68%;
    border-radius: 18px;
  }

  .mg-card--mobile .mg-card__meta {
    left: 32px;
    top: 24px;
  }

  .mg-card--mobile .mg-card__year {
    font-size: 16px;
    line-height: 22px;
    margin-bottom: 8px;
  }

  .mg-card--mobile .mg-card__name {
    font-size: 18px;
    line-height: 24px;
    letter-spacing: 0.18em;
  }

  .mg-card--mobile .mg-card__picture {
    height: 230px;
    padding-top: 62px;
  }

  .mg-card--mobile .mg-card__img {
    height: 170px;
    max-width: 280px;
  }

  .mg-card--mobile .mg-card__body {
    padding-left: 29px;
  }

  .mg-card--mobile .mg-card__priceLabel {
    font-size: 14px;
    line-height: 18px;
  }

  .mg-card--mobile .mg-card__prices {
    font-size: 16px;
    line-height: 20px;
    margin-top: 6px;
    font-family: var(--font-inter);
    font-weight: 700;
  }

  .mg-card--mobile .mg-card__dot {
    margin: 0 6px;
    font-size: 14px;
    line-height: 18px;
  }

  /* Controls en mobile: flechas + bullets */
  .mg-models__controls--mobile {
    margin-top: 40px;
    gap: 10px;
    grid-template-columns: 1fr;
  }

  .mg-models__nav img {
    width: 35px;
    height: 37px;
  }

  .mg-models__nav--prev-m img {
    transform: rotate(180deg);
  }
  .mg-models__nav--next-m img {
    transform: rotate(0deg);
  }

  .mg-card__arrow {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    z-index: 2;
  }

  .mg-card {
    height: 306px;
  }
}
