:root {
  /* REJILLA productos */
  --bubble-size: 48mm;
  --name-rect-bottom-offset: 8mm;

  /* PRODUCTO DESTACADO (A4 horizontal) */
  --featured-title-size: 1.9rem;
  --featured-desc-size: 1.15rem;
  --featured-price-size: 4.5rem;
  --featured-price-dec-size: 3.2rem;
  --featured-price-offset-y: 6mm;
  --featured-extra-size: 1rem;
  --featured-badge-x: 200mm;
  --featured-badge-y: 40mm;
  --featured-badge-scale: 2.2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  background: linear-gradient(to bottom, #facc15 0%, #0f4fb7 100%);
  color: #111827;
  display: flex;
  min-height: 100vh;
  padding: 16px;
  gap: 16px;
}

.app {
  display: flex;
  flex: 1 1 140px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  gap: 16px;
}

/* PANEL LATERAL */
.panel-controles {
  width: 320px;
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px 20px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.panel-controles h2 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.panel-controles small {
  color: #6b7280;
  font-size: 0.8rem;
}

.mode-switch {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  background: #e5e7eb;
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
}

.mode-btn {
  flex: 1 1 140px;
  border-radius: 999px;
  border: none;
  padding: 6px 8px;
  font-size: 0.78rem;
  cursor: pointer;
  background: transparent;
  color: #374151;
  font-weight: 500;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s;
  white-space: nowrap;
}

.mode-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.6);
}

.panel-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
  margin-top: 4px;
}

.panel-section h3 {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.field-group {
  margin-bottom: 10px;
}

.field-group label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 4px;
  color: #374151;
  font-weight: 500;
}

.field-group input[type="text"],
.field-group input[type="number"],
.field-group textarea,
.field-group select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 6px 8px;
  font-size: 0.85rem;
  outline: none;
  resize: vertical;
}

.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.3);
}

.field-group input[type="file"] {
  border: none;
  padding: 0;
  font-size: 0.8rem;
}

.inline-fields {
  display: flex;
  gap: 8px;
}

.inline-fields .field-group {
  flex: 1 1 140px;
  margin-bottom: 0;
}

.hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: -4px;
  margin-bottom: 6px;
}

.btn {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: none;
  font-size: 0.8rem;
  cursor: pointer;
  background: #2563eb;
  color: #ffffff;
  font-weight: 500;
  transition: transform 0.08s ease, box-shadow 0.08s ease,
    background 0.1s ease;
  width: 100%;
  margin-top: 4px;
}

.btn:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #111827;
}

.mode-section {
  display: none;
}

.mode-section.active {
  display: block;
}

/* PÁGINAS GENERALES */
.preview-wrapper {
  flex: 1 1 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: auto;
  gap: 16px;
  padding: 20px;
  min-width: 0;
}

