/* Header "Tải app" button + QR/store popover (desktop) and mobile-menu CTA. */
.header-app {
    position: relative;
}

.header-app__button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid #b89a62;
    border-radius: 9999px;
    background: #e3c06a;
    color: #0b0b0b;
    padding: 0.625rem 1.15rem;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.header-app__button:hover,
.header-app__button:focus-visible {
    background: #f0d488;
    color: #0b0b0b;
}

.header-app__button:focus-visible {
    outline: 2px solid #e7d9bd;
    outline-offset: 2px;
}

.header-app__button svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.header-app__label-short {
    display: none;
}

/* Narrow desktop (lg..xl): keep the header on one line. */
@media (max-width: 1279px) {
    .header-app__button {
        padding: 0.625rem 0.9rem;
        letter-spacing: 0.08em;
    }

    .header-app__label-full {
        display: none;
    }

    .header-app__label-short {
        display: inline;
    }
}

.header-app__popover {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 60;
    width: 400px;
    margin-top: 0.85rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #ffffff;
    color: #374151;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.5rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    transition-delay: 0.15s;
}

/* Hover bridge so the popover stays open while the pointer moves down to it. */
.header-app__popover::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -0.95rem;
    height: 0.95rem;
}

.header-app:hover .header-app__popover,
.header-app:focus-within .header-app__popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

.header-app__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0b0b0b;
}

.header-app__copy {
    margin: 0.35rem 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
}

.header-app__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.header-app__stores {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.header-app__store-link {
    display: block;
    transition: opacity 0.2s ease;
}

.header-app__store-link:hover {
    opacity: 0.82;
}

.header-app__store-badge {
    display: block;
    width: 140px;
    height: auto;
}

.header-app__qr {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 0.5rem;
}

.header-app__member-link {
    display: inline-flex;
    margin-top: 1rem;
    font-size: 13px;
    font-weight: 700;
    color: #e50914;
}

.header-app__member-link:hover {
    color: #b91c1c;
    text-decoration: underline;
}

.mobile-app-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    border: 1px solid #b89a62;
    border-radius: 9999px;
    background: #e3c06a;
    color: #0b0b0b;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
}

.mobile-app-cta:hover {
    background: #f0d488;
}

.mobile-app-cta svg {
    width: 16px;
    height: 16px;
}

/* 1024-1279px: tighten header spacing so the nav stays on one line next to both buttons. */
@media (min-width: 1024px) and (max-width: 1279px) {
    [data-site-header] nav {
        gap: 1rem;
    }

    [data-site-header] nav > div.flex-1 > div {
        gap: 0.9rem;
    }

    [data-site-header] .nav-link {
        white-space: nowrap;
    }
}
