/* =========================================
   INK & ARCHIVE
   SHARED NAVBAR COMPONENT
========================================= */



/* =========================================
   ANNOUNCEMENT BAR
   RESPONSIVE WIDTH FIX
========================================= */

.announcement-bar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 6px 10px;
    box-sizing: border-box;

    background: var(--navy);
    color: var(--pastel-pink);

    font-size: 11px;
    letter-spacing: 1.2px;
    line-height: 1.5;
    text-align: center;

    overflow-wrap: anywhere;
}

/* SMALL MOBILE */

@media (max-width: 480px) {
    .announcement-bar {
        padding: 6px 8px;
        font-size: 9px;
        letter-spacing: 0.5px;
    }
}


/* =========================================
   2. MAIN NAVBAR
========================================= */

.main-navbar {
    width: 100%;
    background: var(--soft-purple);
    position: relative;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(31, 37, 68, 0.10);
}

.navbar-container {
    width: min(100% - 40px, var(--container-width));
    height: 88px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}


/* =========================================
   3. BRAND LOGO
========================================= */

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-icon {
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--pastel-pink);
    color: var(--navy);
    border-radius: 50%;
    font-size: 23px;
}

.brand-name {
    font-family: var(--heading-font);
    font-size: 25px;
    font-weight: 700;
    color: var(--text-light);
    white-space: nowrap;
    letter-spacing: -0.5px;
}

.brand-name span {
    color: var(--pastel-pink);
}

/* LOGO IMAGE SIZE CONTROL */

.brand-icon {
    overflow: hidden;
}

.brand-icon span {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
}

.brand-icon img {
    display: block;

    width: 100%;
    height: 100%;

    max-width: 100%;
    object-fit: contain;
}


/* =========================================
   4. NAVIGATION LINKS
========================================= */

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 27px;
}

.nav-link {
    position: relative;
    color: var(--text-light);
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -7px;
    width: 0;
    height: 2px;
    background: var(--pastel-pink);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--pastel-pink);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}


/* =========================================
   5. NAVBAR ACTIONS
========================================= */

.nav-actions {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-shrink: 0;
}

.nav-icon-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    position: relative;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-light);
    font-size: 19px;
    cursor: pointer;
    transition: var(--transition);
}

.nav-icon-btn:hover {
    background: rgba(255, 208, 236, 0.20);
    color: var(--pastel-pink);
    transform: translateY(-2px);
}

.nav-icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}


/* =========================================
   6. CART COUNT
========================================= */

.cart-count {
    position: absolute;
    top: -2px;
    right: -3px;
    width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--pastel-pink);
    color: var(--navy);
    font-size: 9px;
    font-weight: 700;
}


/* =========================================
   7. SEARCH BUTTON
========================================= */

.search-toggle {
    border: 1px solid rgba(255, 255, 255, 0.45);
}


/* =========================================
   8. MOBILE MENU BUTTON
========================================= */

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--pastel-pink);
    color: var(--navy);
    font-size: 21px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}


/* =========================================
   9. SEARCH PANEL
========================================= */

.nav-search-panel {
    display: none;
    width: 100%;
    padding: 15px 20px;
    background: var(--navy);
}

.nav-search-panel.show {
    display: block;
    animation: searchReveal 0.3s ease;
}

.nav-search-form {
    width: min(100%, 650px);
    margin: auto;
    display: flex;
    align-items: center;
    background: var(--light-lavender);
    border-radius: 50px;
    overflow: hidden;
}

.nav-search-form input {
    width: 100%;
    min-width: 0;
    padding: 12px 20px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--navy);
    font-size: 13px;
}

