/* css/sitio.css — ajustes globales de accesibilidad y privacidad (se carga en todas las páginas) */

/* Mapa con carga bajo solicitud */
.map-consent { display: grid; place-items: center; min-height: 360px; background: #eef1f5; text-align: center; padding: 24px; }
.map-consent-inner { max-width: 420px; color: #14212f; }
.map-consent-inner .bi { font-size: 2rem; color: #005691; }
.map-consent-inner a { color: #005691; }
.btn-map-load { border: 0; border-radius: 50rem; padding: 10px 26px; background: #012C4F; color: #fff; font-weight: 600; }
.btn-map-load:hover, .btn-map-load:focus-visible { background: #005691; }

/* Contraste: texto de párrafo más oscuro (antes #7A7A7A = 4,3:1; ahora 5,7:1 sobre blanco, WCAG AA) */
:root { --text-color: #666666; }

/* Foco visible para quien navega con teclado */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible, .form-check-input:focus-visible {
  outline: 3px solid #005691 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 5px #fff !important;
}

/* Enlace "Saltar al contenido" (visible solo al usar Tab) */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 3000;
  padding: 10px 18px; border-radius: 6px;
  background: #012C4F; color: #fff !important; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }


/* Respeta la preferencia del sistema de reducir animaciones */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Formularios: la plantilla ocultaba todas las etiquetas con display:none, lo que también las ocultaba
   a los lectores de pantalla. Se muestran las etiquetas de los campos y se conservan ocultas (solo
   visualmente) las que usan .visually-hidden. */
.form label.form-label { display: block; font-size: 15px; font-weight: 500; color: #14212f; margin-bottom: 6px; }
.form label.visually-hidden { display: block !important; }
.form .form-check { display: flex; align-items: flex-start; gap: 10px; padding-left: 0; }
.form .form-check label.form-check-label { display: block; font-size: 14px; font-weight: 400; line-height: 1.5; color: #3d4a58; }
.form .form-check label.form-check-label a { color: #005691; text-decoration: underline; }
.form input[type="checkbox"].form-check-input {
  flex-shrink: 0; width: 20px; height: 20px; margin: 2px 0 0; padding: 0;
  border: 2px solid #5d6b7a; border-radius: 4px; background-color: #fff; float: none; cursor: pointer;
}
.form input[type="checkbox"].form-check-input:checked { background-color: #005691; border-color: #005691; }
.form .form-check .invalid-feedback { flex-basis: 100%; }

/* Boletín: autorización debajo del campo de correo */
.form.subscribe:has(.subscribe-consent) { border-radius: 28px; padding: 6px 6px 14px; }
.form.subscribe .subscribe-consent { padding: 0 14px; }
.form.subscribe .subscribe-consent .form-check-label,
.form.subscribe .subscribe-consent .form-check-label a { color: #3d4a58 !important; }
.form.subscribe .subscribe-consent .form-check-label a { text-decoration: underline; }
@media (min-width: 768px) {
  .form.subscribe input[type="email"] { flex: 1 1 0; width: auto; min-width: 0; }
  .form.subscribe .submit_subscribe { flex: 0 0 auto; width: auto !important; }
}

/* Con el carrito abierto se oculta el botón flotante de WhatsApp para que no tape "Completar pedido" */
body:has(#cartOffcanvas.show) .floating-whatsapp,
body:has(#cartOffcanvas.showing) .floating-whatsapp {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.floating-whatsapp { transition: opacity .2s ease, visibility .2s ease; }


/* ===== Artículos del blog (contenido largo) ===== */
.post-body { color: #3d4a58; font-size: 1.05rem; line-height: 1.75; min-width: 0; }
.post-body > * + * { margin-top: 1.1rem; }
.post-body h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); color: #005691; margin-top: 2.4rem; margin-bottom: .2rem; line-height: 1.3; scroll-margin-top: 110px; }
.post-body h3 { font-size: clamp(1.12rem, 1rem + .5vw, 1.3rem); color: #012C4F; margin-top: 1.6rem; margin-bottom: .1rem; line-height: 1.35; }
.post-body p, .post-body li { color: #3d4a58; }
.post-body ul, .post-body ol { padding-left: 1.3rem; margin-bottom: 0; }
.post-body li + li { margin-top: .45rem; }
.post-body li::marker { color: #009edf; font-weight: 700; }
.post-body a:not(.btn-cta-primary) { color: #005691; text-decoration: underline; text-underline-offset: 3px; }
.post-body a:not(.btn-cta-primary):hover { color: #009edf; }
.post-body strong { color: #012C4F; }
.post-body .post-hero-img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; }
.post-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .9rem; color: #5b6b7b; }
.post-meta i { color: #009edf; margin-right: .35rem; }
.post-lead { font-size: 1.15rem; color: #012C4F !important; font-weight: 500; }
.post-summary { background: #eef7fc; border-left: 4px solid #009edf; border-radius: 12px; padding: 1.1rem 1.3rem; }
.post-summary h2, .post-summary .h-summary { font-size: 1.05rem; margin: 0 0 .5rem; color: #012C4F; font-weight: 700; }
.post-summary ul { margin: 0; }
.post-toc { background: #f6f8fa; border: 1px solid #e3e8ee; border-radius: 12px; padding: 1rem 1.3rem; }
.post-toc summary { cursor: pointer; font-weight: 700; color: #012C4F; }
.post-toc ol { margin-top: .6rem; }
.post-toc a { text-decoration: none !important; }
.post-callout { background: #012C4F; color: #fff; border-radius: 14px; padding: 1.2rem 1.4rem; }
.post-callout p, .post-callout strong, .post-callout li { color: #fff !important; }
.post-callout.warning { background: #fff7e6; border: 1px solid #f5c26b; color: #5a3b00; }
.post-callout.warning p, .post-callout.warning strong, .post-callout.warning li { color: #5a3b00 !important; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e3e8ee; border-radius: 12px; }
.post-body table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .95rem; margin: 0; }
.post-body th { background: #012C4F; color: #fff; text-align: left; padding: .7rem .9rem; font-weight: 600; }
.post-body td { padding: .65rem .9rem; border-top: 1px solid #e3e8ee; vertical-align: top; }
.post-body tr:nth-child(even) td { background: #f8fafc; }
.post-faq details { border: 1px solid #e3e8ee; border-radius: 12px; padding: .9rem 1.1rem; background: #fff; }
.post-faq details + details { margin-top: .7rem; }
.post-faq summary { cursor: pointer; font-weight: 600; color: #012C4F; list-style-position: outside; }
.post-faq details[open] summary { color: #005691; margin-bottom: .5rem; }
.post-faq details p { margin: 0; }
.post-cta { background: linear-gradient(135deg, #012C4F, #005691); border-radius: 16px; padding: 1.6rem; color: #fff; }
.post-cta h2 { color: #fff !important; margin-top: 0 !important; }
.post-cta p { color: #e6f3fb !important; }
.post-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.post-related a { display: block; border: 1px solid #e3e8ee; border-radius: 12px; overflow: hidden; text-decoration: none !important; color: #012C4F !important; background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.post-related a:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(1, 44, 79, .12); }
.post-related img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.post-related span { display: block; padding: .75rem .9rem; font-weight: 600; font-size: .95rem; line-height: 1.35; }
.post-author { display: flex; gap: 1rem; align-items: center; background: #f6f8fa; border-radius: 14px; padding: 1rem 1.2rem; }
.post-author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 64px; }
.post-author p { margin: 0; font-size: .95rem; }
@media (max-width: 575.98px) {
  .post-body { font-size: 1rem; }
  .post-cta { padding: 1.2rem; }
}
/* Tarjetas del blog: imagen con proporción fija para que la grilla no se descuadre */
.card.blog > a > img { aspect-ratio: 16 / 10; object-fit: cover; }
/* Títulos de tarjetas del blog: hasta 3 líneas en lugar de 1 */
.section.our-blog .blog-content h4, .card.blog .blog-content h4 { -webkit-line-clamp: 3; line-clamp: 3; }
/* Tienda: el nombre del producto es el título de la tarjeta */
.product-card-title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; color: #012C4F; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-title a { color: inherit; text-decoration: none; }
.product-card-title a:hover { color: #0277bd; }
.product-card-brand { font-size: .78rem; letter-spacing: .5px; text-transform: uppercase; color: #5b6b7b; }
.price-ask { font-size: .95rem; font-weight: 600; color: #0277bd; }