.page {
  width: 210mm;
  height: 297mm;
  background: linear-gradient(to bottom, #facc15 0%, #0f4fb7 100%);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.page + .page {
  margin-top: 10mm;
}

/* PÁGINA HORIZONTAL DESTACADO */
.page-horizontal {
  width: 297mm;
  height: 210mm;
  background: #ffffff;
  border-radius: 8mm;
  border: 5px solid #0f4fb7;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.4);
  position: relative;
  overflow: hidden;
  padding: 8mm;
  box-sizing: border-box;
  margin: 0 auto;
}

.featured-card {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 6mm;
  border: 3px solid #facc15;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  padding: 6mm;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8mm;
  position: relative;
  box-sizing: border-box;
}

.featured-left {
  position: relative;
  background: #ffffff;
  border-radius: 4mm;
  overflow: hidden;
  height: 100%;
}

.featured-left-inner {
  width: 100%;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-left-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* CÍRCULO PRECIO DESTACADO */
.featured-badge {
  position: absolute;
  top: var(--featured-badge-y);
  left: var(--featured-badge-x);
  transform-origin: right center;
  transform: scale(var(--featured-badge-scale));
  background: radial-gradient(circle at 30% 30%, #facc15 0, #16a34a 70%);
  color: #ffffff;
  border-radius: 999px;
  padding: 3mm 8mm;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
  text-align: center;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.95rem;
  line-height: 1.1;
  z-index: 5;
}

.featured-badge span {
  display: block;
}

.featured-badge .badge-small {
  font-size: 0.8rem;
}

.featured-badge .badge-big {
  font-size: 1.4rem;
}

.featured-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-right: 4mm;
  gap: 4mm;
}

/* Offsets verticales por modo para el bloque de textos del destacado */
.featured-card.mode-both .featured-right {
  margin-top: 280px;
}

.featured-card.mode-circle-only .featured-right {
  margin-top: 280px;
}

.featured-card.mode-bottom-only .featured-right {
  margin-top: 200px;
}

/* Modo solo círculo: oculta solo el precio grande de la derecha */
.featured-card.mode-circle-only .featured-price-main {
  display: none;
}

/* Modo solo precio inferior (sin círculo): oculta el círculo verde */
.featured-card.mode-bottom-only .featured-badge {
  display: none;
}

.featured-title {
  color: #0f4fb7;
  font-size: var(--featured-title-size);
  font-weight: 800;
  line-height: 1.1;
}

.featured-desc {
  color: #0f172a;
  font-size: var(--featured-desc-size);
  line-height: 1.25;
}

.featured-price-block {
  margin-top: var(--featured-price-offset-y);
}

.featured-price-main {
  color: #16a34a;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.featured-price-main span {
  display: inline-block;
}

.featured-price-main .featured-int {
  font-size: var(--featured-price-size);
}

.featured-price-main .featured-dec,
.featured-price-main .featured-euro {
  font-size: var(--featured-price-dec-size);
  margin-left: 1mm;
}

.featured-price-extra {
  margin-top: 2mm;
  color: #16a34a;
  font-size: var(--featured-extra-size);
  font-weight: 800;
}

.featured-logo {
  position: absolute;
  top: 6mm;
  right: 10mm;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.featured-logo img {
  max-width: 40mm;
  height: auto;
  display: block;
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  body {
    background: #ffffff;
    padding: 0;
  }
  .panel-controles {
    display: none;
  }
  .preview-wrapper {
    margin: 0;
  }
  .page,
  .page-horizontal {
    border-radius: 0;
    box-shadow: none;
    page-break-after: always;
  }
  .page:last-of-type,
  .page-horizontal:last-of-type {
    page-break-after: auto;
  }
}

/* CABECERA BIELSA (modo cartelería productos) */
.header-wrap {
  padding: 10mm 10mm 4mm;
  background: transparent;
}

.bielsa-logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10mm;
}

.bielsa-logo-block {
  flex: 1 1 140px;
}

.supers-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #0f4fb7;
  text-transform: uppercase;
}

.bielsa-name {
  font-size: 3.2rem;
  font-weight: 800;
  color: #0f4fb7;
  line-height: 0.95;
}

.bielsa-subline {
  margin-top: 4px;
  background: #0f4fb7;
  color: #ffffff;
  font-size: 0.78rem;
  text-transform: uppercase;
  padding: 2px 8px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.bielsa-promo {
  margin-top: 3px;
  background: #111827;
  color: #ffffff;
  font-size: 0.7rem;
  padding: 2px 8px;
  text-transform: uppercase;
}

.header-logo-circle {
  width: 40mm;
  height: 40mm;
  border-radius: 50%;
  border: 3px solid #0f4fb7;
  background: #fefce8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.header-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-contact {
  margin-top: 4mm;
  font-size: 0.75rem;
  color: #111827;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.header-contact span::before {
  content: "• ";
}

.super-ofertas {
  margin-top: 6mm;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  align-items: center;
  gap: 4mm;
}

.super-pill {
  background: #0ea5e9;
  border-radius: 40px;
  padding: 4px 16px;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  align-items: center;
  box-shadow: 0 4px 12px rgba(8, 47, 73, 0.5);
}

.super-pill-main {
  background: #16a34a;
  border-radius: 999px;
  padding: 4px 18px;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
  margin-right: 4px;
  border: 3px solid #ffffff;
}

.super-pill-sub {
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
}

.badge-free-text {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #111827;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
}

.iva-global {
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #ffffff;
  padding: 0;
  border-radius: 0;
  background: none;
  display: block;
}

/* GRID PRODUCTOS */
.products-area {
  flex: 1 1 140px;
  padding: 0 10mm 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 10mm;
}

.products-grid {
  margin-top: 6mm;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6mm 6mm;
  justify-items: center;
}

.product-card {
  position: relative;
  width: var(--bubble-size);
  min-height: calc(var(--bubble-size) + 14mm);
}

.product-inner {
  position: relative;
  width: var(--bubble-size);
  margin: 0 auto;
  padding-bottom: 12mm;
}

.product-bubble {
  width: var(--bubble-size);
  height: var(--bubble-size);
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #16a34a;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6mm 4mm 4mm;
  position: relative;
  margin: 0 auto;
}

.product-image {
  width: calc(var(--bubble-size) * 0.6);
  height: calc(var(--bubble-size) * 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.product-code {
  position: absolute;
  top: 2mm;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.25);
  z-index: 3;
}

.price-badge {
  position: absolute;
  right: -12mm;
  top: 6mm;
  min-width: 24mm;
  height: 24mm;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #facc15 0, #16a34a 70%);
  display: flex;
  flex-wrap: wrap;
  width: 50%;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.8);
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  padding: 26px 3mm;
  z-index: 4;
}

.price-int,
.price-dec,
.price-euro {
  font-size: 1.25rem;
  line-height: 1;
  display: inline-block;
}

.price-dec {
  margin-left: 1px;
}

.price-euro {
  margin-left: 2px;
}

.product-name-rect {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--name-rect-bottom-offset);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  min-height: 8mm;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.25);
  max-width: 95%;
  z-index: 5;
}

