/******* Do not edit this file *******
Woody Code Snippets CSS and JS
Saved: May 12 2026 | 08:33:18 */
/* ============================================================================
   PATECO — Loop "Comercio Minorista en cifras" · Diseño EN CIFRAS
   ----------------------------------------------------------------------------
   Woody: Tipo CSS · Cabecera · Automatic Insertion ON
          Display Conditions: Page ID = 21841 (Home PATECO v2)
   
   Aplica el estilo del bloque "EN CIFRAS" al loop dinámico del observatorio
   que ya existe (#comercio_minorista_cifras).
   ============================================================================ */

/* ============ VARIABLES ============ */
#comercio_minorista_cifras {
  --kpi-navy: #1B3A5C;
  --kpi-accent: #2980B9;
  --kpi-red: #E74C3C;
  --kpi-green: #27AE60;
  --kpi-text: #2C3E50;
  --kpi-muted: #5B6B7D;
  --kpi-border: #E5E9EF;
  --kpi-bg: #FFFFFF;
}

/* ============ CONTENEDOR PRINCIPAL ============ */
#comercio_minorista_cifras {
  display: grid !important;
  grid-template-columns: 1fr;
  grid-template-areas:
    "head"
    "stats";
  gap: 0 !important;
  max-width: 1180px;
  margin: 0 auto !important;
  background: #FFFFFF !important;
  border: 1px solid var(--kpi-border) !important;
  border-radius: 12px !important;
  padding: 26px 34px 30px !important;
  box-shadow: 0 2px 14px rgba(15,23,42,0.04) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  white-space: normal !important;
  color: var(--kpi-text) !important;
}

/* ============ BLOQUE 1: HEADER (Comercio Minorista en cifras · Datos CV) ============ */
#comercio_minorista_cifras > .bloque:first-child {
  grid-area: head;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid var(--kpi-border) !important;
  margin-bottom: 24px !important;
  background: transparent !important;
  text-align: left !important;
}

#comercio_minorista_cifras > .bloque:first-child > .column {
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
  gap: 12px !important;
  text-align: left !important;
}

#comercio_minorista_cifras > .bloque:first-child .destacado.moresize {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.18em !important;
  color: var(--kpi-muted) !important;
  text-transform: uppercase !important;
}

#comercio_minorista_cifras > .bloque:first-child > .column > span:not(.destacado) {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: var(--kpi-muted) !important;
  letter-spacing: 0.04em !important;
}

/* Pseudo-elemento "IR AL OBSERVATORIO →" en el header */
#comercio_minorista_cifras > .bloque:first-child::after {
  content: 'IR AL OBSERVATORIO →';
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--kpi-navy);
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s;
}
#comercio_minorista_cifras > .bloque:first-child:hover::after {
  color: var(--kpi-accent);
}

/* ============ BLOQUES 2-4: KPIs (3 columnas) ============ */
/* Wrapper virtual: convertimos los bloques 2-N en un grid 3 columnas */
#comercio_minorista_cifras {
  position: relative;
}

#comercio_minorista_cifras > .bloque:nth-child(n+2) {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  background: transparent !important;
  text-align: left !important;
}

/* Container para los 3 KPIs usando grid auto-flow */
#comercio_minorista_cifras::before {
  content: '';
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  width: 100%;
}

/* Posicionar los bloques KPI con grid */
#comercio_minorista_cifras {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    "head head head"
    "kpi1 kpi2 kpi3";
  gap: 0 28px !important;
}
#comercio_minorista_cifras > .bloque:first-child { grid-area: head; }
#comercio_minorista_cifras > .bloque:nth-child(2) { grid-area: kpi1; }
#comercio_minorista_cifras > .bloque:nth-child(3) { grid-area: kpi2; }
#comercio_minorista_cifras > .bloque:nth-child(4) { grid-area: kpi3; }

/* Eliminar el pseudo-elemento extra */
#comercio_minorista_cifras::before {
  display: none;
}

/* ============ KPI INDIVIDUAL ============ */

/* Etiqueta del KPI (ej: "Afiliaciones Seg. Social.") */
#comercio_minorista_cifras > .bloque:nth-child(n+2) .destacado {
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  color: var(--kpi-muted) !important;
  text-transform: uppercase !important;
  display: block !important;
  margin-bottom: 4px !important;
  order: 2;
}

/* Fecha del dato (ej: "Marzo 2026") - lo ocultamos en el header del KPI, va abajo */
#comercio_minorista_cifras > .bloque:nth-child(n+2) > .column > .cifras_fecha {
  font-size: 11px !important;
  color: var(--kpi-muted) !important;
  font-weight: 500 !important;
  order: 3;
  margin-bottom: 12px !important;
}

/* Column reordering */
#comercio_minorista_cifras > .bloque:nth-child(n+2) > .column {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  order: 2;
  margin-top: 8px !important;
}

