/*
Theme Name:   SERAL (Divi child)
Theme URI:    https://seral.cl
Description:  Tema hijo de Divi para SERAL. Solo estilos (v2: estética menos genérica). No cambia estructura, contenido, menús ni URLs. Para volver atrás: activar Divi.
Author:       SERAL
Template:     Divi
Version:      1.0.3
Text Domain:  seral-divi-child
*/

/* ==========================================================
   Tokens (ver DESIGN.md)
   ========================================================== */
:root {
  --s-navy: #25306D;
  --s-navy-ink: #1B2456;
  --s-night: #10142E;
  --s-yellow: #F5C322;
  --s-yellow-hover: #E8B512;
  --s-lav: #D6CEEA;
  --s-lav-line: #B9B3DA;
  --s-text: #3B4054;
  --s-muted: #5F6478;
  --s-line: #DADCE3;
  --s-line-strong: #B9BCC8;
  --s-alt: #F4F4F2;
  --s-r: 4px;
  --s-r-tag: 3px;
}

/* ==========================================================
   1 · Esquinas y profundidad: radio 4px, sin sombras ni "flotar"
   ========================================================== */
html body .et-l--header .et_pb_section { box-shadow: none !important; border-bottom: 1px solid var(--s-line); }

html body .seral-prod .sp-card,
html body .seral-svc .sv-card,
html body .seral-types div,
html body .seral-cat .et_pb_gallery_item,
html body .seral-quote form,
html body .seral-cta-band { border-radius: var(--s-r) !important; box-shadow: none !important; }

html body .seral-prod .sp-card,
html body .seral-svc .sv-card { border: 1px solid var(--s-line) !important; transition: border-color .15s ease !important; }
html body .seral-prod .sp-card:hover,
html body .seral-svc .sv-card:hover,
html body .seral-cat .et_pb_gallery_item:hover { transform: none !important; box-shadow: none !important; border-color: var(--s-line-strong) !important; }

html body .seral-eco .ec-media img,
html body .seral-svlist .sv-row img,
html body .seral-imgs img,
html body .seral-gal .et_pb_gallery_image,
html body .seral-foot .sf-map iframe,
html body .seral-video,
html body .seral-video .et_pb_video_box,
html body .seral-video iframe { border-radius: var(--s-r) !important; box-shadow: none !important; }

html body .seral-quote input,
html body .seral-quote select,
html body .seral-quote textarea { border-radius: var(--s-r) !important; border-color: var(--s-line-strong) !important; }

/* Botón del slide "Planta de termopaneles" */
html body .et_pb_fullwidth_slider_0 .et_pb_more_button {
  border-radius: var(--s-r) !important; border-width: 1.5px !important;
  border-color: rgba(255,255,255,.85) !important; color: #fff !important;
  letter-spacing: .04em !important; box-shadow: none !important;
}

/* ==========================================================
   2 · Amarillo solo para la acción principal
   ========================================================== */
