/* =========================================================
   Hamida Traders
   Final Shared Global Base + Public Header
   Locked Home V11.1 Design System
   Frontend Integration 2026-08-31
   ========================================================= */

:root{
    --navy:#061a2d;
    --navy2:#0a2946;
    --blue:#0052cc;
    --blue2:#1769d2;
    --green:#168257;
    --green2:#2fb77f;
    --ink:#14283d;
    --muted:#6b7f92;
    --line:#dce5ed;
    --page:#f4f7fa;
    --white:#fff;
    --max:1180px;
    --r:22px;
    --shadow:0 24px 70px rgba(6,26,45,.14);
}

*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    min-height:100vh;
    background:var(--page);
    color:var(--ink);
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    line-height:1.55;
    overflow-x:hidden;
}

a{
    color:inherit;
    text-decoration:none;
}

button,
input,
select{
    font:inherit;
}

button,
select{
    cursor:pointer;
}

img,
svg{
    display:block;
    max-width:100%;
}

.site-main{
    min-height:60vh;
}

.sr-only{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:-1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
    border:0!important;
}

/* ===== TOP ACCENT ===== */

.top-accent{
    position:fixed;
    left:0;
    top:0;
    right:0;
    height:2px;
    z-index:2000;
    background:linear-gradient(
        90deg,
        #1769d2 0%,
        #57a3ff 45%,
        #2fb77f 100%
    );
    box-shadow:0 0 16px rgba(47,183,127,.24);
}

/* ===== FINAL SHARED HEADER ===== */

.site-header{
    position:sticky;
    top:0;
    z-index:1000;
    width:100%;
    background:rgba(4,18,31,.84);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    border-bottom:1px solid rgba(255,255,255,.07);
    box-shadow:0 8px 28px rgba(0,0,0,.08);
}

.header-inner{
    width:min(var(--max),calc(100% - 30px));
    min-height:80px;
    margin:auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

.brand{
    display:flex;
    align-items:center;
    gap:11px;
    flex:0 0 auto;
}

.real-logo{
    width:46px;
    height:46px;
    object-fit:contain;
    flex:0 0 46px;
    filter:drop-shadow(0 10px 22px rgba(0,82,204,.20));
}

.brand-copy{
    display:flex;
    align-items:center;
    gap:8px;
}

.brand-name{
    color:#fff;
    font-size:18px;
    font-weight:800;
    letter-spacing:.01em;
    white-space:nowrap;
}

.brand-tag{
    display:block;
    padding-left:8px;
    border-left:1px solid rgba(255,255,255,.18);
    color:#9bb0c3;
    font-size:10px;
    line-height:1.15;
    white-space:nowrap;
}

.nav-wrap{
    display:flex;
    align-items:center;
    gap:24px;
}

.main-nav{
    display:flex;
    align-items:center;
    gap:20px;
}

.main-nav > a,
.buyer-help-trigger{
    position:relative;
    color:#c8d6e4;
    font-size:12px;
    font-weight:500!important;
    letter-spacing:.02em;
    transition:color .2s ease;
}

.main-nav > a{
    padding:0;
}

.main-nav > a:hover,
.main-nav > a.active,
.buyer-help-trigger:hover,
.buyer-help-menu.open .buyer-help-trigger{
    color:#fff;
}

.main-nav > a::after,
.buyer-help-trigger::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:-9px;
    height:2px;
    transform:scaleX(0);
    transform-origin:left;
    background:linear-gradient(90deg,#2b7be7,#45c596);
    transition:transform .25s ease;
}

.main-nav > a:hover::after,
.main-nav > a.active::after,
.buyer-help-trigger:hover::after,
.buyer-help-menu.open .buyer-help-trigger::after{
    transform:scaleX(1);
}

.header-actions{
    display:flex;
    align-items:center;
    gap:8px;
}

/* ===== BUYER HELP ===== */

.buyer-help-menu{
    position:relative;
}

.buyer-help-trigger{
    display:flex;
    align-items:center;
    gap:5px;
    padding:0;
    border:0;
    background:transparent;
    cursor:pointer;
}

.buyer-help-dropdown{
    position:absolute;
    left:50%;
    top:34px;
    transform:translate(-50%,-5px);
    width:230px;
    padding:9px;
    background:rgba(5,23,39,.985);
    border:1px solid rgba(255,255,255,.10);
    border-radius:13px;
    box-shadow:0 22px 50px rgba(0,0,0,.28);
    opacity:0;
    visibility:hidden;
    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;
}

.buyer-help-menu:hover .buyer-help-dropdown,
.buyer-help-menu:focus-within .buyer-help-dropdown,
.buyer-help-menu.open .buyer-help-dropdown{
    opacity:1;
    visibility:visible;
    transform:translate(-50%,0);
}

.buyer-help-dropdown a{
    display:block!important;
    padding:10px 11px!important;
    border-radius:8px;
    color:#c8d6e4!important;
    font-size:11.5px!important;
    font-weight:500!important;
}

.buyer-help-dropdown a:hover{
    background:rgba(255,255,255,.06);
    color:#fff!important;
}

.buyer-help-dropdown a::after{
    display:none!important;
}

/* ===== SEARCH ===== */

.search-shell{
    position:relative;
    display:flex;
    align-items:center;
    height:38px;
}

.search-trigger{
    position:relative;
    display:block;
    flex:0 0 38px;
    width:38px;
    height:38px;
    padding:0;
    border:1px solid rgba(255,255,255,.13);
    border-radius:10px;
    background:rgba(255,255,255,.055);
    color:#dfe9f3;
    font-size:0;
    cursor:pointer;
}

.search-trigger::before{
    content:"";
    position:absolute;
    width:13px;
    height:13px;
    left:10px;
    top:9px;
    border:1.6px solid #dfe9f3;
    border-radius:50%;
}

.search-trigger::after{
    content:"";
    position:absolute;
    width:7px;
    height:1.6px;
    left:22px;
    top:23px;
    border-radius:2px;
    background:#dfe9f3;
    transform:rotate(45deg);
}

.search-pop{
    position:absolute;
    right:0;
    top:46px;
    width:330px;
    padding:9px;
    display:flex;
    gap:7px;
    background:rgba(5,24,40,.97);
    border:1px solid rgba(255,255,255,.12);
    border-radius:13px;
    box-shadow:0 18px 45px rgba(0,0,0,.25);
    opacity:0;
    visibility:hidden;
    transform:translateY(-6px);
    transition:
        opacity .2s ease,
        visibility .2s ease,
        transform .2s ease;
}

.search-shell:hover .search-pop,
.search-shell.open .search-pop,
.search-shell:focus-within .search-pop{
    opacity:1;
    visibility:visible;
    transform:none;
}

.search-pop input{
    min-width:0;
    flex:1;
    height:38px;
    border:0;
    outline:0;
    border-radius:9px;
    padding:0 11px;
}

.search-pop button{
    height:38px;
    padding:0 12px;
    border:0;
    border-radius:9px;
    background:#1769d2;
    color:#fff;
    font-weight:700;
}

/* ===== LANGUAGE + BUYER LOGIN ===== */

.language-control{
    position:relative;
    display:flex;
    align-items:center;
    height:38px;
}

.lang{
    height:38px;
    max-width:128px;
    border:1px solid rgba(255,255,255,.13);
    border-radius:10px;
    background:rgba(255,255,255,.06);
    color:#dfe9f3;
    padding:0 10px;
    font-size:12px;
}

#backToEnglish[hidden]{display:none;}

#backToEnglish{
    width:auto;
    max-width:none;
    white-space:nowrap;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}

