@import url('hwm-patterns.css');

/* Catálogo corporativo · páginas productos/index y productos/*/productos/
   Paleta: #38b6ff · #ffde59 · #000000 · #ffffff
   (Banner y botones heredan estilos globales de styles.css) */

.catalog-ui {
  background: #ffffff;
}

/* ---------- HormiMax · al lado izquierdo (referencia: Cajas) ---------- */
@keyframes catalog-hormimax-float {
  0%, 100% {
    transform: translateX(-5%) translateY(0);
  }
  50% {
    transform: translateX(-5%) translateY(-10px);
  }
}

@keyframes catalog-hormimax-float-up {
  0%, 100% {
    transform: translateX(-10%) scale(1.72) translateY(0);
  }
  50% {
    transform: translateX(-10%) scale(1.72) translateY(-10px);
  }
}

@keyframes catalog-hormimax-float-esquineros {
  0%, 100% {
    transform: translateX(-14%) scale(1.72) translateY(0);
  }
  50% {
    transform: translateX(-14%) scale(1.72) translateY(-10px);
  }
}

@keyframes catalog-hormimax-float-flejes {
  0%, 100% {
    transform: translateX(-12%) scale(1.35) translateY(0);
  }
  50% {
    transform: translateX(-12%) scale(1.35) translateY(-10px);
  }
}

.catalog-ui .catalog-hormimax {
  position: fixed;
  top: clamp(16rem, 28vh, 21rem);
  left: 0;
  margin-left: clamp(-3.5rem, -3vw, -1.25rem);
  right: auto;
  bottom: auto;
  z-index: 15;
  width: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
  opacity: 0.95;
}

.catalog-ui .catalog-hormimax img {
  display: block;
  width: auto;
  height: min(58vh, 520px);
  max-height: min(58vh, 520px);
  object-fit: contain;
  object-position: left top;
  transform: translateX(-5%);
  transform-origin: left top;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.14));
  animation: catalog-hormimax-float 4.2s ease-in-out infinite;
}

/* SVG más pequeños: mismo tamaño visual, más margen izquierdo para no tapar ficha */
.catalog-ui .catalog-hormimax:not(.catalog-hormimax--cajas):not(.catalog-hormimax--esquineros):not(.catalog-hormimax--flejes) {
  margin-left: clamp(-11rem, -9vw, -5.5rem);
}

.catalog-ui .catalog-hormimax:not(.catalog-hormimax--cajas):not(.catalog-hormimax--esquineros):not(.catalog-hormimax--flejes) img {
  transform: translateX(-10%) scale(1.72);
  animation: catalog-hormimax-float-up 4.2s ease-in-out infinite;
}

/* Esquineros */
.catalog-ui .catalog-hormimax--esquineros {
  margin-left: clamp(-8.5rem, -7vw, -4.5rem);
}

.catalog-ui .catalog-hormimax--esquineros img {
  transform: translateX(-14%) scale(1.72);
  animation: catalog-hormimax-float-esquineros 4.2s ease-in-out infinite;
}

/* Flejes: misma ilustración, más compacto */
.catalog-ui .catalog-hormimax--flejes {
  margin-left: clamp(-6.5rem, -5.5vw, -3.25rem);
}

.catalog-ui .catalog-hormimax--flejes img {
  height: min(46vh, 400px);
  max-height: min(46vh, 400px);
  transform: translateX(-12%) scale(1.35);
  animation: catalog-hormimax-float-flejes 4.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .catalog-ui .catalog-hormimax img {
    animation: none;
  }
}

@media (max-width: 1100px) {
  .catalog-ui .catalog-hormimax {
    top: clamp(14.5rem, 26vh, 19rem);
    margin-left: clamp(-3rem, -2.5vw, -1rem);
  }

  .catalog-ui .catalog-hormimax:not(.catalog-hormimax--cajas):not(.catalog-hormimax--esquineros):not(.catalog-hormimax--flejes) {
    margin-left: clamp(-9rem, -8vw, -4.5rem);
  }

  .catalog-ui .catalog-hormimax--esquineros {
    margin-left: clamp(-7rem, -6.5vw, -3.75rem);
  }

  .catalog-ui .catalog-hormimax--flejes {
    margin-left: clamp(-5.5rem, -5vw, -2.75rem);
  }

  .catalog-ui .catalog-hormimax--flejes img {
    height: min(40vh, 340px);
    max-height: min(40vh, 340px);
  }

  .catalog-ui .catalog-hormimax img {
    height: min(52vh, 460px);
    max-height: min(52vh, 460px);
  }
}

