*{
    padding: 0;
    margin: 0;
    outline: none;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

body {
    background: #F8F5F0;
    margin-top: 60px;
}

/* Badge */
.badge-wrapper {
    position: relative;
    display: inline-block;
}

#ordersCount {
    position: absolute;
    top: -10px;
    right: -17px;
    background-color: #e53935;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
    display: none;
}

nav {
    background: #1B4332;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    width: 100%;
    padding: 0 100px;
    position: fixed;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

nav .logo {
    color: #fff;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -1px;
}

nav .logo a {
    color: #fff;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -1px;
    text-decoration: none;
}

nav .logo .logo-accent {
    color: #52B788;
}

nav .nav-items {
    display: flex;
    flex: 1;
    list-style: none;
    padding: 0 0 0 40px;
}

nav .nav-items li {
    padding: 0 15px;
}

nav .nav-items li a {
    color: rgba(255,255,255,0.85);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}

nav .nav-items li a:hover {
    color: #52B788;
}

/* ── Order badge (inside nav-items menu) ─────────────────────────── */
.orders-nav-link {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    position: relative;
}

.orders-badge-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.orders-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #e53935;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #1B4332;
    line-height: 1;
    animation: none;
}

.orders-badge.pulse {
    animation: badgePulse 0.4s ease;
}

@keyframes badgePulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* ── Search form — DESKTOP ────────────────────────────────────────
   Border width is 2px in every state (base and focus) — only the
   colour changes. This is deliberate: a width change between
   states forces a layout recalculation on focus, which on some
   Android/Chrome combinations renders as a visible double-edge
   flash for one frame. Keeping width constant removes that
   recalculation entirely. */
nav form {
    display: flex;
    height: 38px;
    border-radius: 6px;
    padding: 2px;
    background: rgba(255,255,255,0.12);
    min-width: 18% !important;
    border: 2px solid rgba(255,255,255,0.2);
    transition: border-color 0.15s, background-color 0.15s;
}

nav form:focus-within {
    border-color: #52B788;
    background: rgba(255,255,255,0.18);
}

nav form .search-bar {
    height: 100%;
    flex: 1;
    min-width: 0;
    padding: 0 10px;
    margin: 0;
    background: transparent;
    color: white;
    font-weight: 400;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 0;
    font-size: 16px; /* ≥16px prevents Android/Chrome auto-zoom-on-focus */
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

nav form .search-bar:focus {
    outline: none;
}

nav form .search-bar::-webkit-search-decoration,
nav form .search-bar::-webkit-search-cancel-button,
nav form .search-bar::-webkit-search-results-button,
nav form .search-bar::-webkit-search-results-decoration {
    -webkit-appearance: none;
    display: none;
}

nav form .search-bar::placeholder {
    color: rgba(255,255,255,0.5);
}

nav form button {
    padding: 0 14px;
    background: #52B788;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: white;
    height: 100%;
    border-radius: 4px;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

nav form button:focus {
    outline: none;
}

nav form button:hover {
    background: #40916C;
}

/* Icons */
nav .menu-icon,
nav .search-icon,
nav .cancel-icon {
    width: 40px;
    color: #fff;
    text-align: center;
    margin: 0 50px;
    font-size: 18px;
    cursor: pointer;
    display: none;
}

/* ── Hamburger badge dot (visible even when menu is closed) ──────── */
.menu-badge-dot {
    position: absolute;
    top: 12px;
    right: 6px;
    width: 9px;
    height: 9px;
    background: #e53935;
    border-radius: 50%;
    border: 1.5px solid #1B4332;
    pointer-events: none;
    z-index: 1010;
    display: none;
}

.menu-badge-dot.pulse {
    animation: badgePulse 0.4s ease;
}

nav .logo a {
    color: #fff !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1245px) {
    nav { padding: 0 50px; }
}

@media (max-width: 1140px) {
    nav { padding: 0px; }

    nav .logo {
        flex: 2;
        text-align: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    nav .nav-items {
        position: fixed;
        z-index: 999;
        top: 60px;
        width: 100%;
        left: -100%;
        height: calc(100% - 60px);
        background: #1B4332;
        display: block;
        padding: 20px 50px 50px;
        text-align: center;
        overflow-y: auto;
        transition: left 0.3s ease-in-out;
    }

    nav .nav-items.active { left: 0; }

    nav .nav-items li {
        line-height: 40px;
        margin: 30px 0;
    }

    nav .nav-items li a { font-size: 20px; }

    /* Mobile search form — same fixed-border-width principle applies.
       Border is 2px solid in every state; only opacity/transform
       (which never affect box size) animate the open/close. */
    nav form {
        position: fixed;
        top: 11px;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0 5px;
        padding: 4px 12px;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
        transform: scaleY(0);
        transform-origin: top center;
        background: white;
        border: 2px solid #52B788;
        border-radius: 0;
        display: flex;
        align-items: center;
        z-index: 1002;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    nav form:focus-within {
        border-color: #52B788;
        background: white;
    }

    nav form .search-bar {
        color: #333;
    }

    nav form .search-bar::placeholder {
        color: #aaa;
    }

    nav form.active {
        opacity: 1;
        pointer-events: auto;
        transform: scaleY(1);
    }

    nav form:before { display: none; }

    nav .menu-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 60px;
        position: relative;
        padding: 10px;
    }

    nav .search-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 60px;
    }

    nav .menu-icon > span.fas { display: block; }
    
    nav .search-icon.hide,
    nav .menu-icon span.hide { display: none; }

    nav .cancel-icon.show {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 60px;
    }
}

@media (max-width: 980px) {
    nav .search-icon,
    nav .cancel-icon,
    nav .menu-icon { margin: 0 20px; }
    nav form { right: 30px; }
}

@media (max-width: 350px) {
    nav .search-icon,
    nav .cancel-icon,
    nav .menu-icon {
        margin: 0 10px;
        font-size: 16px;
    }
}