/* TBO Visor 3D — estilos acotados a .tbo3d para no chocar con el tema (WoodMart). */
.tbo3d{
  --tb-bg:#ECECE6; --tb-surface:#FFFFFF; --tb-stage:#E1E1D8; --tb-ink:#101010; --tb-muted:#5B5B53; --tb-line:#D3D3C9;
  --tb-accent:#E8E620; --tb-accent-ink:#101010; --tb-error:#B3261E;
  --tb-display:"Archivo Black","Arial Black",Impact,sans-serif;
  --tb-body:"Barlow","Helvetica Neue",Arial,sans-serif;
  --tb-label:"Barlow Condensed","Arial Narrow",Arial,sans-serif;
  color:var(--tb-ink);font-family:var(--tb-body);font-size:16px;line-height:1.45;text-align:left;
  /* Ocupa todo el ancho de la pantalla; visor.js lo alinea aunque el tema lo meta en una columna estrecha */
  position:relative;width:100vw;max-width:none;margin:0 0 32px calc(50% - 50vw);
}
.tbo3d *,.tbo3d *::before,.tbo3d *::after{box-sizing:border-box}
.tbo3d [hidden]{display:none!important}

.tbo3d .tbo3d-layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(360px,24vw,460px);grid-template-rows:minmax(0,1fr);gap:clamp(14px,1.2vw,22px);
  width:100%;max-width:1840px;margin:0 auto;padding-left:max(16px,2vw);padding-right:max(16px,2vw);
  height:clamp(600px,calc(100vh - 120px),1150px)}
@media (min-width:1600px){
  .tbo3d{font-size:17px}
  .tbo3d .tbo3d-panel{padding:24px}
  .tbo3d .tbo3d-pname{font-size:30px}
}
@media (max-width:880px){
  .tbo3d .tbo3d-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(240px,44%) minmax(0,1fr);gap:10px;
    padding-left:12px;padding-right:12px;
    height:calc(100vh - 90px);height:calc(100svh - 90px);min-height:560px}
}