@media (max-width: 860px) {
  .catalog-ui .catalog-hormimax {
    top: auto;
    left: max(0.5rem, env(safe-area-inset-left));
    margin-left: 0;
    bottom: calc(9.5rem + env(safe-area-inset-bottom));
    opacity: 0.92;
  }

  .catalog-ui .catalog-hormimax img {
    height: clamp(76px, 18vw, 104px);
    max-height: clamp(76px, 18vw, 104px);
    transform: none;
    animation: catalog-hormimax-float 4.2s ease-in-out infinite;
  }

  .catalog-ui .catalog-hormimax:not(.catalog-hormimax--cajas):not(.catalog-hormimax--esquineros):not(.catalog-hormimax--flejes) img {
    transform: none;
    animation: catalog-hormimax-float 4.2s ease-in-out infinite;
  }

  .catalog-ui .catalog-hormimax--esquineros img {
    transform: none;
    animation: catalog-hormimax-float 4.2s ease-in-out infinite;
  }

  .catalog-ui .catalog-hormimax--flejes {
    display: none;
  }
}

@media (max-width: 520px) {
  .catalog-ui .catalog-hormimax {
    left: max(0.35rem, env(safe-area-inset-left));
    bottom: calc(9rem + env(safe-area-inset-bottom));
  }

  .catalog-ui .catalog-hormimax img {
    height: clamp(68px, 16vw, 92px);
    max-height: clamp(68px, 16vw, 92px);
  }
}

/* ---------- Sección catálogo ---------- */
.catalog-ui .section.white {
  padding: 2.75rem 7vw 4rem;
}

.catalog-ui .section.white > .lead {
  max-width: 720px;
  margin: 0 auto 1rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1.65;
  color: #38485a;
}

.catalog-ui .catalogProducts {
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- Grid categorías ---------- */
.catalog-ui .categoryGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 1rem;
  max-width: 1280px;
  margin: 0 auto;
}

.catalog-ui .catCard {
  border: 1px solid #d7edf9;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(15, 50, 80, .06);
  min-height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.catalog-ui .catCard::before {
  height: 3px;
  background: #38b6ff;
}

.catalog-ui .catCard:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(56, 182, 255, .14);
  border-color: rgba(56, 182, 255, .45);
}

.catalog-ui .catImg {
  height: 168px;
  padding: 0.35rem 0.5rem 0.15rem;
  background: #ffffff;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid rgba(56, 182, 255, 0.1);
  overflow: hidden;
}

.catalog-ui .catImg img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: none;
}

.catalog-ui .catBody {
  padding: 0.65rem 1.25rem 1.25rem;
  text-align: left;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.catalog-ui .catBody h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: -.01em;
}

.catalog-ui .catBody p {
  margin: 0;
  flex: 1;
  font-size: .88rem;
  line-height: 1.55;
  color: #38485a;
}

.catalog-ui .btnSmall {
  margin-top: .5rem;
  align-self: flex-start;
}

/* ---------- Fichas de producto (layout ficha técnica) ---------- */
.catalog-ui .productApartado {
  max-width: 1180px;
  margin: 0 auto 2.5rem;
}

.catalog-ui .productApartado:last-child {
  margin-bottom: 0;
}

.catalog-ui .productBlock--sheet {
  display: block;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(56, 182, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(15, 50, 80, 0.06);
  background: #ffffff;
  position: relative;
  z-index: 20;
}

.catalog-ui .productBlock--sheet:hover {
  box-shadow: 0 4px 18px rgba(56, 182, 255, .1);
}

.catalog-ui .productSheetTitle {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  font-weight: 900;
  color: #38b6ff;
  text-transform: none;
  letter-spacing: -.03em;
  line-height: 1.05;
}

.catalog-ui .productSheetGrid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.catalog-ui .productSheetVisual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: .5rem;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid rgba(56, 182, 255, 0.1);
}

.catalog-ui .productSheetVisual .imgAnimWrap {
}
  min-height: 220px;
  width: 100%;
}

.catalog-ui .productSheetVisual .imgAnim {
  max-width: 100%;
  max-height: 300px;
}

.catalog-ui .productSheetInfo {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.catalog-ui .productDescTitle,
.catalog-ui .medidasTableTitle {
  margin: 0 0 .75rem;
  font-size: 1.05rem;
  font-weight: 900;
  color: #000000;
  letter-spacing: -.02em;
}

.catalog-ui .productDesc p {
  margin: 0;
  font-size: .95rem;
  line-height: 1.65;
  color: #38485a;
}

/* Tabla de medidas · estilo corporativo */
.catalog-ui .medidasTableGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.catalog-ui .medidasCol {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  min-width: 0;
}

.catalog-ui .medidasHead {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .65rem .75rem;
  background: #38b6ff;
  color: #ffffff;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  border-radius: 10px;
}

.catalog-ui .medidasCell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: .75rem .85rem;
  background: #ffffff;
  color: #000000;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
  border: 2px solid #ffde59;
  border-radius: 10px;
}

