/* ============================================================
   Mac3D — producto.css
   Ubicación: /home/macdcom/mac3d.xyz/backend/assets/css/producto.css
   Solo estilos específicos del producto.
   Overrides globales claros en theme-light.css
   ============================================================ */

/* ══════════════════════════════════════════════════════════════
   HERO PRODUCTO
   ══════════════════════════════════════════════════════════════ */

.prod-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  background: #0a0a0a;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-top: 64px;
}
.prod-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.78);
  transition: transform 8s ease;
}
.prod-hero:hover .prod-hero-bg { transform: scale(1.03); }
.prod-hero-fog {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.4) 45%, rgba(0,0,0,.05) 80%, transparent 100%),
    linear-gradient(to right, rgba(0,0,0,.35) 0%, transparent 55%);
}
.prod-hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 4rem 60px 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1400px;
}
.prod-hero-cat {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--orange3);
  display: flex;
  align-items: center;
  gap: .8rem;
}
.prod-hero-cat::before { content: ''; width: 24px; height: 2px; background: var(--orange); }
.prod-hero-h1 {
  /* Título principal — se reduce automáticamente con títulos largos.
     Para títulos cortos (~40 chars): muy grande.
     Para títulos largos (~120 chars): aún legible sin desbordar. */
  font-size: clamp(1.8rem, 4.2vw, 4.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: #fff;
  max-width: 900px;
  /* Limitar a 4 líneas máximo, agregar elipsis si excede */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  hyphens: auto;
}

/* Cuando el título tiene más de 60 caracteres, reducir aún más (clase JS opcional) */
.prod-hero-h1.long-title {
  font-size: clamp(1.5rem, 3.2vw, 3rem);
  -webkit-line-clamp: 5;
}
.prod-hero-sub {
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(255,255,255,.65);
  max-width: 540px;
  line-height: 1.6;
}

/* Precio visible en hero — badge translúcido */
.prod-hero-price {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  padding: .7rem 1.2rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(10px);
  border-radius: 100px;
  align-self: flex-start;
  margin-top: .4rem;
}
.prod-hero-price-num { font-size: 1.6rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.prod-hero-price-currency { font-size: .82rem; font-weight: 500; color: rgba(255,255,255,.6); letter-spacing: .08em; }

.prod-hero-chips { display: flex; gap: .6rem; flex-wrap: wrap; }
.prod-chip {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .06em;
  padding: .3rem .85rem;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}
.prod-chip.orange {
  border-color: rgba(217,79,30,.5);
  color: var(--orange3);
  background: rgba(217,79,30,.12);
}

/* ══════════════════════════════════════════════════════════════
   CTA FLOTANTE
   ══════════════════════════════════════════════════════════════ */

.prod-cta-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: .8rem;
  background: var(--orange);
  color: #fff;
  padding: 1rem 1.8rem;
  border: none;
  border-radius: 100px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: -.01em;
  box-shadow: 0 8px 32px rgba(217,79,30,.45);
  transform: translateY(120px);
  opacity: 0;
  transition: transform .5s cubic-bezier(.16,1,.3,1), opacity .5s, background .2s, box-shadow .2s;
}
.prod-cta-float.visible { transform: translateY(0); opacity: 1; }
.prod-cta-float:hover:not(:disabled) {
  background: var(--orange2);
  box-shadow: 0 12px 40px rgba(217,79,30,.55);
}
.prod-cta-float:active:not(:disabled) {
  transform: translateY(0) scale(.97);
}
.prod-cta-float.comprado { background: #1e7a42; }
.prod-cta-float.comprado:hover { background: #26955a; box-shadow: 0 12px 40px rgba(30,122,66,.4); }

/* ── Par de botones flotantes (Agregar + Comprar ya) ────────── */
.prod-cta-pair {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 500;
  display: flex;
  gap: .7rem;
  align-items: center;
  transform: translateY(120px);
  opacity: 0;
  transition: transform .5s cubic-bezier(.16,1,.3,1), opacity .5s;
}
.prod-cta-pair.visible { transform: translateY(0); opacity: 1; }

.prod-cta-pair .prod-cta-float {
  position: static;
  transform: none;
  opacity: 1;
  box-shadow: 0 8px 32px rgba(217,79,30,.45);
}

.prod-cta-add {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 1rem 1.4rem;
  background: rgba(255,255,255,.95);
  color: #1d1d1f;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 100px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 6px 22px rgba(0,0,0,.1);
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.prod-cta-add svg {
  flex-shrink: 0;
  transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.prod-cta-add:hover {
  background: #fff;
  border-color: rgba(217,79,30,.35);
  color: #D94F1E;
  box-shadow: 0 10px 28px rgba(0,0,0,.14);
  transform: translateY(-2px);
}
.prod-cta-add:hover svg { transform: rotate(90deg); }
.prod-cta-add:active { transform: translateY(0) scale(.97); }

/* Mobile: apilar verticalmente */
@media (max-width: 640px) {
  .prod-cta-pair {
    flex-direction: column-reverse;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    gap: .5rem;
  }
  .prod-cta-pair .prod-cta-float,
  .prod-cta-add {
    width: 100%;
    justify-content: center;
    padding: .9rem 1.4rem;
    font-size: .9rem;
  }
}

/* ══════════════════════════════════════════════════════════════
   SPECS BAR
   ══════════════════════════════════════════════════════════════ */

.prod-specs {
  background: #f5f5f7;
  border-bottom: 1px solid rgba(0,0,0,.07);
  padding: 2.5rem 60px;
  display: flex;
  gap: 0;
  justify-content: space-around;
  flex-wrap: wrap;
}
.prod-spec {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.5rem;
  border-right: 1px solid rgba(0,0,0,.08);
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background .2s;
}
.prod-spec:hover { background: #fff0eb; }
.prod-spec:hover .spec-ico { transform: scale(1.2) translateY(-2px); opacity: 1; }
.prod-spec:hover .spec-val { color: var(--orange); }
.prod-spec:last-child { border-right: none; }
.spec-ico {
  font-size: 1.5rem;
  margin-bottom: .5rem;
  opacity: .6;
  transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .3s;
}
.spec-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -.02em;
  line-height: 1;
  transition: color .2s;
}
.spec-lbl {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6e6e73;
  margin-top: .3rem;
}
.prod-spec.clicked .spec-val { animation: specPulse .4s cubic-bezier(.16,1,.3,1); }
@keyframes specPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ══════════════════════════════════════════════════════════════
   GALERÍA — Cards scroll infinito
   ══════════════════════════════════════════════════════════════ */

.prod-gallery { background: #fff; padding: 5rem 60px; }

.gallery-viewport {
  overflow: hidden;
  position: relative;
  margin-top: 2rem;
}
.gallery-viewport.scrolling {
  mask-image: linear-gradient(to right, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
}
.gallery-track {
  display: flex;
  gap: 32px;
  width: max-content;
  align-items: center;
  will-change: transform;
}
.gallery-track.paused { /* JS pausa el rAF con esta clase */ }

.gallery-card {
  flex-shrink: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #f5f5f7;
  cursor: zoom-in;
  line-height: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s;
}
.gallery-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 48px rgba(0,0,0,.14);
}
.gallery-card img {
  display: block;
  width: auto;
  height: var(--card-h, 280px);
  max-width: 480px;
  min-width: 160px;
  pointer-events: none;
  -webkit-user-drag: none;
}
.gallery-card:nth-child(4n+1) img { --card-h: 260px; }
.gallery-card:nth-child(4n+2) img { --card-h: 320px; }
.gallery-card:nth-child(4n+3) img { --card-h: 240px; }
.gallery-card:nth-child(4n+4) img { --card-h: 300px; }

/* ══════════════════════════════════════════════════════════════
   LIGHTBOX (zoom + pan)
   ══════════════════════════════════════════════════════════════ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.96);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lb-img-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  border-radius: 12px;
  cursor: grab;
  user-select: none;
}
.lb-img-wrap.grabbing { cursor: grabbing; }
.lb-img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transform-origin: center;
  transition: transform .2s ease;
  pointer-events: none;
}
.lb-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 10;
}
.lb-close:hover { background: rgba(255,255,255,.22); }
.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 10;
}
.lb-nav:hover { background: rgba(255,255,255,.22); }
.lb-prev { left: 1.5rem; }
.lb-next { right: 1.5rem; }
.lb-zoom-hint {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: .72rem;
  color: rgba(255,255,255,.4);
  letter-spacing: .1em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   DESCRIPCIÓN
   ══════════════════════════════════════════════════════════════ */

.prod-desc { background: #fff; padding: 5rem 60px; border-top: 1px solid rgba(0,0,0,.06); }
.prod-desc-inner { max-width: 720px; margin: 0 auto; }
.prod-desc h2 { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; margin-bottom: 1.5rem; }
.prod-desc-text { font-size: 1.05rem; line-height: 1.85; color: #424245; }
.prod-desc-text p { margin-bottom: 1rem; }

/* ══════════════════════════════════════════════════════════════
   FICHA TÉCNICA
   ══════════════════════════════════════════════════════════════ */

.prod-ficha { background: #f5f5f7; padding: 5rem 60px; }
.ficha-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  border-radius: 16px;
  overflow: hidden;
  margin-top: 2.5rem;
}
.ficha-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  padding: 1.2rem 1.6rem;
  transition: background .18s;
}
.ficha-row:nth-child(odd) { background: #fafaf7; }
.ficha-row.expandable { cursor: pointer; position: relative; overflow: hidden; }
.ficha-row.expandable:hover { background: #fff0eb; }
.ficha-row.expandable:hover .ficha-arrow { color: var(--orange); transform: translateX(3px); }
.ficha-row.active { background: #fff0eb; }
.ficha-row.active .ficha-arrow { color: var(--orange); transform: rotate(90deg); }
.ficha-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(217,79,30,.18);
  transform: scale(0);
  pointer-events: none;
  animation: fichaRipple .55s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes fichaRipple {
  0%   { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}
.ficha-key {
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: #6e6e73;
  min-width: 140px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.ficha-val { font-size: .95rem; font-weight: 600; color: #1d1d1f; flex: 1; }
.ficha-val.orange { color: var(--orange); }
.ficha-arrow {
  font-size: 1.1rem;
  color: rgba(0,0,0,.2);
  margin-left: auto;
  flex-shrink: 0;
  transition: color .18s, transform .25s cubic-bezier(.16,1,.3,1);
}

/* ══════════════════════════════════════════════════════════════
   PANEL INFO DESLIZABLE
   ══════════════════════════════════════════════════════════════ */

.ficha-overlay {
  position: fixed;
  inset: 0;
  z-index: 790;
  background: rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.ficha-overlay.open { opacity: 1; pointer-events: all; }
.ficha-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 800;
  transform: translateY(100%);
  transition: transform .45s cubic-bezier(.16,1,.3,1);
  pointer-events: none;
}
.ficha-panel.open { transform: translateY(0); pointer-events: all; }
.ficha-panel-inner {
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 2rem 2.5rem 3rem;
  box-shadow: 0 -8px 48px rgba(0,0,0,.12);
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}
.ficha-panel-inner::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: rgba(0,0,0,.15);
  border-radius: 2px;
  margin: 0 auto 1.2rem;
}
.ficha-panel-header {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1rem;
}
.ficha-panel-ico { font-size: 1.4rem; opacity: .7; }
.ficha-panel-key {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange);
}
.ficha-panel-text {
  font-size: 1rem;
  line-height: 1.75;
  color: #424245;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}
.ficha-panel-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,.07);
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.ficha-panel-close:hover { background: rgba(0,0,0,.12); }

/* ══════════════════════════════════════════════════════════════
   VIDEOS
   ══════════════════════════════════════════════════════════════ */

.prod-videos { background: #fff; padding: 5rem 60px; border-top: 1px solid rgba(0,0,0,.06); }
.videos-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: 2.5rem;
  align-items: start;
}
.videos-grid.solo { grid-template-columns: 1fr; max-width: 720px; }
.videos-grid.solo-short { grid-template-columns: 1fr; max-width: 360px; }
.video-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
}
.video-wrap.short { aspect-ratio: 9/16; max-height: 560px; max-width: 315px; }
.video-wrap iframe { width: 100%; height: 100%; border: none; }

/* ══════════════════════════════════════════════════════════════
   RELACIONADOS
   ══════════════════════════════════════════════════════════════ */

.prod-relacionados { background: #f5f5f7; padding: 5rem 60px; }
.rel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 2.5rem;
}
.rel-card {
  display: block;
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s;
}
.rel-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,.1); }
.rel-img {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #e8e4dc;
}
.rel-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}
.rel-card:hover .rel-img img { transform: scale(1.05); }
.rel-body { padding: .9rem 1rem 1.2rem; }
.rel-cat {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: .4rem;
}
.rel-title {
  font-size: .92rem;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.25;
  letter-spacing: -.01em;
}

/* ══════════════════════════════════════════════════════════════
   TÍTULOS DE SECCIÓN
   ══════════════════════════════════════════════════════════════ */

.sec-eyebrow {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}
.sec-eyebrow::before {
  content: '';
  width: 24px;
  height: 3px;
  background: var(--orange);
  border-radius: 2px;
}
.sec-h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: #1d1d1f;
}

/* ══════════════════════════════════════════════════════════════
   REVEAL
   ══════════════════════════════════════════════════════════════ */

.prod-rev {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
.prod-rev.in { opacity: 1; transform: none; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .prod-hero-content,
  .prod-specs,
  .prod-gallery,
  .prod-desc,
  .prod-ficha,
  .prod-videos,
  .prod-relacionados {
    padding-left: 32px;
    padding-right: 32px;
  }
  .videos-grid { grid-template-columns: 1fr; }
  .video-wrap.short { max-height: 350px; }
  .rel-grid { grid-template-columns: repeat(2, 1fr); }
  .ficha-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .prod-hero-content,
  .prod-specs,
  .prod-gallery,
  .prod-desc,
  .prod-ficha,
  .prod-videos,
  .prod-relacionados {
    padding-left: 20px;
    padding-right: 20px;
  }
  .prod-hero-h1 { font-size: clamp(1.4rem, 6vw, 2.4rem); -webkit-line-clamp: 5; }
  .prod-hero-h1.long-title { font-size: clamp(1.2rem, 5vw, 1.9rem); }
  .prod-specs { padding: 1.5rem 20px; gap: 0; }
  .prod-spec { min-width: 100px; padding: .8rem .8rem; }
  .spec-val { font-size: 1.2rem; }
  .prod-cta-float { bottom: 1rem; right: 1rem; padding: .85rem 1.4rem; font-size: .85rem; }
  .rel-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ══════════════════════════════════════════════════════════════
   BOTÓN VOLVER ATRÁS (siempre visible, flotante arriba-izquierda)
   ══════════════════════════════════════════════════════════════ */

.prod-back {
  position: fixed;
  top: 85px;
  left: 1.5rem;
  z-index: 400;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.1rem .6rem .85rem;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 100px;
  color: #1d1d1f;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: -.01em;
  text-decoration: none;
  transition: transform .25s cubic-bezier(.16,1,.3,1),
              background .25s ease,
              box-shadow .25s ease,
              padding .25s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.prod-back svg {
  transition: transform .3s cubic-bezier(.16,1,.3,1);
  flex-shrink: 0;
}
.prod-back:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  transform: translateX(-2px);
  padding-right: 1.3rem;
  padding-left: .75rem;
}
.prod-back:hover svg { transform: translateX(-3px); }
.prod-back span { line-height: 1; }

/* Sobre hero oscuro: el botón se adapta al contexto con variante clara */
.prod-hero ~ .prod-back,
body:has(.prod-hero) .prod-back {
  /* mantiene variante clara siempre — arriba blanco, legible sobre cualquier fondo */
}

@media (max-width: 640px) {
  .prod-back {
    top: 72px;
    left: 1rem;
    padding: .5rem .9rem .5rem .7rem;
    font-size: .75rem;
  }
  .prod-back svg { width: 16px; height: 16px; }
}

/* ══════════════════════════════════════════════════════════════
/* ══════════════════════════════════════════════════════════════
   BLOQUE A · FICHA GRÁFICA — versión final
   Tipografía grande · Animaciones lentas (50%) · Cubo visible
   4 columnas: Cubo | Espesor | Dificultad | Piezas
   ══════════════════════════════════════════════════════════════ */

.prod-ficha-graf {
  background: #fff;
  padding: 5rem 60px 4rem;
  border-top: 1px solid rgba(0,0,0,.06);
}
.fg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 2.5rem;
}

/* ── CARD BASE ────────────────────────────────────────────── */
.fg-card {
  background: #f5f5f7;
  padding: 1.8rem 1.6rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 360px;
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.05);
  transition: transform .35s cubic-bezier(.16,1,.3,1),
              box-shadow .35s ease,
              border-color .25s ease,
              background .25s ease;
  overflow: hidden;
}
/* expandable cards: cursor pointer + hover */
.fg-card.expandable {
  cursor: pointer;
}
.fg-card.expandable:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.08);
  border-color: rgba(217,79,30,.3);
  background: #fff;
}
.fg-card.expandable:active { transform: translateY(-2px) scale(.99); }

/* card del cubo NO es expandible (no cursor pointer global) */
.fg-card-cubo:hover {
  border-color: rgba(217,79,30,.15);
  background: #fafafa;
}

.fg-card-arrow {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  font-size: 1.7rem;
  font-weight: 300;
  color: #c7c7cc;
  line-height: 1;
  transition: transform .3s ease, color .3s ease;
}
.fg-card.expandable:hover .fg-card-arrow {
  color: var(--orange);
  transform: translateX(4px);
}

.fg-card.clicked::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: radial-gradient(circle at center, rgba(217,79,30,.18) 0%, transparent 55%);
  animation: fgRipple .6s ease-out;
  pointer-events: none;
}
@keyframes fgRipple {
  0% { opacity: 1; transform: scale(.9); }
  100% { opacity: 0; transform: scale(1.05); }
}

/* ── EYEBROW (título de cada card) — más grande y visible ───── */
.fg-eyebrow {
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #1d1d1f;
  margin-bottom: 1.2rem;
  align-self: flex-start;
}

.fg-card-head {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.fg-card-head .fg-eyebrow { margin-bottom: 0; }

/* ── BADGE "NO REESCALAR" ahora es BUTTON clickable ──────────── */
.fg-no-rescale-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .42rem .8rem;
  background: linear-gradient(135deg, #D94F1E, #b83e13);
  border: none;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  color: #fff;
  text-transform: uppercase;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(217,79,30,.3);
  flex-shrink: 0;
  cursor: pointer;
  animation: fgBadgePulse 3.6s ease-in-out infinite;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  z-index: 5;
}
.fg-no-rescale-badge:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(217,79,30,.5);
}
.fg-no-rescale-badge:active { transform: scale(.98); }
.fg-no-rescale-badge svg { flex-shrink: 0; stroke: #fff; }
@keyframes fgBadgePulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(217,79,30,.35); }
  50%      { box-shadow: 0 2px 16px rgba(217,79,30,.6); }
}

/* ── COLUMNA 1: Cubo 3D rotable ─────────────────────────────── */
.fg-cubo-wrap {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
  perspective-origin: 50% 50%;
  margin: 1rem 0 2rem;
  position: relative;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.fg-cubo-wrap.dragging { cursor: grabbing; }
.fg-cubo-wrap.dragging .fg-cubo-hint { opacity: 0; }

.fg-cubo-hint {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .72rem;
  color: #6e6e73;
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .3s ease;
  font-weight: 500;
  background: rgba(255,255,255,.85);
  padding: .25rem .6rem;
  border-radius: 100px;
  backdrop-filter: blur(6px);
}

.fg-cubo {
  position: relative;
  width: 130px;
  height: 130px;
  transform-style: preserve-3d;
  transform: rotateX(-22deg) rotateY(-32deg);
  transition: transform 4s cubic-bezier(.16,1,.3,1);
}
.fg-cubo.spinning { transition: none; }

/* Caras del cubo: bordes gruesos y diferencia de tono real */
.fg-face {
  position: absolute;
  inset: 0;
  border: 2.5px solid #1d1d1f;
  background: #fff;
  box-shadow: inset 0 0 18px rgba(0,0,0,.04);
}
.fg-face.fg-front   { background: #ffffff; }
.fg-face.fg-back    { background: #ffffff; }
.fg-face.fg-right   { background: #c5c5ca; box-shadow: inset 0 0 30px rgba(0,0,0,.10); }
.fg-face.fg-left    { background: #c5c5ca; box-shadow: inset 0 0 30px rgba(0,0,0,.10); }
.fg-face.fg-top     { background: #ededf0; box-shadow: inset 0 0 18px rgba(0,0,0,.05); }
.fg-face.fg-bottom  { background: #a0a0a8; box-shadow: inset 0 0 30px rgba(0,0,0,.16); }

/* Dimensiones del cubo: GRANDES y notorias */
.fg-cubo-dims {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  font-size: 1.7rem;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -.025em;
  margin-top: auto;
}
.fg-dim {
  display: inline-flex;
  align-items: baseline;
  gap: .2rem;
}
.fg-dim em {
  font-size: 1.05rem;
  font-style: normal;
  color: #6e6e73;
  font-weight: 600;
}
.fg-dim-sep {
  color: #c7c7cc;
  font-weight: 300;
  font-size: 1.4rem;
}

/* ── COLUMNA 2: Espesor + barra + material ──────────────────── */
.fg-card-espesor { justify-content: flex-start; }
.fg-espesor-num {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .55rem;
  margin: 1.5rem 0 2rem;
}
.fg-num {
  font-size: 4.2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.fg-unit {
  font-size: 1.4rem;
  font-weight: 600;
  color: #6e6e73;
  letter-spacing: .01em;
}
.fg-espesor-bar { width: 100%; margin-bottom: 1.6rem; }
.fg-bar-track {
  width: 100%;
  height: 12px;
  background: rgba(0,0,0,.06);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: .6rem;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.06);
}
.fg-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--orange), #F27D4B);
  border-radius: 100px;
  transition: width 3s cubic-bezier(.16,1,.3,1);
}
.fg-bar-fill.in { width: var(--pct, 0%); }
.fg-bar-scale {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: #6e6e73;
  letter-spacing: .03em;
  font-weight: 600;
}
.fg-material {
  margin-top: auto;
  padding: 1rem 1.2rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -.01em;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.06);
  align-self: stretch;
  text-align: center;
}

/* ── COLUMNA 3: Dificultad (5 barras) + tiempo ──────────────── */
.fg-card-dif { justify-content: flex-start; }
.fg-dif-bars {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  height: 110px;
  margin: 1.5rem 0 1.2rem;
}
.fg-dif-bar {
  width: 28px;
  background: #e5e5ea;
  border-radius: 5px;
  transition: background 1.2s ease, box-shadow 1.2s ease, transform .8s cubic-bezier(.16,1,.3,1);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.05);
  transform: scaleY(0.85);
  transform-origin: bottom;
}
/* Alturas escalonadas (escala visual del nivel) */
.fg-dif-1 { height: 30%; }
.fg-dif-2 { height: 47.5%; }
.fg-dif-3 { height: 65%; }
.fg-dif-4 { height: 82.5%; }
.fg-dif-5 { height: 100%; }

/* Cuando se activa .in en el contenedor: las barras "on" se colorean */
.fg-dif-bars.in .fg-dif-bar {
  transform: scaleY(1);
}
.fg-dif-bars.in .fg-dif-bar.on {
  background: linear-gradient(to top, var(--orange), #F27D4B);
  box-shadow: 0 2px 6px rgba(217,79,30,.25);
}
/* Cascada para que se llenen una a una */
.fg-dif-bars.in .fg-dif-bar.on:nth-child(1) { transition-delay: 0s; }
.fg-dif-bars.in .fg-dif-bar.on:nth-child(2) { transition-delay: .12s; }
.fg-dif-bars.in .fg-dif-bar.on:nth-child(3) { transition-delay: .24s; }
.fg-dif-bars.in .fg-dif-bar.on:nth-child(4) { transition-delay: .36s; }
.fg-dif-bars.in .fg-dif-bar.on:nth-child(5) { transition-delay: .48s; }

.fg-dif-meta {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .8rem;
  margin-bottom: 1.4rem;
}
.fg-dif-label {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -.025em;
  color: #1d1d1f;
}
.fg-dif-pct {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  background: rgba(217,79,30,.1);
  padding: .15rem .55rem;
  border-radius: 100px;
}

.fg-tiempo-box {
  margin-top: auto;
  padding: .9rem 1rem 1rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  align-self: stretch;
}
.fg-tiempo-label {
  font-size: .8rem;
  font-weight: 600;
  color: #6e6e73;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: left;
  flex: 1;
  line-height: 1.2;
}

/* Anillo SVG con número al centro */
.fg-ring-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}
.fg-ring {
  width: 72px;
  height: 72px;
  display: block;
}
.fg-ring-bg {
  stroke: #e5e5ea;
}
.fg-ring-fg {
  stroke: var(--orange);
  transition: stroke-dashoffset 2s cubic-bezier(.16,1,.3,1);
}
.fg-ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  pointer-events: none;
}
.fg-num-ring {
  font-size: 1.45rem;
  font-weight: 700;
  color: #1d1d1f;
  line-height: 1;
  letter-spacing: -.025em;
}
.fg-ring-unit {
  font-size: .65rem;
  font-weight: 600;
  color: #6e6e73;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* ── COLUMNA 4: Piezas con grid visual ───────────────────────── */
.fg-card-piezas { justify-content: flex-start; }

.fg-piezas-num {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .55rem;
  margin: 1.2rem 0 1.5rem;
}
.fg-piezas-lbl {
  font-size: 1.4rem;
  font-weight: 600;
  color: #6e6e73;
  letter-spacing: .01em;
}

/* Grid de cuadritos representando las piezas — 20 columnas compactas */
.fg-piezas-grid {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 3px;
  width: 100%;
  max-width: 240px;
  margin: 0 auto 1.2rem;
  min-height: 110px;
  align-content: center;
  position: relative;
}
.fg-pz {
  width: 100%;
  aspect-ratio: 1;
  background: #d8d8de;
  border-radius: 3px;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .4s ease, transform .4s cubic-bezier(.16,1,.3,1), background .3s ease;
}
.fg-piezas-grid.in .fg-pz {
  opacity: 1;
  transform: scale(1);
  background: var(--orange);
  /* delay individual basado en el índice — animación cascada */
  transition-delay: calc(var(--i) * 12ms);
}

/* "+N más" para grids con más de 100 piezas: ocupa 2 celdas para legibilidad */
.fg-pz-extra {
  width: 100%;
  background: #1d1d1f;
  color: #fff;
  border-radius: 2px;
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .4s ease, transform .4s cubic-bezier(.16,1,.3,1);
  font-variant-numeric: tabular-nums;
  cursor: help;
  line-height: 1;
  text-align: center;
  grid-column: span 2;
  /* Mismo alto que un puntito (un puntito = 1 col, ratio 1:1; aquí 2 cols → alto = mitad del ancho) */
  aspect-ratio: 2 / 1;
}
.fg-piezas-grid.in .fg-pz-extra {
  opacity: 1;
  transform: scale(1);
  transition-delay: calc(var(--i) * 12ms + 200ms); /* aparece después del último puntito */
}
/* Cuando hay extra, marcar visualmente que el grid es "una muestra" */
.fg-piezas-grid.has-extra::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1.5px dashed rgba(217,79,30,.25);
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s ease;
}
.fg-piezas-grid.has-extra.in::after {
  opacity: 1;
  transition-delay: 1.5s;
}

.fg-piezas-hint {
  margin-top: auto;
  padding: .8rem 1rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  color: #1d1d1f;
  align-self: stretch;
  text-align: center;
}

/* ── ANIMACIÓN DE ENTRADA ESCALONADA POR CARD ─────────────────
   Solo se aplica si JS marca .js-ready. Sin JS, todas visibles.
   ─────────────────────────────────────────────────────────── */
.prod-ficha-graf.js-ready .fg-card {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.2s cubic-bezier(.16,1,.3,1),
              transform 1.2s cubic-bezier(.16,1,.3,1),
              box-shadow .35s ease,
              border-color .25s ease,
              background .25s ease;
}
.prod-ficha-graf.js-ready.in .fg-card { opacity: 1; transform: translateY(0); }
.prod-ficha-graf.js-ready.in .fg-card:nth-child(1) { transition-delay: 0s; }
.prod-ficha-graf.js-ready.in .fg-card:nth-child(2) { transition-delay: .2s; }
.prod-ficha-graf.js-ready.in .fg-card:nth-child(3) { transition-delay: .4s; }
.prod-ficha-graf.js-ready.in .fg-card:nth-child(4) { transition-delay: .6s; }

.fg-card.expandable:hover {
  transform: translateY(-4px) !important;
  transition-delay: 0s !important;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE FICHA GRÁFICA
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
  .fg-grid { grid-template-columns: repeat(2, 1fr); }
  .fg-card { min-height: 380px; }
}

@media (max-width: 720px) {
  .prod-ficha-graf { padding: 3rem 20px 2.5rem; }
  .fg-grid { grid-template-columns: 1fr; gap: 12px; }
  .fg-card { min-height: auto; padding: 1.6rem 1.4rem 1.8rem; }
  .fg-cubo-wrap { height: 180px; }
  .fg-cubo { width: 110px; height: 110px; }
  .fg-num { font-size: 3.2rem; }
  .fg-num-mini { font-size: 2rem; }
  .fg-cubo-dims { font-size: 1.45rem; }
  .fg-dim em { font-size: .95rem; }
  .fg-dif-bars { height: 90px; gap: .35rem; }
  .fg-dif-bar { width: 22px; }
  .fg-dif-label { font-size: 1.55rem; }
  .fg-eyebrow { font-size: .82rem; }
  .fg-no-rescale-badge { font-size: .68rem; padding: .35rem .7rem; }
  .fg-piezas-grid { max-width: 240px; }
}