/* Brightstar 1.1.2 - app-style mobile chrome (bottom tab bar, sticky buy bar).
   Plain CSS on purpose: it works without rebuilding the Tailwind bundle. */
:root { --bs-red:#E51B23; --bs-green:#078B2B; --bs-line:#E5E7EB; --bs-muted:#6B7280; }

.app-tabbar, .app-buybar { display: none; }
.wa-float { display: inline-flex; align-items: center; gap: .5rem; }
.wa-float svg { width: 1.25rem; height: 1.25rem; }

@media (max-width: 1023.98px) {
  html { -webkit-tap-highlight-color: transparent; }
  body.app-pad { padding-bottom: calc(4.25rem + env(safe-area-inset-bottom)); overscroll-behavior-y: none; }
  .desk-only { display: none !important; }

  /* ---- bottom tab bar ---- */
  .app-tabbar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid var(--bs-line); padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 16px rgba(0,0,0,.05);
  }
  .app-tabbar ul { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; list-style: none; }
  .app-tabbar li { margin: 0; }
  .app-tabbar a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 3.5rem; font-size: .6875rem; line-height: 1.1; font-weight: 500; color: var(--bs-muted); text-decoration: none;
  }
  .app-tabbar a:active { background: #f3f4f6; }
  .app-tabbar a[aria-current="page"] { color: var(--bs-red); font-weight: 600; }
  .app-tabbar svg { width: 1.5rem; height: 1.5rem; }
  .app-tabbar .badge {
    position: absolute; top: .3rem; left: calc(50% + .3rem); min-width: 1.15rem; padding: 0 .3rem; border-radius: 9999px;
    background: var(--bs-red); color: #fff; font-size: .6875rem; font-weight: 600; line-height: 1.15rem; text-align: center;
  }
  /* ---- floating WhatsApp button: round icon above the tab bar ---- */
  .wa-float {
    display: inline-flex !important; align-items: center; justify-content: center; gap: 0;
    width: 3.5rem; height: 3.5rem; padding: 0 !important; right: 1rem !important;
    bottom: calc(4.25rem + env(safe-area-inset-bottom) + .75rem) !important;
    box-shadow: 0 6px 18px rgba(7,139,43,.45);
  }
  .wa-float svg { width: 1.75rem; height: 1.75rem; }
  .wa-float .wa-text { display: none; }
  .wa-float.has-buybar { display: none !important; } /* the product page's sticky bar already has Order on WhatsApp */

  /* ---- product page: sticky buy bar (replaces the tab bar on that page) ---- */
  .app-buybar {
    display: flex; gap: .5rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid var(--bs-line); box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  }
  .app-buybar > * { flex: 1 1 0; min-height: 3rem; padding-inline: .5rem; font-size: .9375rem; white-space: nowrap; }
  .app-buybar svg { width: 1.25rem; height: 1.25rem; flex: none; }

  /* ---- touch feel ---- */
  .btn:active, .btn-red:active, .btn-whatsapp:active, .btn-line:active { transform: scale(.98); }
  header.sticky { box-shadow: 0 1px 8px rgba(0,0,0,.04); }
}
