/* =========================
   WAI STORE NAVBAR
========================= */

* {
    box-sizing: border-box;
}

.navbar {
    width: 100%;
    min-height: 80px;
    padding: 0 4%;
    background: #ffffff;
    border-top: 4px solid #ff6b00;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    font-family: Arial, sans-serif;
}

/* LOGO */

.nav-logo {
    flex-shrink: 0;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #1769d1;
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.logo-icon {
    width: 32px;
    height: 32px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #ff6b00;
    color: #ffffff;
    border-radius: 6px;
    font-size: 18px;
}

.nav-logo a>span:last-child>span {
    color: #ff6b00;
}

/* NAVIGATION LINKS */

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

.nav-links a {
    padding: 10px 0;

    color: #182b49;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;

    transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ff6b00;
}

/* SEARCH AND CART */

.nav-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-shrink: 0;
}

.nav-search {
    display: flex;
    align-items: stretch;
    height: 40px;
}

.nav-search input {
    width: 190px;
    min-width: 0;
    padding: 0 14px;

    border: 1px solid #dddddd;
    border-right: none;
    border-radius: 22px 0 0 22px;

    background: #ffffff;
    color: #182b49;
    font-size: 13px;
    outline: none;
}

.nav-search input:focus {
    border-color: #1769d1;
}

.nav-search button {
    width: 44px;
    flex-shrink: 0;

    border: none;
    border-radius: 0 22px 22px 0;

    background: #ff6b00;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;

    transition: background 0.25s ease;
}

.nav-search button:hover {
    background: #1769d1;
}

/* CART ICON AND ITEM COUNT */

.nav-icon.cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #182b49;
    font-size: 23px;
    text-decoration: none;
}

.cart-icon>span {
    position: absolute;
    top: -10px;
    right: -11px;

    min-width: 18px;
    height: 18px;
    padding: 0 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ff6b00;
    color: #ffffff;
    border-radius: 50%;

    font-size: 10px;
    font-weight: 700;
}

/* CART NOTIFICATION */

.cart-notification {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 9999;

    max-width: calc(100% - 40px);
    padding: 14px 22px;

    background: #1769d1;
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);

    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

/* TABLET */

@media (max-width: 1100px) {
    .navbar {
        gap: 18px;
        padding: 0 3%;
    }

    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 13px;
    }

    .nav-search input {
        width: 145px;
    }

    .nav-actions {
        gap: 18px;
    }
}

/* MOBILE */

@media (max-width: 760px) {
    .navbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "logo actions"
            "links links";
        align-items: center;
        gap: 4px 12px;
        min-height: 0;
        padding: 8px 4%;
    }

    .nav-logo {
        grid-area: logo;
        min-width: 0;
    }

    .nav-logo a {
        font-size: 19px;
    }

    .nav-actions {
        grid-area: actions;
        width: auto;
        justify-content: flex-end;
        gap: 10px;
    }

    .nav-search {
        width: clamp(120px, 38vw, 200px);
    }

    .nav-search input {
        width: 100%;
        font-size: 16px; /* stops iPhone auto-zoom */
    }

    .nav-icon.cart-icon {
        min-width: 44px;
        min-height: 44px;
    }

    .cart-icon > span {
        top: 4px;
        right: 2px;
    }

    .nav-links {
        grid-area: links;
        width: 100%;
        justify-content: flex-start;
        gap: 22px;
        overflow-x: auto;
        padding: 0 0 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        flex-shrink: 0;
        padding: 10px 2px;
        font-size: 14px;
    }

    .cart-notification {
        left: 50%;
        right: auto;
        bottom: 20px;
        transform: translateX(-50%);
        text-align: center;
    }
}