.mf {
  padding: 80px 24px;
  background: #fff;
  color: #0b0c0c;
  margin-block-start: 0px;
}
.mf__inner {
  max-width: 1240px;
  margin: 0 auto;
}
.mf__title {
  font-family: var(--font-geely);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 48px;
  margin: 0 0 24px;
  line-height: 44px;
}
.mf__desc {
  font-family: var(--font-inter);
  font-size: 20px;
  line-height: 30px;
  margin: 0 0 40px;
  font-weight: 500;
}
.mf__tabs {
  display: flex;
  gap: 20px;
  margin: 18px 0 40px;
}
.mf__tab {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px 0 14px;
  font-family: var(--font-inter);
  font-size: 20px;
  line-height: 24px;
  min-width: 108px;
}
.mf__tab.is-active {
  font-weight: 700;
  position: relative;
}
.mf__tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 3px;
  background: #0b0c0c;
}

.mf__panel {
  display: none;
}
.mf__panel.is-active {
  display: block;
}

.mf__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.mf__item.is-hidden {
  display: none;
}

.mf-card {
  border-radius: 16px;
  padding: 32px;
  background: #fff;
  box-shadow: 0px 4px 4px 0px #bdbdbd80;
  border: 1px solid #f6f3f5;
}
.mf-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.mf-card__title {
  margin: 0;
  font-family: var(--font-geely);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 24px;
  line-height: 30px;
  color: #212529;
}
.mf-card__meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  margin: 18px 0;
}
.mf-card__type {
  font-family: var(--font-inter);
  font-size: 16px;
  line-height: 22px;
  text-transform: lowercase;
  color: #027bff;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: capitalize;
}
.mf-card__versions {
  border: 1px solid #0b0c0c;
  background: #fff;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  line-height: 22px;
  color: #0b0c0c;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mf-card__media {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0 16px;
  min-height: 120px;
}
.mf-card__img {
  width: 100%;
  max-width: 100%;
  height: 180px;
  object-fit: contain;
  display: block;
}
.mf-card__label {
  font-family: var(--font-inter);
  font-size: 16px;
  line-height: 22px;
  color: #212529;
}
.mf-card__prices {
  margin: 20px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-inter);
  font-weight: 700;
  font-size: 20px;
  line-height: 24px;
  color: #212529;
}
.mf-card__dot {
  font-size: 16px;
  line-height: 22px;
  color: #212529;
}

.mf-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.mf-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 44px;
  text-decoration: none;
  font-family: var(--font-inter);
  border: 1px solid #0b0c0c;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
}
.mf-btn--ghost {
  background: #fff;
  color: #0b0c0c;
}
.mf-btn--solid {
  background: #0b0c0c;
  color: #fff;
}

.mf__more {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}
.mf__moreBtn {
  border: 1px solid #0b0c0c;
  background: #fff;
  height: 40px;
  padding: 0 18px;
  cursor: pointer;
  font-family: var(--font-inter);
  font-weight: 700;
}

