/* Quimiur: clon visual de quimiur.com (Divi). Mobile-first, tokens del tema. */

:root {
  --q-blue: var(--wp--preset--color--primary);
  --q-blue-mid: var(--wp--preset--color--primary-light);
  --q-blue-water: var(--wp--preset--color--secondary);
  --q-yellow: var(--wp--preset--color--accent);
  /* #2ea3f2 del origen no llega a 4.5:1 sobre blanco */
  --q-link: #0077cc;
  --q-text: #666;
  --q-heading: #333;
  --q-container: 1080px;
  --q-gutter: clamp(1rem, 0.5rem + 2.5vw, 1.5rem);
  --q-heading-font: var(--wp--preset--font-family--heading);
}

body { color: var(--q-text); font-size: 0.875rem; line-height: 1.7; }
.q-main { display: block; }
.q-main p { margin: 0 0 1em; }
.q-container { width: 100%; max-width: calc(var(--q-container) + 2 * var(--q-gutter)); margin-inline: auto; padding-inline: var(--q-gutter); box-sizing: border-box; }
.q-skip:focus { position: fixed; top: 0.5rem; left: 0.5rem; z-index: 1000; width: auto; height: auto; clip: auto; padding: 0.5rem 1rem; background: #fff; color: var(--q-blue); }
:where(.q-main, .q-header, .q-footer) a:focus-visible, :where(.q-main, .q-header, .q-footer) summary:focus-visible { outline: 2px solid var(--q-yellow); outline-offset: 2px; }

/* --- Botones ------------------------------------------------------------ */
.q-button { display: inline-block; padding: 0.3em 1em; border: 2px solid currentColor; border-radius: 3px; font-size: 1.25rem; line-height: 1.7; text-decoration: none; transition: background-color 0.2s, border-color 0.2s; }
.q-button--light { color: #fff; }
.q-button--light:hover, .q-button--light:focus-visible { background: rgba(255, 255, 255, 0.2); border-color: transparent; color: #fff; }

.q-title { margin: 0; font-family: var(--q-heading-font); font-weight: 600; letter-spacing: 2px; line-height: 1.4; text-transform: uppercase; text-align: center; color: var(--q-heading); font-size: clamp(1.25rem, 1rem + 1.2vw, 1.625rem); }
.q-title--light { color: #fff; font-family: var(--wp--preset--font-family--primary); font-weight: 400; letter-spacing: 0; }
.q-rule { display: block; width: 3.75rem; height: 3px; margin: 1.5rem auto 2rem; background: var(--q-blue-mid); }
.q-rule--light { background: #fff; }

/* --- Cabecera ----------------------------------------------------------- */
.q-header { position: relative; background: var(--q-blue); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1); }
.q-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; }
.q-header__logo { display: block; line-height: 0; }
.q-header__logo img { width: auto; height: 2.75rem; max-width: 10.5rem; }
.q-nav { display: none; }
.q-nav ul, .q-mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.q-nav a, .q-mobile-nav a { color: rgba(255, 255, 255, 0.96); font-weight: 600; font-size: 0.875rem; text-decoration: none; }
.q-nav a:hover { opacity: 0.7; }
.q-nav a[aria-current="page"], .q-mobile-nav a[aria-current="page"] { color: var(--q-yellow); }
.q-mobile-nav { position: static; }
.q-mobile-nav summary { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; color: #fff; cursor: pointer; list-style: none; }
.q-mobile-nav summary::-webkit-details-marker { display: none; }
.q-mobile-nav .icon { width: 1.75rem; height: 1.75rem; }
.q-mobile-nav__close, .q-mobile-nav[open] .q-mobile-nav__open { display: none; }
.q-mobile-nav[open] .q-mobile-nav__close { display: block; }
.q-mobile-nav nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--q-blue); border-top: 3px solid var(--q-blue-water); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); }
.q-mobile-nav li a { display: block; padding: 0.75rem var(--q-gutter); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
@media (min-width: 981px) {
  .q-header__inner { min-height: 5rem; }
  .q-nav { display: block; }
  .q-nav ul { display: flex; gap: 1.5rem; }
  .q-mobile-nav { display: none; }
}

/* --- Pie ------------------------------------------------------------------ */
.q-footer { background: linear-gradient(180deg, #002456 0%, #1a1d2b 100%); color: #fff; padding-top: 1.5rem; }
.q-footer a { color: #fff; text-decoration: none; }
.q-footer section p a[href*="/productos/"] { text-decoration: underline; }
.q-footer a:hover { text-decoration: underline; }
.q-footer__columns { display: grid; gap: 2rem; padding-block: 2rem; }
.q-footer h2 { margin: 0 0 0.75rem; padding-bottom: 0.5rem; border-bottom: 2px solid #fff; color: #fff; font-size: 1.375rem; font-weight: 400; line-height: 1.4; }
.q-footer p { margin: 0 0 0.4em; font-size: 0.875rem; line-height: 1.6; }
.q-footer section p:nth-child(odd):not(:first-of-type) { margin-top: 0.6em; }
.q-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1.5rem; padding-block: 1.5rem 2rem; text-align: center; }
.q-footer__bottom p { margin: 0; }
.q-footer__legal { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; font-size: 0.8125rem; }
.q-footer__legal a { color: rgba(255, 255, 255, 0.8); }
@media (min-width: 768px) { .q-footer__columns { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 981px) { .q-footer__columns { grid-template-columns: repeat(4, 1fr); gap: 5.5%; } .q-footer h2 { width: 80%; } }

/* --- Onda y banner -------------------------------------------------------- */
.q-wave { position: absolute; left: 0; bottom: -1px; z-index: 2; display: block; width: 100%; height: 3.25rem; fill: #fff; }
.q-wave--top { top: -1px; bottom: auto; transform: rotate(180deg); }
.q-banner { position: relative; display: grid; place-items: center; min-height: 10rem; overflow: hidden; background: var(--q-blue-water); text-align: center; }
.q-banner__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.q-banner__inner { position: relative; z-index: 1; padding-block: 2rem 3.5rem; }
.q-banner h1 { margin: 0; color: #fff; font-family: var(--q-heading-font); font-weight: 700; font-size: clamp(2.25rem, 1.5rem + 3.5vw, 4.5rem); line-height: 1.1; text-shadow: 0 0 0.3em rgba(0, 0, 0, 0.15); }
.q-banner .q-rule { margin: 1rem auto 0; background: #fff; }
.q-banner__subtitle { margin: 1rem auto 0; text-align: center; font-family: var(--q-heading-font); font-weight: 300; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); color: var(--q-text); }
@media (min-width: 981px) { .q-banner { min-height: 15rem; } }

/* --- Portada ------------------------------------------------------------- */
.q-hero { position: relative; overflow: hidden; background: var(--q-blue-water); color: #fff; }
.q-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.q-hero__inner { position: relative; z-index: 1; display: grid; gap: 1.5rem; align-items: center; padding-block: 3rem 5rem; }
.q-hero__media img { display: block; width: 100%; max-width: min(16rem, 70vw); height: auto; margin-inline: auto; }
.q-hero__text { text-align: center; }
.q-hero h2 { margin: 0 0 0.75rem; font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.875rem); font-weight: 400; line-height: 1.2; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.q-hero h2 a { color: #fff; text-decoration: none; }
.q-hero p { margin: 0 0 1.5rem; font-size: 1.0625rem; line-height: 1.7; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
@media (min-width: 768px) {
  .q-hero__inner { grid-template-columns: 1fr 1fr; gap: 3rem; padding-block: 5rem 7rem; }
  .q-hero__text { text-align: left; }
}

.q-servicios { display: grid; gap: 2.5rem; padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) 2rem; text-align: center; }
.q-servicio img { width: 8rem; height: auto; margin: 0 auto 1.25rem; }
.q-servicio h2 { margin: 0 0 0.5rem; font-size: 1.125rem; font-weight: 500; color: var(--q-heading); }
.q-servicio p { margin: 0; }
@media (min-width: 768px) { .q-servicios { grid-template-columns: repeat(3, 1fr); gap: 5.5%; } }

.q-ventajas { background: linear-gradient(180deg, #003580 0%, #0077cc 100%); padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) 0; }
.q-ventajas__grid { display: grid; background: #fff; box-shadow: 0 10px 60px rgba(71, 74, 182, 0.12); }
.q-ventaja { padding: 1.875rem; box-shadow: inset -1px -1px 0 rgba(71, 74, 182, 0.12); color: #5f5fa0; line-height: 1.9; }
.q-ventaja h3 { margin: 0 0 0.5rem; color: #2e2545; font-size: 1.125rem; font-weight: 700; line-height: 1.5; }
.q-ventaja p { margin: 0; }
@media (min-width: 768px) { .q-ventajas__grid { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, auto); grid-auto-flow: column; } }

.q-marcas { position: relative; padding-block: clamp(4rem, 3rem + 4vw, 6rem) clamp(3rem, 2rem + 4vw, 5rem); text-align: center; }
.q-marcas::before { content: attr(data-fondo); position: absolute; left: 0; right: 0; top: clamp(2rem, 1rem + 4vw, 3.5rem); margin: 0; color: rgba(0, 53, 128, 0.04); font-family: var(--q-heading-font); font-weight: 700; font-size: clamp(3rem, 1.5rem + 7vw, 6.5rem); line-height: 1; text-transform: uppercase; pointer-events: none; }
.q-marcas .q-title { position: relative; }
.q-marcas__logos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; align-items: center; list-style: none; margin: 0; padding: 0; }
.q-marcas__logos img { display: block; width: 100%; max-width: 12.5rem; height: auto; max-height: 5rem; margin-inline: auto; object-fit: contain; filter: grayscale(1); opacity: 0.6; }
@media (min-width: 768px) { .q-marcas__logos { grid-template-columns: repeat(4, 1fr); gap: 3rem 2rem; } }

.q-sobre { position: relative; margin-top: 2rem; background: linear-gradient(180deg, #0077cc 0%, #003580 100%); color: #fff; }
.q-sobre .q-wave--top { height: 3rem; }
.q-sobre__inner { display: grid; gap: 2rem; align-items: center; padding-block: 5rem 3rem; }
.q-sobre__foto img { display: block; width: 100%; height: auto; border: 6px solid #fff; box-sizing: border-box; }
.q-sobre h2 { margin: 0 0 0.75rem; color: #fff; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); font-weight: 400; }
.q-sobre blockquote { margin: 1.25rem 0 1.5rem; padding-left: 1.25rem; border-left: 5px solid var(--q-blue-water); }
.q-sobre blockquote p { margin: 0; }
.q-sobre .q-button { font-size: 1.125rem; }
@media (min-width: 768px) { .q-sobre__inner { grid-template-columns: 2fr 3fr; gap: 5.5%; } }

/* --- Catálogo: tarjetas, acordeón, CTA ------------------------------------ */
.q-productos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.q-producto-card a { display: block; color: var(--q-heading); text-decoration: none; }
.q-producto-card img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; margin-bottom: 0.75rem; }
.q-producto-card__title { margin: 0; color: var(--q-heading); font-size: 0.875rem; font-weight: 400; line-height: 1.3; }
.q-producto-card a:hover .q-producto-card__title { color: var(--q-blue-mid); }
@media (min-width: 768px) { .q-productos--3 { grid-template-columns: repeat(3, 1fr); gap: 2.5rem 5.5%; } .q-productos--4 { grid-template-columns: repeat(4, 1fr); } }

.q-catalogo { max-width: calc(var(--q-container) + 2 * var(--q-gutter)); margin: 0 auto; padding: 2.5rem var(--q-gutter) 1.875rem; box-sizing: border-box; }
.q-catalogo__grupo { margin-bottom: 1rem; border: 1px solid #d9d9d9; border-radius: 5px; overflow: hidden; }
.q-catalogo__grupo summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.25rem; background: #0072aa; color: #fff; cursor: pointer; list-style: none; }
.q-catalogo__grupo summary::-webkit-details-marker { display: none; }
.q-catalogo__grupo summary h2 { margin: 0; color: #fff; font-size: 0.875rem; font-weight: 700; line-height: 1.4; }
.q-catalogo__icono { flex: none; width: 1.5rem; height: 1.5rem; transition: transform 0.2s; }
.q-catalogo__grupo[open] .q-catalogo__icono { transform: rotate(180deg); }
.q-catalogo__grupo .q-productos { padding: 1.5rem 1.25rem 2rem; }

.q-cta-catalogo { position: relative; display: grid; place-items: center; min-height: 18rem; overflow: hidden; margin-top: 1.875rem; background: var(--q-blue); color: #fff; text-align: center; }
.q-cta-catalogo__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.q-cta-catalogo__inner { position: relative; padding-block: 4rem; }
.q-cta-catalogo h2 { margin: 0 0 0.5rem; color: #fff; font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.875rem); font-weight: 300; line-height: 1.2; }
.q-cta-catalogo p { max-width: 36rem; margin: 0 auto 1.25rem; }
@media (min-width: 981px) { .q-cta-catalogo { min-height: 26rem; } }

/* --- Migas, ficha de producto y categoría ------------------------------- */
.q-migas ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 1.25rem; padding: 0; font-size: 0.8125rem; color: #767676; }
.q-migas li + li::before { content: "/"; margin: 0 0.35em; }
.q-migas a { color: #767676; text-decoration: none; }
.q-migas a:hover { color: var(--q-blue-mid); }

.q-producto, .q-categoria { padding-block: 3.5rem 4rem; }
.q-producto__top { display: grid; gap: 2rem; }
.q-producto__principal img { display: block; width: 100%; height: auto; }
.q-producto__miniaturas { display: flex; flex-wrap: wrap; gap: 0.75rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.q-producto__miniaturas img { display: block; width: 5rem; height: 5rem; object-fit: contain; border: 1px solid #eee; }
.q-producto__resumen h1 { margin: 0 0 1rem; color: var(--q-heading); font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); font-weight: 500; line-height: 1.2; }
.q-producto__fichas a, .q-producto__meta a, .q-post__meta a, .q-post__content a, .q-producto__texto a, .q-docs a { color: var(--q-link); text-decoration: none; }
.q-producto__fichas a:hover, .q-producto__meta a:hover, .q-post__content a:hover, .q-producto__texto a:hover { text-decoration: underline; }
.q-producto__meta { margin-top: 1.25rem; padding-top: 0.75rem; border-top: 1px solid #ddd; }
.q-producto__descripcion { margin-top: 3rem; border: 1px solid #d9d9d9; }
.q-producto__tab { display: inline-block; margin: 0; padding: 0.5rem 1.875rem; background: #fff; border-right: 1px solid #d9d9d9; color: var(--q-heading); font-size: 0.875rem; font-weight: 600; }
.q-producto__texto { padding: 1.5rem 1.875rem 0.75rem; border-top: 1px solid #d9d9d9; }
.q-producto__texto h2, .q-producto__texto h3 { color: var(--q-heading); font-size: 1.125rem; }
.q-relacionados { margin-top: 2.5rem; }
.q-relacionados > h2 { margin: 0 0 1.5rem; color: var(--q-heading); font-size: 1.625rem; font-weight: 500; }
.q-relacionados .q-producto-card__title { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.625rem); }
@media (min-width: 768px) { .q-producto__top { grid-template-columns: 1fr 1fr; gap: 5.5%; } }

.q-categoria h1 { margin: 0 0 0.5rem; color: var(--q-heading); font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); font-weight: 500; }
.q-categoria__total { margin: 0 0 2rem; color: #999; }
.q-categoria .navigation.pagination { margin-top: 2.5rem; }
.q-categoria .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.q-categoria .page-numbers { display: inline-grid; place-items: center; min-width: 2.5rem; min-height: 2.5rem; border: 1px solid #ddd; color: var(--q-heading); text-decoration: none; }
.q-categoria .page-numbers.current { background: #eee; }

/* --- Blog --------------------------------------------------------------- */
.q-blog { padding-block: 2.5rem 3.5rem; }
.q-blog__grid { display: grid; gap: 2rem; align-items: start; }
.q-card { overflow: hidden; border: 1px solid var(--q-blue-mid); border-radius: 10px; box-shadow: 0 2px 18px rgba(0, 0, 0, 0.1); background: #fff; }
.q-card__image img { display: block; width: 100%; height: auto; aspect-ratio: 400 / 250; object-fit: cover; }
.q-card__body { padding: 1.25rem; font-family: var(--q-heading-font); font-weight: 300; color: #777; line-height: 1.9; }
.q-card__title { margin: 0 0 1rem; font-family: var(--q-heading-font); font-size: 1rem; font-weight: 500; line-height: 1.5; }
.q-card__title a { color: #222; text-decoration: none; }
.q-card__body p { margin: 0; }
.q-card__more { color: var(--q-link); text-decoration: none; }
@media (min-width: 768px) { .q-blog__grid { grid-template-columns: repeat(3, 1fr); gap: 5.5%; } }

.q-post { padding-block: 3.5rem 4rem; }
.q-post__title { margin: 0 0 0.25rem; color: var(--q-heading); font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); font-weight: 500; }
.q-post__meta { margin: 0 0 2rem; font-size: 0.8125rem; }
.q-post__meta a { color: #666; }
.q-post__content h2 { margin: 1.25rem 0 0.5rem; color: var(--q-heading); font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem); font-weight: 500; }
.q-post__content h3 { margin: 1rem 0 0.5rem; color: var(--q-heading); font-size: 1.25rem; font-weight: 500; }
.q-post__content ul, .q-post__content ol, .q-producto__texto ul { margin: 0 0 1.5em; padding-left: 1.5em; }
.q-post__content figure { margin: 2rem 0 1rem; }
.q-post__content img { max-width: 100%; height: auto; }
.q-post__content figcaption { font-size: 0.8125rem; }

/* --- Contacto ----------------------------------------------------------- */
.q-contacto { position: relative; z-index: 3; display: grid; gap: 1.5rem; margin-top: -2rem; padding-bottom: 3.5rem; }
.q-contacto__fila { display: grid; gap: 1.5rem; }
.q-contacto__card { padding: 1.5rem 1.25rem; border-radius: 10px; background: #fff; box-shadow: 0 12px 18px -6px rgba(0, 0, 0, 0.1); text-align: center; }
.q-contacto__card .icon { width: 1.75rem; height: 1.75rem; color: var(--q-blue); }
.q-contacto__card h2 { margin: 0.75rem 0 0.25rem; color: var(--q-heading); font-family: var(--q-heading-font); font-size: 0.875rem; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; }
.q-contacto__card p { margin: 0; }
.q-contacto__card a { color: inherit; text-decoration: none; }
@media (min-width: 768px) { .q-contacto__fila { grid-template-columns: repeat(3, 1fr); gap: 5.5%; } }

/* --- Documentos y legales ------------------------------------------------ */
.q-docs { padding-block: 3.5rem 2rem; font-size: 1rem; }
.q-docs h2 { margin: 0 0 1rem; color: #555; font-size: 1.125rem; font-weight: 700; }
.q-docs ul { list-style: none; margin: 0 0 2.5rem; padding: 0; }
.q-docs li { margin-bottom: 0.6rem; }
.q-doc__boton { display: inline-block; margin-left: 0.4rem; padding: 0 0.5em; background: #32373c; color: #fff; text-decoration: none; }
.q-docs a.q-doc__boton { color: #fff; }
.q-doc__boton:hover { background: #000; }
.q-legal { padding-block: 3rem 4rem; }
.q-legal h2 { color: var(--q-heading); font-size: 1.375rem; margin: 1.5rem 0 0.5rem; }
.q-404 { padding-block: 4rem; }
@media (min-width: 768px) { .q-hero__media img { max-width: 27rem; } }

/* overflow-x: hidden en html/body (base.css) convierte el body en contenedor de
   desplazamiento y la cabecera sticky deja de quedarse fija; clip recorta sin ese efecto. */
html,
body {
  overflow-x: clip;
}
