/* ============================================================
   TERMOPLAS — Catálogo técnico (overlay)
   ============================================================ */
html.cat-open, html.cat-open body { overflow: hidden; }

/* destaque discreto do item "Catálogo" no menu */
.nav__link--cat { color: #fff; }
.nav__link--cat::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bordo); margin-right: 0.55em; vertical-align: 2px;
  box-shadow: 0 0 10px var(--bordo-glow);
}
.nav__overlay a.nav__over--cat > span { color: var(--bordo-400); }

/* ---- overlay ---- */
.cat {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(0.5rem, 2vw, 2rem);
  opacity: 0; transition: opacity 0.26s var(--ease);
}
.cat.is-open { opacity: 1; }
.cat[hidden] { display: none; }

.cat__backdrop {
  position: absolute; inset: 0;
  background: rgba(6, 7, 11, 0.74);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
          backdrop-filter: blur(10px) saturate(120%);
}

.cat__panel {
  position: relative;
  width: min(1220px, 100%);
  height: min(94vh, 980px);
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(141,23,57,0.12), transparent 55%),
    var(--graphite-950);
  border: 1px solid var(--line-dark);
  border-radius: clamp(14px, 1.6vw, 22px);
  box-shadow: 0 60px 120px -40px rgba(0,0,0,0.85);
  overflow: hidden;
  transform: translateY(16px) scale(0.99);
  transition: transform 0.3s var(--ease);
}
.cat.is-open .cat__panel { transform: none; }

/* topo */
.cat__top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: clamp(1.1rem, 2.2vw, 1.8rem) clamp(1.1rem, 2.4vw, 2rem) 0;
}
.cat__eyebrow { font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--bordo-400); font-weight: 600; }
.cat__lead { font-family: var(--font-display); font-weight: 600; color: #fff; font-size: clamp(1.05rem, 1.6vw, 1.4rem); margin-top: 0.35rem; }
.cat__close {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; color: var(--on-dark);
  border: 1px solid var(--line-dark); background: rgba(255,255,255,0.03);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.cat__close:hover { background: var(--bordo); border-color: var(--bordo); color: #fff; }

/* abas de marca */
.cat__brands {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: clamp(0.7rem, 1.5vw, 1rem) clamp(1.1rem, 2.4vw, 2rem);
}
.cat__tab {
  padding: 0.5em 1.05em; border-radius: 100px;
  border: 1px solid var(--line-dark); background: rgba(255,255,255,0.02);
  color: var(--on-dark-70); font-size: 0.86rem; font-weight: 500; white-space: nowrap;
  transition: color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.cat__tab:hover { color: var(--on-dark); border-color: var(--line-strong); }
.cat__tab.is-on { background: var(--bordo); border-color: var(--bordo); color: #fff; }

/* corpo: setas + visualização */
.cat__body {
  flex: 1; min-height: 0; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; align-items: stretch;
  gap: clamp(0.4rem, 1.5vw, 1.2rem);
  padding: 0 clamp(0.6rem, 1.6vw, 1.4rem) clamp(0.4rem, 1vw, 0.9rem);
}
.cat__arrow {
  flex: 0 0 auto; align-self: center; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: var(--on-dark);
  border: 1px solid var(--line-dark); background: rgba(255,255,255,0.03);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.cat__arrow:hover { background: var(--bordo); border-color: var(--bordo); color: #fff; }

.cat__view { min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; }
/* nome em UMA linha: marca + modelo + configuração */
.cat__meta {
  display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap;
  gap: 0.15rem 0.6rem; padding: 0 0 0.55rem; flex: 0 0 auto;
}
.cat__brand { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bordo-400); font-weight: 600; }
.cat__model { font-family: var(--font-display); font-weight: 600; color: #fff; font-size: clamp(1.05rem, 1.5vw, 1.4rem); line-height: 1.15; }
.cat__config { font-size: 0.86rem; color: var(--on-dark-70); }
.cat__config::before { content: "·"; margin-right: 0.55em; color: var(--on-dark-40); }

/* moldura na proporção exata do desenho (16:9) — sem margem branca em volta */
.cat__figwrap { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.cat__figure {
  position: relative; margin: 0;
  aspect-ratio: 6000 / 3375;
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  border-radius: 10px; overflow: hidden; background: #fff;
  box-shadow: 0 24px 55px -30px rgba(0,0,0,0.85);
}
.cat__img { width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.cat__figure.is-zoom { overflow: auto; }
.cat__figure.is-zoom .cat__img { width: auto; height: auto; max-width: none; max-height: none; cursor: zoom-out; }
.cat__zoom {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center; color: #fff;
  background: rgba(14,16,22,0.82); border: 0; cursor: pointer;
  transition: background 0.3s var(--ease);
}
.cat__zoom:hover { background: var(--bordo); }

.cat__avail { text-align: center; margin: 0.6rem 0 0.1rem; font-size: 0.82rem; color: var(--bordo-400); }

/* rodapé */
.cat__foot {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  padding: clamp(0.9rem, 1.8vw, 1.3rem) clamp(1.1rem, 2.4vw, 2rem);
  border-top: 1px solid var(--line-dark);
}
.cat__count { order: 1; font-family: var(--font-display); font-size: 0.94rem; color: var(--on-dark-70); font-variant-numeric: tabular-nums; }
.cat__disclaimer { order: 2; flex: 1 1 240px; font-size: 0.72rem; line-height: 1.4; color: var(--on-dark-40); max-width: 52ch; }
.cat__wa {
  order: 3; margin-left: auto;
  display: inline-flex; align-items: center; gap: 0.55em;
  padding: 0.82em 1.5em; border-radius: 100px;
  background: #1f8a4c; color: #fff; font-weight: 600; font-size: 0.92rem;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.cat__wa:hover { background: #14663a; transform: translateY(-2px); }

/* ---- mobile ---- */
@media (max-width: 720px) {
  .cat { padding: 0; }
  .cat__panel { width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .cat__brands { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cat__brands::-webkit-scrollbar { display: none; }
  .cat__body { grid-template-columns: 1fr; padding: 0 clamp(0.8rem, 3vw, 1.2rem); position: relative; }
  .cat__arrow { position: absolute; top: 46%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px; background: rgba(9,10,15,0.7); }
  .cat__arrow--prev { grid-column: 1; left: 4px; }
  .cat__arrow--next { grid-column: 1; right: 4px; left: auto; }
  .cat__view { grid-column: 1; grid-row: 1; }
  .cat__foot { flex-direction: column; align-items: stretch; text-align: center; gap: 0.7rem; }
  .cat__wa { order: 1; margin: 0; justify-content: center; }
  .cat__count { order: 2; }
  .cat__disclaimer { order: 3; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cat, .cat__panel { transition: none; }
}
