/* ==========================================================================
   Announcement Bar
   Figma: bg #00447c, height 47px (17.74% of 264.65)
   Text: 14.513px, weight 400, color white, letter-spacing 1.161px
   ========================================================================== */
.announcement-bar {
    height: 47px;
}

.announcement-bar__text {
    font-size: 14.513px;
    letter-spacing: 1.161px;
    margin: 0;
}

.announcement-bar__text a {
    color: var(--white);
}

/* ==========================================================================
   Header Main
   Figma: white bg, height 146px, border-bottom 0.854px solid #707070
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-main__inner {
    gap: 30px;
    height: 146px;
    padding: 0 35px;
}

/* ==========================================================================
   Left: Hamburger + Location / Search
   Hamburger: 34px wide, 3 bars of #535353
   Location: 12.806px #707070 + "Change" 9.391px #c6c6c6 underline
   Search: 17.074px placeholder #acacac, letter-spacing 1.366px
   ========================================================================== */
.header-left {
    flex: 1;
}

.hamburger {
    gap: 7px;
    width: 34px;
    height: 26px;
    margin-right: 22px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: #535353;
}

.header-search-wrap {
    flex-grow: 1;
    gap: 10px;
}

/* Store location */
.store-location {
    gap: 5px;
}

.store-location__pin {
    flex-shrink: 0;
}

.store-location__text {
    font-size: 14.806px;
    color: #707070;
}

.store-location__change {
    font-size: 14.806px;
    color: #707070;
    margin-left: 4px;
}

/* Search box — Figma: 572 x 43px, border 0.854px #707070, white fill */
.search-box {
    max-width: 572px;
    height: 43px;
    border: 0.854px solid #707070;
    background: var(--white);
    padding: 0 14px;
}

.search-box__icon {
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    height: 100%;
    font-size: 17.074px;
    color: #535353;
    letter-spacing: 1.366px;
    background: transparent;
    padding: 0;
}

.search-box input::placeholder {
    color: var(--gray-500);
}

/* ==========================================================================
   Center: Logo
   Figma: centered horizontally, top 69.15px from NAV top = 22px from header-main top
   Size: 366 x 84 (aspect 429:98)
   ========================================================================== */
.header-logo {
    line-height: 0;
}

.header-logo img {
    height: 84px;
    width: auto;
}

/* ==========================================================================
   Right: Links + Icons
   Links: 14.513px, weight 400, color #505050, letter-spacing 1.161px
   Heart: 41x41  |  Account: 35x35  |  Cart: 44x44
   Cart badge: bg #D31245, 22px circle, 14.513px white text
   ========================================================================== */
.header-right {
    flex: 1;
}

.header-links {
    gap: 30px;
    margin-right: 62px;
}

.header-links a {
    font-size: 15.513px;
    color: #505050;
    letter-spacing: 1.161px;
    transition: color 0.2s;
}

.header-links a:hover {
    color: var(--primary);
}

.header-icons {
    gap: 31px;
}

.header-icon {
    flex-shrink: 0;
    color: #535353;
    transition: color 0.2s;
}

.header-icon:hover {
    color: var(--primary);
}

.cart-count {
    top: -4px;
    right: -6px;
    font-size: 14.513px;
    width: 22px;
    height: 22px;
    letter-spacing: 1.161px;
}

/* ==========================================================================
   Category Nav
   Figma: white bg, top border line, height 72px
   Items: 14.513px, weight 400, color #535353, letter-spacing 1.161px, uppercase
   Positioned from 8.36% to 85.64% of viewport
   BESTSELLERS is Bold
   ========================================================================== */
.category-nav {
    border-top: 0.854px solid #707070;
    height: 72px;
}

.category-nav__list {
    width: 100%;
    padding: 0 8.36%;
    margin: 0;
}

.category-nav__list a {
    font-size: 14.513px;
    color: #535353;
    letter-spacing: 1.161px;
    transition: color 0.2s;
}

.category-nav__list a:hover {
    color: var(--primary);
}

/* ==========================================================================
   Mobile Nav Drawer
   ========================================================================== */
.mobile-nav-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    width: 460px;
    max-width: 100vw;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav__header {
    padding: 31px 30px 30px;
    gap: 15px;
}

.mobile-nav__close {
    width: 40px;
    height: 40px;
    background-color: #f2f2f4;
    flex-shrink: 0;
}

.mobile-nav__logo {
    max-height: 76px;
    width: auto;
    max-width: 100%;
    flex: 1;
    min-width: 0;
}

.mobile-nav__list {
    flex: 1;
}

.mobile-nav__item {
    border-bottom: var(--border-thin) solid var(--gray-200);
}

.mobile-nav__item:first-child {
    border-top: var(--border-thin) solid var(--gray-200);
}

.mobile-nav__item a {
    padding: 16px 30px;
    font-size: 16px;
    color: #2a2a2a;
    letter-spacing: 0.8px;
}

.mobile-nav__item--has-children {
    padding-right: 30px;
}

.mobile-nav__item--has-children a {
    flex: 1;
}

.mobile-nav__footer {
    padding: 0 29px;
    border-top: var(--border-thin) solid var(--gray-200);
    background-color: #f9fafb;
    height: 72px;
    flex-shrink: 0;
}

.mobile-nav__social {
    gap: 15px;
}

