/* ==========================================================================
   GUESTLY APP SHELL (Step 2)
   Glass navbar (hooks the theme's existing .fixed-header scroll class),
   mobile bottom navigation, layout utilities. Consumes --g-* tokens.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Navbar: floating glass once the page scrolls (theme adds .fixed-header)
-------------------------------------------------------------------------- */
.main-header .header-lower {
    /* At rest the header is TRANSPARENT — no fill, no hairline, no shadow —
       so it reads as part of the page (the Homeyhuts look), not a bar
       sitting on it. The theme's own solid background is overridden here;
       scrolling still brings in the glass below. */
    background: transparent !important;
    box-shadow: none;
    border-bottom: 0 !important;
    transition: background var(--g-normal, .3s) var(--g-ease, ease),
                box-shadow var(--g-normal, .3s) var(--g-ease, ease),
                padding var(--g-normal, .3s) var(--g-ease, ease);
}
.main-header.fixed-header .header-lower {
    /* Scrolled: still TRANSPARENT — the page stays visible through the bar.
       At 78% white this read as a solid strip; the fill is now a whisper and
       the heavy blur + saturation boost is what keeps the labels readable
       over whatever scrolls underneath (the site is light-only, so contrast
       holds). */
    background: rgba(255, 255, 255, .35) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
    backdrop-filter: blur(22px) saturate(1.6);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .05);
    /* !important because the at-rest state zeroes the border the same way. */
    border-bottom: 1px solid rgba(0, 0, 0, .04) !important;
}
/* --------------------------------------------------------------------------
   Header logo: sized by HEIGHT, optically centred

   The base theme sizes the wordmark by WIDTH (.logo-box .logo{max-width:180px}),
   so the bar's height was dictated by whatever aspect ratio the uploaded asset
   happened to have (720x175 today => 43.75px tall), while the scrolled state
   clamped by height (40px) - so the logo visibly JUMPED on scroll. Driving both
   states from max-height keeps the rhythm identical for any logo the owner
   uploads, and flex wrappers drop the inline-baseline gap that sits under an
   <img> (the few px that made it read as slightly low in the bar).
-------------------------------------------------------------------------- */
.main-header .logo-box,
.main-header .logo-box .logo,
.main-header .logo-box .logo > a {
    display: flex;
    align-items: center;
}
.main-header .logo-box .logo {
    max-width: none;      /* height is the constraint now, not width */
    line-height: 0;       /* no descender gap under the image */
}
.main-header .logo-box .logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 36px;
    object-fit: contain;  /* never distort a non-standard logo */
    transition: max-height var(--g-normal, .3s) var(--g-ease, ease);
}
/* Scrolled + the desktop scroll-clone: one shared, slightly tighter size. */
.main-header.fixed-header .logo-box .logo img,
.main-header .sticky-header .logo-box .logo img {
    max-height: 32px;
}

/* --------------------------------------------------------------------------
   Mobile bottom navigation (guest/public shell)
-------------------------------------------------------------------------- */
.gx-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--g-z-sticky, 100);
    display: none;
    background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--g-border, #e9e9ec);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
@media (max-width: 991px) {
    .gx-bottom-nav { display: flex; }
    /* Keep page content clear of the nav */
    body:has(.gx-bottom-nav) { padding-bottom: 64px; }
    /* The theme's own host bottom-nav pages don't include this component. */
}

.gx-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    color: var(--g-text-soft, #6f6f76);
    text-decoration: none;
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--g-fast, .15s) ease, transform var(--g-fast, .15s) ease;
}
.gx-bottom-nav a:active { transform: scale(.92); }
.gx-bottom-nav a i { font-size: 19px; }
.gx-bottom-nav a.active { color: var(--g-primary, #FF3131); }
.gx-bottom-nav a.active i { font-weight: 900; }
.gx-bottom-nav a:focus-visible { outline: 2px solid var(--g-primary, #FF3131); outline-offset: -2px; }

/* --------------------------------------------------------------------------
   Layout utilities
-------------------------------------------------------------------------- */
.g-container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--g-s4, 16px);
}
@media (min-width: 768px) { .g-container { padding-inline: var(--g-s5, 24px); } }
@media (min-width: 1440px) { .g-container { max-width: 1360px; } }

.g-grid {
    display: grid;
    gap: var(--g-s4, 16px);
    grid-template-columns: 1fr;
}
@media (min-width: 650px)  { .g-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .g-grid { grid-template-columns: repeat(3, 1fr); gap: var(--g-s5, 24px); } }
@media (min-width: 1440px) { .g-grid { grid-template-columns: repeat(4, 1fr); } }
