/* Bermo PWA R21 — scoped styles, inherit site typography */
.bpwa-nav,.bpwa-install,.bpwa-notice,.bpwa-ios-guide,.bpwa-update{box-sizing:border-box;font-family:inherit}
.bpwa-nav *, .bpwa-install *, .bpwa-notice *, .bpwa-ios-guide *, .bpwa-update *{box-sizing:border-box}
.bpwa-nav{display:none}
@media(max-width:767px){
  html.bpwa-app-active{scroll-padding-bottom:88px}
  body.bpwa-has-tabbar{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))!important}
  .bpwa-nav{position:fixed;z-index:900;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:8px 8px calc(7px + env(safe-area-inset-bottom,0px));background:rgba(255,255,255,.97);border-top:1px solid #e8ebef;box-shadow:0 -3px 20px rgba(16,43,69,.06);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
  .bpwa-nav a{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-height:54px;padding:5px 3px;color:#677789;text-decoration:none;border-radius:12px;font-size:10px;font-weight:600;letter-spacing:0;line-height:1.1;white-space:nowrap}
  .bpwa-nav a svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .bpwa-nav a[aria-current=page]{color:#102b45;background:#f2f6f9;font-weight:750}
  .bpwa-nav a[aria-current=page]::after{content:'';position:absolute;margin-top:43px;width:14px;height:2px;border-radius:3px;background:#cba45c}
  .bpwa-nav a:focus-visible,.bpwa-install button:focus-visible,.bpwa-ios-guide button:focus-visible,.bpwa-update button:focus-visible{outline:3px solid #d3ad69;outline-offset:2px}
}
.bpwa-install,.bpwa-update{position:fixed;z-index:920;bottom:calc(88px + env(safe-area-inset-bottom,0px));left:12px;right:12px;max-width:440px;margin:0 auto;padding:14px 42px 14px 14px;background:#fff;color:#102b45;border:1px solid #e8ebef;border-radius:18px;box-shadow:0 14px 40px rgba(16,43,69,.18);display:flex;gap:12px;align-items:center}
.bpwa-install[hidden],.bpwa-notice[hidden],.bpwa-ios-guide[hidden],.bpwa-update[hidden]{display:none!important}
.bpwa-install-icon{flex:0 0 42px;height:42px;width:42px;border-radius:12px;background:#102b45;color:#d5ad67;display:grid;place-items:center;font-size:27px;font-weight:800}
.bpwa-install-text{min-width:0;flex:1}.bpwa-install-title{display:block;font-size:13px;font-weight:800;line-height:1.25}.bpwa-install-help{display:block;font-size:11px;color:#617184;line-height:1.35;margin-top:3px}
.bpwa-install-actions{display:flex;gap:8px;align-items:center;margin-top:8px}.bpwa-install-primary,.bpwa-update-primary{background:#102b45;color:white;border:0;border-radius:9px;font:inherit;font-size:12px;font-weight:700;padding:8px 11px;min-height:34px;cursor:pointer}
.bpwa-close{position:absolute;top:9px;right:9px;background:transparent;border:0;color:#6b7785;width:28px;height:28px;display:grid;place-items:center;border-radius:10px;cursor:pointer;font-size:20px}
.bpwa-notice{position:fixed;z-index:950;top:calc(12px + env(safe-area-inset-top,0px));left:12px;right:12px;max-width:460px;margin:auto;padding:12px 16px;background:#102b45;color:#fff;text-align:center;font-size:13px;font-weight:650;border-radius:12px;box-shadow:0 6px 24px rgba(0,0,0,.18)}
.bpwa-ios-guide{position:fixed;inset:0;z-index:990;background:rgba(6,22,37,.58);display:grid;place-items:end center;padding:16px;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))}
.bpwa-ios-guide-panel{background:white;color:#102b45;border-radius:22px;padding:25px 22px 22px;width:100%;max-width:430px;box-shadow:0 12px 40px rgba(0,0,0,.24);position:relative}
.bpwa-ios-guide-panel h2{font:inherit;font-size:20px;font-weight:800;margin:0 0 12px}.bpwa-ios-guide-panel p{font-size:14px;line-height:1.6;margin:0 0 10px;color:#526273}.bpwa-ios-guide-panel .bpwa-done{background:#102b45;color:white;border:0;border-radius:12px;padding:13px;min-height:44px;width:100%;font:inherit;font-weight:700;margin-top:8px}
@media(min-width:768px){.bpwa-install,.bpwa-update{bottom:24px}}
@media(prefers-reduced-motion:reduce){.bpwa-nav *,.bpwa-install *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
/* BERMO_R22_INSTALL_LOGO */
.bpwa-install-icon{overflow:hidden;background:transparent;color:inherit}
.bpwa-install-icon img{display:block;width:100%;height:100%;object-fit:contain;border-radius:10px}


/* BERMO_PWA_MENU_FIX_V1 — dock movil, aislado al marketplace publico.
   Se aprovecha la barra Bermo 3 y se preservan las rutas y comportamiento del portal. */
@media (max-width: 767px) {
  body.bpwa-nav-enhanced .b3-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    justify-content: initial;
    gap: 3px;
    position: fixed;
    z-index: 600;
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(9px + env(safe-area-inset-bottom, 0px));
    width: auto;
    height: auto;
    min-height: 75px;
    padding: 7px;
    border: 1px solid rgba(196, 208, 220, .88);
    border-radius: 24px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 18px 46px rgba(16, 35, 71, .16), 0 2px 10px rgba(16, 35, 71, .055);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-sizing: border-box;
    isolation: isolate;
  }
  body.bpwa-nav-enhanced .b3-bottom-nav > a {
    position: relative;
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    min-height: 60px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 2px 6px;
    border-radius: 17px;
    background: transparent;
    color: #68778a !important;
    font-family: inherit;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -.012em;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
  }
  body.bpwa-nav-enhanced .b3-bottom-nav > a svg {
    display: block;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 5px;
    border-radius: 11px;
    color: #627387;
    background: transparent;
    box-sizing: border-box;
    transition: background-color .18s ease, color .18s ease;
  }
  body.bpwa-nav-enhanced .b3-bottom-nav > a span {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.bpwa-nav-enhanced .b3-bottom-nav > a.is-current,
  body.bpwa-nav-enhanced .b3-bottom-nav > a[aria-current="page"] {
    background: #f4f7fa;
    color: #102347 !important;
    font-weight: 760;
  }
  body.bpwa-nav-enhanced .b3-bottom-nav > a.is-current svg,
  body.bpwa-nav-enhanced .b3-bottom-nav > a[aria-current="page"] svg {
    background: #102347;
    color: #e1bd78;
  }
  body.bpwa-nav-enhanced .b3-bottom-nav > a.is-current::after,
  body.bpwa-nav-enhanced .b3-bottom-nav > a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: calc(50% - 9px);
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #cba45c;
  }
  body.bpwa-nav-enhanced .b3-bottom-nav > a:active { transform: scale(.97); }
  body.bpwa-nav-enhanced .b3-bottom-nav > a:focus-visible {
    outline: 2px solid #b78c45;
    outline-offset: 2px;
  }
  /* El buscador a pantalla completa siempre tapa el dock, nunca al reves. */
  body.bpwa-nav-enhanced.b3-search-lock .b3-bottom-nav { display: none !important; }
  /* Reserva espacio para que no se pierdan controles bajo la barra flotante. */
  body.bpwa-nav-enhanced { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important; }
  /* El menu de cuenta hereda el mismo lenguaje visual sin cambiar enlaces ni sesion. */
  body.bpwa-nav-enhanced .b3-account-menu {
    min-width: min(310px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    border: 1px solid #e0e6ed;
    border-radius: 20px;
    padding: 8px;
    box-shadow: 0 22px 48px rgba(16, 35, 71, .19);
    background: #fff;
  }
  body.bpwa-nav-enhanced .b3-account-menu a,
  body.bpwa-nav-enhanced .b3-account-menu form button {
    border-radius: 12px;
    padding: 12px 13px;
    color: #25364a;
    font-size: 13px;
    line-height: 1.35;
  }
  body.bpwa-nav-enhanced .b3-account-menu a:hover,
  body.bpwa-nav-enhanced .b3-account-menu form button:hover { background: #f2f6fa; }
  body.bpwa-nav-enhanced .b3-account-menu .b3-menu-separator { margin: 8px 6px; background: #e7ecf1; }
  body.bpwa-nav-enhanced .b3-account-menu .b3-menu-identity { padding: 12px 13px; }
}
@media (max-width: 350px) {
  body.bpwa-nav-enhanced .b3-bottom-nav { left: 7px; right: 7px; gap: 0; padding: 5px; }
  body.bpwa-nav-enhanced .b3-bottom-nav > a { font-size: 9px; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  body.bpwa-nav-enhanced .b3-bottom-nav > a,
  body.bpwa-nav-enhanced .b3-bottom-nav > a svg { transition: none !important; }
}
