/* --- Global Header --- */
.website-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    max-height: 128px;
    height: auto;
}

.top-bar {
    background: #0a4275;
    color: white;
    padding: 12px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.nav-menu {
    display: flex;
    flex-wrap: nowrap;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 800;
    font-size: 14px;
    position: relative;
    white-space: nowrap;
}

.result-button {
    background: #e11d48;
    color: white;
    padding: 12px 25px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
}

.navbar {
    background: rgba(255, 255, 255, 0.98);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: visible;
}

.website-header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.website-header .navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-width: max-content;
    flex-wrap: nowrap;
    gap: 12px;
    overflow: visible;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    white-space: nowrap;
    position: relative;
    z-index: 1040;
}

.header-login-link,
.header-register-link {
    color: #df0024;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
    transition: opacity 0.2s;
}

.header-login-link:hover,
.header-register-link:hover {
    opacity: 0.85;
    color: #df0024;
}

.header-register-link {
    background: #df0024;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 8px;
}

.header-register-link:hover {
    color: #fff !important;
    opacity: 0.9;
}

.header-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary, #0a4275);
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
}

.header-profile-link:hover {
    color: var(--primary, #0a4275);
    opacity: 0.9;
}

/* Profile & Auth dropdowns */
.header-dropdown .dropdown-toggle::after {
    margin-right: 0.35em;
    margin-left: 0;
}

[dir="rtl"] .header-dropdown .dropdown-toggle::after {
    margin-left: 0.35em;
    margin-right: 0;
}

/* Ensure dropdown is above everything */
.header-dropdown {
    position: relative;
    z-index: 1050;
}

.header-dropdown-menu {
    min-width: 180px;
    padding: 8px 0;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-top: 8px;
    z-index: 1060 !important;
}

.header-dropdown-menu .dropdown-item {
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
}

.header-dropdown-menu .dropdown-item:hover {
    background: rgba(10, 66, 117, 0.06);
    color: var(--primary, #0a4275);
}

.header-dropdown-menu .dropdown-item-form .dropdown-item {
    cursor: pointer;
    width: 100%;
}

.header-auth-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #df0024;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
}

.header-auth-trigger:hover {
    color: #df0024;
    opacity: 0.9;
}

.header-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: #f0f0f0;
    border-radius: 50%;
    padding: 0;
    transition: background 0.2s;
}

.header-cart-btn:hover {
    background: #e11d48;
}

.header-cart-btn img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.header-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e11d48;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.header-lang-link {
    color: var(--primary, #0a4275);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    padding: 6px 10px;
    border: 1px solid currentColor;
    border-radius: 6px;
}

.header-lang-link:hover {
    color: var(--primary, #0a4275);
    background: rgba(10, 66, 117, 0.08);
}

.website-header .nav-menu a.active {
    color: #e11d48;
}

.social-links a {
    color: white;
    font-size: 18px;
    transition: 0.3s;
    text-decoration: none;
}

/* --- Navbar Toggler (mobile) --- */
.website-header .navbar-toggler {
    display: none;
    border: 1px solid rgba(10, 66, 117, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
}

.website-header .navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(10, 66, 117, 0.25);
}

.website-header .navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(10, 66, 117, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

/* --- Responsive: Mobile & Tablet --- */
@media (max-width: 991px) {
    .website-header .navbar {
        flex-wrap: wrap;
        overflow: visible;
        padding: 12px 15px;
    }

    .website-header .navbar .container {
        flex-wrap: wrap;
        min-width: 0;
        gap: 0;
    }

    .website-header .logo {
        flex: 1;
        min-width: 0;
    }

    .website-header .logo img {
        max-height: 40px;
        width: auto;
    }

    .website-header .navbar-toggler {
        display: inline-flex;
        order: 2;
    }

    .website-header .navbar-collapse {
        order: 3;
        width: 100%;
        flex-basis: 100%;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .website-header .navbar-collapse.collapsing,
    .website-header .navbar-collapse.show {
        display: block;
    }

    .website-header .nav-menu {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0;
        width: 100%;
    }

    .website-header .nav-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .website-header .nav-menu a {
        display: block;
        padding: 12px 0;
        font-size: 15px;
        white-space: normal;
    }

    .website-header .header-actions {
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        justify-content: flex-start;
    }

    .website-header .result-button {
        padding: 10px 18px;
        font-size: 14px;
    }

    .top-bar {
        padding: 10px 15px;
        font-size: 12px;
    }

    .top-bar>div:first-child {
        max-width: 60%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .social-links a {
        font-size: 16px;
        margin-left: 8px;
    }
}

/* --- Desktop: hide toggler, keep menu in one line --- */
@media (min-width: 992px) {
    .website-header .navbar-toggler {
        display: none;
    }

    .website-header .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        width: auto;
        margin: 0;
        padding: 0;
        border: none;
        flex: 1;
        justify-content: space-between;
        align-items: center;
        min-width: 0;
    }

    .website-header .navbar-collapse.collapse {
        display: flex !important;
    }
}

.top-slider {
    position: relative;
    height: 100vh;
    overflow: hidden;
    padding-top: 150px;
}

@media screen and (max-width: 992px) {
    header {
        height: auto;
        padding-bottom: 50px;
        box-shadow: none !important;
    }
}
