/* Añadidos a style.css del prototipo.
   Se mantiene aparte para poder re-sincronizar style.css/scss si el diseñador
   manda una versión nueva sin perder esto. */

/* --- Métricas de "Política de calidad" (home) ---------------------------- */
.section-quality .card.card--stat {
  min-height: 170px;
  justify-content: center;
  padding-right: 0;
}

.section-quality .card--stat .card-content {
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}

.section-quality .stat-number {
  font-family: var(--FontBlack);
  font-size: 56px;
  line-height: 1;
}

.section-quality .stat-label {
  font-size: 18px;
  line-height: 22px;
}

@media (max-width: 1199px) {
  .section-quality .stat-number { font-size: 44px; }
}

/* --- Varios wells apilados (servicio post venta) -------------------------- */
/* El .well del prototipo es de altura fija (pensado para uno solo). Acá hay
   tres, con textos de distinto largo. */
.section-servicios .well {
  height: auto;
  margin-bottom: 3rem;
}

.section-servicios .well:last-child {
  margin-bottom: 0;
}

.section-servicios .well-inner {
  height: auto;
  min-height: 256px;
}

.section-servicios .well-inner::before,
.section-servicios .well-inner::after {
  height: 100%;
  background-size: 100% 100%;
}

/* --- Modal de producto ---------------------------------------------------- */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.product-modal.is-open {
  display: flex;
}

.product-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
}

.product-modal-dialog {
  position: relative;
  z-index: 1;
  background-color: var(--colorWhite);
  border-radius: 16px;
  padding: 1rem;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
}

.product-modal-viewer {
  position: relative;
}

/* La foto se achica sola para entrar en el alto del dialog, asi el modal nunca
   scrollea: 90vh menos el padding, el titulo y su margen. object-fit deja las
   bandas contra el fondo blanco del dialog, invisibles. */
.product-modal-img {
  width: 100%;
  max-height: calc(90vh - 2rem - 3.5rem);
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}

/* Flechas de la galería. Se ocultan solas via [hidden] cuando el producto
   tiene una sola foto. */
.product-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--colorWhite);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.product-modal-nav:hover {
  background-color: var(--colorRed);
}

.product-modal-nav[hidden] {
  display: none;
}

.product-modal-prev {
  left: 0.75rem;
}

.product-modal-next {
  right: 0.75rem;
}

.product-modal-count {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background-color: rgba(0, 0, 0, 0.6);
  color: var(--colorWhite);
  font-size: 13px;
}

.product-modal-count[hidden] {
  display: none;
}

.product-modal-title {
  font-family: var(--FontBold);
  color: var(--colorBase);
  text-align: center;
  margin-top: 1rem;
}

.product-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--colorRed);
  color: var(--colorWhite);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.product-modal-close:hover {
  background-color: var(--colorBase);
}

body.modal-open {
  overflow: hidden;
}

/* --- Enlaces del footer --------------------------------------------------- */
.section-footer a[href^="tel:"]:hover {
  text-decoration: underline;
}

/* --- Card de Trailers en el home ------------------------------------------
   Las otras cards de .section-links son webp con el texto incrustado. Esta usa
   una foto del catálogo, recortada al mismo alto, con el título en HTML. */
.section-links .card-photo {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

.section-links .card-photo img {
  width: 100%;
  aspect-ratio: 620 / 246;
  object-fit: cover;
  object-position: center 60%;
}

.section-links .card-photo::after {
  content: "";
  position: absolute;
  inset: 0;
 /* background: linear-gradient(90deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.15) 70%); */
}

.section-links .card-photo-label {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  font-family: var(--FontBold);
  font-size: 40px;
  line-height: 1.1;
  color: var(--colorWhite);
}

@media (max-width: 480px) {
  .section-links .card-photo-label {
    font-size: 30px;
  }
}
