/* ==========================================================================
   TEMA CYBER WEEK (semana del Cyber Monday)
   Capa encima del diseño normal. Solo se carga cuando TEMA_CYBERWEEK es true
   (template/controllers.php) y actúa bajo body.tema-cw.

   Criterio visual: tecnológico pero limpio. Azul noche como color principal,
   cian eléctrico como acento (siempre sobre fondo oscuro), un degradado sutil
   a violeta en las piezas destacadas y magenta solo para el precio tachado.
   ========================================================================== */

.tema-cw {
  --cw-noche: #0b1026;
  --cw-noche-2: #1a2147;
  --cw-violeta: #5b3fd6;
  --cw-gris: #636a82;
  --cw-linea: #dfe3f1;
  --cw-neon: #22d3ee;          /* acento, sobre fondo oscuro */
  --cw-neon-texto: #0e7490;    /* versión legible sobre blanco */
  --cw-hielo: #f3f6fd;
  --cw-hielo-oscuro: #e3e9fb;
  --cw-rosa: #d61f69;
  --cw-degradado: linear-gradient(110deg, var(--cw-noche) 0%, var(--cw-noche-2) 55%, var(--cw-violeta) 130%);

  /* Variables del diseño base (css/globals.css) */
  --color-brand-900: var(--cw-noche);
  --color-brand-800: var(--cw-noche);
  --color-brand-700: var(--cw-noche-2);
  --color-accent-300: var(--cw-hielo-oscuro);
  --color-accent-200: var(--cw-neon);
  --color-accent-200-50: rgba(34, 211, 238, 0.5);
}

/* --------------------------------------------------------------------------
   Barra superior
   -------------------------------------------------------------------------- */
.cw-barra {
  display: block;
  background: var(--cw-degradado);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  text-decoration: none;
}

.cw-barra-fija {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 38px;
  padding: 0 16px;
}

.cw-barra-fija strong {
  color: var(--cw-neon);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cw-barra-lema {
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.cw-barra-cuenta {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.6);
}

.cw-barra-cuenta b {
  font-weight: 600;
  color: #fff;
}

.cw-barra-cta {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(34, 211, 238, 0.6);
  text-underline-offset: 3px;
}

.cw-barra:hover .cw-barra-cta {
  text-decoration-color: var(--cw-neon);
}

@media (max-width: 700px) {
  .cw-barra-lema,
  .cw-barra-cta { display: none; }
  .cw-barra-fija { gap: 12px; font-size: 12px; }
}

/* --------------------------------------------------------------------------
   Home
   -------------------------------------------------------------------------- */
.cw-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: -56px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--cw-linea);
  border-radius: 999px;
  color: var(--cw-noche);
  font-size: 14px;
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.cw-hero-chip:hover {
  border-color: var(--cw-noche);
}

.cw-hero-chip span {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--cw-noche);
  color: var(--cw-neon);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .cw-hero-chip { margin-bottom: -16px; font-size: 13px; }
}

.cw-card-promo {
  background: var(--cw-degradado);
  color: #fff;
}

.cw-card-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.cw-card-titulo {
  margin-top: 14px;
  font-size: 46px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -1.5px;
  color: var(--cw-neon);
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
}

.cw-card-texto {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
}

.cw-card-texto b {
  font-weight: 600;
  color: #fff;
}

.cw-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  margin-top: auto;
  padding: 3px 3px 3px 20px;
  border-radius: 999px;
  background: #fff;
  color: var(--cw-noche);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.cw-card-btn-circulo {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--cw-noche);
}

.cw-card-btn-circulo img {
  filter: brightness(0) invert(1);
}

@media (max-width: 1300px) {
  .cw-card-promo { min-height: 300px; }
}

/* --------------------------------------------------------------------------
   Sustitución de los colores fijos de Tailwind (clases tipo bg-[#175960])
   El flag "i" cubre también las variantes en mayúsculas (#11434C...).
   -------------------------------------------------------------------------- */

/* Fondos oscuros corporativos -> azul noche */
.tema-cw [class~="bg-[#11434c]" i],
.tema-cw [class~="bg-[#175960]" i] {
  background-color: var(--cw-noche);
}

