/* Panel de propietario · editor de Trending con vista previa en directo — ver m-propietarios-trending.js
 * Pensado para no confundirse: tres pestañas grandes con número, cada parte en recuadros numerados (1, 2, 3…) con su icono,
 * cada campo con icono + nombre claro + contador, y la vista previa fija a la derecha mientras se baja por el formulario. */
.te { margin-top: 22px; --te-blue: #1f7aff; --te-pink: #EBB72A; --te-gold: #c9961b; --te-ink: #173b5c; --te-mut: #6d7f94; --te-line: #dde6ef; }
.te-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.te-hd h2 { margin: 0; font-size: 20px; color: var(--te-ink); }
.te-hd h2 i { margin-right: 8px; color: #ff6a2b; }
.te-hd p { margin: 6px 0 0; max-width: 780px; color: var(--te-mut); font-size: 13.5px; line-height: 1.5; }
.te-hd p b { color: var(--te-ink); }
.te-dirty { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 99px; background: #fff4d6; border: 1px solid #f0cf73; color: #8a6200; font-size: 12px; font-weight: 800; }
.te-dirty[hidden] { display: none; }
.te-dirty i { font-size: 8px; color: #e5a100; }

/* pestañas grandes */
.te-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 20px; }
.te-tab { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "n i" "n b" "n s"; column-gap: 12px; align-items: center; text-align: left; padding: 13px 16px; border: 2px solid var(--te-line); border-radius: 16px; background: #f8fafc; color: var(--te-ink); cursor: pointer; font: inherit; transition: border-color .15s, background .15s, box-shadow .15s; }
.te-tab:hover { border-color: #b9cde2; background: #fff; }
.te-tab .te-tn { grid-area: n; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e4ecf5; color: #496682; font-weight: 900; font-size: 15px; }
.te-tab > i { grid-area: i; justify-self: start; font-size: 16px; color: #7a8da3; }
.te-tab b { grid-area: b; font-size: 15px; }
.te-tab small { grid-area: s; color: var(--te-mut); font-size: 12px; }
.te-tab.on { border-color: var(--te-gold); background: #fffaf0; box-shadow: 0 4px 16px rgba(201, 150, 27, .18); }
.te-tab.on .te-tn { background: var(--te-gold); color: #fff; }
.te-tab.on > i { color: var(--te-gold); }

/* formulario | vista previa */
.te-body { display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 24px; align-items: start; }
.te-pane[hidden] { display: none; }
.te-pane { display: grid; gap: 20px; }
.te-box { border: 1.5px solid var(--te-line); border-radius: 20px; background: #fff; overflow: hidden; }
.te-bh { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--te-line); background: linear-gradient(90deg, rgba(31, 122, 255, .09), transparent 70%); }
.te-hot > .te-bh { background: linear-gradient(90deg, rgba(235, 183, 42, .1), transparent 70%); }
.te-bh h3 { margin: 0; font-size: 16px; color: var(--te-ink); }
.te-bh p { margin: 3px 0 0; font-size: 12.5px; color: var(--te-mut); }
.te-badge { flex: none; display: grid; place-items: center; min-width: 62px; height: 36px; padding: 0 12px; border-radius: 99px; color: #fff; font-weight: 900; font-size: 14px; letter-spacing: .03em; background: linear-gradient(180deg, #4aa8ff, #1466e6); box-shadow: 0 3px 10px rgba(31, 122, 255, .35); }
.te-hot > .te-bh .te-badge { background: linear-gradient(180deg, #FFC72E, #FFC72E); box-shadow: 0 3px 10px rgba(255, 199, 46, .35); }

/* recuadros numerados */
.te-g { margin: 0; padding: 16px 18px 18px; border: 0; border-top: 1px solid #edf1f6; min-width: 0; }
.te-g:first-of-type { border-top: 0; }
.te-g legend { float: left; width: 100%; display: flex; align-items: center; gap: 9px; margin: 0 0 12px; padding: 0; color: var(--te-ink); font-size: 14px; font-weight: 900; }
.te-g legend + * { clear: both; }
.te-gn { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--te-ink); color: #fff; font-size: 12px; }
.te-g legend > i { color: var(--te-gold); }
.te-gnote { margin: -4px 0 12px; color: var(--te-mut); font-size: 12.5px; }
.te-gb { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.te-span2, .te-icp, .te-color { grid-column: 1 / -1; }

/* campos */
.te-f { display: grid; gap: 6px; min-width: 0; align-content: start; }
.te-l { display: flex; align-items: center; gap: 7px; color: #2c4a67; font-size: 12.5px; font-weight: 800; }
.te-l i { width: 16px; text-align: center; color: #8aa0b8; }
.te-w { position: relative; display: block; }
.te-w input { width: 100%; box-sizing: border-box; height: 42px; padding: 0 56px 0 12px; border: 1.5px solid #cfdbe8; border-radius: 11px; background: #fbfcfe; color: #17324b; font: 600 14px Lato, Arial, sans-serif; transition: border-color .15s, box-shadow .15s; }
.te-w input:focus { outline: 0; border-color: var(--te-blue); box-shadow: 0 0 0 3px rgba(31, 122, 255, .16); background: #fff; }
.te-cnt { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #9aabbd; font-size: 11px; font-style: normal; font-weight: 700; pointer-events: none; }
.te-f > small { color: #8191a3; font-size: 11.5px; line-height: 1.35; }
.te-f > small b { color: #4d6b88; }
.te-wi { display: flex; align-items: center; gap: 10px; }
.te-wi .te-iprev { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: #17324b; color: #ffd21f; font-size: 18px; }
.te-wi input { padding-right: 12px; }

/* iconos para elegir */
.te-icons { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.te-icons button { display: grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid #d6e0ea; border-radius: 10px; background: #f6f9fc; color: #4b6784; font-size: 15px; cursor: pointer; transition: transform .12s, border-color .12s; }
.te-icons button:hover { transform: translateY(-2px); border-color: #9fb7d0; }
.te-icons button.on { border-color: var(--te-gold); background: #fff6df; color: var(--te-gold); box-shadow: 0 0 0 3px rgba(201, 150, 27, .16); }

/* tipos de letra */
.te-fonts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.te-font { display: grid; justify-items: center; gap: 3px; padding: 12px 8px 10px; border: 2px solid #d6e0ea; border-radius: 14px; background: #f8fafc; color: var(--te-ink); cursor: pointer; font: inherit; text-align: center; transition: border-color .15s, background .15s; }
.te-font b { font-size: 30px; line-height: 1.1; color: #17324b; }
.te-font span { font-size: 12px; font-weight: 800; }
.te-font small { font-size: 11px; color: var(--te-mut); }
.te-font:hover { border-color: #9fb7d0; background: #fff; }
.te-font.on { border-color: var(--te-gold); background: #fffaf0; box-shadow: 0 3px 12px rgba(201, 150, 27, .2); }

/* color */
.te-color { display: grid; gap: 7px; }
.te-cw { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.te-cw input[type=color] { width: 56px; height: 42px; padding: 3px; border: 1.5px solid #cfdbe8; border-radius: 11px; background: #fff; cursor: pointer; }
.te-cw code { padding: 8px 11px; border-radius: 9px; background: #eef3f8; color: #35526e; font-size: 13px; font-weight: 800; }
.te-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: #3b6aa3; font: 700 12.5px Lato, Arial, sans-serif; cursor: pointer; text-decoration: underline; }

/* imágenes */
.te-img { grid-column: 1 / -1; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; align-items: start; }
.te-img.wide { grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: center; }
.te-thumb { overflow: hidden; border: 1.5px solid #cfdbe8; border-radius: 13px; background: repeating-conic-gradient(#e9eef4 0 25%, #f7f9fc 0 50%) 0 / 16px 16px; }
.te-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.te-img.wide .te-thumb img { object-fit: cover; }
.te-imgf { display: grid; gap: 8px; min-width: 0; }
.te-imgf small { color: #8191a3; font-size: 11.5px; line-height: 1.4; }
.te-imgf small b { color: #4d6b88; }
.te-up { position: relative; justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 11px; background: var(--te-ink); color: #fff; font-size: 13px; font-weight: 800; cursor: pointer; }
.te-up:hover { background: #24517c; }
.te-up input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.te-url { width: 100%; box-sizing: border-box; height: 36px; padding: 0 11px; border: 1.5px solid #dbe5ee; border-radius: 9px; background: #fbfcfe; color: #27445f; font: 500 12px Lato, Arial, sans-serif; }
.te-url:focus { outline: 0; border-color: var(--te-blue); }

/* las 6 miniaturas */
.te-tiles { grid-column: 1 / -1; display: grid; gap: 12px; }
.te-tile { display: grid; grid-template-columns: 30px minmax(0, 1fr) 210px; gap: 14px; align-items: center; padding: 12px 14px; border: 1.5px solid #e2eaf2; border-radius: 15px; background: #f9fbfd; }
.te-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #dfe8f2; color: #3d5a78; font-weight: 900; font-size: 13px; }
.te-tf { display: grid; gap: 9px; }
.te-tf .te-w input { height: 38px; }

/* pie */
.te-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; padding-top: 16px; border-top: 1px solid #ebeff4; }
.te-foot > span:first-child { color: #77899d; font-size: 12px; }
.te-foot > span i { margin-right: 5px; color: #c29425; }
.te-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* vista previa fija */
.te-pvw { position: sticky; top: 84px; display: grid; gap: 10px; padding: 14px; border-radius: 20px; background: #000a1c; border: 2px solid #1b3c6e; box-shadow: 0 10px 30px rgba(0, 10, 28, .3); }
.te-live { display: flex; align-items: center; gap: 9px; margin: 0; color: #fff; font-size: 13px; font-weight: 900; letter-spacing: .02em; }
.te-dot { width: 10px; height: 10px; border-radius: 50%; background: #34e089; box-shadow: 0 0 0 0 rgba(52, 224, 137, .6); animation: te-pulse 1.8s infinite; }
@keyframes te-pulse { 70% { box-shadow: 0 0 0 9px rgba(52, 224, 137, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 224, 137, 0); } }
.te-pvn { margin: 0; color: #8fa6c4; font-size: 11.5px; }
.te-pv { pointer-events: none; user-select: none; --dz: 1px; }
.te-pv-split { display: grid; gap: 14px; }
.te-pv .ts-h { width: 100%; }
/* la columna se pinta aquí con su tamaño del diseño (330 px) aunque la pantalla no sea ancha */
.te-pv .tc { display: block; position: relative; width: 330px; max-width: 100%; margin: 0 auto; container-type: inline-size; }
.te-pv .tc-in { position: relative; top: auto; height: 790px; }

@media (max-width: 1280px) {
  .te-body { grid-template-columns: minmax(0, 1fr); }
  .te-pvw { position: static; order: -1; }
  .te-pv-split { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .te-tabs { grid-template-columns: 1fr; }
  .te-gb { grid-template-columns: 1fr; }
  .te-fonts { grid-template-columns: 1fr 1fr; }
  .te-img, .te-img.wide { grid-template-columns: 1fr; }
  .te-tile { grid-template-columns: 1fr; }
  .te-n { justify-self: start; }
  .te-pv-split { grid-template-columns: 1fr; }
  .te-hd { flex-direction: column; }
  .te-foot { flex-direction: column; align-items: stretch; }
  .te-btns .hx-btn { flex: 1; justify-content: center; }
}
.te-tile .te-img { grid-column: auto; }

/* barra «Ir a» */
.te-jump { position: sticky; top: 76px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; padding: 10px 14px; border: 1.5px solid #dde6ef; border-radius: 14px; background: rgba(255, 255, 255, .96); }
.te-jump > span { color: #6d7f94; font-size: 12.5px; font-weight: 800; }
.te-jump button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1.5px solid #d3deea; border-radius: 99px; background: #f6f9fc; color: #173b5c; font: 800 13px Lato, Arial, sans-serif; cursor: pointer; }
.te-jump button:hover { border-color: #c9961b; background: #fffaf0; }
.te-jump button i { color: #c9961b; }

/* ════════ pestaña «Tienda» (3-nov-2026): portada de cada categoría, cajas TOP / HOT y garantías ════════ */
.te-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.te[data-tab="shop"] .te-body { grid-template-columns: minmax(0, 1fr); }
.te[data-tab="shop"] .te-pvw { position: sticky; top: 76px; z-index: 6; order: -1; }
.te-pv-shop { display: grid; gap: 12px; }
.te-pv-shop2 { --u: .62px; display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 14px; align-items: center; }
.te-pv-shop .ti-hero { border-radius: 14px; overflow: hidden; }
.te-badge.shop { min-width: 46px; font-size: 18px; background: linear-gradient(180deg, #ffe066, #f6c22b 55%, #eaa91a); color: #3b2a00; box-shadow: 0 3px 10px rgba(201, 150, 27, .35); }
.te-shop > .te-bh { background: linear-gradient(90deg, rgba(201, 150, 27, .12), transparent 70%); }
.te-g0 { padding-bottom: 6px; }
.te-scats { display: flex; flex-wrap: wrap; gap: 8px; }
.te-scat { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 2px solid var(--te-line); border-radius: 99px; background: #f8fafc; color: var(--te-ink); font: 800 13.5px Lato, Arial, sans-serif; cursor: pointer; transition: border-color .15s, background .15s; }
.te-scat i { color: #8aa0b8; font-size: 15px; }
.te-scat:hover { border-color: #b9cde2; background: #fff; }
.te-scat.on { border-color: var(--te-gold); background: #fffaf0; box-shadow: 0 3px 12px rgba(201, 150, 27, .2); }
.te-scat.on i { color: var(--te-gold); }
.te-optw { display: grid; gap: 7px; }
.te-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.te-opt { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "i b" "i s"; column-gap: 10px; align-items: center; min-width: 190px; padding: 10px 14px; border: 2px solid #d6e0ea; border-radius: 14px; background: #f8fafc; color: var(--te-ink); cursor: pointer; text-align: left; font: inherit; }
.te-opt i { grid-area: i; font-size: 18px; color: #7a8da3; }
.te-opt b { grid-area: b; font-size: 13.5px; }
.te-opt small { grid-area: s; font-size: 11.5px; color: var(--te-mut); }
.te-opt.on { border-color: var(--te-gold); background: #fffaf0; box-shadow: 0 3px 12px rgba(201, 150, 27, .2); }
.te-opt.on i { color: var(--te-gold); }
.te-shared { padding: 18px 18px 0; border-top: 6px solid #f1f5f9; }
.te-shared h4 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--te-mut); font-size: 12.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.te-shared h4 i { color: var(--te-gold); }
.te-perks { display: grid; gap: 10px; }
.te-perk { display: grid; grid-template-columns: 30px minmax(0, 230px) minmax(0, 1fr); gap: 12px; align-items: end; padding: 10px 12px; border: 1.5px solid #e2eaf2; border-radius: 14px; background: #f9fbfd; }
.te-perk .te-n { align-self: center; }
@media (max-width: 1280px) { .te-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .te-perk { grid-template-columns: 1fr; } .te-pv-shop2 { grid-template-columns: 1fr; } .te[data-tab="shop"] .te-pvw { position: static; } }