.catalog-ui .medidasTableFrame {
  padding: 0;
  background: #ffffff;
  border-radius: 10px;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.catalog-ui .medidasTableFrame .imgAnimWrap {
  min-height: auto;
  width: auto;
  padding: 0;
}

.catalog-ui .medidasTableFrame .specTable {
  width: auto;
  max-width: min(100%, 600px);
  max-height: 380px;
  height: auto;
  object-fit: contain;
  filter: none;
}

.catalog-ui .imgAnimWrap--spec {
  cursor: zoom-in;
}

/* Layout legacy (si queda en alguna página) */
.catalog-ui .productBlock {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: 0;
  margin-bottom: 0;
  border: 1px solid #d7edf9;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(15, 50, 80, .06);
  overflow: hidden;
}

.catalog-ui .productBlock::before {
  display: none;
}

.catalog-ui .productBlock:hover {
  transform: none;
  box-shadow: 0 4px 18px rgba(56, 182, 255, .1);
}

.catalog-ui .productContent {
  padding: 2rem 2.25rem;
  background: #ffffff;
}

.catalog-ui .productContent h3 {
  margin: 0 0 .75rem;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 800;
  color: #000000;
  text-transform: none;
  letter-spacing: -.02em;
  line-height: 1.25;
}

.catalog-ui .productContent p {
  margin: 0;
  font-size: .95rem;
  line-height: 1.65;
  color: #38485a;
}

.catalog-ui .productBlock--spec {
  border-color: #e8f4fc;
}

.catalog-ui .productBlock--spec .productContent {
  background: #f8fcff;
}

.catalog-ui .productBlock--spec .productContent h3 {
  color: #38b6ff;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.catalog-ui .productVisual {
  min-height: 260px;
  padding: 1.5rem 1.75rem;
  background: #ffffff;
  border-left: 1px solid #edf4f8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-ui .productBlock--spec .productVisual {
  background: #f8fcff;
}

.catalog-ui .imgAnimWrap {
  min-height: 220px;
  width: 100%;
}

.catalog-ui .imgAnim {
  width: auto;
  height: auto;
  max-width: min(100%, 480px);
  max-height: 460px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .08));
}

.catalog-ui .imgAnimWrap:hover .imgAnim:not(.is-reset) {
  transform: scale(1.08);
}

.catalog-ui .specTable {
  max-width: min(100%, 600px);
  max-height: 380px;
}

/* ---------- Sección relacionados ---------- */
.catalog-ui .section.gray {
  padding: 2.5rem 7vw;
  background: #f3f8fc;
  border-top: 1px solid #d7edf9;
}

.catalog-ui .section.gray h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  margin-bottom: .5rem;
}

.catalog-ui .related a {
  background: #ffffff;
  border: 1px solid #38b6ff;
  color: #000000;
  border-radius: 6px;
  box-shadow: none;
  font-size: .78rem;
  font-weight: 700;
  padding: .6rem 1rem;
}

.catalog-ui .related a:hover {
  background: #38b6ff;
  color: #000000;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .catalog-ui .productBlock {
    grid-template-columns: 1fr;
  }

  .catalog-ui .productSheetGrid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .catalog-ui .productSheetVisual {
    min-height: auto;
  }

  .catalog-ui .medidasTableGrid {
    grid-template-columns: 1fr;
  }

  .catalog-ui .productVisual {
    border-left: 0;
    border-top: 1px solid #edf4f8;
    min-height: 220px;
  }

  .catalog-ui .productContent {
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 680px) {
  .catalog-ui .categoryGrid {
    grid-template-columns: 1fr;
  }

  .catalog-ui .wixBanner {
    padding: 2.5rem clamp(1rem, 4vw, 1.25rem);
  }

  .catalog-ui .section.white {
    padding: 2rem clamp(1rem, 4vw, 1.25rem) 3rem;
  }

  .catalog-ui .catBody h3 {
    font-size: clamp(0.92rem, 4vw, 1rem);
  }

  .catalog-ui .catBody p {
    font-size: clamp(0.88rem, 3.5vw, 0.95rem);
    line-height: 1.6;
  }

  .catalog-ui .productContent h2,
  .catalog-ui .productContent h3,
  .catalog-ui .productSheetTitle {
    font-size: clamp(1.1rem, 5vw, 1.35rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .catalog-ui .productContent p,
  .catalog-ui .productContent li {
    font-size: clamp(0.88rem, 3.5vw, 0.95rem);
    line-height: 1.65;
  }

  .catalog-ui .medidasTableWrap,
  .catalog-ui .productSheetTableWrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-inline: -0.25rem;
    padding-inline: 0.25rem;
  }

  .catalog-ui .btnSmall {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}
