.new-index-filter {
  grid-template-columns: minmax(250px, 1.7fr) repeat(2, minmax(135px, 1fr)) auto;
}

.sheet-hero figure img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  image-rendering: auto;
}

.sheet-visuals {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(210px, .75fr);
  gap: 14px;
  align-items: stretch;
}

.sheet-visuals figure {
  margin: 0;
  border: 1px solid #dfdcd6;
  background: #fff;
}

.sheet-visuals figcaption,
.sheet-profile > span {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid #e8e5df;
  color: #666;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
}

.sheet-photo {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  justify-items: center;
}

.sheet-photo img {
  align-self: center;
  padding: 14px;
  cursor: zoom-in;
}

.angoli-corner img {
  width: 100%;
  height: auto;
  max-height: 390px;
  object-fit: contain;
  padding: 10px;
}

.angoli-profile img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  align-self: center;
  padding: 8px;
}

/* The 61 mm visible section occupies 173 px at 72 ppi. */
.sheet-photo img[src*="foto-catalogo-107-127-000-61mm"],
.sheet-photo img[src*="foto-catalogo-107-167-000-61mm"] {
  width: 100%;
  height: 173px;
  padding: 0;
  object-fit: cover;
  object-position: left center;
}

.new-moulding-card[data-ref="107/127/000"] .new-moulding-media img,
.new-moulding-card[data-ref="107/167/000"] .new-moulding-media img {
  display: block;
  width: 100%;
  height: 173px;
  margin-block: 8px;
  object-fit: cover;
  object-position: left center;
}

.sheet-profile {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 280px;
}

.sheet-profile svg {
  width: 100%;
  height: 100%;
  min-height: 250px;
  padding: 12px;
  cursor: zoom-in;
}

.sheet-profile path,
.sheet-profile line {
  fill: none;
  stroke: #171717;
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.sheet-profile line {
  stroke: #c9141b;
  stroke-width: 1;
}

.sheet-profile text {
  fill: #555;
  font: 9px "DM Sans", Arial, sans-serif;
  text-anchor: middle;
}

.photo-lightbox {
  width: min(94vw, 1500px);
  max-width: none;
  height: min(92vh, 1000px);
  max-height: none;
  padding: 42px 22px 22px;
  border: 0;
  background: #fff;
  box-shadow: 0 28px 90px #0008;
}

.photo-lightbox::backdrop {
  background: #000c;
}

.photo-lightbox-view {
  width: 100%;
  height: 100%;
}

.photo-lightbox-view img,
.photo-lightbox-view svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-lightbox-view svg {
  padding: 18px;
  background: #fff;
}

.photo-lightbox-close {
  position: absolute;
  top: 5px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #171717;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.sheet-profile.unavailable {
  place-items: center;
  align-content: center;
  min-height: 280px;
  border: 1px solid #dfdcd6;
  background: #f7f5f1;
  color: #888;
}

.sheet-profile.unavailable > span {
  width: 100%;
  align-self: start;
}

.sheet-profile.unavailable p {
  padding: 40px 18px;
  font-size: 11px;
}

@media (max-width: 1120px) {
  .new-index-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .new-index-filter {
    grid-template-columns: 1fr;
  }
  .sheet-visuals {
    grid-template-columns: 1fr;
  }
}

.missing-photo-section {
  padding: 48px 0 80px;
  background: #f5f3ef;
}

.missing-photo-tools {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto;
  align-items: end;
  gap: 14px 24px;
  margin-bottom: 20px;
}

.missing-photo-tools label {
  grid-column: 1;
  color: #666;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
}

.missing-photo-tools input {
  grid-column: 1;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #d8d4cd;
  background: #fff;
}

.missing-photo-tools p {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: #666;
}

.missing-photo-table-wrap {
  overflow-x: auto;
  border: 1px solid #dfdcd6;
  background: #fff;
}

.missing-photo-table {
  width: 100%;
  border-collapse: collapse;
}

.missing-photo-table th,
.missing-photo-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #ece9e3;
  text-align: left;
}

.missing-photo-table th {
  background: #171717;
  color: #fff;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .8px;
}

.missing-photo-table td:first-child a {
  color: #151515;
  font-weight: 750;
}

