/* Products page — medidas / features (.product-data-div en ficha) */

/*
 * Misma geometría que .video-prod: ancho amplio centrado; 100% ≤768px.
 * Alcance: .product-ficha-page .product-data-div (HTML usa id único por producto).
 */
.product-ficha-page .product-data-div .product-measures {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .product-ficha-page .product-data-div .product-measures {
    width: 100%;
  }

}

@media (max-width: 100px) {

  .pm-label,
  .pm-value {
    font-size: 2rem !important;
  }
  .product-ficha-page .product-data-div .pm-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}
/* ── Inner grid: 2 columnas centradas como bloque ── */
.pm-grid {
  display: grid;
  grid-template-columns: max-content max-content;
  /* auto: el renglón de diseñadores no estira al resto. */
  grid-auto-rows: auto;
  column-gap: 12rem;
  row-gap: 0;
  align-items: center;
  justify-content: space-between;
  width: 80%;
  margin: 0 auto;
  padding: 1rem 2rem;
  box-sizing: border-box;
}

/*
 * PC ≥992: alineación label | icono+valor (incluye filas sin icono,
 * materiales y diseñadores). ≤991 queda en product.css.
 */
@media (min-width: 992px) {
  .product-ficha-page .product-data-div .pm-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    justify-content: center;
    column-gap: 0;
    width: 80%;
    padding-left: 0;
    padding-right: 0;
  }

  .product-ficha-page .product-data-div .pm-label,
  .product-ficha-page .product-data-div .pm-meta {
    text-align: left;
  }

  .product-ficha-page .product-data-div .pm-label {
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: max(0px, calc(var(--pm-label-push, 0px) - 10.8rem));
    text-align: left;
    white-space: nowrap;
  }

  .product-ficha-page .product-data-div .pm-meta {
    grid-column: 2;
    justify-self: start;
    width: auto;
    max-width: 100%;
    margin-left: 10.8rem;
    white-space: nowrap;
  }

  .product-ficha-page .product-data-div .pm-meta .pm-value {
    white-space: nowrap;
  }

  /* Todas las filas: misma altura mínima (icono 64px) y centrado vertical. */
  .product-ficha-page .product-data-div .pm-label,
  .product-ficha-page .product-data-div .pm-meta {
    min-height: 64px;
    box-sizing: border-box;
  }

  .product-ficha-page .product-data-div .pm-label--full {
    grid-column: 1 / -1;
  }

  /* Materiales largos: saltan de línea en vez de desbordar hacia el menú flotante */
  .product-ficha-page .product-data-div .pm-meta--materiales {
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    box-sizing: border-box;
  }

  .product-ficha-page .product-data-div .pm-meta--materiales .pm-value {
    white-space: normal;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
  }

  .product-ficha-page .product-data-div .pm-meta--disenadores {
    justify-self: stretch;
    white-space: normal;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .product-ficha-page .product-data-div .pm-meta--disenadores .pm-value {
    white-space: normal;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .product-ficha-page .product-data-div .pm-meta--disenadores .pm-value--stacked {
    gap: 0.35em;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  /* Varios diseñadores: alinear arriba con el primer nombre. */
  .product-ficha-page .product-data-div .pm-label--disenadores:has(+ .pm-meta--disenadores .pm-value-line:nth-child(2)),
  .product-ficha-page .product-data-div .pm-meta--disenadores:has(.pm-value-line:nth-child(2)) {
    align-self: start;
  }

  /* Viñeta delante de cada diseñador (misma line-height que el resto). */
  .product-ficha-page .product-data-div .pm-meta--disenadores .pm-value-line {
    position: relative;
    padding-left: 1.1em;
    text-indent: 0;
    line-height: 1.5;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
  }

  .product-ficha-page .product-data-div .pm-meta--disenadores .pm-value-line::before {
    content: "\2022";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: aqua;
  }

  /* Diseñadores: siempre aqua (con o sin información) */
  .product-ficha-page .product-data-div .pm-meta--disenadores .pm-value,
  .product-ficha-page .product-data-div .pm-meta--disenadores .pm-value-line,
  .product-ficha-page .product-data-div .pm-meta--disenadores .pm-value a {
    color: aqua !important;
  }

  .product-ficha-page .product-data-div .pm-value a {
    color: aqua !important;
  }
}

/* ── Columna 1: label ── */
.pm-label {
  color: #fff;
  font-size: 1.9rem;
  line-height: 1.5;
  text-align: left;
  padding: 0;
  white-space: nowrap;
  box-sizing: border-box;
  align-self: center;
  display: flex;
  align-items: center;
  height: 100%;
}

/* label que ocupa ambas columnas (ej: medidas_no_disponibles) */
.pm-label--full {
  grid-column: 1 / -1;
  white-space: normal;
}

/* ── Columna 2: icono + valor ── */
.pm-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  padding: 0;
  height: 100%;
}

/* icono */
.pm-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.pm-icon:empty {
  display: none;
}

.pm-icon svg {
  width: 64px;
  height: 64px;
  display: block;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* valor */
.pm-value {
  flex: 1 1 0;
  min-width: 0;
  color: #fff;
  font-size: 1.9rem;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.pm-value em {
  font-style: normal;
}

.pm-value a {
  color: inherit;
}

.pm-value--stacked {
  display: flex;
  flex-direction: column;
}

.pm-value-line {
  display: block;
}

/* ── Módulo Técnicas: carrusel 2 columnas con flechas ── */
.gallery-tecnicas {
  display: block;
  text-align: center;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 0;
  box-sizing: border-box;
}

.gallery-tecnicas .gallery-items-slider-wrap {
  --gallery-items-cover-h: 2.5rem;
}

.gallery-tecnicas .gallery-items-slider-wrap .side-arrow {
  align-self: center;
  height: 2.5rem;
  min-height: 2.5rem;
}

.gallery-tecnicas .gallery-items-slider .swiper-slide {
  width: auto;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.gallery-tecnicas__item {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 2rem 0;
}

.gallery-tecnicas .gallery-item-title {
  display: inline-block;
  margin: 0;
  padding: 0;
  font-size: 2.5rem;
  line-height: 1.5;
  font-weight: normal;
  text-transform: none;
  white-space: normal;
  text-align: center;
}

.gallery-tecnicas__item .gallery-item-title::before {
  content: "\2022\00a0";
}

.gallery-tecnicas__item--has-info .gallery-item-title::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 0.35em;
  vertical-align: middle;
  background: url("../img/lupa-prod.png") no-repeat center / contain;
}

.gallery-tecnicas .gallery-item-title a {
  color: inherit;
  text-decoration: none;
}

.gallery-tecnicas .gallery-item-title a.js-prod-related-link {
  color: aqua !important;
}

.gallery-tecnicas .gallery-items-slider.gallery-items--single .swiper-slide {
  width: 100% !important;
  max-width: 100% !important;
}

.gallery-tecnicas .gallery-items-slider.gallery-items--single .gallery-tecnicas__item {
  justify-content: center;
}

/* ── Responsive 768px ── */
@media (max-width: 768px) {
  .pm-grid {
    column-gap: 0.75rem;
    row-gap: 0.4rem;
    padding: 0.75rem 1rem;
  }

  .pm-icon svg {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  #product-data-div .pm-label,
  #product-data-div .pm-meta {
    min-height: 40px;
  }

  .pm-label,
  .pm-value {
    font-size: 1.5rem;
  }

  .gallery-tecnicas {
    padding: 2rem 0;
  }

  .gallery-tecnicas .gallery-item-title {
    font-size: 1.5rem;
  }

  .pm-meta {
    gap: 0.6rem;
  }
}

@media (max-width: 580px) {
  .pm-grid {
    grid-template-columns: max-content max-content;
    column-gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    row-gap: 0.35rem;
  }

  .pm-icon svg {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
  }

  #product-data-div .pm-label,
  #product-data-div .pm-meta {
    min-height: 30px;
  }

  .pm-label,
  .pm-value {
    font-size: 1.25rem;
  }

  .gallery-tecnicas .gallery-item-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 420px) {
  .pm-grid {
    column-gap: 0.4rem;
    padding: 0.4rem 0.5rem;
    row-gap: 0.3rem;
  }

  .pm-icon svg {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
  }

  #product-data-div .pm-label,
  #product-data-div .pm-meta {
    min-height: 26px;
  }

  .pm-label,
  .pm-value {
    font-size: 0.75rem;
  }

  .gallery-tecnicas {
    padding: 2rem 0;
  }

  .gallery-tecnicas .gallery-item-title {
    font-size: 0.75rem;
  }

  .pm-meta {
    gap: 0.3rem;
  }
}

/* pages/products.php — separadores según diseño (solo body.page-products) */
body.page-products {
  background-color: #000;
}

/* PC: contenido centrado con 10% de margen a cada lado (como compare). ≤991 queda como celular. */
@media (min-width: 992px) {
  body.page-products .categoria {
    width: 80%;
    margin-left: 10%;
    margin-right: 10%;
    box-sizing: border-box;
  }
}

body.page-products #main-header {
  border-bottom: none;
  box-shadow: 0 1px 0 #e8e8e8, 0 2px 0 #5c5c5c;
}