.mobile-nav__social a {
    color: #2a2a2a;
}

.mobile-nav__legal {
    gap: 30px;
}

.mobile-nav__legal a {
    font-size: 14px;
    color: #2a2a2a;
    letter-spacing: 0.5px;
}

/* Mobile-only elements — visibility controlled by utility classes (md-hide lg-hide) */

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1599px) {
    .header-links {
        margin-right: 50px;
    }

    .header-icons {
        gap: 15px;
    }

    .header-icon--heart img {
        width: 28px;
        height: 28px;
    }

    .header-icon--account img {
        width: 24px;
        height: 24px;
    }

    .header-icon--cart img {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 1439px) {
    .header-main__inner {
        height: 120px;
        padding: 0 25px;
    }

    .header-logo img {
        height: 68px;
    }

    .header-links {
        gap: 18px;
        margin-right: 25px;
    }

    .header-links a {
        font-size: 13px;
    }
}

@media (max-width: 1199px) {
    .header-main__inner {
        height: 100px;
        gap: 15px;
    }

    .header-logo img {
        height: 55px;
    }

    .search-box {
        height: 38px;
    }

    .search-box input {
        font-size: 14px;
    }

    .header-links {
        gap: 10px;
        margin-right: 15px;
    }

    .header-links a {
        font-size: 12px;
    }

    .header-icons {
        gap: 12px;
    }

    .header-icon--heart img {
        width: 24px;
        height: 24px;
    }

    .header-icon--account img {
        width: 22px;
        height: 22px;
    }

    .header-icon--cart img {
        width: 26px;
        height: 26px;
    }

    .cart-count {
        font-size: 10px;
        width: 16px;
        height: 16px;
        top: -3px;
        right: -4px;
    }

    .category-nav__list a {
        font-size: 13px;
        letter-spacing: 0.8px;
    }

    .store-location__text {
        font-size: 11px;
    }

    .store-location__pin {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 991px) {
    .header-main__inner {
        height: 85px;
        padding: 0 20px;
    }

    .header-logo img {
        height: 45px;
    }

    .search-box {
        height: 34px;
    }

    .search-box__icon {
        width: 16px;
        height: 16px;
    }

    .header-links {
        gap: 14px;
        margin-right: 18px;
    }

    .header-links a {
        font-size: 12px;
        letter-spacing: 0.8px;
    }

    .category-nav {
        height: auto;
        padding: 14px 0;
    }

    .category-nav__list {
        padding: 0 20px;
    }
}

@media (max-width: 767px) {

    /* Announcement bar — Figma: 61px, 14px, 2-line, centered */
    .announcement-bar {
        height: 61px;
        padding: 13px 15px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .announcement-bar__text {
        font-size: 14px;
        letter-spacing: 1.12px;
        text-align: center;
        line-height: 1.3;
    }

    /* Mobile store location bar — Figma: icon at left=65, text 14px #707070, Change 10px #c6c6c6 */
    .mobile-location {
        padding: 7px 15px 7px 15px;
        gap: 9px;
        justify-content: center;
    }

    .mobile-location__pin {
        width: 27px;
        height: 27px;
        flex-shrink: 0;
    }

    .mobile-location__text {
        font-size: 14px;
        color: #707070;
        white-space: nowrap;
    }

    .mobile-location__change {
        font-size: 14px;
        color: #707070;
        text-decoration: underline;
        margin-right: 0;
        white-space: nowrap;
    }

    /* Header main — Figma: hamburger left=15, logo left=77 h=41, icons right */
    .header-main__inner {
        height: auto;
        padding: 12px 15px;
        flex-wrap: wrap;
        gap: 0;
    }

    .header-left {
        align-items: center;
        flex: 0 0 auto;
    }

    .hamburger {
        margin-bottom: 0;
    }

    .mobile-search {
        padding: 0 15px 12px;
    }

    /* Figma: search at y=74, 363px wide, 34px tall, 13px placeholder */
    .search-box {
        height: 34px;
        max-width: 100%;
    }

    .search-box input {
        font-size: 13px;
        letter-spacing: 1.04px;
    }

    .search-box__icon {
        width: 18px;
        height: 18px;
    }

    /* Figma: logo 180×41 */
    .header-logo img {
        height: 41px;
    }

    /* Figma: icons heart=23, account=23, cart=25 */
    .header-icon--heart img {
        width: 23px;
        height: 23px;
    }

    .header-icon--account img {
        width: 23px;
        height: 23px;
    }

    .header-icon--cart img {
        width: 25px;
        height: 25px;
    }

    .header-icons {
        gap: 8px;
    }

    .cart-count {
        font-size: 8px;
        width: 14px;
        height: 14px;
        top: -2px;
        right: -4px;
    }

    /* Category nav — Figma: 46px, horizontal scroll, 15px, border-bottom, annotation: swipe */
    .category-nav {
        height: 46px;
        padding: 0;
        border-top: none;
        border-bottom: 1px solid #707070;
    }

    .category-nav__list {
        padding: 14px 15px;
        gap: 15px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior: contain;
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .category-nav__list a {
        font-size: 15px;
        letter-spacing: 1.2px;
        white-space: nowrap;
    }

    /* Mobile nav overrides */
    .mobile-nav__legal {
        gap: 15px;
    }

    .mobile-nav__legal a {
        font-size: 11px;
    }
}