.tema-cw [class~="bg-[#228a95]" i] {
  background-color: var(--cw-noche-2);
}

.tema-cw [class~="hover:bg-[#175960]" i]:hover,
.tema-cw [class~="hover:bg-[#228a95]" i]:hover {
  background-color: var(--cw-noche-2);
}

/* Fondos claros verdosos -> azul hielo */
.tema-cw [class~="bg-[#ceffee]" i] {
  background-color: var(--cw-hielo-oscuro);
}

.tema-cw [class~="bg-[#ecfdf7]" i],
.tema-cw [class~="bg-[#f0faf7]" i],
.tema-cw [class~="bg-[#e8f5f3]" i],
.tema-cw [class~="bg-[#f4fbfc]" i],
.tema-cw [class~="bg-[#f5faf9]" i] {
  background-color: var(--cw-hielo);
}

.tema-cw [class~="bg-[#dce8ec]" i] {
  background-color: #ececec;
}

.tema-cw [class~="bg-[rgba(34,138,149,0.3)]" i] {
  background-color: var(--cw-hielo-oscuro);
}

/* Textos */
.tema-cw [class~="text-[#11434c]" i],
.tema-cw [class~="text-[#175960]" i] {
  color: var(--cw-noche);
}

.tema-cw [class~="text-[#228a95]" i],
.tema-cw [class~="text-[#007d8b]" i],
.tema-cw [class~="text-[#006f7f]" i],
.tema-cw [class~="hover:text-[#228a95]" i]:hover {
  color: var(--cw-neon-texto);
}

.tema-cw [class~="text-[#ceffee]" i] {
  color: var(--cw-neon);
}

/* Bordes, anillos y controles */
.tema-cw [class~="border-[#11434c]" i],
.tema-cw [class~="border-[#175960]" i],
.tema-cw [class~="border-b-[#175960]" i],
.tema-cw [class~="border-[#228a95]" i] {
  border-color: var(--cw-noche);
}

.tema-cw footer [class~="border-b-[#175960]" i] {
  border-color: rgba(255, 255, 255, 0.12);
}

.tema-cw [class~="border-[rgba(34,138,149,0.2)]" i] {
  border-color: var(--cw-linea);
}

.tema-cw [class~="ring-[#11434c]" i],
.tema-cw [class~="ring-[#175960]" i] {
  --tw-ring-color: var(--cw-noche);
}

.tema-cw [class~="accent-[#11434c]" i],
.tema-cw [class~="accent-[#175960]" i] {
  accent-color: var(--cw-noche);
}

.tema-cw [class~="focus:border-[#11434c]" i]:focus {
  border-color: var(--cw-noche);
}

/* --------------------------------------------------------------------------
   Colores fijos de las hojas propias (globals.css, courses.css)
   -------------------------------------------------------------------------- */
.tema-cw .mobile-sheet-cta {
  background: var(--cw-noche);
}

.tema-cw .mobile-sheet-promo::after {
  background: linear-gradient(180deg, rgba(11, 16, 38, 0) 38.22%, var(--cw-noche) 89.38%);
}

.tema-cw .filter-badge,
.tema-cw .cart-header-count {
  background: var(--cw-noche);
  color: #fff;
}

@media (max-width: 1100px) {
  .tema-cw footer {
    background: var(--cw-noche) !important;
  }
}

/* Iconos coloreados por filtro */
.tema-cw .icon-light {
  /* cian */
  filter: brightness(0) saturate(100%) invert(76%) sepia(53%) saturate(1300%)
    hue-rotate(148deg) brightness(97%) contrast(92%);
}

.tema-cw .icon-accent,
.tema-cw .icon-success {
  /* azul noche */
  filter: brightness(0) saturate(100%) invert(6%) sepia(35%) saturate(3600%)
    hue-rotate(220deg) brightness(92%) contrast(100%);
}

/* --------------------------------------------------------------------------
   Tarjetas de curso
   La tarjeta no tiene fondo ni padding: nada de sombras ni elevación,
   solo un zoom suave de la imagen.
   -------------------------------------------------------------------------- */
.tema-cw .course-media img {
  transition: transform 0.4s ease;
}

