/* ===========================
   NAVBAR
=========================== */

header {
    position: fixed;
    inset: 0 0 auto;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.mobile-location,
.desktop-contact-strip,
.mobile-actions,
.mobile-menu-close,
.mobile-menu-contact,
.mobile-menu-item,
.mobile-menu-sale,
.logo-word {
    display: none;
}

header.scrolled,
header.nav-open {
    background: rgba(251, 250, 247, .86);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 38px rgba(17, 17, 17, .08);
}

.navbar {
    width: min(96%, 1720px);
    height: 86px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.logo {
    display: flex;
    align-items: center;
    width: 118px;
    min-width: 118px;
    transition: var(--transition);
}

.logo-image {
    width: auto;
    height: 74px;
    max-width: 100%;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
    opacity: .94;
    transition: var(--transition);
}

header.scrolled .logo-image,
header.nav-open .logo-image {
    filter: none;
    opacity: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(14px, 1.45vw, 26px);
    color: var(--white);
    transition: var(--transition);
}

header.scrolled .nav-links,
header.nav-open .nav-links {
    color: var(--primary);
}

.nav-links a {
    position: relative;
    font-weight: 800;
    font-size: clamp(.78rem, .82vw, .94rem);
}

.desktop-contact-strip {
    flex: 1 1 640px;
    min-width: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 2vw, 34px);
    color: var(--white);
}

.desktop-location,
.desktop-phone {
    display: grid;
    grid-template-columns: auto minmax(0, auto);
    align-items: center;
    column-gap: 12px;
    color: var(--white);
}

.desktop-location span,
.desktop-phone span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: var(--white);
    background: #20a870;
    font-size: 1.25rem;
}

.desktop-phone span {
    background: transparent;
    border: 2px solid currentColor;
}

.desktop-phone svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.desktop-location strong,
.desktop-phone strong {
    color: currentColor;
    font-family: var(--title-font);
    font-size: clamp(1rem, 1.15vw, 1.38rem);
    line-height: 1;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.desktop-location em,
.desktop-phone em {
    color: #1ed27d;
    font-size: .62rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.desktop-phone em {
    color: #ff6c55;
}

.desktop-social-call {
    display: flex;
    align-items: center;
    gap: 10px;
}

.desktop-social-call a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--white);
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .22);
}

header.scrolled .desktop-contact-strip,
header.nav-open .desktop-contact-strip {
    color: var(--primary);
}

header.scrolled .desktop-phone span,
header.nav-open .desktop-phone span {
    color: var(--primary);
}

@media (max-width: 1280px) {
    .desktop-contact-strip {
        min-width: 430px;
        gap: 16px;
    }

    .desktop-social-call {
        display: none;
    }

    .desktop-location span,
    .desktop-phone span {
        width: 40px;
        height: 40px;
    }

    .nav-links {
        gap: 12px;
    }
}

.nav-links a:not(.cta-button)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.cta-button {
    color: var(--primary);
    background: var(--white);
    padding: 13px 22px;
    border-radius: 999px;
    box-shadow: 0 14px 30px rgba(17, 17, 17, .14);
}

header.scrolled .cta-button,
header.nav-open .cta-button {
    background: var(--primary);
    color: var(--white);
}

.menu {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .22);
}

.menu span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--white);
    transition: var(--transition);
}

header.scrolled .menu,
header.nav-open .menu {
    background: var(--primary);
}

