/* =========================================================================
   HEADER — thanh điều hướng nổi (floating bar) đè lên hero

   Mockup: thanh trắng bo góc, cách mép trên ~11px, cách mép trái/phải ~20px.
   Nội dung bên trong căn theo đúng global content container (1200px).
   ========================================================================= */

.site-header {
    position: absolute;
    inset: var(--header-offset) 0 auto;
    z-index: 60;
    width: 100%;
}

.site-header--sticky {
    position: fixed;
    top: 0;
    inset-inline: 0;
    padding-top: var(--header-offset);
    background: linear-gradient(to bottom, rgba(240, 228, 210, .92), rgba(240, 228, 210, 0));
    backdrop-filter: blur(2px);
    animation: header-drop .32s var(--ease);
}

@keyframes header-drop {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

/* Trang trong (không có hero ảnh) — header nằm trên nền giấy */
.site-header--solid {
    position: relative;
    inset: auto;
    padding-top: var(--header-offset);
}

.site-header__bar {
    width: min(100% - 40px, 1280px);
    margin-inline: auto;
    height: var(--header-h);
    padding-inline: 40px;
    display: flex;
    align-items: center;
    gap: 26px;
    background: #fcfaf7;
    border-radius: var(--radius-md);
    box-shadow: 0 6px 26px rgba(53, 28, 20, .12);
}

/* ---------------------------------------------------------------- LOGO */
.site-logo {
    flex: 0 1 auto;
    min-width: 0;
    display: block;
}

.site-logo img {
    height: 58px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
}

/* ---------------------------------------------------------------- NAV */
.site-nav {
    flex: 1 1 auto;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 34px;
    margin-left: 24px;
}

.site-nav__link {
    position: relative;
    display: inline-block;
    padding: 6px 0;
    font-size: var(--fs-nav);
    font-weight: 500;
    color: var(--c-heading);
    white-space: nowrap;
    transition: color var(--dur) var(--ease);
}

.site-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.5px;
    border-radius: 2px;
    background: var(--c-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur) var(--ease);
}

.site-nav__link:hover {
    color: var(--c-red);
}

.site-nav__item.is-active .site-nav__link {
    color: var(--c-red);
    font-weight: 600;
}

.site-nav__item.is-active .site-nav__link::after,
.site-nav__link:hover::after {
    transform: scaleX(1);
}

/* ---------------------------------------------------------------- ACTIONS */
.site-header__actions {
    flex: none;
    display: flex;
    align-items: center;
    gap: 22px;
}

.header-cart {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-pill);
    color: var(--c-heading);
    transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.header-cart:hover {
    color: var(--c-red);
    background: rgba(189, 35, 30, .08);
}

.header-cart .icon {
    width: 25px;
    height: 25px;
}

.header-cart__count {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    background: var(--c-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.site-header .btn--primary {
    min-height: 50px;
    padding: 0 30px;
    font-size: var(--fs-body-sm);
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(189, 35, 30, .26);
}

/* ---------------------------------------------------------------- TOGGLE */
.nav-toggle {
    display: none;
    flex: none;
    width: 46px;
    height: 46px;
    margin-left: auto;
    border-radius: var(--radius-sm);
    color: var(--c-heading);
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2.2px;
    margin: 4.6px auto;
    border-radius: 2px;
    background: currentColor;
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.8px) rotate(-45deg);
}

/* Nút CTA rút gọn khi màn hình hẹp */
.cta-short { display: none; }

@media (max-width: 480px) {
    .cta-long { display: none; }
    .cta-short { display: inline; }
}
