/* Ban Countdown Bar - ficha de producto (diseño caja negra / Black Friday)
 *
 * Todo va siempre en UNA fila: TÍTULO | OFERTA ...... [DÍAS] [HORAS] [MIN] [SEG]
 * Las medidas están en "em": en columnas estrechas (móvil, quickview...) el bloque
 * entero se reduce proporcionalmente en lugar de pasar a varias líneas.
 */
.bancdb-list { margin: 1rem 0; }

.bancdb {
  --bancdb-bg: #141414;          /* fondo de la caja */
  --bancdb-text: #ffffff;        /* texto principal */
  --bancdb-accent: #f5b72a;      /* amarillo: FRIDAY, oferta, números */
  --bancdb-divider: #4a4a4a;     /* línea vertical entre título y oferta */
  --bancdb-box-bg: #1f1f1f;      /* cajas del contador */
  --bancdb-box-border: #5a5a5a;  /* borde de las cajas del contador */
  --bancdb-label: #e5e5e5;       /* DÍAS / HORAS / MIN / SEG */
  --bancdb-radius: 0.75em;

  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5em;
  padding: 1.25em 1.75em;
  border-radius: var(--bancdb-radius);
  background: var(--bancdb-bg);
  color: var(--bancdb-text);
  font-size: 16px;               /* tamaño base (escritorio); ver escalado abajo */
  line-height: 1.2;
}
.bancdb + .bancdb { margin-top: 0.5rem; }
.bancdb *,
.bancdb *::before,
.bancdb *::after { box-sizing: border-box; }

/* ---- Bloque izquierdo: título + oferta ---- */
.bancdb__message {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}
.bancdb__content {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1.75em;
}
.bancdb__content,
.bancdb__content * {
  color: var(--bancdb-text) !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
.bancdb__content p,
.bancdb__content h1, .bancdb__content h2, .bancdb__content h3,
.bancdb__content h4, .bancdb__content h5, .bancdb__content h6 {
  margin: 0;
  padding: 0;
  font-family: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
/* Restos del editor que el tema puede pintar como barras (líneas, párrafos vacíos) */
.bancdb__content hr,
.bancdb__content p:empty,
.bancdb__content div:empty { display: none !important; }
.bancdb__content a { text-decoration: underline; }

/* Título (primer párrafo del mensaje): BLACK / FRIDAY */
.bancdb .bancdb__title {
  flex: 0 0 auto;
  padding-right: 0.78em;         /* ≈ 28px a tamaño completo */
  border-right: 1px solid var(--bancdb-divider) !important;
  font-size: 2.25em;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}
.bancdb__title * { font-size: inherit; font-weight: inherit; }
.bancdb .bancdb__title strong,
.bancdb .bancdb__title b,
.bancdb .bancdb__title em,
.bancdb .bancdb__title span[style] { color: var(--bancdb-accent) !important; font-style: normal; }

/* Oferta (resto del mensaje): "25% DTO." + "Con el cupón VITALDAYS" */
.bancdb__offer {
  min-width: 0;
  font-size: 1.125em;
  font-weight: 500;
  line-height: 1.3;
}
.bancdb__offer > :first-child {
  margin-bottom: 0.15em;
  font-size: 1.667em;            /* ≈ 30px a tamaño completo */
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}
.bancdb .bancdb__offer > :first-child,
.bancdb .bancdb__offer > :first-child * { color: var(--bancdb-accent) !important; }
/* Si el mensaje tiene un único bloque no se convierte en título: se muestra como oferta */
.bancdb__content > :only-child:not(.bancdb__title) { font-size: 1.125em; font-weight: 500; }
.bancdb__content strong,
.bancdb__content b { font-weight: 800; }

/* ---- Contador ---- */
.bancdb__timer {
  flex: 0 0 auto;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 1.125em;
  font-variant-numeric: tabular-nums;
}
.bancdb__unit {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
}
.bancdb__value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2em;                /* caja de 60px a tamaño completo */
  height: 2em;
  padding: 0 0.27em;
  border: 2px solid var(--bancdb-box-border);
  border-radius: 0.375em;
  background: var(--bancdb-box-bg);
  color: var(--bancdb-accent);
  font-size: 1.875em;
  font-weight: 700;
  line-height: 1;
}
.bancdb__label {
  font-size: 0.9375em;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--bancdb-label);
}

/* ---- Escalado según el ancho disponible ----
 * A partir de ~800px de ancho se ve a tamaño completo; por debajo todo se reduce
 * en proporción para que siga cabiendo en una sola fila. */
@media (max-width: 575.98px) {
  .bancdb { font-size: 2.15vw; gap: 1em; padding: 1em 1.25em; } /* navegadores sin container queries */
}
@supports (container-type: inline-size) {
  .bancdb-list { container-type: inline-size; }
  .bancdb { font-size: clamp(6px, 2cqi, 16px); }
  @container (max-width: 640px) {
    .bancdb { font-size: clamp(6px, 2.35cqi, 16px); gap: 1em; padding: 1em 1.25em; }
    .bancdb__content { gap: 1.1em; }
    .bancdb .bancdb__title { padding-right: 0.5em; }
    .bancdb__timer { gap: 0.6em; }
    .bancdb__label { font-size: max(0.85em, 8px); }
    .bancdb__offer { font-size: max(1.125em, 10px); }
  }
}

/* Ajustes por ubicación */
.bancdb-list--displayAfterProductThumbs { margin: 1rem 0; }
.bancdb-list--displayProductBadges { margin: 0.5rem 0; }

/* Avisos ocultos por no coincidir con la combinación elegida */
.bancdb[hidden],
.bancdb-list[hidden] { display: none !important; }
