/**
 * ficha.css - Ficha de propiedad (property-details.php).
 *
 * Diseño editorial: galería grande en mosaico, encabezado con precio,
 * datos clave en una franja, contenido a la izquierda y la consulta fija a la
 * derecha. En el celular la galería pasa a carrusel con swipe y la consulta
 * queda en una barra fija abajo.
 *
 * Se carga solo en la ficha (ver $extra_css), después de custom.css.
 */

.pd {
  --pd-ink: var(--hero-ink, #0d1017);
  --pd-muted: #6b7280;
  --pd-line: #eceef2;
  --pd-soft: #f6f7f9;
  --pd-yellow: var(--hero-yellow, #FFDE59);
  --pd-radius: 24px;
  --pd-tint: color-mix(in srgb, var(--pd-yellow), #ffffff 72%);
  --pd-card-shadow: 0 1px 2px rgba(13, 16, 23, 0.04), 0 12px 32px rgba(13, 16, 23, 0.05);

  /* Fondo cálido apenas gris: los bloques blancos de contenido se despegan
     de él como tarjetas, en lugar de quedar todo plano sobre blanco */
  background-color: #f6f5f2;
  padding: 24px 0 0;
  color: #2b3240;
}

/* Miga de pan como una píldora discreta */
.pd-breadcrumb {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 16px;
  border: 1px solid var(--pd-line);
  border-radius: 999px;
  background: #ffffff;
  font-size: 13.5px;
}

/* --------------------------------------------------------------
 # Galería
--------------------------------------------------------------- */
.pd-gallery {
  position: relative;
  border-radius: var(--pd-radius);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(13, 16, 23, 0.14);
}

.pd-gallery-track {
  display: grid;
  gap: 10px;
  height: clamp(360px, 52vw, 560px);
}

/* Mosaico según la cantidad de fotos: siempre llena el espacio */
.pd-gallery-1 .pd-gallery-track { grid-template-columns: 1fr; }
.pd-gallery-2 .pd-gallery-track { grid-template-columns: 1fr 1fr; }
.pd-gallery-3 .pd-gallery-track { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.pd-gallery-4 .pd-gallery-track { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pd-gallery-5 .pd-gallery-track { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }

.pd-gallery-3 .pd-shot:first-child,
.pd-gallery-4 .pd-shot:first-child,
.pd-gallery-5 .pd-shot:first-child {
  grid-row: 1 / 3;
}
.pd-gallery-4 .pd-shot:nth-child(2) {
  grid-column: 2 / 4;
}

.pd-shot {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: var(--pd-soft);
  overflow: hidden;
  cursor: zoom-in;
  min-height: 0;
}

.pd-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s;
}

.pd-shot:hover img {
  transform: scale(1.04);
  filter: brightness(1.05);
}

/* En el mosaico entran 5: el resto se ve en el visor */
.pd-shot-extra {
  display: none;
}

.pd-gallery.is-taken .pd-shot img {
  filter: grayscale(0.5) brightness(0.85);
}

.pd-gallery-badges {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  gap: 8px;
  pointer-events: none;
}

.pd-gallery-badges .status-badge {
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--nav-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.pd-gallery-badges .status-badge.featured {
  background: var(--pd-yellow);
  color: var(--pd-ink);
}

.pd-gallery-all {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--pd-ink);
  font-family: var(--nav-font);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px);
  transition: transform 0.25s, box-shadow 0.25s;
}

.pd-gallery-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

/* El contador solo tiene sentido en el carrusel del celular */
.pd-gallery-counter {
  display: none;
}

/* --------------------------------------------------------------
 # Encabezado
--------------------------------------------------------------- */
.pd-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  padding: 36px 0 28px;
}

.pd-eyebrow {
  margin: 0 0 10px;
  font-family: var(--nav-font);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pd-muted);
}

.pd-eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 3px;
  margin: 0 10px 3px 0;
  border-radius: 2px;
  background: var(--pd-yellow);
  vertical-align: middle;
}

.pd-title {
  margin: 0;
  font-family: var(--heading-font);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--pd-ink);
}

.pd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 14px;
  font-size: 15px;
  color: var(--pd-muted);
}

.pd-meta i {
  margin-right: 4px;
  color: var(--pd-ink);
}

.pd-head-price {
  flex-shrink: 0;
  text-align: right;
}

.pd-price {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  color: var(--pd-ink);
  white-space: nowrap;
}

.pd-price-cur {
  font-family: var(--nav-font);
  font-size: 17px;
  font-weight: 700;
  color: var(--pd-muted);
}

.pd-price-num {
  font-family: var(--nav-font);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.pd-price-per {
  font-size: 16px;
  font-weight: 600;
  color: var(--pd-muted);
}

.pd-price-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--pd-muted);
}