.missing-photo-table td:last-child a {
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 620px) {
  .missing-photo-tools {
    grid-template-columns: 1fr;
  }
  .missing-photo-tools p {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Sistema común de fotografía y perfil transversal para todas las molduras. */
.moulding-profile-system .sheet-hero-grid{grid-template-columns:minmax(260px,.85fr) minmax(0,1.35fr);gap:clamp(28px,5vw,72px);align-items:center}
.profile-system-visuals{grid-template-columns:minmax(0,1.18fr) minmax(280px,.82fr);gap:16px;align-items:stretch}
.profile-system-visuals>figure{height:380px;min-height:0;overflow:hidden;border:1px solid #dedbd4;background:#fff}
.profile-system-visuals>figure>figcaption{height:40px;box-sizing:border-box}
.profile-system-photo{grid-template-rows:40px minmax(0,1fr)}
.profile-system-photo.has-visualisation-note{grid-template-rows:40px minmax(0,1fr) auto}
.profile-system-photo.has-visualisation-note>img{height:100%!important;min-height:0}
.profile-system-photo>img{display:block;width:100%;height:340px!important;max-height:none!important;padding:18px!important;object-fit:contain!important;object-position:center;background:#fff;box-sizing:border-box}
/* Match the supplied 61 mm / 173 px photo in both fiches. */
.profile-system-photo>img[src*="foto-catalogo-107-127-000-61mm"],
.profile-system-photo>img[src*="foto-catalogo-107-167-000-61mm"]{
  height:173px!important;
  min-height:173px!important;
  padding:0!important;
  object-fit:cover!important;
  object-position:left center!important;
  align-self:center;
}
.profile-system-photo>.sheet-no-photo{height:340px}
.profile-system-diagram{display:grid;grid-template-rows:40px minmax(0,1fr) auto;min-height:0!important}
.profile-system-diagram>svg{display:block;width:100%;height:304px;max-height:100%;min-height:0!important;padding:8px 10px 0;box-sizing:border-box;background:#fbfaf8}
.profile-system-diagram>small{min-height:28px;padding:5px 12px 8px;color:#777;font-size:8px;line-height:1.35;text-align:center;text-transform:uppercase;letter-spacing:.45px;background:#fbfaf8}
.profile-system-diagram .profile-geometry path{fill:#e5cfad;stroke:#171717;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.profile-system-diagram .profile-arrow-head{fill:#c9141b}
.profile-system-diagram .profile-dimensions line{stroke:#c9141b;stroke-width:1.15;vector-effect:non-scaling-stroke}
.profile-system-diagram .profile-dimensions text{fill:#4b4b4b;font:10px "DM Sans",Arial,sans-serif}
.profile-system-diagram .profile-rebate-dimensions line{stroke:#c9141b;stroke-width:1.15;vector-effect:non-scaling-stroke}
.profile-system-diagram .profile-rebate-dimensions text{fill:#c9141b;font:9px "DM Sans",Arial,sans-serif;font-weight:700}
.profile-system-diagram .profile-rebate-pending text{fill:#9a9690;font:8px "DM Sans",Arial,sans-serif;font-weight:700;letter-spacing:.35px;text-transform:uppercase}
.profile-system-diagram .profile-size{fill:#171717;font:700 14px "DM Sans",Arial,sans-serif;letter-spacing:.2px}
.sheet-hero .source-technical-profile>img{display:block;width:100%;height:100%;max-height:100%;min-height:0;padding:10px 14px;object-fit:contain;background:#fbfaf8;box-sizing:border-box}
.source-technical-profile>svg{stroke-linecap:round;stroke-linejoin:round}
.source-technical-profile>img[src*="perfil-1045-40ba-centrado"]{height:100%;max-height:100%;align-self:center;object-position:center}
.profile-system-diagram.unavailable{display:grid;grid-template-rows:40px 1fr;place-items:stretch;align-content:stretch}
.profile-system-diagram.unavailable>p{display:grid;place-items:center;margin:0;padding:20px;color:#8a8a8a;font-size:10px;text-transform:uppercase;letter-spacing:.7px}

/* Bloque técnico unificado: misma jerarquía que las fichas de la colección CUBE. */
.moulding-profile-system .unified-product-specifications{align-content:start}
.moulding-profile-system .unified-product-specifications>div{min-width:0}
.moulding-profile-system .unified-product-specifications dt{color:#6d6a65}
.moulding-profile-system .unified-product-specifications dd{overflow-wrap:anywhere}
.moulding-profile-system .unified-product-specifications [data-specification="anchototal"] dd,
.moulding-profile-system .unified-product-specifications [data-specification="altototal"] dd,
.moulding-profile-system .unified-product-specifications [data-specification="anchodelrebaje"] dd,
.moulding-profile-system .unified-product-specifications [data-specification="alturainteriordelrebaje"] dd{color:#151515;font-weight:800}
.moulding-profile-system .unified-product-specifications [data-specification="nuestrareferencia"] dd{color:var(--red);font-weight:850;letter-spacing:.2px}

/* Fotografías del índice calibradas por ancho y sin deformar el grosor. */
.new-moulding-grid{align-items:start}
.new-moulding-card{height:auto}
.new-moulding-media{display:flex;width:100%;height:auto;min-height:0;align-items:center;justify-content:center;padding:12px 0;background:#fff}
.new-moulding-media img{display:block;width:calc(100% - 24px);max-width:720px;height:auto;padding:0;object-fit:contain!important;object-position:center!important;background:#fff}
.new-moulding-card[data-ref="107/127/000"] .new-moulding-media,
.new-moulding-card[data-ref="107/167/000"] .new-moulding-media{min-height:190px}
.new-moulding-card[data-ref="107/127/000"] .new-moulding-media img,
.new-moulding-card[data-ref="107/167/000"] .new-moulding-media img{
  width:calc(100% - 24px);
  height:173px!important;
  margin:0;
  object-fit:cover!important;
  object-position:left center!important;
}
.new-moulding-media:hover img{transform:none}
.new-moulding-media .no-photo{min-height:112px}
.new-moulding-info{min-height:142px;padding:15px 17px}
.new-moulding-info h2{font-size:17px;line-height:1.15}

@media(max-width:1020px){
  .moulding-profile-system .sheet-hero-grid{grid-template-columns:1fr}
  .profile-system-visuals{grid-template-columns:minmax(0,1.1fr) minmax(260px,.9fr)}
}
@media(max-width:760px){
  .profile-system-visuals{grid-template-columns:1fr}
  .profile-system-visuals>figure{height:350px}
  .profile-system-photo>img,.profile-system-photo>.sheet-no-photo{height:310px!important}
  .profile-system-diagram>svg{height:274px}
  .moulding-profile-system .unified-product-specifications{grid-template-columns:1fr 1fr}
}
@media(max-width:480px){
  .profile-system-visuals>figure{height:318px}
  .profile-system-photo>img,.profile-system-photo>.sheet-no-photo{height:278px!important;padding:12px!important}
  .profile-system-diagram>svg{height:242px;padding:4px}
  .new-moulding-media{height:auto}
  .new-moulding-info{min-height:132px}
  .moulding-profile-system .unified-product-specifications{grid-template-columns:1fr}
}

/* Perfiles en madera de ayous incorporados al índice general. */
.ayous-index-profile {
  display: grid;
  place-items: center;
  padding: 12px;
  background: #f7f4ee;
}

.ayous-index-profile img {
  object-fit: contain;
  background: transparent;
}

.ayous-rebate {
  margin: -3px 0 16px !important;
  color: #777 !important;
  font-size: 9px !important;
}

/* Las referencias mongoy sin fotografía muestran solo una muestra del acabado. */
.new-moulding-media:has(.finish-sample-caption) { position: relative; }
.new-moulding-media .finish-sample-caption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, .92);
  color: #3d3930;
  font-size: 10px;
  line-height: 1.25;
}
.profile-system-photo > small {
  display: block;
  padding: 6px 12px 12px;
  color: #6b6256;
  font-size: 11px;
  text-align: center;
}

.sheet-photo > small,
.mongoy-l-profile > small {
  display: block;
  padding: 6px 10px 12px;
  color: #6b6256;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}

/* Fotografías horizontales a 180 mm y 72 ppp, sin comprimir el ancho visible. */
:is(.angoli-recta, .moldura-112-6x22) .sheet-hero-grid {
  grid-template-columns: minmax(0, 1fr) 512px;
  gap: 32px;
}
:is(.angoli-recta, .moldura-112-6x22) .sheet-visuals {
  grid-template-columns: minmax(0, 1fr);
}
:is(.angoli-recta, .moldura-112-6x22) :is(.angoli-horizontal, .horizontal-112) {
  height: 170px;
}
:is(.angoli-recta, .moldura-112-6x22) :is(.angoli-horizontal, .horizontal-112) img {
  display: block;
  width: 510px;
  max-width: 100%;
  height: auto;
  padding: 0;
  object-fit: contain;
  justify-self: center;
}
:is(.angoli-recta, .moldura-112-6x22) .sheet-profile {
  height: 260px;
  min-height: 0;
}
:is(.angoli-recta, .moldura-112-6x22) .sheet-profile img {
  width: auto;
  max-width: 100%;
  max-height: 175px;
  justify-self: center;
}
@media (max-width: 1080px) {
  :is(.angoli-recta, .moldura-112-6x22) .sheet-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  :is(.angoli-recta, .moldura-112-6x22) .sheet-visuals {
    width: min(100%, 512px);
  }
}
.moldura-112-6x22 .profile-system-photo {
  height: 170px;
}
.moldura-112-6x22 .profile-system-photo img {
  display: block;
  width: 510px;
  max-width: 100%;
  height: 62px !important;
  min-height: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  justify-self: center;
}
.moldura-112-6x22 .profile-system-diagram {
  height: 330px;
}
.moldura-112-6x22 .profile-112 {
  height: 330px;
}
.moldura-112-6x22 .profile-112 img {
  width: 250px;
  max-height: 245px;
  padding: 4px;
}
.moldura-112-6x22 .profile-112 > small {
  display: block;
  padding: 6px 10px 10px;
  color: #6b6256;
  font-size: 10px;
  text-align: center;
}
.mongoy-l-profile svg {
  display: block;
  width: 100%;
  height: 295px;
  padding: 12px;
  box-sizing: border-box;
}
.mongoy-l-profile svg text {
  fill: #a40010;
  font: 600 12px Arial, sans-serif;
}

/* Keep the complete supplier cross-section visible on the E004 sheets. */
.e004-product .source-technical-profile>img{height:100%;max-height:100%;min-height:0;object-fit:contain}

.baqueton-991560 .source-technical-profile>img{height:100%;max-height:100%;min-height:0;object-fit:contain}