html body .et-l--header .seral-cta { background: var(--s-navy) !important; color: #fff !important; font-weight: 600 !important; }
html body .et-l--header .seral-cta:hover { background: var(--s-navy-ink) !important; }
html body .seral-foot h3 { color: var(--s-lav) !important; }

/* ==========================================================
   3 · Hero: velo plano, foto con su color real, sin animación de entrada
   ========================================================== */
html body .et_pb_slide:has(.seral-hero) .et_pb_slide_overlay_container { background: rgba(16,20,40,.6) !important; }
html body .et_pb_slide:has(.seral-hero) .et_pb_slide_description,
html body .et_pb_slide:has(.seral-hero).et-pb-active-slide .et_pb_slide_description {
  animation: none !important; -webkit-animation: none !important; opacity: 1 !important; transform: none !important;
}
html body .seral-hero .sh-eyebrow { display: flex !important; align-items: center; gap: 12px; font-weight: 600 !important; }
html body .seral-hero .sh-eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--s-lav); flex: 0 0 auto; }
html body .seral-hero .sh-sub { color: #E2E4EE !important; }

/* Más aire entre el header y el texto del hero (sin animación, el texto quedaba pegado al header) */
@media (min-width: 981px) { html body .seral-hero { margin-top: 64px !important; } }
html body .seral-prod .sp-intro { color: var(--s-text) !important; max-width: 420px !important; }

/* ==========================================================
   4 · Píldoras → etiquetas rectangulares
   ========================================================== */
html body .seral-prod .sp-chip,
html body .seral-svlist .sv-chips span {
  background: transparent !important; border: 1px solid var(--s-line) !important;
  border-radius: var(--s-r-tag) !important; color: #1E2235 !important; font-weight: 400 !important;
}
html body .seral-prod .sp-chip.new {
  border-color: var(--s-navy) !important; border-left: 3px solid var(--s-navy) !important;
  background: transparent !important; color: #1E2235 !important;
}
html body .seral-prod .sp-chips-label { color: var(--s-muted) !important; font-weight: 600 !important; }
html body .seral-filter button {
  background: transparent !important; border: 1px solid var(--s-line) !important;
  border-radius: var(--s-r-tag) !important; color: var(--s-navy) !important;
}
html body .seral-filter button:hover { border-color: var(--s-navy) !important; }
html body .seral-filter button.on { background: var(--s-navy) !important; border-color: var(--s-navy) !important; color: #fff !important; }

/* ==========================================================
   5 · Botones: 3 roles
   ========================================================== */
/* Principal (amarillo) */
html body .seral-hero .sh-btn.primary,
html body .seral-ph .ph-btn,
html body .seral-cta-band a,
html body .seral-quote button {
  background: var(--s-yellow) !important; color: var(--s-navy-ink) !important;
  border-radius: var(--s-r) !important; font-weight: 700 !important; box-shadow: none !important;
}
html body .seral-hero .sh-btn.primary:hover,
html body .seral-ph .ph-btn:hover,
html body .seral-cta-band a:hover,
html body .seral-quote button:hover { background: var(--s-yellow-hover) !important; }
/* Secundario (borde) */
html body .seral-hero .sh-btn.ghost { border: 1.5px solid rgba(255,255,255,.85) !important; border-radius: var(--s-r) !important; font-weight: 600 !important; }
html body .seral-hero .sh-btn.ghost:hover { background: rgba(255,255,255,.08) !important; }
html body .seral-eco .ec-btn {
  background: transparent !important; color: var(--s-navy) !important;
  border: 1.5px solid var(--s-navy) !important; border-radius: var(--s-r) !important; font-weight: 600 !important;
}
html body .seral-eco .ec-btn:hover { background: var(--s-navy) !important; color: #fff !important; }
/* Link de acción */
html body .seral-prod .sp-link,
html body .seral-svlist .sv-link,
html body .seral-eco .ec-link,
html body .seral-foot .sf-link,
html body .seral-cat .sq-consult,
html body .seral-bio p a,
html body .seral-eco .ec-note a {
  color: var(--s-navy) !important; font-weight: 600 !important;
  text-decoration: underline !important; text-underline-offset: 4px; text-decoration-color: var(--s-lav-line) !important;
  display: inline-flex; align-items: center; gap: 4px;
}
html body .seral-foot .sf-link { color: #fff !important; text-decoration-color: rgba(214,206,234,.6) !important; }
html body .seral-prod .sp-link:hover,
html body .seral-svlist .sv-link:hover,
html body .seral-eco .ec-link:hover,
html body .seral-cat .sq-consult:hover { text-decoration-color: var(--s-navy) !important; }
html body .s-chev { width: 14px; height: 14px; flex: 0 0 auto; }
/* Foco visible con teclado */
html body .seral-hero a:focus-visible,
html body .seral-ph a:focus-visible,
html body .seral-cta-band a:focus-visible,
html body .seral-quote button:focus-visible,
html body .seral-filter button:focus-visible,
html body .et-l--header .seral-cta:focus-visible,
html body .seral-prod .sp-card:focus-visible { outline: 2px solid var(--s-yellow); outline-offset: 2px; }

/* ==========================================================
   6 · Íconos: viñetas cuadradas en vez de ✓ (las flechas → las cambia seral.js por un SVG)
   ========================================================== */
html body .seral-hero .sh-checks span::before {
  content: "" !important; width: 6px; height: 6px; background: var(--s-lav);
  display: inline-block; margin-right: 10px !important; vertical-align: middle; position: relative; top: -1px;
}
html body .seral-eco li::before {
  content: "" !important; width: 6px !important; height: 6px !important; background: var(--s-navy);
  top: .6em !important; left: 4px !important;
}

/* ==========================================================
   7 · Ritmo de espaciado + línea bajo el encabezado de cada sección
   ========================================================== */
html body #productos.et_pb_section { padding-top: 88px !important; padding-bottom: 80px !important; }
html body #servicios.et_pb_section,
html body #termopaneles.et_pb_section,
html body #cotizar.et_pb_section { padding-top: 88px !important; padding-bottom: 88px !important; }
html body .seral-prod { gap: 32px !important; }
html body .seral-prod .sp-grid { gap: 20px !important; }
html body .seral-prod .sp-head { border-bottom: 1px solid var(--s-line); padding-bottom: 24px; }
html body .seral-svc > div:first-child { border-bottom: 1px solid var(--s-line); padding-bottom: 24px; }
html body .seral-svc { gap: 32px !important; }
html body .et_pb_section:has(.seral-cta-band) { padding-top: 48px !important; }

/* ==========================================================
   8 · Texto de cuerpo: tamaños mínimos, contraste y largo de línea
   ========================================================== */
html body .seral-ph .ph-desc,
html body .seral-eco .ec-p,
html body .seral-svlist p { color: var(--s-text) !important; max-width: 68ch; }
html body .seral-prod .sp-body p,
html body .seral-svc .sv-body p,
html body .seral-types p { font-size: 15px !important; color: var(--s-text) !important; line-height: 1.55 !important; }
html body .seral-foot .sf-label { font-size: 13px !important; color: #A3A8C6 !important; }
html body .seral-eco .ec-note,
html body .seral-bio p { font-size: 14px !important; color: var(--s-text) !important; }
html body .seral-quote .q-note { font-size: 13px !important; color: var(--s-muted) !important; }

/* ==========================================================
   9 · Fondos alternos: gris cemento en vez de gris lila
   ========================================================== */
html body #servicios.et_pb_section,
html body .et_pb_section:has(.seral-ph) { background-color: var(--s-alt) !important; }
html body .seral-strip { background: var(--s-alt) !important; border-radius: var(--s-r) !important; }

/* ==========================================================
   10 · Imágenes: proporciones fijas, sin redondeo dentro de tarjetas
   ========================================================== */
html body .seral-prod .sp-card img { height: auto !important; aspect-ratio: 4 / 3; border-radius: 0 !important; border-bottom: 1px solid var(--s-line); }
html body .seral-svc .sv-card img { height: auto !important; aspect-ratio: 4 / 3; border-radius: 0 !important; border-bottom: 1px solid var(--s-line); }
html body .seral-cat .et_pb_gallery_image img { aspect-ratio: 4 / 3; border-radius: 0 !important; }
html body .seral-eco .ec-media img { height: auto !important; aspect-ratio: 4 / 3; }
html body .seral-svlist .sv-row img { height: auto !important; aspect-ratio: 4 / 3; }
html body .seral-imgs img { height: auto !important; aspect-ratio: 4 / 3; }

/* ==========================================================
   11 · Tablet: menú en una línea y grilla de productos sin tarjeta huérfana
   ========================================================== */
@media (min-width: 981px) and (max-width: 1200px) {
  html body .et-l--header .seral-logos img { height: 34px !important; }
  html body .et-l--header .seral-logos .eco img { height: 26px !important; }
  html body .et-l--header .seral-logos { gap: 12px !important; }
  html body .et-l--header .seral-logos .eco { padding-left: 12px !important; }
  html body .et-l--header .seral-menu .et-menu > li { padding-left: 8px !important; padding-right: 8px !important; }
  html body .et-l--header .seral-menu .et-menu > li > a { font-size: 14px !important; }
  html body .et-l--header .seral-cta { padding: 10px 14px !important; font-size: 14px !important; }
  html body .et-l--header .seral-hdr-row > .et_pb_column { margin-right: 16px !important; }
}
@media (min-width: 1100px) { html body .seral-prod .sp-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; } }
@media (min-width: 768px) and (max-width: 1099px) { html body .seral-prod .sp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }

/* ==========================================================
   12 · Rótulos sobre los títulos: en gris, con menos protagonismo
   ========================================================== */
html body .seral-prod .sp-eyebrow,
html body .seral-svc .sv-eyebrow,
html body .seral-svlist .sv-num { color: var(--s-muted) !important; font-weight: 600 !important; letter-spacing: .1em !important; }
