/* ============================================================
   1. Inicio — css/plantillas_base.css
   Base común para render de plantillas de producto
   ============================================================ */

/* ============================================================
   1.1 Inicio — Stage técnico común
   ============================================================ */
.tr-plantilla-stage {
  position: relative;
  width: 100%;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tr-plantilla-canvas {
  position: relative;
  width: min(100%, 920px);
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 24px;
  background: transparent;
  isolation: isolate;
}

.tr-plantilla-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* ============================================================
   1.1 Fin
   ============================================================ */


/* ============================================================
   1.2 Inicio — Capas base
   ============================================================ */
.tr-plantilla-frame-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.tr-plantilla-layer--image {
  z-index: 2;
  overflow: visible;
}

.tr-plantilla-layer--ornament {
  z-index: 3;
}

.tr-plantilla-layer--text {
  z-index: 4;
}

.tr-plantilla-image-slot {
  position: absolute;
  overflow: hidden;
  box-sizing: border-box;
  background: #ffffff;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.26);
}

.tr-plantilla-image-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.tr-plantilla-text-node {
  position: absolute;
  transform: translateX(-50%);
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  box-sizing: border-box;
}
/* ============================================================
   1.2 Fin
   ============================================================ */


/* ============================================================
   1.3 Inicio — Marco sólido, vidrio negro y glow limpio
   ============================================================ */
.tr-glow-wall {
  position: absolute;
  inset: 0;
  background: #050505;
}

.tr-glow-aura {
  position: absolute;
  border-radius: 22px;
  filter: blur(22px);
  opacity: 0.42;
  background: rgba(255, 190, 78, 0.72);
}

.tr-glow-shadow {
  position: absolute;
  border-radius: 18px;
  filter: blur(14px);
  opacity: 0.42;
  background: rgba(0, 0, 0, 0.72);
}

.tr-glow-frame {
  position: absolute;
  box-sizing: border-box;
  border-style: solid;
  border-color: transparent;
  border-radius: 13px;
  background: #5a351f;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(110, 66, 39, 0.95);
}

.tr-glow-frame::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 8px;
  border: 1px solid rgba(36, 20, 12, 0.55);
  box-shadow: none;
}

.tr-glow-frame::after {
  content: "";
  display: none;
}

.tr-glow-glass {
  position: absolute;
  box-sizing: border-box;
  border-radius: 8px;
  background: #050505;
  box-shadow:
    0 0 8px rgba(255, 230, 150, 0.95),
    0 0 22px rgba(255, 184, 72, 0.78),
    0 0 46px rgba(255, 142, 28, 0.58);
}
/* ============================================================
   1.3 Fin
   ============================================================ */

/* ============================================================
   1.4 Inicio — Guías técnicas opcionales
   ============================================================ */
.tr-plantilla-guides {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
}

.tr-plantilla-guide-box {
  position: absolute;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  box-sizing: border-box;
}

.tr-plantilla-guide-box--print {
  border-color: rgba(17, 17, 17, 0.28);
}

.tr-plantilla-guide-label {
  position: absolute;
  top: -18px;
  left: 0;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
}

.tr-plantilla-guide-label--print {
  color: #111111;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(17, 17, 17, 0.15);
}
/* ============================================================
   1.4 Fin
   ============================================================ */


/* ============================================================
   1.5 Inicio — Modos visuales comunes
   ============================================================ */
.tr-plantilla-mode-glow {
  background: #11131c;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 18px 48px rgba(0, 0, 0, 0.30);
}

.tr-plantilla-mode-print {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #d9d9d9;
}

.tr-plantilla-mode-print .tr-plantilla-frame-layer {
  display: none;
}

.tr-plantilla-mode-print .tr-plantilla-image-slot {
  box-shadow: none;
}

.tr-plantilla-mode-engraving {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.05) 100%),
    linear-gradient(180deg, #8a6243 0%, #6a472e 100%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.tr-plantilla-mode-engraving .tr-plantilla-frame-layer {
  display: none;
}
/* ============================================================
   1.5 Fin
   ============================================================ */


/* ============================================================
   1.6 Inicio — Responsive base
   ============================================================ */
@media (max-width: 720px) {
  .tr-plantilla-stage {
    min-height: 420px;
  }

  .tr-plantilla-canvas {
    width: 100%;
    border-radius: 18px;
  }
}
/* ============================================================
   1.6 Fin
   ============================================================ */

/* ============================================================
   2. Fin — css/plantillas_base.css
   ============================================================ */