/* Visor 3D de productos (pagina producto-3d). Todo va bajo .visor3d para no tocar el resto del sitio. */
.visor3d { --v3-red: #c8102e; --v3-red-hi: #e80b31; --v3-ink: #44484b; --v3-text: #333; --v3-muted: #737373; --v3-soft: #f4f4f4; --v3-line: #ddd; clear: both; margin-top: 0; padding-top: 4em; /* igual que .margin-top-4em de la ficha: las migas de pan no ocupan altura */ margin-bottom: 4em; }
.visor3d [hidden] { display: none !important; }
.visor3d .v3-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--v3-line); }
.visor3d .v3-brand img { width: 130px; height: auto; display: block; margin-bottom: 6px; }
.visor3d .v3-brand h1 { margin: 0; font-weight: 600; color: var(--v3-ink); text-transform: none; font-size: 32px; }
.visor3d .v3-code { color: var(--v3-muted); }
.visor3d .v3-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.visor3d .v3-cats { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.visor3d .v3-cats li { color: var(--v3-red); font-weight: 800; padding: 2px 16px; border-left: 1px solid var(--v3-line); }
.visor3d .v3-cats li:first-child { border-left: 0; padding-left: 0; }
.visor3d .v3-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.visor3d .v3-actions a, .visor3d .v3-actions .btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 22px; border-radius: 20px; font-size: 14px; line-height: 1; font-weight: 600; white-space: nowrap; }
.visor3d .v3-back { border: 1px solid var(--v3-red); color: var(--v3-red); background: #fff; }
.visor3d .v3-back:hover, .visor3d .v3-back:focus { background: var(--v3-red); color: #fff; text-decoration: none; }

.visor3d .v3-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
.visor3d .v3-stage { position: relative; height: clamp(420px, 70vh, 760px); border-radius: 4px; overflow: hidden; background: radial-gradient(120% 90% at 50% 30%, #fff 55%, var(--v3-soft)); box-shadow: 0 2px 14px rgba(0, 0, 0, .1); touch-action: none; }
.visor3d .v3-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.visor3d .v3-stage:focus-within { box-shadow: 0 0 0 3px rgba(200, 16, 46, .35), 0 2px 14px rgba(0, 0, 0, .1); }
.visor3d .v3-hs { position: absolute; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--v3-red); color: #fff; font-weight: 800; font-size: 12px; line-height: 30px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .92), 0 5px 12px rgba(0, 0, 0, .25); transition: opacity .25s, background .2s; will-change: transform; }
.visor3d .v3-hs.active { background: var(--v3-ink); }
.visor3d .v3-hs.dim { opacity: .35; }
.visor3d .v3-hs.off { opacity: 0; pointer-events: none; }
.visor3d .v3-hs:focus { outline: 3px solid var(--v3-red-hi); outline-offset: 3px; }
.visor3d .v3-hs-label { position: absolute; left: 0; top: 0; pointer-events: none; font-weight: 800; font-size: 13px; color: var(--v3-ink); background: #fff; padding: 7px 10px; border-left: 3px solid var(--v3-red); white-space: nowrap; box-shadow: 0 4px 12px rgba(0, 0, 0, .14); transition: opacity .2s; }
.visor3d .v3-loading { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--v3-muted); font-weight: 600; }
.visor3d .v3-bar { width: 280px; max-width: 70%; height: 4px; background: var(--v3-line); overflow: hidden; }
.visor3d .v3-bar i { display: block; height: 100%; width: 0; background: var(--v3-red); transition: width .2s; }
.visor3d .v3-tools { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; pointer-events: none; }
.visor3d .v3-tools > * { pointer-events: auto; }
.visor3d .v3-seg { display: inline-flex; background: #fff; border-radius: 5px; padding: 3px; box-shadow: 0 2px 10px rgba(0, 0, 0, .14); }
.visor3d .v3-seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 4px; font-weight: 600; font-size: 13px; color: var(--v3-ink); cursor: pointer; }
.visor3d .v3-seg button[aria-pressed="true"] { background: var(--v3-red); color: #fff; }
.visor3d .v3-chk { display: inline-flex; gap: 14px; flex-wrap: wrap; background: #fff; border-radius: 5px; padding: 9px 14px; box-shadow: 0 2px 10px rgba(0, 0, 0, .14); color: var(--v3-ink); font-weight: 600; font-size: 13px; }
.visor3d .v3-chk label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; margin: 0; font-weight: 600; }
.visor3d .v3-chk input { accent-color: var(--v3-red); width: 16px; height: 16px; margin: 0; }
.visor3d .v3-hint { position: absolute; top: 12px; left: 14px; font-size: 12px; color: var(--v3-muted); background: rgba(255, 255, 255, .9); padding: 7px 10px; border-radius: 4px; pointer-events: none; }

.visor3d .v3-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.visor3d .v3-title { margin: 0 0 10px; font-weight: 800; font-size: 18px; text-transform: uppercase; color: var(--v3-ink); padding-left: 14px; border-left: 5px solid var(--v3-red); }
.visor3d .v3-comps { list-style: none; margin: 0; padding: 0; }
.visor3d .v3-comps button { width: 100%; text-align: left; display: flex; gap: 12px; align-items: center; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--v3-line); background: transparent; color: var(--v3-text); font-weight: 600; font-size: 15px; cursor: pointer; }
.visor3d .v3-comps li:first-child button { border-top: 1px solid var(--v3-line); }
.visor3d .v3-comps button:hover { color: var(--v3-red); }
.visor3d .v3-comps .n { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; background: var(--v3-red); color: #fff; font-weight: 800; font-size: 12px; line-height: 26px; text-align: center; }
.visor3d .v3-comps button[aria-current="true"] { color: var(--v3-red); background: var(--v3-soft); }
.visor3d .v3-comps button[aria-current="true"] .n { background: var(--v3-ink); }
.visor3d .v3-detail { padding: 2px 0 2px 14px; border-left: 3px solid var(--v3-red); }
.visor3d .v3-eyebrow { display: block; font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--v3-red); margin-bottom: 4px; }
.visor3d .v3-detail h3 { margin: 0 0 6px; font-weight: 800; font-size: 18px; color: var(--v3-ink); }
.visor3d .v3-detail p { margin: 0 0 8px; text-align: justify; }
.visor3d .v3-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.visor3d .v3-facts span { font-weight: 600; font-size: 12px; padding: 5px 9px; border-radius: 3px; background: var(--v3-soft); color: var(--v3-ink); }
.visor3d .v3-reset { border: 1px solid var(--v3-red); background: transparent; color: var(--v3-red); border-radius: 20px; padding: 6px 14px; font-weight: 600; font-size: 13px; cursor: pointer; }
.visor3d .v3-reset:hover { background: var(--v3-red); color: #fff; }
.visor3d .v3-specs { margin: 0; }
.visor3d .v3-specs div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--v3-line); }
.visor3d .v3-specs div:first-child { border-top: 1px solid var(--v3-line); }
.visor3d .v3-specs dt { font-weight: 500; }
.visor3d .v3-specs dd { margin: 0; text-align: right; }
.visor3d .v3-note { font-size: 12px; color: var(--v3-muted); margin: 0; }

@media (max-width: 991px) {
  .visor3d .v3-main { grid-template-columns: minmax(0, 1fr); }
  .visor3d .v3-stage { height: auto; aspect-ratio: 4 / 3.4; }
  .visor3d .v3-right { align-items: flex-start; }
}
@media (max-width: 520px) {
  .visor3d .v3-stage { aspect-ratio: 1 / 1.15; }
  .visor3d .v3-cats { gap: 4px 14px; }
  .visor3d .v3-cats li { border-left: 0; padding: 0; }
  .visor3d .v3-seg button { padding: 7px 9px; }
  .visor3d .v3-hs-label { display: none; }
  .visor3d .v3-brand h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .visor3d .v3-hs, .visor3d .v3-bar i { transition: none; } }

/* theme.css centra y aligera ".content h1/h2"; estas reglas lo superan dentro del visor */
.content .visor3d .v3-brand h1 { margin: 0; text-align: left; text-transform: none; font-weight: 600; font-size: 32px; color: var(--v3-ink); }
.content .visor3d h2.v3-title { margin: 0 0 10px; text-align: left; text-transform: uppercase; font-weight: 800; font-size: 18px; color: var(--v3-ink); }
.content .visor3d .v3-detail h3 { margin: 0 0 6px; text-align: left; text-transform: none; font-weight: 800; font-size: 18px; color: var(--v3-ink); }
@media (max-width: 520px) { .content .visor3d .v3-brand h1 { font-size: 26px; } }

/* Boton "Ver en 3D" en la ficha del producto */
.btn-ver-3d { display: inline-block; padding: 8px 18px; border: 1px solid #c8102e; color: #c8102e; border-radius: 20px; font-weight: 600; background: #fff; }
.btn-ver-3d:hover, .btn-ver-3d:focus { background: #c8102e; color: #fff; text-decoration: none; }
.btn-ver-3d .fa { margin-right: 6px; }
