/* app-mobile-shared.css — app-shell (cabecera/barra inferior/footer) y
 * limpieza genérica para TODO el resto del sitio (carrito, checkout, mi
 * cuenta, CMS, contacto...) en móvil. Home/categoría/producto tienen su
 * propio fichero y este script se auto-desactiva en esas páginas
 * (ver app-mobile-shared.js) para no duplicar la cabecera. */
@media (max-width: 768px) {

  body.amh-shared-active #header,
  body.amh-shared-active .header-nav {
    display: none !important;
  }

  /* El footer real NO se oculta con display:none: el widget del chat vive
     dentro de él en el DOM. Se oculta solo visualmente. */
  #footer.footer-container {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  body.amh-shared-active {
    padding-top: 56px;
    padding-bottom: 64px;
  }

  /* Limpieza genérica de contenido (carrito, checkout, mi cuenta, CMS...) */
  body.amh-shared-active #content.page-content,
  body.amh-shared-active .page-content {
    padding: 0 12px;
  }
  body.amh-shared-active h1.h1,
  body.amh-shared-active .page-header h1 {
    font-size: 18px !important; color: #16324a !important; font-weight: 700 !important;
  }
  body.amh-shared-active .card {
    border-radius: 14px !important; border: 1px solid #eef1f4 !important; box-shadow: none !important;
  }
  body.amh-shared-active .btn-primary,
  body.amh-shared-active button.btn-primary,
  body.amh-shared-active a.btn-primary {
    background: linear-gradient(135deg, #0f2a52 0%, #163a6b 100%) !important;
    border: 0 !important; border-radius: 10px !important; font-weight: 700 !important;
  }

  /* ---------- Cabecera / barra inferior / footer (idénticos al resto) ---------- */
  #app-mobile-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1200;
    display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px;
    background: linear-gradient(135deg, #0a1a33 0%, #0f2a52 55%, #163a6b 100%);
    box-shadow: 0 2px 10px rgba(10,26,51,.35);
  }
  #app-mobile-header .amh-logo { display: flex; align-items: center; height: 34px; }
  #app-mobile-header .amh-logo img { height: 34px; width: auto; }
  #app-mobile-header .amh-spacer { flex: 1; }
  #app-mobile-header .amh-icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff;
    border: 0; position: relative; font-size: 18px;
  }
  #app-mobile-header .amh-badge {
    position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 3px;
    border-radius: 8px; background: #ff5a3c; color: #fff; font-size: 10px; line-height: 16px;
    text-align: center; font-weight: 700;
  }
  #app-mobile-header .amh-badge.is-empty { display: none; }

  #app-mobile-bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
    display: flex; background: #fff; border-top: 1px solid #eef1f4; box-shadow: 0 -2px 8px rgba(0,0,0,.06);
  }
  #app-mobile-bottomnav .amb-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; padding: 8px 0 6px; color: #7c93a8; text-decoration: none; font-size: 10px; font-weight: 600;
    border: 0; background: none; position: relative;
  }
  #app-mobile-bottomnav .amb-item.is-active { color: #0f3f66; }
  #app-mobile-bottomnav .amb-icon { font-size: 19px; line-height: 1; }
  #app-mobile-bottomnav .amb-badge {
    position: absolute; top: 2px; right: calc(50% - 20px); min-width: 15px; height: 15px; padding: 0 3px;
    border-radius: 8px; background: #ff5a3c; color: #fff; font-size: 9px; line-height: 15px; text-align: center; font-weight: 700;
  }
  #app-mobile-bottomnav .amb-badge.is-empty { display: none; }

  .amh-footer-minimal {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 18px 0 12px; margin: 12px 0 0; border-top: 1px solid #eef1f4;
  }
  .amh-footer-minimal img { height: 20px; width: auto; opacity: .85; }
  .amh-footer-minimal .amh-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; }
  .amh-footer-minimal a { font-size: 10px; color: #9aa8b5; text-decoration: none; }
  .amh-footer-minimal .amh-footer-copy { font-size: 9px; color: #c2cbd3; }
}

@media (min-width: 769px) {
  #app-mobile-header, #app-mobile-bottomnav { display: none !important; }
}