.lang option{
    color:#14283d;
    background:#fff;
}

.login{
    height:38px;
    padding:0 14px;
    border:1px solid rgba(255,255,255,.14);
    border-radius:10px;
    background:#fff;
    color:var(--navy);
    font-size:12px;
    font-weight:800;
}

.login[aria-disabled="true"]{
    cursor:default;
}

/* ===== MOBILE NAVIGATION ===== */

.mobile-btn{
    display:none;
    width:40px;
    height:40px;
    padding:0;
    border:0;
    border-radius:10px;
    background:rgba(255,255,255,.08);
    color:#fff;
    font-size:20px;
}

.mobile-panel{
    display:none;
    background:#061a2d;
    border-top:1px solid rgba(255,255,255,.08);
}

.mobile-panel.open{
    display:block;
}

.mobile-panel a{
    display:block;
    padding:13px 18px;
    color:#d8e4ee;
    border-bottom:1px solid rgba(255,255,255,.06);
    font-size:13px;
}

.mobile-panel a:hover{
    color:#fff;
    background:rgba(255,255,255,.035);
}

.mobile-panel__heading{
    display:block;
    padding:13px 18px 8px;
    color:#fff;
    font-size:11px;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.mobile-sub{
    padding-left:34px!important;
    color:#93a9bc!important;
    font-size:12px!important;
}

.mobile-buyer-login{
    width:calc(100% - 36px);
    min-height:40px;
    margin:14px 18px 18px;
    border:0;
    border-radius:10px;
    background:#fff;
    color:#061a2d;
    font-size:12px;
    font-weight:800;
}

/* ===== RESPONSIVE HEADER ===== */

@media (max-width:1100px){
    .main-nav{
        gap:15px;
    }

    .nav-wrap{
        gap:16px;
    }

    .brand-name{
        font-size:16px;
    }
}

@media (max-width:1000px){
    .brand-tag{
        display:none;
    }

    .main-nav{
        display:none;
    }

    .buyer-help-menu{
        display:none;
    }

    .mobile-btn{
        display:block;
    }

    .search-pop{
        right:-100px;
    }
}

@media (max-width:680px){
    .header-inner{
        width:calc(100% - 24px);
        min-height:70px;
        gap:10px;
    }

    .real-logo{
        width:40px;
        height:40px;
        flex-basis:40px;
    }

    .brand-name{
        font-size:15px;
    }

    .nav-wrap{
        gap:8px;
    }

    .header-actions{
        gap:6px;
    }

    .search-pop{
        position:fixed;
        left:12px;
        right:12px;
        top:72px;
        width:auto;
    }

    .lang{
        max-width:92px;
    }

    .login{
        display:none;
    }
}

@media (max-width:480px){
    .brand-name{
        font-size:14px;
    }

    .lang{
        max-width:78px;
        padding:0 6px;
        font-size:11px;
    }

    .search-trigger{
        width:36px;
        height:36px;
    }

    .mobile-btn{
        width:36px;
        height:36px;
    }
}

/* ===== ACCESSIBILITY / REDUCED MOTION ===== */

@media (prefers-reduced-motion:reduce){
    *,
    *::before,
    *::after{
        animation-duration:.01ms!important;
        animation-iteration-count:1!important;
        transition-duration:.01ms!important;
        scroll-behavior:auto!important;
    }
}

/* Mobile brand subtitle */
@media(max-width:680px){
  .brand-copy{flex-direction:column;align-items:flex-start;gap:2px}
  .brand-tag{display:block;padding-left:0;border-left:0;font-size:8px;line-height:1.1}.brand-tag br{display:none}
}
