/*
 * Storefront base fix: Tailwind bundle lacks the generated rule for the
 * `max-lg:hidden` utility used by the desktop top bar, so it never hides on
 * narrow viewports. This restores its intended behaviour: hidden below the
 * `lg` breakpoint (1024px), visible above it — exactly what the missing
 * Tailwind rule would have produced.
 */

@media (max-width: 1023.98px) {
    .max-lg\:hidden {
        display: none !important;
    }
}

/* Top bar announcement rotation */
.topbar-announce { display: inline; }
.topbar-announce__item { white-space: nowrap; }

/* Default storefront logo: China Mall mark (applies to every style unless a
   skin overrides it with its own logo). Not scoped to <header>: standalone
   pages (sign-in, sign-up, password reset) render the logo outside of one. */
img[src*="logo"] {
    content: url("logos/china-mall.webp");
    height: 34px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

/* Navigation loading veil: shown the moment an in-site link is tapped so slow
   pages (weak mobile networks) give immediate feedback instead of a dead tap. */
#page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
}

#page-loading-overlay.is-active {
    display: flex;
}

.page-loading-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(0, 0, 0, 0.12);
    border-top-color: var(--ui-primary, #f97316);
    border-radius: 50%;
    animation: page-loading-spin 0.7s linear infinite;
}

@keyframes page-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Account area (profile, orders, addresses…) hides the storefront search box:
   there is nothing to search inside the customer account. */
body.account-area form[action*="/search"],
body.account-area .header-search-form,
body.account-area input[name="query"] {
    display: none !important;
}

/* Platform name next to the logo. Every logo link carries this aria-label via
   the bagisto translation key, so one rule covers header / auth / checkout. */
a[aria-label="China Mall"] {
    display: inline-flex;
    align-items: center;
}

.china-mall-brand {
    margin-left: 10px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #18181b;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .china-mall-brand {
        margin-left: 8px;
        font-size: 16px;
    }
}