.pd-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pd-yellow), #ffffff 55%);
  color: var(--pd-ink);
  font-weight: 600;
  font-size: 13px;
}

.pd-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 16px;
  border: 1px solid var(--pd-line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--pd-ink);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s, background-color 0.2s;
}

.pd-share:hover {
  border-color: var(--pd-ink);
}

/* --------------------------------------------------------------
 # Datos clave
--------------------------------------------------------------- */
/* Datos clave en una tarjeta propia, con los íconos sobre el amarillo de marca */
.pd-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 6px 30px;
  list-style: none;
  border: 1px solid var(--pd-line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--pd-card-shadow);
}

.pd-facts li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 34px 22px 0;
  margin-right: 34px;
  border-right: 1px solid var(--pd-line);
}

.pd-facts li:last-child {
  border-right: 0;
  margin-right: 0;
}

.pd-facts i {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--pd-tint);
  color: var(--pd-ink);
  font-size: 20px;
}

.pd-facts strong {
  font-family: var(--nav-font);
  font-size: 22px;
  font-weight: 800;
  color: var(--pd-ink);
}

.pd-facts span {
  font-size: 14px;
  color: var(--pd-muted);
}

/* --------------------------------------------------------------
 # Cuerpo: contenido + columna de consulta
--------------------------------------------------------------- */
.pd-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 32px;
  align-items: start;
  padding-top: 24px;
}

/* Cada bloque de contenido es una tarjeta blanca */
.pd-section {
  padding: 34px 36px;
  border: 1px solid var(--pd-line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--pd-card-shadow);
}

.pd-section + .pd-section {
  margin-top: 20px;
}

.pd-section h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 24px;
  font-family: var(--heading-font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--pd-ink);
}

.pd-section h2 i {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--pd-tint);
  font-size: 18px;
}

.pd-section-lead {
  margin: -8px 0 18px;
  color: var(--pd-muted);
}

.pd-content > .property-taken-notice {
  margin: 0 0 20px;
}

/* Descripción */
.pd-desc {
  font-size: 16.5px;
  line-height: 1.8;
  color: #3a4252;
}

.pd-desc p {
  margin: 0;
}

.pd-desc.is-clamped {
  position: relative;
  max-height: 13.5em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 65%, transparent);
  mask-image: linear-gradient(#000 65%, transparent);
}

.pd-desc.is-clamped.is-open {
  max-height: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.pd-more {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pd-ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Características */
.pd-feature-group + .pd-feature-group {
  margin-top: 26px;
}

.pd-feature-group h3 {
  margin: 0 0 12px;
  font-family: var(--nav-font);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pd-muted);
}

.pd-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15.5px;
}

.pd-features i {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pd-yellow), #ffffff 45%);
  color: var(--pd-ink);
  font-size: 14px;
}

/* Condiciones del alquiler (fuera del bloque oscuro del diseño anterior) */
.pd .rent-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pd .rent-term {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid var(--pd-line);
  border-radius: 14px;
  background: var(--pd-soft);
}

.pd .rent-term-label {
  font-family: var(--nav-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pd-muted);
}

.pd .rent-term-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--pd-ink);
}

/* Requisitos: reusa los estilos del sitio, sin la caja propia */
.pd .rent-requirements {
  margin: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

/* Ficha técnica */
.pd-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  margin: 0;
}

.pd-specs > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--pd-line);
}

.pd-specs dt {
  font-weight: 400;
  color: var(--pd-muted);
}

.pd-specs dd {
  margin: 0;
  font-weight: 600;
  color: var(--pd-ink);
  text-align: right;
}

.pd-map {
  border-radius: var(--pd-radius);
  overflow: hidden;
}

/* --------------------------------------------------------------
 # Columna de consulta
--------------------------------------------------------------- */
.pd-aside {
  position: sticky;
  top: 110px;
  scroll-margin-top: 110px;
}

.pd-contact {
  border: 1px solid var(--pd-line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(13, 16, 23, 0.1);
  overflow: hidden;
}

/* Cabecera oscura con un brillo amarillo de marca en la esquina */
.pd-contact-head {
  position: relative;
  padding: 26px 28px 24px;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--pd-yellow), transparent 78%) 0%, transparent 55%),
    var(--pd-ink);
  color: #ffffff;
}

.pd-contact-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--nav-font);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.pd-contact-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #ffffff;
}

.pd-contact-price .pd-price-num {
  font-size: 32px;
}

.pd-contact-head .pd-price-cur,
.pd-contact-head .pd-price-per {
  color: rgba(255, 255, 255, 0.6);
}

.pd-contact-sub {
  margin: 6px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

/* "Respondemos por WhatsApp" con un punto verde que late */
.pd-contact-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.pd-contact-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--whatsapp-color, #25d366);
  animation: pd-live 2s ease-out infinite;
}

