/* =========================================
   PAWKART - SHARED NAVBAR
========================================= */

:root {
    --paw-blue: #3D45AA;
    --paw-red: #DA3D20;
    --paw-orange: #F8843F;
    --paw-yellow: #FFF19B;
    --paw-dark: #25264A;
    --paw-white: #FFFFFF;
}


/* =========================================
   NAVBAR BASE
========================================= */

.main-navbar {
    width: 100%;
    position: relative;
    z-index: 1000;
    background: var(--paw-white);
    box-shadow: 0 3px 18px rgba(61, 69, 170, 0.09);
}

.navbar-container {
    width: 100%;
    max-width: 1500px;
    height: 82px;
    margin: 0 auto;
    padding: 12px 4%;
    min-width: 0;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}


/* =========================================
   BRAND LOGO
========================================= */

.navbar-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.navbar-brand img {
    display: block;
    width: 205px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}


/* =========================================
   NAVIGATION MENU
========================================= */

.navbar-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 25px;
    flex: 1;
}

.navbar-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 23px;

    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-links li {
    margin: 0;
    padding: 0;
}

.navbar-links a {
    position: relative;
    display: inline-block;

    color: var(--paw-dark);
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 800;

    text-decoration: none;
    white-space: nowrap;

    padding: 10px 0;
    transition: color 0.25s ease;
}

.navbar-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 3px;

    width: 0;
    height: 3px;
    border-radius: 10px;

    background: var(--paw-orange);
    transition: width 0.25s ease;
}

.navbar-links a:hover {
    color: var(--paw-blue);
}

.navbar-links a:hover::after {
    width: 100%;
}


/* =========================================
   SEARCH BAR
========================================= */

.navbar-search {
    width: 205px;
    height: 42px;
    flex-shrink: 0;

    display: flex;
    align-items: center;

    background: #F3F4FF;
    border: 1px solid #E0E2F8;
    border-radius: 30px;
    overflow: hidden;

    transition: border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.navbar-search:focus-within {
    border-color: var(--paw-blue);
    box-shadow: 0 0 0 3px rgba(61, 69, 170, 0.10);
}

.navbar-search input {
    width: 100%;
    min-width: 0;
    height: 100%;

    border: none;
    outline: none;
    background: transparent;

    padding: 0 5px 0 15px;

    color: var(--paw-dark);
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
}

.navbar-search input::placeholder {
    color: #777A9B;
}

.navbar-search button {
    width: 40px;
    height: 40px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    background: transparent;
    color: var(--paw-blue);
    cursor: pointer;

    transition: color 0.25s ease;
}

.navbar-search button:hover {
    color: var(--paw-red);
}

.navbar-search button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================
   ACCOUNT / WISHLIST / CART
========================================= */

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.nav-action {
    position: relative;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--paw-blue);
    text-decoration: none;

    border-radius: 50%;
    transition: background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.nav-action:hover {
    color: var(--paw-red);
    background: #FFF0E9;
    transform: translateY(-2px);
}

.nav-action svg {
    width: 22px;
    height: 22px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cart-count {
    position: absolute;
    top: -3px;
    right: -4px;

    min-width: 18px;
    height: 18px;
    padding: 0 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--paw-red);
    color: var(--paw-white);

    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 900;

    border: 2px solid var(--paw-white);
    border-radius: 50%;
}


/* =========================================
   MOBILE HAMBURGER BUTTON
========================================= */

.menu-toggle {
    display: none;

    width: 43px;
    height: 43px;
    padding: 10px;

    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    background: var(--paw-blue);
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 21px;
    height: 2px;

    background: var(--paw-white);
    border-radius: 5px;

    transition: transform 0.25s ease,
        opacity 0.25s ease;
}


/* Hamburger animation */

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================
   LAPTOP RESPONSIVE
========================================= */

@media (max-width: 1250px) {

    .navbar-container {
        gap: 16px;
        padding-left: 3%;
        padding-right: 3%;
    }

    .navbar-brand img {
        width: 150px;
    }

    .navbar-menu {
        gap: 17px;
    }

    .navbar-links {
        gap: 15px;
    }

    .navbar-links a {
        font-size: 13px;
    }

    .navbar-search {
        width: 175px;
    }

    .navbar-actions {
        gap: 9px;
    }
}


/* =========================================
   TABLET AND MOBILE NAVBAR
========================================= */

@media (max-width: 1000px) {

    .navbar-container {
        min-height: 78px;
        padding: 10px 5%;
    }

    .navbar-brand img {
        width: 155px;
    }

    .menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;

        width: 100%;
        max-height: calc(100vh - 78px);
        overflow-y: auto;

        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;

        padding: 24px 5% 28px;

        background: var(--paw-white);
        border-top: 1px solid #ECECFA;
        box-shadow: 0 12px 20px rgba(37, 38, 74, 0.12);
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-links {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .navbar-links a {
        display: block;
        padding: 11px 5px;
        font-size: 15px;
    }

    .navbar-links a::after {
        display: none;
    }

    .navbar-links a:hover {
        padding-left: 12px;
        background: #F3F4FF;
        border-radius: 8px;
    }

    .navbar-search {
        width: 100%;
        height: 45px;
    }

    .navbar-actions {
        justify-content: center;
        gap: 25px;
        padding-top: 5px;
    }

}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .navbar-container {
        min-height: 70px;
        padding: 9px 4%;
    }

    .navbar-brand img {
        width: 135px;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
    }

    .navbar-menu {
        padding: 20px 5% 24px;
        max-height: calc(100vh - 70px);
    }

}

/* Prevent navbar children from exceeding the viewport */

.main-navbar,
.navbar-container,
.navbar-menu {
    max-width: 100%;
    box-sizing: border-box;
}

.navbar-brand,
.navbar-menu,
.navbar-links,
.navbar-actions {
    min-width: 0;
}

html,
body {
    margin: 0;
    padding: 0;
}

.main-navbar {
    margin-top: 0;
}

/* =========================================
   ACTIVE NAVIGATION LINK
========================================= */

.navbar-links a.active {
    color: var(--paw-blue);
    font-weight: 800;
    position: relative;
}

.navbar-links a.active::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--paw-orange);
    border-radius: 10px;
}