.tbo3d .tbo3d-stage{position:relative;background:var(--tb-stage);border-radius:6px;overflow:hidden;height:100%;min-height:0;touch-action:none}
.tbo3d .tbo3d-viewer{position:absolute;inset:0}
.tbo3d .tbo3d-viewer canvas{display:block;width:100%!important;height:100%!important;cursor:grab}
.tbo3d .tbo3d-viewer canvas:active{cursor:grabbing}
.tbo3d .tbo3d-stage-top{position:absolute;left:16px;right:16px;top:14px;pointer-events:none}
.tbo3d .tbo3d-pname{font-family:var(--tb-display);font-size:clamp(18px,2.2vw,26px);line-height:1.05;text-wrap:balance;color:var(--tb-ink)}
.tbo3d .tbo3d-pdims{font-family:var(--tb-label);font-size:15px;color:var(--tb-muted);letter-spacing:.02em;margin-top:4px}
.tbo3d .tbo3d-stage-bottom{position:absolute;left:16px;right:16px;bottom:12px;display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.tbo3d .tbo3d-hint{font-family:var(--tb-label);font-size:13px;color:var(--tb-muted);letter-spacing:.04em;text-transform:uppercase}
.tbo3d .tbo3d-veil{position:absolute;inset:0;display:grid;place-items:center;background:rgba(232,230,32,.85);font-family:var(--tb-display);font-size:22px;color:var(--tb-accent-ink)}
.tbo3d .tbo3d-webgl-error{position:absolute;inset:0;display:grid;place-items:center;padding:24px;text-align:center;color:var(--tb-muted)}

.tbo3d .tbo3d-panel{background:var(--tb-surface);border:1px solid var(--tb-line);border-radius:6px;padding:18px;
  height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.tbo3d .tbo3d-editor,.tbo3d .tbo3d-form,.tbo3d .tbo3d-done{display:flex;flex-direction:column;gap:22px}
.tbo3d .tbo3d-form{gap:12px}
.tbo3d .tbo3d-group{display:flex;flex-direction:column;gap:9px}
.tbo3d .tbo3d-glabel{font-family:var(--tb-label);font-weight:600;text-transform:uppercase;letter-spacing:.08em;font-size:13px;color:var(--tb-muted);
  display:flex;justify-content:space-between;gap:8px;margin:0;line-height:1.3}
.tbo3d .tbo3d-chips{display:flex;flex-wrap:wrap;gap:6px}

/* Botones: anulan los estilos globales de botón del tema */
.tbo3d .tbo3d-chip,.tbo3d .tbo3d-link,.tbo3d .tbo3d-cta,.tbo3d .tbo3d-sw{
  -webkit-appearance:none;appearance:none;min-height:0;height:auto;width:auto;margin:0;box-shadow:none;text-shadow:none;
  text-transform:none;letter-spacing:normal;line-height:1.25;transition:none}
.tbo3d .tbo3d-chip{font:500 15px var(--tb-body);border:1px solid var(--tb-line);background:transparent;color:var(--tb-ink);padding:7px 12px;border-radius:999px;cursor:pointer}
.tbo3d .tbo3d-chip:hover{border-color:var(--tb-ink);background:transparent;color:var(--tb-ink)}
.tbo3d .tbo3d-chip[aria-pressed="true"],.tbo3d .tbo3d-chip[aria-pressed="true"]:hover{background:var(--tb-ink);color:var(--tb-surface);border-color:var(--tb-ink)}
.tbo3d .tbo3d-fonts .tbo3d-chip{font-size:17px;padding:6px 12px;line-height:1.2}
.tbo3d .tbo3d-link{font:500 14px var(--tb-body);background:none;border:0;color:var(--tb-muted);text-decoration:underline;cursor:pointer;padding:0;align-self:flex-start}
.tbo3d .tbo3d-link:hover{background:none;color:var(--tb-ink)}
.tbo3d .tbo3d-cta{font:700 16px var(--tb-body);background:var(--tb-accent);color:var(--tb-accent-ink);border:0;border-radius:4px;padding:14px 16px;cursor:pointer;text-transform:uppercase;letter-spacing:.04em;width:100%}
.tbo3d .tbo3d-cta:hover{background:var(--tb-accent);color:var(--tb-accent-ink);filter:brightness(.95)}
.tbo3d .tbo3d-cta[disabled]{opacity:.6;cursor:progress}

.tbo3d .tbo3d-faceedit{display:flex;flex-direction:column;gap:8px;border-left:3px solid var(--tb-accent);padding-left:10px}
.tbo3d .tbo3d-slot{display:flex;flex-direction:column;gap:6px}
.tbo3d .tbo3d-drop{display:flex;align-items:center;gap:12px;border:1.5px dashed var(--tb-line);border-radius:6px;padding:10px;cursor:pointer;margin:0;font-weight:400;position:relative}
.tbo3d .tbo3d-drop:hover{border-color:var(--tb-ink)}
.tbo3d .tbo3d-drop input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.tbo3d .tbo3d-thumb{width:52px;height:52px;flex:none;border-radius:4px;background:repeating-conic-gradient(var(--tb-line) 0 25%,transparent 0 50%) 0 0/12px 12px;display:grid;place-items:center;overflow:hidden;color:var(--tb-muted);font-size:24px}
.tbo3d .tbo3d-thumb img{max-width:100%;max-height:100%;width:auto;height:auto}
.tbo3d .tbo3d-drop-text{min-width:0;display:flex;flex-direction:column;color:var(--tb-ink)}
.tbo3d .tbo3d-drop-text strong{font-weight:600}
.tbo3d .tbo3d-drop-text span{font-size:14px;color:var(--tb-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tbo3d .tbo3d-slot-foot{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:14px;color:var(--tb-muted)}
.tbo3d .tbo3d-slot-foot:empty{display:none}
.tbo3d .tbo3d-err{font-size:14px;color:var(--tb-error)}

.tbo3d .tbo3d-swatches{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.tbo3d .tbo3d-sw{width:32px;height:32px;border-radius:50%;border:1px solid var(--tb-line);cursor:pointer;padding:0}
.tbo3d .tbo3d-sw[aria-pressed="true"]{outline:2px solid var(--tb-ink);outline-offset:2px}
.tbo3d .tbo3d-custom{position:relative;width:32px;height:32px;border-radius:50%;border:1px dashed var(--tb-muted);overflow:hidden;display:grid;place-items:center;font-size:18px;color:var(--tb-muted);margin:0;cursor:pointer}
.tbo3d .tbo3d-custom input{position:absolute;inset:-8px;opacity:0;cursor:pointer;width:auto;height:auto}

.tbo3d .tbo3d-input{font:500 16px var(--tb-body);width:100%;height:auto;min-height:0;padding:10px 12px;margin:0;border:1px solid var(--tb-line);border-radius:4px;background:#fff;color:var(--tb-ink);box-shadow:none;line-height:1.3}
.tbo3d .tbo3d-input:focus{border-color:var(--tb-ink)}
.tbo3d textarea.tbo3d-input{resize:vertical}
.tbo3d input[type=range]{width:100%;accent-color:var(--tb-ink);margin:0;padding:0;border:0;background:transparent;height:auto}
.tbo3d .tbo3d-toggle{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:400;cursor:pointer;margin:0;color:var(--tb-ink)}
.tbo3d .tbo3d-toggle input{accent-color:var(--tb-ink);width:18px;height:18px;flex:none;margin:0}
.tbo3d .tbo3d-sub{padding-left:26px;font-size:14px;color:var(--tb-muted)}
.tbo3d .tbo3d-legal{align-items:flex-start;font-size:14px}
.tbo3d .tbo3d-legal a{color:var(--tb-ink);text-decoration:underline}
.tbo3d .tbo3d-note{font-size:13px;color:var(--tb-muted);border-top:1px solid var(--tb-line);padding-top:12px;margin:0}

.tbo3d .tbo3d-field{display:flex;flex-direction:column;gap:4px;margin:0;font-weight:400}
.tbo3d .tbo3d-field>span{font-family:var(--tb-label);font-weight:600;text-transform:uppercase;letter-spacing:.06em;font-size:13px;color:var(--tb-muted)}
.tbo3d .tbo3d-hp{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}
.tbo3d .tbo3d-ftitle{font-family:var(--tb-display);font-size:22px;line-height:1.1;color:var(--tb-ink)}
.tbo3d .tbo3d-formhead p,.tbo3d .tbo3d-done p{margin:6px 0 0;color:var(--tb-muted);font-size:15px}
.tbo3d .tbo3d-shot{display:block;width:100%;height:auto;max-height:220px;object-fit:contain;border:1px solid var(--tb-line);border-radius:4px;background:var(--tb-stage)}

.tbo3d button:focus-visible,.tbo3d input:focus-visible,.tbo3d textarea:focus-visible,.tbo3d .tbo3d-drop:focus-within,.tbo3d .tbo3d-custom:focus-within{outline:2px solid var(--tb-ink);outline-offset:2px}

@media (max-width:880px){
  .tbo3d .tbo3d-panel{padding:14px}
  .tbo3d .tbo3d-editor{gap:18px}
  .tbo3d .tbo3d-hint{display:none}
  .tbo3d .tbo3d-pname{font-size:17px}
  .tbo3d .tbo3d-pdims{font-size:13px}
}