@keyframes pd-live {
  0%        { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(37, 211, 102, 0); }
}

.pd-contact-body {
  padding: 24px 28px 28px;
}

.pd-label {
  display: block;
  margin: 0 0 8px;
  font-family: var(--nav-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pd-muted);
}

.pd-contact .form-control {
  height: 50px;
  margin-bottom: 18px;
  border: 1px solid var(--pd-line);
  border-radius: 12px;
  background: var(--pd-soft);
  font-size: 15px;
}

.pd-contact .form-control:focus {
  border-color: var(--pd-ink);
  background: #ffffff;
  box-shadow: none;
}

/* Intereses como opciones grandes: un toque y listo, sin desplegable */
.pd-intents {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.pd-intent {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.pd-intent input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pd-intent span {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 11px 12px;
  border: 1px solid var(--pd-line);
  border-radius: 12px;
  font-family: var(--default-font);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  color: #3a4252;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.pd-intent span i {
  font-size: 16px;
}

.pd-intent:hover span {
  border-color: #c9ced8;
}

.pd-intent input:checked + span {
  border-color: var(--pd-ink);
  background: var(--pd-ink);
  color: #ffffff;
}

.pd-intent input:focus-visible + span {
  outline: 2px solid var(--pd-yellow);
  outline-offset: 2px;
}

.pd-contact .form-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--pd-muted);
}

.pd-contact-alt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--pd-line);
}

.pd-contact-alt a,
.pd-contact-alt button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  border: 1px solid var(--pd-line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--pd-ink);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s;
}

.pd-contact-alt a:hover,
.pd-contact-alt button:hover {
  border-color: var(--pd-ink);
  color: var(--pd-ink);
}

.pd-contact-alt > :only-child {
  grid-column: 1 / -1;
}

.pd-agency {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--pd-line);
  border-radius: 18px;
  background: #ffffff;
}

.pd-agency img {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  padding: 6px;
  border-radius: 12px;
  background: #ffffff;
  object-fit: contain;
}

.pd-agency strong {
  display: block;
  font-size: 15px;
  color: var(--pd-ink);
}

.pd-agency span {
  font-size: 13px;
  color: var(--pd-muted);
}

/* --------------------------------------------------------------
 # Similares
--------------------------------------------------------------- */
.pd-similar {
  padding: 64px 0 88px;
}

.pd-similar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.pd-similar-head h2 {
  margin: 0;
  font-family: var(--heading-font);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--pd-ink);
}

.pd-similar-head a {
  font-weight: 700;
  color: var(--pd-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --------------------------------------------------------------
 # Cierre: coordinar visita
--------------------------------------------------------------- */
.pd-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 48px;
  padding: 44px 48px;
  border-radius: 28px;
  background:
    radial-gradient(80% 160% at 0% 0%, color-mix(in srgb, var(--pd-yellow), transparent 82%) 0%, transparent 60%),
    var(--pd-ink);
  color: #ffffff;
}

.pd-cta-eyebrow {
  margin: 0 0 8px;
  font-family: var(--nav-font);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pd-yellow);
}

.pd-cta h2 {
  margin: 0 0 8px;
  font-family: var(--heading-font);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.pd-cta-text > p:last-child {
  margin: 0;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.72);
}

.pd-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.pd-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  background: var(--pd-yellow);
  color: var(--pd-ink);
  font-family: var(--nav-font);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(255, 222, 89, 0.25);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s;
}

.pd-cta-btn:hover {
  color: var(--pd-ink);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(255, 222, 89, 0.35);
}

.pd-cta-alt {
  font-size: 14.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.pd-cta-alt:hover {
  color: #ffffff;
}

/* Rótulo sobre el precio del encabezado */
.pd-price-label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--nav-font);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pd-muted);
}

/* --------------------------------------------------------------
 # Visor de fotos
--------------------------------------------------------------- */
html.pd-lightbox-open {
  overflow: hidden;
}

.pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  background: #0a0c10;
  color: #ffffff;
  animation: pd-fade 0.25s ease;
}

.pd-lightbox[hidden] {
  display: none;
}

@keyframes pd-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pd-lightbox-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-family: var(--nav-font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.pd-lightbox-close,
.pd-lightbox-nav {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 20px;
  transition: background-color 0.2s;
}

.pd-lightbox-close:hover,
.pd-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.pd-lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 80px;
}

.pd-lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  user-select: none;
}

.pd-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.pd-lightbox-nav.prev { left: 18px; }
.pd-lightbox-nav.next { right: 18px; }

.pd-lightbox-thumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pd-lightbox-thumbs button {
  flex-shrink: 0;
  width: 76px;
  height: 54px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: none;
  opacity: 0.5;
  transition: opacity 0.2s, border-color 0.2s;
}