.product-name {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
}

/* FOOTER PÁGINA 2 */
.footer {
  margin-top: auto;
  padding: 4mm 10mm 12mm;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85), transparent);
  color: #f9fafb;
  font-size: 0.7rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50% mapa, 50% texto */
  gap: 8mm;
  align-items: flex-start;
}

.footer-map {
  background: #ffffff;
  border-radius: 12px;
  padding: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.footer-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.footer-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-text h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-text p {
  margin-top: 2px;
}

.footer-bottom {
  margin-top: 4mm;
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  opacity: 0.95;
}

/* CABECERA PÁGINA 2 MINI LOGO */
.page2-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8mm;
  padding: 6mm 10mm 0;
}

.page2-title {
  display: inline-block;
  background: #0f4fb7;
  color: #ffffff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.page2-logo-mini img {
  max-width: 30mm;
  max-height: 30mm;
  height: auto;
  width: auto;
  object-fit: contain;
}

[contenteditable="true"] {
  outline: none;
  cursor: text;
}

[contenteditable="true"]:focus {
  box-shadow: inset 0 0 0 1px #2563eb;
  border-radius: 3px;
  background: rgba(239, 246, 255, 0.9);
}

/* === Buscador de artículos (catálogo) === */
.catalog-search-results {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 4px;
  border: 1px solid #dddddd;
  border-radius: 4px;
  background: #ffffff;
  font-size: 11px;
  line-height: 1.3;
}

.catalog-search-item {
  padding: 4px 6px;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.catalog-search-item:nth-child(odd) {
  background: #f9f9f9;
}

.catalog-search-item:hover {
  background: #e5f3ff;
}

.catalog-search-code {
  font-weight: 600;
  font-family: monospace;
}

.catalog-search-desc {
  text-transform: none;
}

@media (max-width: 1024px) {
  body {
    flex-direction: column;
  }
  .app {
    flex-direction: column;
  }
  .panel-controles {
    width: 100%;
  }
  .preview-wrapper {
    justify-content: flex-start;
  }
}


/* Cabecera SVG (pixel) */
.cabecera-svg-full{width:100%;height:auto;display:block;}


/* ===== Ajustes solicitados ===== */
#page1, #page2 {
  background: #ffcc00 !important;
}
#page1 .header-wrap--svg {
  margin: 0 !important;
  padding: 0 !important;
}
#page1 .header-wrap--svg .cabecera-svg-full {
  width: 100%;
  height: auto;
  display: block;
}
.cabecera-blue-strip {
  background: #00347c; /* azul del SVG */
  color: #ffffff;
  font-weight: 900;
  font-size: 28px;
  padding: 10px 16px;
  line-height: 1.1;
}
.cabecera-blue-strip:focus {
  outline: 3px solid rgba(0,52,124,.25);
}


