/* =====================================================================
   Tienda de plantillas: catalogo, ficha, vitrina de la landing y editor del panel.
   Cada herramienta aporta su color en --tool (Excel verde, Power BI ambar, PDF rojo...).
   ===================================================================== */

/* ---------------------------- Portadas ------------------------------ */
.tpl-cover { --tool: var(--brand); position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.tpl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.tpl-cover--auto {
  display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--tool) 55%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--tool) 92%, #fff 0%), color-mix(in srgb, var(--tool) 70%, #0B1220));
  color: #fff;
}
.tpl-cover--auto::before { content: ''; position: absolute; inset: 0; opacity: .14;
  background-image: linear-gradient(rgba(255,255,255,.9) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.9) 1px, transparent 1px);
  background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 75%); }
.tpl-cover__sheet { position: absolute; top: 14%; right: 12%; width: 34%; aspect-ratio: 3 / 4; border-radius: 8px; background: rgba(255,255,255,.96);
  box-shadow: 0 18px 30px -10px rgba(0,0,0,.45); transform: rotate(6deg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  transition: transform .35s ease; }
.tpl-cover__sheet::after { content: ''; position: absolute; top: 0; right: 0; width: 26%; aspect-ratio: 1; background: linear-gradient(225deg, var(--surface-2) 50%, color-mix(in srgb, var(--tool) 30%, #fff) 50%); border-radius: 0 8px 0 6px; }
.tpl-cover__sheet > i { font-size: clamp(22px, 3.2vw, 36px); color: var(--tool); }
.tpl-cover__lines { display: flex; flex-direction: column; gap: 4px; width: 60%; }
.tpl-cover__lines i { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--tool) 25%, #E5E7EB); }
.tpl-cover__lines i:nth-child(2) { width: 75%; }
.tpl-cover__lines i:nth-child(3) { width: 50%; }
.tpl-cover__title { position: relative; max-width: 58%; font-weight: 800; font-size: 15px; line-height: 1.2; letter-spacing: -.01em; text-shadow: 0 1px 2px rgba(0,0,0,.25);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-cover--mini { width: 64px; flex-shrink: 0; border-radius: 10px; }
.tpl-cover--mini.tpl-cover--auto { padding: 0; }
.tpl-cover--mini .tpl-cover__title, .tpl-cover--mini .tpl-cover__lines { display: none; }
.tpl-cover--mini .tpl-cover__sheet { width: 46%; top: 22%; right: 26%; }
.tpl-cover--grande { padding: 28px; }
.tpl-cover--grande .tpl-cover__title { font-size: clamp(22px, 3vw, 34px); max-width: 52%; }
.tpl-cover--grande .tpl-cover__sheet { width: 26%; right: 9%; top: 16%; }

/* ---------------------------- Chips y precio ------------------------ */
.tpl-chip { --tool: var(--brand); display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: color-mix(in srgb, var(--tool) 82%, #000); background: color-mix(in srgb, var(--tool) 12%, transparent); width: fit-content; }
[data-theme="dark"] .tpl-chip { color: color-mix(in srgb, var(--tool) 55%, #fff); background: color-mix(in srgb, var(--tool) 20%, transparent); }
.tpl-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: rgba(17, 24, 39, .78); color: #fff; backdrop-filter: blur(6px); }
.tpl-badge--gratis { background: #059669; }
.tpl-badge--oferta { background: #E11D48; }
.tpl-precio { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.tpl-precio.is-free, .tpl-card__price.is-free { color: var(--success); }
.tpl-precio s, .tpl-card__price s { font-size: .6em; color: var(--muted); font-weight: 500; margin-left: 6px; }

/* ---------------------------- Tarjeta ------------------------------- */
.tpl-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-xs); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; color: var(--text) !important; }
.tpl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.tpl-card:hover .tpl-cover img { transform: scale(1.04); }
.tpl-card:hover .tpl-cover__sheet { transform: rotate(0deg) translateY(-4px); }
.tpl-card__link { position: absolute; inset: 0; z-index: 1; }
.tpl-card__media { position: relative; }
.tpl-card__badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.tpl-card__rapida { position: absolute; z-index: 2; left: 50%; bottom: 12px; transform: translate(-50%, 8px); opacity: 0; border: 0; border-radius: 999px; padding: 7px 14px;
  font-size: 13px; font-weight: 600; background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); transition: opacity .2s, transform .2s; }
.tpl-card:hover .tpl-card__rapida, .tpl-card__rapida:focus-visible { opacity: 1; transform: translate(-50%, 0); }
.tpl-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tpl-card__title { font-size: 16px !important; font-weight: 700 !important; line-height: 1.3 !important; margin: 0 !important; letter-spacing: -.01em; }
.tpl-card__text { font-size: 13.5px; color: var(--text-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-card__meta { font-size: 12.5px; color: var(--muted); }
.tpl-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 4px; }
.tpl-card__price { font-weight: 800; font-size: 17px; }
.tpl-card__pop { font-size: 12.5px; color: var(--muted); }
@media (hover: none) {
  .tpl-card__rapida { opacity: 1; left: auto; right: 10px; top: 10px; bottom: auto; transform: none; padding: 6px 10px; font-size: 12px; }
}

/* ---------------------------- Catalogo ------------------------------ */
.tpl-hero { position: relative; padding: 56px 0 30px; overflow: hidden; text-align: center;
  background: radial-gradient(800px 360px at 50% -20%, color-mix(in srgb, var(--brand) 20%, transparent), transparent 70%); }
.tpl-hero h1 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; line-height: 1.08; margin: 12px 0 14px !important; letter-spacing: -.035em; }
.tpl-hero h1 span { background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 50%, var(--vidrio-coral))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tpl-hero .lp-lead { margin: 0 auto 26px; }
.tpl-buscador { position: relative; max-width: 620px; margin: 0 auto 22px; }
.tpl-buscador > i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; }
.tpl-buscador input { width: 100%; height: 58px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  padding: 0 56px 0 52px; font-size: 16px; box-shadow: var(--shadow-md); outline: none; transition: border-color .15s, box-shadow .15s; }
.tpl-buscador input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring), var(--shadow-md); }
.tpl-buscador kbd { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); box-shadow: none; font-size: 12px; }
.tpl-herramientas, .tpl-vitrina__chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tpl-herramienta { --tool: var(--brand); display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 14px; cursor: pointer; transition: all .15s; }
.tpl-herramienta i { color: var(--tool); }
.tpl-herramienta span { font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 0 7px; }
.tpl-herramienta:hover { border-color: var(--tool); color: var(--text); }
.tpl-herramienta.is-on { background: var(--tool); border-color: var(--tool); color: #fff; box-shadow: 0 8px 18px -8px var(--tool); }
.tpl-herramienta.is-on i { color: #fff; }
.tpl-herramienta.is-on span { background: rgba(255,255,255,.25); color: #fff; }

.tpl-tienda { padding: 26px 0 90px; background: var(--bg); }
.tpl-tienda__grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.tpl-filtros { position: sticky; top: 88px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.tpl-filtros__cabeza { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tpl-filtros__cerrar { display: none; border: 0; background: none; font-size: 18px; color: var(--text); }
.tpl-limpiar { border: 0; background: none; color: var(--brand); font-weight: 600; font-size: 13px; padding: 0; }
.tpl-filtros fieldset { border: 0; border-top: 1px solid var(--border); padding: 14px 0 6px; margin: 10px 0 0; }
.tpl-filtros legend { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; border: 0; margin: 0 0 10px; width: auto; }
.tpl-seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 3px; }
.tpl-seg button { border: 0; background: none; border-radius: 9px; padding: 7px 4px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.tpl-seg button.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }
.tpl-rango { display: block; margin: 14px 0 0; font-weight: 400; font-size: 13px; color: var(--text-2); }
.tpl-rango input { width: 100%; accent-color: var(--brand); margin-top: 6px; }
.tpl-opcion { display: flex !important; align-items: center; gap: 9px; font-weight: 500 !important; font-size: 14px; padding: 5px 0; margin: 0; cursor: pointer; color: var(--text-2); }
.tpl-opcion input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.tpl-opcion span { flex: 1; }
.tpl-opcion small { color: var(--muted); }

.tpl-barra { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tpl-barra__filtros { display: none !important; }
.tpl-barra__total { font-weight: 700; color: var(--text); }
.tpl-activos { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.tpl-activo { border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border)); background: var(--brand-softer); color: var(--brand); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; }
[data-theme="dark"] .tpl-activo { color: var(--brand-light); }
.tpl-orden { display: flex !important; align-items: center; gap: 8px; margin: 0 0 0 auto; font-weight: 500 !important; font-size: 13px; color: var(--muted); }
.tpl-orden select { width: auto; min-width: 200px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.tpl-grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tpl-grid [hidden] { display: none !important; }
.tpl-vacio { text-align: center; padding: 60px 20px; color: var(--muted); }
.tpl-vacio > i { font-size: 34px; display: block; margin-bottom: 10px; color: var(--subtle); }
.tpl-vacio b { color: var(--text); }

@media (max-width: 991px) {
  .tpl-tienda__grid { grid-template-columns: 1fr; }
  .tpl-barra__filtros { display: inline-flex !important; }
  .tpl-filtros { position: fixed; inset: 0 auto 0 0; width: min(320px, 88vw); z-index: 1060; border-radius: 0 18px 18px 0; overflow-y: auto;
    transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow-lg); top: 0; }
  .tpl-filtros.is-open { transform: none; }
  .tpl-filtros__cerrar { display: block; }
  body.tpl-sin-scroll { overflow: hidden; }
  body.tpl-sin-scroll::after { content: ''; position: fixed; inset: 0; background: rgba(11, 18, 32, .45); z-index: 1055; }
  .tpl-orden { margin-left: 0; }
}

/* ---------------------------- Vista rapida -------------------------- */
.tpl-rapida { display: grid !important; grid-template-columns: 1.15fr 1fr; overflow: hidden; }
.tpl-rapida__cerrar { position: absolute; right: 14px; top: 10px; z-index: 3; font-size: 28px; }
.tpl-rapida__media { background: var(--surface-2); display: flex; align-items: center; min-height: 320px; }
.tpl-rapida__media > * { width: 100%; }
.tpl-rapida__media iframe, .tpl-rapida__media video { aspect-ratio: 16 / 9; border: 0; background: #000; }
.tpl-rapida__media img { max-height: 70vh; object-fit: contain; }
.tpl-rapida__info { padding: 28px 26px; display: flex; flex-direction: column; gap: 12px; }
.tpl-rapida__info h2 { font-size: 22px; font-weight: 800; margin: 0; }
.tpl-rapida__info > p { color: var(--text-2); margin: 0; }
.tpl-rapida__compra { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
@media (max-width: 767px) { .tpl-rapida { grid-template-columns: 1fr; } }

.tpl-incluye { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tpl-incluye li { position: relative; padding-left: 24px; font-size: 14px; color: var(--text-2); }
.tpl-incluye li::before { content: '\F26E'; font-family: 'bootstrap-icons'; position: absolute; left: 0; top: 0; color: var(--success); }
.tpl-incluye--grande li { font-size: 16px; padding: 10px 12px 10px 38px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.tpl-incluye--grande li::before { left: 12px; top: 10px; }
.tpl-datos { display: grid; gap: 0; margin: 0; }
.tpl-datos > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.tpl-datos dt { color: var(--muted); font-weight: 400; }
.tpl-datos dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------------------------- Ficha --------------------------------- */
.tpl-ficha { padding: 26px 0 90px; background: var(--bg); }
.tpl-migas { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.tpl-migas a { color: var(--text-2) !important; }
.tpl-migas i { font-size: 11px; }
.tpl-ficha__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
.tpl-visor { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); }
.tpl-visor__principal { background: #0B1220; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; }
.tpl-visor__principal > * { width: 100%; height: 100%; border: 0; }
.tpl-visor__principal img { object-fit: contain; background: var(--surface-2); }
.tpl-visor__principal .tpl-cover { aspect-ratio: auto; }
.tpl-visor__miniaturas { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.tpl-visor__miniaturas button { flex: 0 0 84px; height: 60px; border-radius: 10px; border: 2px solid transparent; padding: 0; overflow: hidden; background: var(--surface-2); color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; gap: 2px; }
.tpl-visor__miniaturas button i { font-size: 20px; color: var(--brand); }
.tpl-visor__miniaturas button img { width: 100%; height: 100%; object-fit: cover; }
.tpl-visor__miniaturas button.is-on { border-color: var(--brand); }
.tpl-pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 28px 0 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tpl-pestanas a { padding: 12px 16px; font-weight: 600; color: var(--muted) !important; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tpl-pestanas a.is-on { color: var(--text) !important; border-color: var(--brand); }
.tpl-texto { padding: 22px 2px; font-size: 16px; line-height: 1.75; color: var(--text-2); }
.tpl-texto h3 { font-size: 19px; font-weight: 700; color: var(--text); margin: 22px 0 8px !important; }
.tpl-texto h3:first-child { margin-top: 0 !important; }
.tpl-texto b { color: var(--text); }
.tpl-pasos { list-style: none; counter-reset: paso; padding: 0; margin: 14px 0; display: grid; gap: 12px; }
.tpl-pasos li { counter-increment: paso; position: relative; padding: 14px 16px 14px 60px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.tpl-pasos li::before { content: counter(paso); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: #fff;
  font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px; }

.tpl-comprar { position: sticky; top: 88px; }
.tpl-comprar__caja { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 14px; }
.tpl-comprar__caja h1 { font-size: 26px; font-weight: 800; line-height: 1.15; }
.tpl-comprar__resumen { margin: 0; color: var(--text-2); }
.tpl-comprar__precio { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tpl-comprar__precio small { width: 100%; color: var(--muted); font-size: 12.5px; }
.tpl-comprar__precio s { color: var(--muted); }
.tpl-confianza { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.tpl-confianza i { color: var(--success); margin-right: 6px; }
.tpl-compartir { border: 0; background: none; color: var(--brand); font-weight: 600; font-size: 14px; padding: 0; text-align: left; }
.tpl-relacionadas { margin-top: 56px; }
.tpl-relacionadas h2 { font-size: 24px; font-weight: 800; margin-bottom: 18px !important; }
.tpl-mini { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 16px; }
.tpl-mini b { display: block; }
.tpl-mini span { color: var(--muted); font-size: 14px; }
.tpl-hp { position: absolute !important; left: -9999px !important; }
@media (max-width: 991px) {
  .tpl-ficha__grid { grid-template-columns: 1fr; }
  .tpl-comprar { position: static; }
}

/* ---------------------------- Compra y recuperacion ----------------- */
.tpl-codigo { font-size: 18px; letter-spacing: .12em; font-weight: 700; }
.tpl-codigo-input { text-transform: uppercase; letter-spacing: .2em; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; }
.tpl-recuperadas { margin-top: 22px; display: grid; gap: 10px; }
.tpl-recuperada { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; }
.tpl-recuperada > div { flex: 1; }
.tpl-recuperada b { display: block; }
.tpl-recuperada small { color: var(--muted); }

/* ---------------------------- Vitrina de la landing ----------------- */
.tpl-vitrina { overflow: hidden; background:
  radial-gradient(600px 300px at 90% 20%, color-mix(in srgb, var(--vidrio-ambar, #F59E0B) 14%, transparent), transparent 70%),
  radial-gradient(500px 300px at 70% 90%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%); }
.tpl-vitrina__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.tpl-vitrina__chips { justify-content: flex-start; margin: 0 0 28px; }
.tpl-abanico { position: relative; height: 430px; }
.tpl-abanico__grupo { position: absolute; inset: 0; pointer-events: none; }
.tpl-abanico__carta { position: absolute; width: 250px; left: 50%; top: 40px; margin-left: -125px; opacity: 0; transform: translateY(30px) scale(.92);
  transition: transform .55s cubic-bezier(.2, .9, .3, 1.2), opacity .35s ease; }
.tpl-abanico__grupo.is-on { pointer-events: auto; }
.tpl-abanico__grupo.is-on .tpl-abanico__carta { opacity: 1; }
.tpl-abanico__grupo.is-on .tpl-abanico__carta:nth-child(1) { transform: translateX(-150px) rotate(-9deg); z-index: 1; transition-delay: .05s; }
.tpl-abanico__grupo.is-on .tpl-abanico__carta:nth-child(2) { transform: translateY(-14px); z-index: 3; transition-delay: .1s; }
.tpl-abanico__grupo.is-on .tpl-abanico__carta:nth-child(3) { transform: translateX(150px) rotate(9deg); z-index: 2; transition-delay: .15s; }
.tpl-abanico__grupo.is-on .tpl-abanico__carta:only-child { transform: none; }
.tpl-abanico__grupo.is-on .tpl-abanico__carta:first-child:nth-last-child(2) { transform: translateX(-80px) rotate(-6deg); }
.tpl-abanico__grupo.is-on .tpl-abanico__carta:last-child:nth-child(2) { transform: translateX(80px) rotate(6deg) translateY(-10px); }
.tpl-abanico__grupo.is-on .tpl-abanico__carta:hover { z-index: 5; transform: translateY(-24px) scale(1.04) rotate(0); }
@media (max-width: 991px) {
  .tpl-vitrina__grid { grid-template-columns: 1fr; }
  .tpl-abanico { height: 380px; }
  .tpl-abanico__carta { width: 210px; margin-left: -105px; }
  .tpl-abanico__grupo.is-on .tpl-abanico__carta:nth-child(1) { transform: translateX(-95px) rotate(-9deg); }
  .tpl-abanico__grupo.is-on .tpl-abanico__carta:nth-child(3) { transform: translateX(95px) rotate(9deg); }
}
@media (prefers-reduced-motion: reduce) { .tpl-abanico__carta, .tpl-card { transition: none; } }
.lp-nav__nuevo { position: relative; }
.lp-nav__nuevo::after { content: ''; position: absolute; top: 7px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--vidrio-coral, #F43F5E); }

/* ---------------------------- Panel: editor ------------------------- */
.tpl-editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.tpl-editor__main { display: flex; flex-direction: column; gap: 20px; }
.tpl-editor__main .card__title { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 16px; }
.tpl-editor__main .card__title i { color: var(--brand); }
.tpl-editor__side { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 18px; }
.tpl-label { display: block; font-weight: 600; margin: 4px 0 8px; }
.tpl-tipos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tpl-tipo { --tool: var(--brand); margin: 0; cursor: pointer; }
.tpl-tipo input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-tipo span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 12px; border: 1px solid var(--border); font-weight: 600; font-size: 13.5px; color: var(--text-2); transition: all .15s; }
.tpl-tipo span i { color: var(--tool); }
.tpl-tipo input:checked + span { border-color: var(--tool); background: color-mix(in srgb, var(--tool) 10%, transparent); color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tool) 18%, transparent); }
.tpl-tipo input:focus-visible + span { outline: 2px solid var(--brand); }
.tpl-archivo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--success-soft); margin-bottom: 12px; }
.tpl-archivo > i { font-size: 24px; color: var(--success); }
.tpl-archivo > div { flex: 1; }
.tpl-archivo b { display: block; word-break: break-all; }
.tpl-archivo small { color: var(--muted); }
.tpl-drop { position: relative; display: flex !important; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed var(--border-strong); border-radius: 16px;
  text-align: center; cursor: pointer; font-weight: 400 !important; transition: border-color .15s, background .15s; margin: 0; }
.tpl-drop:hover { border-color: var(--brand); background: var(--brand-softer); }
.tpl-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tpl-drop > i { font-size: 30px; color: var(--brand); }
.tpl-drop small { color: var(--muted); }
.tpl-miniatura { width: 100%; max-width: 220px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); display: block; margin-bottom: 8px; }
.tpl-quitar { display: flex !important; gap: 6px; align-items: center; font-weight: 400 !important; font-size: 13px; color: var(--danger); margin-bottom: 8px; }
.tpl-galeria-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.tpl-galeria-admin label { margin: 0; font-weight: 400; font-size: 12px; }
.tpl-galeria-admin img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.tpl-galeria-admin span { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.tpl-formato { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }
.tpl-publicar .card__title { margin-bottom: 12px; }
.tpl-estado { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tpl-estado label { margin: 0; cursor: pointer; }
.tpl-estado input { position: absolute; opacity: 0; }
.tpl-estado span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 10px; border: 1px solid var(--border); font-weight: 600; font-size: 13.5px; color: var(--text-2); }
.tpl-estado input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.tpl-publicar__datos { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.tpl-vista__label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.tpl-vista .tpl-card:hover { transform: none; }
.tpl-eliminar { margin-top: 16px; }
.tpl-admin-fila { display: flex; align-items: center; gap: 12px; }
@media (max-width: 1100px) {
  .tpl-editor { grid-template-columns: 1fr; }
  .tpl-editor__side { position: static; }
}