body.page-products .logo-mobile.menu-logo-mobile-container {
  border-top: none;
}

body.page-products .categoria:not(:has(.seccion)) {
  margin-top: 0;
  border: none;
}

body.page-products .categoria:not(:has(.seccion)) .h1Home {
  margin: 0;
  padding: 1rem 0;
  border: none;
  color: #fff;
  text-align: center;
  font-family: 'BentonSans-Regular', 'BentonSans-Bold', Arial, Helvetica, sans-serif !important;
  font-weight: 300 !important;
  font-size: 22.5px !important;
  letter-spacing: normal !important;
  line-height: normal;
  font-style: normal;
  box-sizing: border-box;
}

body.page-products .categoria:has(.seccion) {
  border: none;
  margin-top: 0;
  margin-bottom: 0;
  background-color: #000;
}

/* El botón es nuevo: en escritorio no se muestra. En celular/tablet lo abre el media query de abajo. */
body.page-products a.products-h1-volver {
  display: none;
}

/* Celular y tablet: título en una línea, sin «Vintage», letra como la portada y Volver a la derecha */
@media (max-width: 991px) {
  body.page-products .categoria:not(:has(.seccion)) {
    container-type: inline-size;
    container-name: products-titulo;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    /* Mismo margen lateral que el título de la portada (inicio-contenido) */
    padding-left: clamp(0.75rem, 3.2vw, 1.25rem) !important;
    padding-right: clamp(0.75rem, 3.2vw, 1.25rem) !important;
    min-width: 0;
  }

  body.page-products .categoria:not(:has(.seccion)) .h1Home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0.7rem 0;
    white-space: nowrap;
    text-align: center;
    font-size: clamp(1rem, calc(100cqi / 25), 2.25rem) !important;
    line-height: 1.2;
  }

  body.page-products .products-h1-texto {
    min-width: 0;
    overflow: hidden;
    text-overflow: clip;
  }

  body.page-products .products-h1-vintage {
    display: none;
  }

  body.page-products a.products-h1-volver.btn-step-back {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0.35rem 0.6rem !important;
    border-radius: 4px;
    font-size: clamp(12px, 0.72em, 16px) !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    letter-spacing: normal !important;
    text-transform: none;
    white-space: nowrap !important;
  }
}

/* Entre ítems en móvil: pequeño espacio negro, sin línea */
@media (max-width: 768px) {
  body.page-products .categoria:has(.seccion) + .categoria:has(.seccion),
  body.page-products .categoria:not(:has(.seccion)) + .categoria:has(.seccion) {
    margin-top: 6px;
    border-top: none;
  }
}

/* Tablet: el alto fijo de 15rem aplasta la foto (ancho completo × 150px, object-fit: fill). */
@media (min-width: 450px) and (max-width: 991px) {
  body.page-products .categoria .seccion {
    height: auto;
    aspect-ratio: 12 / 5;
    overflow: hidden;
  }

  body.page-products .categoria .seccion img,
  body.page-products .categoria #imgchange {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}