/* ============ FILA CON ICONO + DATO + LABEL ============ */
#comercio_minorista_cifras > .bloque:nth-child(n+2) .row {
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  order: 1;
  margin-bottom: 8px !important;
}

/* La fila con el dato principal (afiliaciones, var, puntos) */
#comercio_minorista_cifras > .bloque:nth-child(2) > .bloque .row:first-child .cifras_dato {
  font-size: clamp(32px, 4vw, 46px) !important;
  font-weight: 800 !important;
  color: var(--kpi-text) !important;
  line-height: 1 !important;
  letter-spacing: -0.02em !important;
}

/* Dato cifras_dato general */
#comercio_minorista_cifras .cifras_dato {
  font-size: clamp(28px, 3.6vw, 40px) !important;
  font-weight: 800 !important;
  color: var(--kpi-text) !important;
  line-height: 1 !important;
  letter-spacing: -0.02em !important;
}

/* Label "afiliaciones", "Var. interanual", "Puntos" */
#comercio_minorista_cifras .cifras_fecha {
  font-size: 12px !important;
  color: var(--kpi-muted) !important;
  font-weight: 500 !important;
}

/* ============ FLECHAS Y DELTAS (segunda fila) ============ */

/* Wrapper de la variación (segunda fila): icono + signo + número + texto */
#comercio_minorista_cifras > .bloque:nth-child(n+2) .row:nth-of-type(2),
#comercio_minorista_cifras > .bloque:nth-child(n+2) > .row {
  font-size: 13px !important;
  font-weight: 700 !important;
  margin-top: 4px !important;
  gap: 4px !important;
}

/* Flecha hacia arriba (verde) */
#comercio_minorista_cifras .fa-angle-double-up,
#comercio_minorista_cifras .fa-arrow-up {
  color: var(--kpi-green) !important;
  font-size: 14px !important;
}

/* Flecha hacia abajo (rojo) */
#comercio_minorista_cifras .fa-angle-double-down,
#comercio_minorista_cifras .fa-arrow-down {
  color: var(--kpi-red) !important;
  font-size: 14px !important;
}

/* Reglas para que el dato y label de la fila de variación sean pequeños */
#comercio_minorista_cifras > .bloque:nth-child(n+2) > .row .cifras_dato,
#comercio_minorista_cifras > .bloque:nth-child(2) > .bloque .row:nth-of-type(2) .cifras_dato,
#comercio_minorista_cifras > .bloque:nth-child(n+3) > .row .cifras_dato {
  font-size: 14px !important;
  font-weight: 700 !important;
}

#comercio_minorista_cifras > .bloque:nth-child(n+2) > .row .cifras_fecha,
#comercio_minorista_cifras > .bloque:nth-child(2) > .bloque .row:nth-of-type(2) .cifras_fecha,
#comercio_minorista_cifras > .bloque:nth-child(n+3) > .row .cifras_fecha {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--kpi-muted) !important;
}

/* Color del signo + o - junto al dato */
#comercio_minorista_cifras > .bloque:nth-child(n+2) > .row span:not(.cifras_dato):not(.cifras_fecha):not(.destacado),
#comercio_minorista_cifras > .bloque:nth-child(2) > .bloque .row:nth-of-type(2) span:not(.cifras_dato):not(.cifras_fecha):not(.destacado) {
  color: var(--kpi-green) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}

/* Cuando la fila contiene flecha hacia abajo, los textos van en rojo */
#comercio_minorista_cifras > .bloque:nth-child(n+2) > .row:has(.fa-angle-double-down) span:not(.cifras_fecha),
#comercio_minorista_cifras > .bloque:nth-child(n+2) > .row:has(.fa-arrow-down) span:not(.cifras_fecha) {
  color: var(--kpi-red) !important;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  #comercio_minorista_cifras {
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas:
      "head head"
      "kpi1 kpi2"
      "kpi3 kpi3" !important;
  }
}

@media (max-width: 640px) {
  #comercio_minorista_cifras {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "head"
      "kpi1"
      "kpi2"
      "kpi3" !important;
    padding: 22px 18px 24px !important;
    gap: 22px 0 !important;
  }
  
  #comercio_minorista_cifras > .bloque:nth-child(n+2) {
    padding-bottom: 22px !important;
    border-bottom: 1px solid var(--kpi-border) !important;
  }
  
  #comercio_minorista_cifras > .bloque:last-child {
    padding-bottom: 0 !important;
    border-bottom: none !important;
  }
  
  #comercio_minorista_cifras > .bloque:first-child::after {
    font-size: 11px;
  }
}

/* ============ ELIMINAR ESTILOS LEGACY DEL TEMA HIJO ============ */
#comercio_minorista_cifras p,
#comercio_minorista_cifras .moresize {
  font-family: 'Inter', sans-serif !important;
}

/* Quitar el color rojo legacy del párrafo */
#comercio_minorista_cifras > p {
  display: none !important;
}