
/* SU HOGAR PREMIUM — HOTFIX 17/08/2026
   1) Respeta realmente el atributo hidden.
   2) Corrige logo y layout del footer.
*/

/* IMPORTANTE:
   modelos-premium.css define display:grid para .pm-loading y .pm-error.
   Esa regla estaba anulando visualmente el atributo HTML hidden. */
.pm-body [hidden],
.pm-loading[hidden],
.pm-error[hidden],
[data-pm-detail][hidden] {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* Footer: mantener proporción real del logo. */
.v3-footer img {
  width: 170px;
  height: auto !important;
  max-width: 100%;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Evitar que los datos se corten o se corran. */
.v3-footer {
  grid-template-columns: minmax(240px, 1.25fr) minmax(220px, .85fr) minmax(110px, auto);
  align-items: start;
}

.v3-footer > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
  min-width: 0;
}

.v3-footer > div:first-child p {
  margin: 0;
  max-width: 360px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.v3-footer > nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 11px 20px;
  align-content: start;
  min-width: 0;
}

.v3-footer > nav a,
.v3-footer .v3-social a {
  line-height: 1.4;
}

.v3-footer .v3-social {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 11px;
  min-width: 0;
}

/* En fichas, que la imagen principal se perciba inmediatamente. */
.pm-detail-hero {
  background: #071337;
}

/* Mobile/tablet */
@media (max-width: 900px) {
  .v3-footer {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .v3-footer > div:first-child,
  .v3-footer > nav,
  .v3-footer .v3-social {
    width: 100%;
  }

  .v3-footer .v3-social {
    align-items: flex-start;
  }

  .v3-footer > nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .v3-footer img {
    width: 155px;
  }

  .v3-footer > nav {
    grid-template-columns: 1fr;
  }
}


/* HOTFIX V2 — contraste de botones dentro de fichas Premium.
   .pm-body a { color: inherit } tenía mayor especificidad que .v3-button-primary,
   por eso el texto blanco heredado del hero ganaba sobre el azul del botón. */
.pm-body a.v3-button.v3-button-primary,
.pm-detail-actions a.v3-button-primary,
.pm-consult a.v3-button-primary {
  background: #ffffff !important;
  color: #071337 !important;
  border: 1px solid #ffffff !important;
  text-shadow: none !important;
}

.pm-body a.v3-button.v3-button-ghost,
.pm-detail-actions a.v3-button-ghost,
.pm-consult a.v3-button-ghost {
  background: rgba(7, 19, 55, .58) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, .68) !important;
  text-shadow: none !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pm-detail-actions a.v3-button,
.pm-consult a.v3-button {
  font-weight: 850;
}

.pm-detail-actions a.v3-button-primary:hover,
.pm-consult a.v3-button-primary:hover {
  background: #eef4ff !important;
  color: #071337 !important;
}

.pm-detail-actions a.v3-button-ghost:hover,
.pm-consult a.v3-button-ghost:hover {
  background: rgba(7, 19, 55, .82) !important;
  color: #ffffff !important;
}


/* HOTFIX V3 — GALERÍA Y PLANOS
   - Las fotos horizontales siguen llenando el escenario.
   - Imágenes verticales / planos pasan automáticamente a object-fit: contain.
   - Click/tap abre visor a pantalla completa.
*/

.pm-gallery-stage {
  cursor: zoom-in;
  background:
    linear-gradient(45deg, #edf1f7 25%, transparent 25%) 0 0/20px 20px,
    linear-gradient(-45deg, #edf1f7 25%, transparent 25%) 0 10px/20px 20px,
    linear-gradient(45deg, transparent 75%, #edf1f7 75%) 10px -10px/20px 20px,
    linear-gradient(-45deg, transparent 75%, #edf1f7 75%) -10px 0/20px 20px,
    #f8faff;
}

.pm-gallery-stage > img {
  object-fit: cover;
  object-position: center;
}

.pm-gallery-stage > img.is-portrait,
.pm-gallery-stage > img.is-plan {
  object-fit: contain !important;
  object-position: center !important;
  padding: 18px;
  background: rgba(255,255,255,.92);
}

.pm-thumb img {
  object-fit: cover;
}

.pm-thumb.is-portrait img,
.pm-thumb.is-plan img {
  object-fit: contain;
  background: #fff;
}

/* Fullscreen lightbox */
.pm-lightbox {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(2, 7, 22, .96);
  color: #fff;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y pinch-zoom;
}

.pm-lightbox[hidden] {
  display: none !important;
}

.pm-lightbox-top {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.pm-lightbox-title {
  min-width: 0;
  font-size: .82rem;
  font-weight: 780;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #dce6fb;
}

.pm-lightbox-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pm-lightbox button {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: #fff;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 820;
}

.pm-lightbox button:hover {
  background: rgba(255,255,255,.16);
}

.pm-lightbox-stage {
  position: relative;
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 20px 74px;
  -webkit-overflow-scrolling: touch;
}

.pm-lightbox-image-wrap {
  display: grid;
  place-items: center;
  min-width: 100%;
  min-height: 100%;
  transform-origin: center center;
}

.pm-lightbox img {
  display: block;
  max-width: min(94vw, 1800px);
  max-height: calc(100svh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform .18s ease;
}

.pm-lightbox.is-zoomed .pm-lightbox-image-wrap {
  min-width: 140%;
  min-height: 140%;
}

.pm-lightbox.is-zoomed img {
  max-width: none;
  max-height: none;
}

.pm-lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 60px !important;
  border-radius: 16px !important;
  font-size: 1.25rem !important;
  background: rgba(4, 12, 36, .58) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pm-lightbox-prev { left: 16px; }
.pm-lightbox-next { right: 16px; }

.pm-lightbox-bottom {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255,255,255,.10);
  color: #bccae6;
  font-size: .78rem;
}

.pm-gallery-zoom-hint {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(5,13,39,.52);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: .68rem;
  font-weight: 780;
  pointer-events: none;
}

body.pm-lightbox-open {
  overflow: hidden !important;
}

@media (max-width: 700px) {
  .pm-gallery-stage > img.is-portrait,
  .pm-gallery-stage > img.is-plan {
    padding: 8px;
  }

  .pm-lightbox-stage {
    padding: 10px 8px;
  }

  .pm-lightbox img {
    max-width: 100%;
    max-height: calc(100svh - 135px);
  }

  .pm-lightbox-nav {
    top: auto;
    bottom: 12px;
    transform: none;
    z-index: 4;
  }

  .pm-lightbox-prev { left: 12px; }
  .pm-lightbox-next { right: 12px; }

  .pm-lightbox-bottom {
    padding-inline: 70px;
    text-align: center;
  }

  .pm-gallery-zoom-hint {
    left: 12px;
    bottom: 12px;
  }
}

/* QA FINAL V4 — footer unificado y robustez */
.v3-footer{grid-template-columns:minmax(230px,1.25fr) minmax(240px,.9fr) minmax(120px,.45fr)!important;gap:32px!important;align-items:start!important}
.v3-footer .v3-footer-brand{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:12px!important;min-width:0}
.v3-footer .v3-footer-brand img{width:170px!important;height:auto!important;max-width:100%!important;filter:brightness(0) invert(1)}
.v3-footer .v3-footer-brand p{margin:0;max-width:360px;line-height:1.55;overflow-wrap:anywhere}
.v3-footer .v3-footer-nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,max-content))!important;gap:11px 22px!important;align-content:start!important}
.v3-footer .v3-social{display:flex!important;flex-direction:column!important;align-items:flex-end!important;gap:11px!important;text-align:right!important}
.v3-footer a{color:#aebbd7!important}.v3-footer a:hover{color:#fff!important}
@media(max-width:900px){.v3-footer{grid-template-columns:1fr!important}.v3-footer .v3-footer-nav{grid-template-columns:repeat(2,minmax(0,1fr))!important}.v3-footer .v3-social{align-items:flex-start!important;text-align:left!important}}
@media(max-width:520px){.v3-footer .v3-footer-nav{grid-template-columns:1fr!important}.v3-footer .v3-footer-brand img{width:155px!important}}


/* QA FINAL V2 — FINANCIACIÓN VISIBLE + CONTRASTE LANDINGS */

/* Las landings declaran .pl-body a { color: inherit }, que puede ganar por
   especificidad sobre los botones. Fijamos contraste explícito. */
.pl-body a.v3-button.v3-button-primary,
.pl-body .pl-actions a.v3-button-primary {
  background: #ffffff !important;
  color: #071337 !important;
  border: 1px solid #ffffff !important;
  text-shadow: none !important;
}

.pl-body a.v3-button.v3-button-ghost,
.pl-body .pl-actions a.v3-button-ghost {
  background: rgba(7, 19, 55, .58) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.68) !important;
  text-shadow: none !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pl-body a.v3-button.v3-button-primary:hover {
  background: #eef4ff !important;
  color: #071337 !important;
}

.pl-body a.v3-button.v3-button-ghost:hover {
  background: rgba(7,19,55,.84) !important;
  color: #ffffff !important;
}

/* Financiación pasa a ser una sección comercial visible de la Home. */
.v3-finance-spotlight {
  position: relative;
  overflow: hidden;
  padding: clamp(90px, 11vw, 150px) var(--v3-gutter);
  background:
    radial-gradient(circle at 86% 18%, rgba(79,126,255,.28), transparent 28%),
    radial-gradient(circle at 12% 88%, rgba(38,80,188,.30), transparent 32%),
    #071337;
  color: #ffffff;
}

.v3-finance-spotlight::after {
  content: "FINANCIACIÓN";
  position: absolute;
  right: -.02em;
  bottom: -.18em;
  font-size: clamp(6rem, 18vw, 19rem);
  line-height: .8;
  font-weight: 950;
  letter-spacing: -.075em;
  color: rgba(255,255,255,.035);
  pointer-events: none;
  user-select: none;
}

.v3-finance-spotlight-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .55fr);
  gap: clamp(38px, 7vw, 90px);
  align-items: end;
}

.v3-finance-spotlight h2 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(3.2rem, 6.3vw, 6.8rem);
  line-height: .93;
  letter-spacing: -.06em;
}

.v3-finance-spotlight-copy > p:not(.v3-kicker) {
  max-width: 690px;
  margin-top: 25px;
  color: #d2ddf2;
  font-size: 1.06rem;
  line-height: 1.68;
}

.v3-finance-benefits {
  display: grid;
  gap: 1px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.v3-finance-benefits div {
  padding: 22px 24px;
  background: rgba(7,19,55,.54);
}

.v3-finance-benefits small {
  display: block;
  color: #9db9ff;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.v3-finance-benefits strong {
  display: block;
  margin-top: 7px;
  color: #ffffff;
  font-size: 1.08rem;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .v3-finance-spotlight-inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .v3-finance-spotlight { padding-left: 22px; padding-right: 22px; }
  .v3-finance-spotlight .v3-actions { display: grid; }
  .v3-finance-spotlight .v3-actions .v3-button { width: 100%; }
}