.pd-lightbox-thumbs button.is-active,
.pd-lightbox-thumbs button:hover {
  opacity: 1;
}

.pd-lightbox-thumbs button.is-active {
  border-color: var(--hero-yellow, #FFDE59);
}

.pd-lightbox-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------
 # Barra fija del celular
--------------------------------------------------------------- */
.pd-mobilebar {
  display: none;
}

/* --------------------------------------------------------------
 # Responsive
--------------------------------------------------------------- */
@media (max-width: 1199px) {
  .pd-body {
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 40px;
  }
}

@media (max-width: 991px) {
  .pd-head {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .pd-head-price {
    text-align: left;
  }

  .pd-price,
  .pd-price-notes {
    justify-content: flex-start;
  }

  .pd-body {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .pd-aside {
    position: static;
    padding: 20px 0 0;
  }

  .pd-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 34px 30px;
  }

  .pd-cta-actions {
    align-items: flex-start;
  }

  /* La consulta va abajo: la barra fija la trae con un toque */
  .pd-mobilebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--pd-line, #eceef2);
    box-shadow: 0 -10px 30px rgba(13, 16, 23, 0.08);
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease;
  }

  .pd-mobilebar.is-hidden {
    transform: translateY(110%);
  }

  .pd-mobilebar-price {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
  }

  .pd-mobilebar-price span {
    font-family: var(--nav-font);
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    white-space: nowrap;
  }

  .pd-mobilebar-price strong {
    font-size: 19px;
    font-weight: 800;
    color: var(--hero-ink, #0d1017);
  }

  .pd-mobilebar-price small {
    font-size: 12.5px;
    color: #6b7280;
  }

  .pd-mobilebar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 13px 22px;
    border-radius: 12px;
    background: var(--whatsapp-color, #25d366);
    color: #ffffff;
    font-family: var(--nav-font);
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  }

  .pd-mobilebar-btn:hover {
    color: #ffffff;
  }

  /* La barra ya tiene WhatsApp: el botón flotante se superpondría */
  body.has-mobilebar .whatsapp-float {
    display: none !important;
  }

  body.has-mobilebar .footer {
    padding-bottom: 84px;
  }
}

@media (max-width: 767px) {
  .pd {
    padding-top: 0;
  }

  .pd-breadcrumb {
    display: none;
  }

  /* Galería a ancho completo, como carrusel con swipe nativo */
  .pd-gallery {
    margin: 0 calc(var(--bs-gutter-x, 1.5rem) * -0.5);
    border-radius: 0;
  }

  .pd-gallery-track {
    display: flex;
    gap: 0;
    height: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .pd-gallery-track::-webkit-scrollbar {
    display: none;
  }

  .pd-shot,
  .pd-shot-extra {
    display: block;
    flex: 0 0 100%;
    aspect-ratio: 4 / 3;
    scroll-snap-align: start;
  }

  .pd-shot:hover img {
    transform: none;
  }

  .pd-gallery-counter {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: block;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(13, 16, 23, 0.7);
    color: #ffffff;
    font-family: var(--nav-font);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    pointer-events: none;
  }

  .pd-gallery-all {
    display: none;
  }

  .pd-gallery-badges {
    top: 14px;
    left: 14px;
  }

  .pd-head {
    padding: 24px 0 20px;
  }

  .pd-share {
    position: absolute;
    right: 0;
    top: 20px;
    margin: 0;
    padding: 8px 12px;
  }

  .pd-share span {
    display: none;
  }

  .pd-head-main {
    position: relative;
    padding-right: 52px;
  }

  .pd-head {
    position: relative;
  }

  .pd-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 8px;
    padding: 20px 18px;
    border-radius: 18px;
  }

  .pd-facts li {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 0;
    margin: 0;
    border-right: 0;
  }

  .pd-facts i {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .pd-facts strong {
    font-size: 19px;
    line-height: 1;
  }

  .pd-facts span {
    font-size: 12.5px;
  }

  .pd-section {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .pd-section + .pd-section {
    margin-top: 14px;
  }

  .pd-section h2 {
    font-size: 19px;
  }

  .pd-section h2 i {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .pd-body {
    padding-top: 16px;
  }

  .pd-specs {
    grid-template-columns: 1fr;
  }

  .pd-contact-head {
    padding: 22px;
  }

  .pd-contact-body {
    padding: 20px 22px 22px;
  }

  .pd-cta {
    margin-top: 32px;
    padding: 28px 22px;
    border-radius: 22px;
  }

  .pd-cta-btn {
    width: 100%;
    justify-content: center;
  }

  .pd-lightbox-stage {
    padding: 0;
  }

  .pd-lightbox-nav {
    display: none;
  }

  .pd-lightbox-thumbs {
    justify-content: flex-start;
  }

  .pd-similar {
    padding: 40px 0 56px;
  }
}