/* ===== Ajuste PROMOCIÓN (caja blanca como en el diseño) ===== */
.cabecera-blue-strip{
  background:#ffffff !important;
  color:#00347c !important;
  border-radius:16px;
  /* margen lateral alineado visualmente con el contenido del SVG */
  margin: 14px 6% 0 6%;
  padding: 14px 18px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.15;
  box-shadow: 0 10px 22px rgba(0,0,0,.14);
}
.cabecera-blue-strip:focus{
  outline: 3px solid rgba(0,52,124,.25);
}


/* ===== Ajuste final: promo encima del SVG ===== */
#page1 .header-wrap--svg{ position: relative; }

#page1 .header-wrap--svg .cabecera-blue-strip{
  position: absolute;
  top: 0;
  left: 30px;
  right: 250px;
  margin: 0 !important;

  font-size: 14px !important;
  line-height: 1.2;

  /* Mantener estilo caja blanca */
  background: #ffffff !important;
  color: #00347c !important;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 10px 22px rgba(0,0,0,.14);
  z-index: 5;
}


/* ===== Ajuste final solicitado: promo a top 240px ===== */
#page1 .header-wrap--svg .cabecera-blue-strip{
  top: 240px !important;
}


/* ===== Página 2: mapa fijo desde raíz (mapa.svg) ===== */
#page2{ position: relative; }
#page2-map-svg{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  pointer-events: none;
}
#page2-map-svg .page2-map-svg-img{
  width: 100%;
  height: auto;
  display: block;
}