.nav-search-form button {
    padding: 12px 23px;
    border: none;
    background: var(--pastel-pink);
    color: var(--navy);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-search-form button:hover {
    background: var(--soft-rose);
}


/* =========================================
   10. SEARCH ANIMATION
========================================= */

@keyframes searchReveal {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================
   11. TABLET NAVBAR
========================================= */

@media (max-width: 1050px) {

    .navbar-container {
        gap: 15px;
    }

    .nav-menu {
        gap: 16px;
    }

    .brand-name {
        font-size: 21px;
    }

    .nav-link {
        font-size: 12px;
    }

    .nav-actions {
        gap: 7px;
    }

}


/* =========================================
   12. MOBILE NAVBAR
========================================= */

@media (max-width: 850px) {

    .navbar-container {
        min-height: 75px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--navy);
        box-shadow: var(--soft-shadow);
        z-index: 1001;
    }

    .nav-menu.open {
        display: flex;
        animation: menuReveal 0.3s ease;
    }

    .nav-link {
        display: block;
        padding: 13px 10px;
        border-bottom: 1px solid rgba(255, 208, 236, 0.13);
        font-size: 14px;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        padding-left: 17px;
    }

}


/* =========================================
   13. MOBILE MENU ANIMATION
========================================= */

@keyframes menuReveal {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================
   14. SMALL MOBILE DEVICES
========================================= */

@media (max-width: 480px) {

    .announcement-bar {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .navbar-container {
        width: calc(100% - 24px);
        gap: 8px;
    }

    .brand-icon {
        width: 35px;
        height: 35px;
        font-size: 19px;
    }

    .brand-name {
        font-size: 19px;
    }

    .nav-actions {
        gap: 3px;
    }

    .nav-icon-btn {
        width: 33px;
        height: 33px;
    }

    .nav-icon-btn svg {
        width: 18px;
        height: 18px;
    }

    .menu-toggle {
        width: 35px;
        height: 35px;
        font-size: 19px;
    }

    .nav-search-panel {
        padding: 12px;
    }

    .nav-search-form input {
        padding: 11px 14px;
    }

    .nav-search-form button {
        padding: 11px 16px;
    }

}


/* =========================================
   15. KEYBOARD ACCESSIBILITY
========================================= */

.nav-link:focus-visible,
.nav-icon-btn:focus-visible,
.menu-toggle:focus-visible,
.nav-search-form button:focus-visible {
    outline: 2px solid var(--pastel-pink);
    outline-offset: 4px;
}


/* =========================================
   16. REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {

    .nav-link,
    .nav-icon-btn,
    .nav-search-form button {
        transition: none;
    }

    .nav-search-panel.show,
    .nav-menu.open {
        animation: none;
    }

}


/* =========================================
   RESPONSIVE NAVBAR WIDTH FIX
========================================= */

/* DESKTOP */

@media (min-width: 1101px) {

    .navbar-container {
        width: calc(100% - 48px);
        max-width: 1240px;
        gap: 20px;
    }

    .nav-menu {
        flex: 1;
        gap: clamp(12px, 1.5vw, 24px);
    }

}

/* SMALL DESKTOP / TABLET */

@media (max-width: 1100px) {

    .navbar-container {
        width: calc(100% - 32px);
        min-height: 75px;
        gap: 12px;
    }

    .brand-name {
        font-size: 20px;
    }

    .nav-menu {
        gap: 12px;
        flex: 1;
        min-width: 0;
    }

    .nav-link {
        font-size: 11px;
    }

    .nav-actions {
        gap: 5px;
    }

}

/* HAMBURGER NAVBAR */

@media (max-width: 950px) {

    .navbar-container {
        width: calc(100% - 30px);
        min-height: 75px;
        gap: 10px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        box-sizing: border-box;
        background: var(--navy);
        box-shadow: var(--soft-shadow);
        z-index: 1001;
    }

    .nav-menu.open {
        display: flex;
        animation: menuReveal 0.3s ease;
    }

    .nav-link {
        display: block;
        padding: 13px 10px;
        font-size: 14px;
        border-bottom: 1px solid rgba(255, 208, 236, 0.13);
    }

    .nav-link::after {
        display: none;
    }

}

/* SMALL MOBILE */

@media (max-width: 480px) {

    .announcement-bar {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .navbar-container {
        width: calc(100% - 20px);
        min-height: 68px;
        gap: 5px;
    }

    .brand-icon {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .navbar-brand {
        gap: 6px;
    }

    .brand-name {
        font-size: 16px;
    }

    .nav-actions {
        gap: 2px;
    }

    .nav-icon-btn {
        width: 32px;
        height: 32px;
    }

    .nav-icon-btn svg {
        width: 17px;
        height: 17px;
    }

    .menu-toggle {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

}

/* EXTRA SMALL MOBILE */

@media (max-width: 350px) {

    .navbar-container {
        width: calc(100% - 16px);
        gap: 3px;
    }

    .brand-name {
        font-size: 14px;
    }

    .brand-icon {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .nav-actions {
        gap: 0;
    }

    .nav-icon-btn {
        width: 29px;
        height: 29px;
    }

    .menu-toggle {
        width: 31px;
        height: 31px;
    }

}

.nav-link:hover,
.nav-link.active {
    color: var(--pastel-pink);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}