@media (max-width: 767px) {
  .mf__title {
    font-size: 32px;
    line-height: 40px;
  }
  .mf__desc {
    font-size: 16px;
    line-height: 22px;
    margin: 0 0 24px;
  }
  .mf-modal__model {
    font-size: 20px;
    line-height: 24px;
  }
  .mf-modal__specTitle {
    font-size: 18px;
    line-height: 24px;
  }
  .mf__grid {
    gap: 16px;
  }
  .mf__tabs {
    overflow-x: auto;
    margin: 18px 0 24px;
  }
  .mf__tab {
    font-size: 16px;
    line-height: 20px;
    min-width: 80px;
  }
  .mf-card {
    padding: 24px;
  }
  .mf-card__title {
    font-size: 18px;
    line-height: 24px;
  }
  .mf-card__versions,
  .mf-card__type,
  .mf-card__label {
    font-size: 14px;
    line-height: 20px;
  }
  .mf-card__prices {
    font-size: 16px;
    line-height: 20px;
    margin: 8px 0 16px;
  }
  .mf-card__dot {
    font-size: 14px;
    line-height: 20px;
  }
  .mf-card__actions {
    grid-template-columns: 1fr;
  }
  .mf-btn {
    font-size: 14px;
    line-height: 20px;
    height: 40px;
  }
}
@media (max-width: 900px) {
  .mf__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .mf {
    padding: 40px 16px;
  }
  .mf__grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   MF MODAL (FORZADO)
========================= */

body.mf-modal-open {
  overflow: hidden;
}

/* Por defecto: NO se muestra */
.mf-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 999999;
  display: none; /* 👈 clave */
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Solo se muestra cuando el JS lo marca como abierto */
.mf-modal[data-open="1"] {
  display: flex;
}

.mf-modal__dialog {
  width: min(900px, 100%);
  padding: 36px;

  position: relative;
  background-color: #ffffff;
  background-image: url("/wp-content/themes/theme-attach/assets/img/fondo-modal-versiones.png");
  background-repeat: no-repeat;
  background-position: top center !important;
  background-size: cover !important;

  border-radius: 36px;
  overflow: hidden;

  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.mf-modal__close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  font-size: 34px;
  line-height: 44px;
  cursor: pointer;
}

.mf-modal__title {
  margin: 0 0 24px;
  font-family: var(--font-geely);
  font-weight: 700;
  font-size: 40px;
  line-height: 40px;
  color: #212529;
}

.mf-modal__model {
  font-family: var(--font-geely);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 24px;
  margin-bottom: 16px;
  color: #0b0c0c;
}

.mf-modal__content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.mf-modal__img {
  font-family: var(--font-inter);
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}

.mf-modal__priceLabel {
  font-family: var(--font-inter);
  font-size: 14px;
  line-height: 20px;
  margin-top: 24px;
}

.mf-modal__price {
  font-family: var(--font-geely);
  font-weight: 700;
  font-size: 24px;
  line-height: 24px;
  color: #0b0c0c;
}

.mf-modal__selectWrap {
  margin-top: 16px;
}

.mf-modal__select {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  border: 0px;
  padding: 0 14px;
  font-family: var(--font-geely);
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: #027bff;
  background: #fff;
  box-shadow: 0px 4px 4px 0px #bdbdbd80;
  text-transform: uppercase;
}

.mf-modal__select:focus {
  outline: none;
}

.mf-modal__right {
  margin-top: 8px;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0px 4px 4px 0px #bdbdbd80;
}

.mf-modal__specBox {
  background: #f6f6f6;
  border-radius: 16px;
  padding: 18px;
}

.mf-modal__specTitle {
  font-family: var(--font-inter);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 12px;
  color: #0b0c0c;
  line-height: 24px;
  margin-bottom: 16px;
}

.mf-modal__specRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 12px 0;
  border-top: 0.5px solid #afb6b9;
  font-family: var(--font-inter);
  font-size: 16px;
  line-height: 20px;
  color: #0b0c0c;
  min-height: 56px;
  margin-top: 16px;
  place-content: center;
}

.mf-modal__specRow:first-child {
  border-top: none;
  margin-top: 0;
}

.mf-modal__specRow strong {
  font-weight: 700;
  align-self: anchor-center;
}

.mf-modal__specRow span {
  font-size: 14px;
}

/* Si todavía existe un modal estático con id=mfModal, que NO aparezca nunca */
#mfModal {
  display: none !important;
}

@media (min-width: 1024px) {
  .mf-modal__dialog {
    background-size: 520px auto;
    background-position: right -40px bottom -40px;
    background-size: cover !important;
    background-position: center top !important;
  }
}

@media (max-width: 768px) {
  .mf-modal__dialog {
    padding: 24px;
    background-size: cover !important;
    background-position: center top !important;
  }
  .mf-modal[data-open="1"] {
    padding: 0;
    align-items: flex-start;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.62);
    overflow-y: scroll;
  }

  .mf-modal__dialog {
    width: min(420px, 100%);
    border-radius: 0;
    min-height: 100vh;
    padding: 22px 18px;
  }

  .mf-modal__content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .mf-modal__title {
    font-size: 28px;
  }

  .mf-modal__price {
    font-size: 20px;
  }

  .mf-modal__specBox {
    padding: 16px;
  }

  .mf-modal__specTitle {
    font-size: 18px;
    line-height: 24px;
  }

  .mf-modal__specRow {
    font-size: 14px;
    line-height: 18px;
  }

  .mf-modal__specRow span {
    font-size: 12px;
    line-height: 16px;
  }
}