@media (max-width: 900px) {
    header {
        padding: 8px 0 0;
        background: rgba(17, 17, 17, .94);
    }

    header.scrolled,
    header.nav-open {
        background: rgba(17, 17, 17, .94);
        box-shadow: none;
    }

    .mobile-location {
        width: min(95%, 560px);
        height: 38px;
        margin: 0 auto 7px;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 8px;
        align-items: center;
        color: var(--white);
        font-size: .83rem;
        letter-spacing: .06em;
        text-decoration: none;
    }

    .desktop-contact-strip {
        display: none;
    }

    .mobile-location span {
        display: grid;
        place-items: center;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        color: var(--white);
        background: #20a870;
        font-size: .9rem;
    }

    .mobile-location strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 600;
    }

    .navbar {
        width: min(95%, 560px);
        height: 66px;
        padding: 0 16px;
        border-radius: 9px;
        background: #050505;
        border: 1px solid rgba(255, 255, 255, .08);
        box-shadow: 0 16px 32px rgba(0, 0, 0, .32);
        gap: 10px;
    }

    .logo {
        order: 2;
        justify-content: center;
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
    }

    .logo-image {
        display: none;
    }

    .logo-word {
        display: block;
        color: var(--white);
        font-family: var(--title-font);
        font-size: 1.42rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .menu {
        order: 1;
        display: block;
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: 0;
        background: transparent;
        flex: 0 0 auto;
    }

    header.scrolled .menu,
    header.nav-open .menu {
        background: transparent;
    }

    .menu span {
        width: 30px;
        height: 3px;
        margin: 5px auto;
        background: var(--white);
        border-radius: 999px;
    }

    header.nav-open .menu span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    header.nav-open .menu span:nth-child(2) {
        opacity: 0;
    }

    header.nav-open .menu span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .mobile-actions {
        order: 3;
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--white);
        line-height: 1;
    }

    .mobile-actions a,
    .mobile-actions button {
        position: relative;
        display: grid;
        place-items: center;
        width: 38px;
        height: 42px;
        color: var(--white);
        background: transparent;
    }

    .mobile-actions [data-cart-count] {
        position: absolute;
        top: 2px;
        right: 0;
        min-width: 17px;
        height: 17px;
        display: grid;
        place-items: center;
        padding: 0 4px;
        color: var(--primary);
        background: var(--accent-hover);
        border-radius: 999px;
        font-size: .62rem;
        font-style: normal;
        font-weight: 900;
    }

    .mobile-actions svg,
    .favorite-nav-button svg {
        width: 31px;
        height: 31px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-actions [data-cart-open] svg {
        width: 33px;
        height: 33px;
    }

    .nav-links {
        position: absolute;
        top: 0;
        left: 0;
        width: min(82vw, 470px);
        height: 100vh;
        padding: 78px 22px 38px;
        display: grid;
        gap: 0;
        align-content: start;
        color: var(--white);
        background: #202329;
        border: 0;
        border-radius: 0;
        box-shadow: 28px 0 44px rgba(0, 0, 0, .38);
        overflow-y: auto;
        transform: translateX(-102%);
        opacity: 0;
        pointer-events: none;
        transition: transform .28s ease, opacity .28s ease;
    }

    header.nav-open::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        background: rgba(0, 0, 0, .48);
    }

    header.nav-open .nav-links {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-menu-close {
        position: absolute;
        top: 18px;
        right: 18px;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        color: var(--white);
        background: rgba(255, 255, 255, .08);
        font-size: 2rem;
        line-height: 1;
        z-index: 2;
    }

    .nav-links > a:not(.mobile-menu-item):not(.mobile-menu-sale):not(.cta-button),
    .nav-links .favorite-nav-button,
    .nav-links .cart-nav-button,
    .nav-links .cta-button {
        display: none;
    }

    .mobile-menu-contact {
        display: grid;
        justify-items: center;
        gap: 10px;
        padding: 0 0 32px;
        text-align: center;
    }

    .mobile-menu-contact > a {
        color: var(--white);
        font-size: 1.9rem;
        letter-spacing: .08em;
        font-weight: 500;
    }

    .mobile-menu-contact span {
        color: #ff6c55;
        font-size: .7rem;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .mobile-menu-contact div {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 14px;
    }

    .mobile-menu-contact div a {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: none;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        overflow: hidden;
        color: var(--white);
        background: #7360f2;
        font-weight: 900;
    }

    .mobile-menu-contact div a:nth-child(2) {
        background: #25d366;
    }

    .mobile-menu-contact div a:nth-child(3) {
        background: #0866ff;
    }

    .nav-links a {
        padding: 17px 14px;
        border-bottom: 1px solid rgba(255, 255, 255, .07);
        color: rgba(255, 255, 255, .88);
        font-size: 1rem;
        font-weight: 500;
    }

    .nav-links a::after {
        display: none;
    }

    .mobile-menu-item {
        display: block;
    }

    .mobile-menu-plus {
        position: relative;
    }

    .mobile-menu-plus::after {
        content: "+";
        position: absolute;
        right: 10px;
        color: rgba(255, 255, 255, .62);
        font-size: 1.35rem;
        font-weight: 300;
    }

    .mobile-menu-sale {
        display: block;
        margin: 22px 0 28px;
        border: 0 !important;
        border-radius: 8px;
        color: var(--white) !important;
        background: #ff462b;
        font-size: 1rem !important;
    }
}