.tema-cw .course-card:hover .course-media img {
  transform: scale(1.03);
}

.cw-badge-dto {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--cw-noche);
  color: var(--cw-neon);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.tema-cw .price-row strong {
  color: var(--cw-noche);
}

.tema-cw .price-row .old {
  color: var(--cw-rosa);
}

.tema-cw .price-row .warn {
  border-color: var(--cw-linea);
  color: var(--cw-gris);
}

.tema-cw .courses-title {
  color: var(--cw-noche);
}

/* --------------------------------------------------------------------------
   Aviso con cuenta atrás (template/components/cyberweek/aviso.php)
   Listados, buscador y carrito
   -------------------------------------------------------------------------- */
.cw-aviso {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 22px 28px;
  border-radius: 16px;
  background: var(--cw-degradado);
  color: #fff;
}

.cw-aviso-copy {
  flex: 1;
  min-width: 0;
}

.cw-aviso-etiqueta {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cw-neon);
}

.cw-aviso-titulo {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #fff;
}

.cw-aviso-texto {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
}

.cw-aviso-cuenta {
  display: flex;
  flex-shrink: 0;
}

.cw-aviso-cuenta span {
  display: flex;
  min-width: 60px;
  flex-direction: column;
  align-items: center;
  padding: 0 14px;
}

.cw-aviso-cuenta span + span {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.cw-aviso-cuenta b {
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.cw-aviso-cuenta small {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 900px) {
  .cw-aviso {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px 20px;
  }
  .cw-aviso-titulo { font-size: 17px; }
  .cw-aviso-cuenta {
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }
  .cw-aviso-cuenta span { flex: 1; min-width: 0; padding: 0 6px; }
  .cw-aviso-cuenta b { font-size: 22px; }
}

/* --------------------------------------------------------------------------
   Ficha de producto
   -------------------------------------------------------------------------- */
.tema-cw .purchase-card {
  overflow: hidden;
}

.cw-compra-cabecera {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 10px;
  margin: -20px -18px 18px;
  padding: 11px 18px;
  background: var(--cw-degradado);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.cw-compra-etiqueta {
  color: var(--cw-neon);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cw-compra-cuenta {
  font-variant-numeric: tabular-nums;
}

.cw-compra-cuenta b {
  font-weight: 600;
  color: #fff;
}

.tema-cw .price-row-main .old {
  color: var(--cw-rosa);
}

.tema-cw .offer-tag {
  border: 1px solid var(--cw-linea);
  color: var(--cw-gris);
}

.tema-cw .btn-enroll {
  border-color: var(--cw-noche);
  background: var(--cw-noche);
  color: #fff;
  transition: background-color 0.2s ease;
}

.tema-cw .btn-enroll span {
  background: var(--cw-neon);
  color: var(--cw-noche);
}

.tema-cw .btn-enroll:hover {
  background: var(--cw-noche-2);
}

@media (max-width: 1100px) {
  .tema-cw .mobile-enroll-btn {
    border-color: var(--cw-noche);
    background: var(--cw-noche);
    color: #fff;
  }
  .tema-cw .mobile-enroll-btn span {
    background: var(--cw-neon);
  }
}

/* --------------------------------------------------------------------------
   Carrito / checkout
   -------------------------------------------------------------------------- */
.tema-cw .summary-box {
  border-color: var(--cw-linea);
  background: var(--cw-hielo);
}

.tema-cw .summary-box .line + .line {
  border-top-color: var(--cw-linea);
}

.cw-ahorro {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 2px solid var(--cw-neon);
  color: var(--cw-gris);
  font-size: 13px;
  line-height: 1.4;
}

.cw-ahorro span {
  color: var(--cw-neon-texto);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cw-ahorro strong {
  color: var(--cw-noche);
  font-weight: 600;
}

.tema-cw .pay-btn {
  background: var(--cw-noche);
  transition: background-color 0.2s ease;
}

.tema-cw .pay-btn span {
  background: var(--cw-neon);
}

.tema-cw .pay-btn:hover {
  background: var(--cw-noche-2);
}

.tema-cw .method input {
  accent-color: var(--cw-noche);
}
