/* ======================================================================
   UBD Visual UX · FOOTER HARMONY 1.6.20

   Objetivo:
   - Armonizar el footer/bloques finales en móvil.
   - Homogeneizar radios, alturas, padding y proporciones.
   - Sólo CSS visual; no toca enlaces ni contenido.
   ====================================================================== */

/* Footer shell compacto y armónico */
footer.ubd-catalog-shell-footer {
  margin-top: 26px !important;
}

footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
}

footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-brand,
footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-links details {
  background: #fff !important;
  border: 1px solid rgba(23, 56, 62, .08) !important;
  border-radius: 24px !important;
  box-shadow: none !important;
}

footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-brand {
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: start !important;
  padding: 18px !important;
}

footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-brand [data-ubd-shell-footer-logo] {
  width: 56px !important;
  height: 56px !important;
  border-radius: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f7f4ee !important;
  color: #17383e !important;
  font-weight: 900 !important;
}

footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-brand strong {
  display: block !important;
  margin: 0 0 6px !important;
  color: #17383e !important;
}

footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-brand p,
footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-brand a,
footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-links details,
footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-links details a,
footer.ubd-catalog-shell-footer .ubd-catalog-shell-copyright {
  color: #5d7176 !important;
}

footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-links {
  display: grid !important;
  gap: 10px !important;
}

footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-links details {
  padding: 0 !important;
  overflow: hidden !important;
}

footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-links summary {
  list-style: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 16px 18px !important;
  min-height: 58px !important;
  font-weight: 800 !important;
  color: #17383e !important;
}

footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-links summary::-webkit-details-marker {
  display: none !important;
}

footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-links summary span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;
  background: #f5f7f6 !important;
  color: #17383e !important;
  flex: 0 0 28px !important;
}

footer.ubd-catalog-shell-footer .ubd-catalog-shell-footer-links details > div {
  display: grid !important;
  gap: 10px !important;
  padding: 0 18px 16px !important;
}

footer.ubd-catalog-shell-footer .ubd-catalog-shell-copyright {
  text-align: center !important;
  font-size: 12px !important;
  padding: 2px 6px 0 !important;
}

footer#footer.ubd-site-footer {
  margin-top: 10px !important;
}

footer#footer.ubd-site-footer .ubd-footer-main {
  border-top: 1px solid rgba(23, 56, 62, .08) !important;
}

footer#footer.ubd-site-footer .container {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

footer#footer.ubd-site-footer .ubd-footer-brand {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  text-align: center !important;
  color: #17383e !important;
}

footer#footer.ubd-site-footer .ubd-footer-brand strong {
  font-size: 14px !important;
  line-height: 1.2 !important;
}

footer#footer.ubd-site-footer .ubd-footer-brand span {
  font-size: 12px !important;
  line-height: 1.35 !important;
  color: #6a7c80 !important;
}

/* Capa defensiva para home móvil: unifica tarjetas del pie aunque el tema inyecte
   variaciones de tamaño por columna/contenedor. */
@media (max-width: 767px) {
  body#index #footer [class*="col-"] > div,
  body#index #footer [class*="col-"] > section,
  body#index #footer [class*="col-"] > article,
  body#index #footer [class*="col-"] > a,
  body#index #footer .block_newsletter,
  body#index #footer .links,
  body#index #footer .contact-rich,
  body#index #footer .cms-richtext,
  body#index #footer .custom-text {
    border-radius: 22px !important;
    box-shadow: none !important;
  }

  body#index #footer .block_newsletter input,
  body#index #footer .block_newsletter .input-group,
  body#index #footer .block_newsletter form {
    border-radius: 18px !important;
  }
}