/* ===== v7: compactar rejilla para que no tape el mapa ===== */
.products-grid{
  gap: 0 !important;
  row-gap: 0 !important;
  column-gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Reducir un poco el tamaño del contenedor de producto */
:root{
  --bubble-size: 48mm;
}


/* ===== v7 patch: ocultar controles no usados sin romper JS ===== */
.is-hidden{ display:none !important; }

/* Ocultar textos editables de IVA / oferta (mantener DOM) */
.footer-bottom span[contenteditable="true"]{ display:none !important; }

/* Textos fijos al final de página 1 */
.footer-bottom-fixed{
  margin-top: 2mm;
}
.footer-bottom-fixed span{
  color: #ffffff;
}


/* ===== v8: ajustar textos fijos de página 1 ===== */
#page1{ position: relative; }
.footer-bottom-fixed{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  /* margen lateral alineado con los productos */
  padding-left: 6%;
  padding-right: 6%;
  margin: 0 !important;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.footer-bottom-fixed span{
  color: #00347c !important; /* azul corporativo */
  font-size: 16px;
  font-weight: 800;
}


/* ===== Ajustes página 2 ===== */
.page2-header-inner{
  margin-bottom: 20px;
}
.page2-title{
  background: #00347c;
}


/* ===== Ajuste final: footer página 1 ===== */
#page1 .footer-bottom-fixed{
  bottom: 50px !important;
}


/* ===== Producto destacado: logo Bielsa ===== */
.featured-logo{
  top: 12px !important;
  right: 12px !important;
}


/* Catálogo resultados (destacado) */
#featured-catalog-results{
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.catalog-result-item{
  width: 100%;
  text-align: left;
  border: 2px solid rgba(0,52,124,.15);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
.catalog-result-item b{ display:block; font-weight: 900; color:#00347c; }
.catalog-result-item span{ display:block; font-size: .95rem; opacity:.9; }
.catalog-result-item:hover{ border-color: rgba(0,52,124,.35); }


/* ===== Ajuste: producto destacado logo (posición) ===== */
.featured-logo{
  top: 50px !important;
  right: 60px !important;
}

.catalog-hint{
  background:#fff;
  border:2px solid rgba(0,52,124,.15);
  border-radius:10px;
  padding:8px 10px;
  font-size:.95rem;
  opacity:.9;
}


/* ===== Producto destacado: código de producto ===== */
.featured-code{
  position: absolute;
  left: 60px;
  bottom: 50px;
  background: #00347c;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.6rem;
  padding: 10px 14px;
  border-radius: 14px;
  line-height: 1;
}


/* ===== Producto destacado: imagen sin deformar ===== */
.featured-left, .featured-left-inner{
  overflow: hidden;
}
#featured-image{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}


/* ===== TV MODE ===== */
.tv-stage{
  width: 100%;
  height: calc(100vh - 0px);
  display:flex;
  align-items:center;
  justify-content:center;
  background:#000;
}
.preview-wrapper #preview-tv .tv-stage{
  height: 100%;
  background: transparent;
}
.tv-safe{
  width: min(100%, 960px);
  aspect-ratio: 16 / 9;
  display:flex;
  align-items:center;
  justify-content:center;
}
.preview-wrapper #preview-tv .tv-safe{
  width: min(100%, 1100px);
}
.tv-featured-card{
  width:100%;
  height:100%;
  transform: none;
  border: 6px solid var(--blue-strong, #0b3b87);
  border-radius: 20px;
  overflow:hidden;
}
.tv-featured-card .featured-title{ font-size: 3.2rem; }
.tv-featured-card .featured-desc{ font-size: 2rem; }
.tv-featured-card .featured-price-bubble{ transform: scale(1.1); transform-origin: top right; }
.tv-featured-card .featured-left-inner img{ object-fit: contain; }

.tv-slots{
  display:flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}
.tv-product-card{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  background:#fff;
  cursor:pointer;
}
.tv-product-card.active{
  outline: 3px solid var(--yellow-strong, #f5c400);
}
.tv-thumb{
  width:64px;
  height:48px;
  flex:0 0 auto;
  border-radius:10px;
  overflow:hidden;
  background:#f2f2f2;
}
.tv-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.tv-meta{ flex:1; min-width:0; }
.tv-code{ font-weight:800; font-size:.9rem; }
.tv-name{ font-size:.85rem; opacity:.9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }


/* === Ajustes UI TV === */
.mode-switch{ flex-wrap:wrap; gap:8px; }
.mode-switch .mode-btn{ flex:1 1 calc(50% - 8px); }
.mode-switch .mode-btn:nth-child(3){ flex-basis:100%; }
#controls-tv .tv-slots{ max-height:340px; overflow-y:auto; padding-right:6px; }


/* === TV CABECERA (preview) === */
.tv-safe{ position:relative; }
.tv-cabecera{ position:absolute; top:0; left:0; width:100%; height:100px; z-index:20; }
.tv-cabecera img{ width:100%; height:100%; object-fit:cover; display:block; }
#preview-tv .tv-stage{ position:relative; }
#preview-tv .tv-featured-card{ padding-top:100px; box-sizing:border-box; }




/* === Controles extra slots TV === */
#controls-tv .tv-product-card{ position:relative; }
#controls-tv .tv-extra{ display:flex; gap:8px; align-items:center; margin-top:6px; flex-wrap:wrap; }
#controls-tv .tv-ptag-select{
  width:68px;
  padding:6px 8px;
  border:1px solid rgba(0,0,0,.15);
  border-radius:10px;
  background:#fff;
  font-weight:800;
}
#controls-tv .tv-green-input{
  flex:1;
  min-width:180px;
  padding:6px 10px;
  border:1px solid rgba(0,0,0,.15);
  border-radius:10px;
}
#controls-tv .tv-clear-btn{
  padding:6px 10px;
  border:1px solid rgba(0,0,0,.18);
  border-radius:10px;
  background:#fff;
  cursor:pointer;
  font-weight:800;
}
#controls-tv .tv-clear-btn:hover{ filter:brightness(.98); }

.tv-green-amount{ margin-top:16px; font-weight:800; color:#1fa34a; }
.featured-ptag{ font-size:1.25em; }


/* === AJUSTES SOLICITADOS (featured-middle / featured-code) === */
:root{
  --featured-code-size: 2.4rem;
}

.featured-middle{
  margin-top: 170px !important;
}

.featured-code{
  margin-top: 130px !important;
  font-size: calc(var(--featured-code-size) + 1rem) !important;
}


/* === AJUSTE VISOR TV (featured-right) === */
.featured-right{
  margin-top: 0px !important;
}


/* === TV FULLSCREEN SIN BORDE (usuario) === */
#tv-stage, .tv-stage { width: 100%; height: 100%; }
.tv-safe { width: 100%; height: 100%; padding: 0 !important; box-sizing: border-box; }
.tv-featured-card { width: 100%; height: 100%; border: none !important; border-radius: 0 !important; box-shadow: none !important; }
