/* =====================================================================
   Ferretería Duque — Base global
   Solo estilos transversales. Cada componente/bloque tendrá su propio CSS.
   ===================================================================== */

/* ---------- Reset minimal ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
  margin: 0;
  background-color: var(--fdq-surface);
  color: var(--fdq-on-surface);
  font-family: var(--fdq-font-body);
  font-size: var(--fdq-fs-body-md);
  line-height: var(--fdq-lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.is-layout-flow{
  margin-top: 0 !important;
}

img, svg, video, canvas { max-width: 100%; height: auto; display: block; }

/* Iconos SVG (sustituyen a los material symbols dentro de texto, badges y botones).
   inline-block para respetar text-align del contenedor y alinearse con el texto. */
.fdq-icon-img, .fdq-btn-icon { display: inline-block; vertical-align: middle; object-fit: contain; }

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--fdq-font-heading);
  color: var(--fdq-on-surface);
  margin: 0 0 var(--fdq-space-sm);
}
h1 { font-size: var(--fdq-fs-h1); font-weight: 700; line-height: var(--fdq-lh-tight);   letter-spacing: var(--fdq-tracking-tight-2); }
h2 { font-size: var(--fdq-fs-h2); font-weight: 600; line-height: var(--fdq-lh-snug);    letter-spacing: var(--fdq-tracking-tight-1); }
h3 { font-size: var(--fdq-fs-h3); font-weight: 600; line-height: var(--fdq-lh-relaxed); }

p { margin: 0 0 var(--fdq-space-sm); }

/* ---------- Links ---------- */
a {
  color: var(--fdq-secondary);
  text-decoration: none;
  transition: color var(--fdq-duration-fast) var(--fdq-ease-out);
}
a:hover { color: var(--fdq-secondary-container); }

/* ---------- Focus accesible (clave: keyboard nav) ---------- */
:focus-visible {
  outline: var(--fdq-focus-ring);
  outline-offset: var(--fdq-focus-offset);
}

/* ---------- Container helper ---------- */
.fdq-container {
  max-width: var(--fdq-container-max);
  margin-inline: auto;
  padding-inline: var(--fdq-space-md);
}

/* ---------- Secciones a tope ----------
   WordPress añade un block-gap (margin-block-start) entre los bloques de
   nivel superior del contenido. Nuestras secciones ya llevan su propio
   padding vertical, así que ese margen sobra y deja huecos entre ellas.
   Lo anulamos SOLO entre los hijos directos del contenido (no afecta al
   espaciado interno de cada bloque). Doble clase para ganar a la regla
   :where() de WP sin depender del orden de carga. */
.entry-content.wp-block-post-content > * {
  margin-block: 0;
}
:where(.wp-site-blocks) > *{
  margin-block-start: 0;
}

/* ---------- Anular SOLO el padding lateral por defecto de core ----------
   WP añade `:where(.wp-block-group.has-background){padding:1.25em 2.375em}` a
   todo grupo con fondo. Los 2.375em laterales descuadran en móvil (cada sección
   ya gestiona su propio padding-inline interno). Anulamos solo el lateral y
   dejamos intacto el vertical (1.25em) de core. La clase (especificidad 0,2,0)
   gana al :where de core (especificidad 0) sin depender del orden de carga. */
.wp-block-group.has-background {
  padding-inline: 0;
}

/* ---------- Utility: label all-caps Inter 700 ---------- */
.fdq-label-caps {
  font-family: var(--fdq-font-body);
  font-size: var(--fdq-fs-label);
  font-weight: 700;
  line-height: var(--fdq-lh-base);
  letter-spacing: var(--fdq-tracking-caps);
  text-transform: uppercase;
}

/* ---------- Utility: separador corto centrado ---------- */
.fdq-divider {
  width: 96px;
  min-height: 0;
  height: 4px;
  margin-inline: auto;
  background-color: var(--fdq-secondary);
}

/* ---------- Utility: gradiente firma 135° ---------- */
.fdq-sheen {
  background: var(--fdq-gradient-sheen);
  color: var(--fdq-on-primary);
}

/* ---------- Utility: glassmorphism (header sticky, modales) ---------- */
.fdq-glass {
  background-color: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ---------- Utility: text-shadow suave (heros con foto) ---------- */
.fdq-text-shadow-sm { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.10); }

/* ---------- Material Symbols Outlined ---------- */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}
.material-symbols-outlined.is-filled { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

/* ---------- Reducir motion para usuarios sensibles ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =====================================================================
   Móvil (< 576px): paddings verticales de sección y títulos hardcodeados.
   Estos valores no usan tokens, así que se ajustan aquí. Se prefija con
   .wp-site-blocks (especificidad 0,2,0) para ganar a las reglas base de los
   componentes sin depender del orden de carga de los CSS.
   ===================================================================== */
@media (max-width: 575.98px) {
  .wp-site-blocks .fdq-hero,
  .wp-site-blocks .fdq-services,
  .wp-site-blocks .fdq-clients,
  .wp-site-blocks .fdq-catalog,
  .wp-site-blocks .fdq-location,
  .wp-site-blocks .fdq-values,
  .wp-site-blocks .fdq-testimonials { padding-block: 48px; }
  .wp-site-blocks .fdq-speed { padding-block: 44px; }
  .wp-site-blocks .fdq-trust__inner { padding-block: 24px; }

  /* Títulos con tamaño fijo (no provienen de tokens) */
  .wp-site-blocks .fdq-services__title { font-size: 24px; }
  .wp-site-blocks .fdq-feature__title { font-size: 26px; }
  .wp-site-blocks .fdq-premium__title { font-size: 24px; }
  .wp-site-blocks .fdq-speed__title { font-size: 26px; }
}
