/* ══════════════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════════════ */
:root {
    --orange:   #fa532e;
    --orange-d: #d94020;
    --navy:     #00436a;
    --navy-d:   #002f4d;
    --navy-l:   #e8f4fb;
    --white:    #ffffff;
    --text:     #0d1b2a;
    --muted:    #6b7a8d;
    --border:   #e3eaf2;
    --shadow:   0 20px 50px rgba(0,0,0,.22);
    --ease:     all .22s cubic-bezier(.4,0,.2,1);
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    /* topbar 38px + navbar 64px = 102px */
    padding-top: 102px;
}
a { text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { display: block; }

/* ══════════════════════════════════════════════════
   TOP HEADER BAR
══════════════════════════════════════════════════ */
.top-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 38px !important;
    background: var(--navy) !important;
    color: #fff;
    z-index: 1060 !important;
    display: flex !important;
    align-items: center !important;
    box-shadow: 0 1px 6px rgba(0,0,0,.25);
}
.top-header .th-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 0 20px;
}

/* topbar links */
.top-link {
    color: #fff;
    font-size: 17px;
    display: flex;
    align-items: center;
    position: relative;
    opacity: .9;
    transition: opacity .2s;
}
.top-link:hover { opacity: 1; color: #fff; }

/* badge */
#cart-count, #wishlist-count {
    position: absolute;
    top: -6px; right: -9px;
    background: var(--orange);
    color: #fff;
    font-size: 9px; font-weight: 700;
    min-width: 16px; height: 16px;
    line-height: 16px; text-align: center;
    border-radius: 50%;
    border: 1.5px solid var(--navy);
}

/* user greeting */
.th-user {
    color: rgba(255,255,255,.9);
    font-size: 13px; font-weight: 500;
}

/* login pill */
.th-login {
    color: #fff;
    font-size: 13px; font-weight: 600;
    padding: 4px 15px;
    border: 1.5px solid rgba(255,255,255,.4);
    border-radius: 20px;
    transition: var(--ease);
}
.th-login:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

/* search button */
.th-search-btn {
    background: none; border: none;
    color: #fff; font-size: 18px;
    cursor: pointer;
    display: flex; align-items: center;
    opacity: .9; line-height: 1;
}
.th-search-btn:hover { opacity: 1; }

/* ── Floating search box ── */
.float-search {
    position: fixed;
    top: 4px; left: 50%;      /* FIX: within topbar (height 38px) */
    transform: translateX(-50%) scaleX(.88);
    width: 0; max-width: 460px;
    opacity: 0; pointer-events: none;
    transition: width .28s ease, opacity .22s ease, transform .28s ease;
    z-index: 99999;
}
.float-search.open {
    width: min(460px, 92vw);
    opacity: 1; pointer-events: all;
    transform: translateX(-50%) scaleX(1);
}
.fs-form {
    display: flex; align-items: center;
    background: #fff; border-radius: 50px;
    box-shadow: 0 6px 24px rgba(0,0,0,.2);
    height: 37px; padding: 0 4px 0 14px;
    border: 2px solid #e0e4ee; overflow: hidden;
}
.fs-form:focus-within { border-color: var(--orange); }
.fs-input {
    flex: 1; border: none; outline: none;
    font-size: 13.5px; color: #222;
    background: transparent; height: 100%;
}
.fs-input::placeholder { color: #aaa; }
.fs-btn {
    background: none; border: none;
    cursor: pointer; display: flex;
    align-items: center; padding: 0 9px;
}
.fs-submit { color: var(--orange); font-size: 16px; }
.fs-close  { color: #bbb; font-size: 14px; }
.fs-close:hover { color: #555; }

/* ══════════════════════════════════════════════════
   MAIN NAVBAR — Complete Bootstrap override
══════════════════════════════════════════════════ */
.top-navbar {
    position: fixed !important;
    top: 38px !important;
    left: 0 !important;
    width: 100% !important;
    background: #fff !important;
    z-index: 1050 !important;
    box-shadow: 0 2px 14px rgba(0,0,0,.09) !important;
    /* FIX: must have explicit height so content doesn't push it */
    height: 64px !important;
}

/* FIX: Bootstrap nav resets */
.top-navbar nav.navbar {
    padding: 0 !important;
    margin: 0 !important;
    height: 64px !important;
    min-height: 64px !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    background: #fff !important;
    flex-wrap: nowrap !important;
}

/* FIX: container-fluid must not add extra padding/margin */
.top-navbar .container-fluid.side-padding {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: 64px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

/* ── LOGO ── */
.logo-brand {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    text-decoration: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    line-height: 1;
}
/* Bootstrap navbar-brand adds margin-right — reset */
.navbar-brand.logo-brand {
    margin-right: auto !important;
}
.logo-brand img {
    height: 100px !important;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    transition: transform .25s ease;
}
.logo-brand:hover img { transform: scale(1.04); }
.logo-brand .logo-txt {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.logo-brand .logo-name {
    display: block;
    font-size: 19px;
    font-weight: 800;
    color: var(--navy) !important;
    line-height: 1;
    margin: 0 !important;
    padding: 0 !important;
}
.logo-brand .logo-name em {
    color: var(--orange) !important;
    font-style: normal;
}
.logo-brand .logo-sub {
    display: block;
    font-size: 10px;
    color: #444 !important;   /* FIX: dark color, visible on white navbar */
    margin-top: 3px;
    text-align: right;
    letter-spacing: .2px;
    font-weight: 500;
}

/* ── HAMBURGER ── */
.burger-toggler {
    background: none !important;
    border: none !important;
    padding: 7px !important;
    cursor: pointer;
    display: none;        /* shown in media query */
    align-items: center;
    justify-content: center;
    margin-left: auto !important;
    text-decoration: none;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.burger-toggler .burger-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    pointer-events: none;
}
.burger-toggler .bar {
    display: block;
    width: 24px; height: 2.5px;
    background: var(--navy);
    border-radius: 2px;
    transition: var(--ease);
}
.burger-toggler:hover .bar { background: var(--orange); }

/* ── NAV LINKS ── */
/* FIX: .navbar-collapse must be visible on desktop */
.top-navbar .navbar-collapse {
    display: flex !important;
    flex-basis: auto !important;
    align-items: center;
    flex: 1;
}

.navbar-nav {
    display: flex !important;
    align-items: center !important;
    gap: 0;
    height: 64px;
    margin: 0 auto !important;
    padding: 0 !important;
    list-style: none !important;
}
.navbar-nav .nav-item {
    position: relative !important;
    height: 64px !important;
    display: flex;
    align-items: center;
    list-style: none !important;
}
.navbar-nav .nav-link {
    display: flex !important;
    align-items: center !important;
    height: 64px !important;
    padding: 0 13px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0d1b2a !important;
    white-space: nowrap;
    position: relative;
    background: none !important;
    text-decoration: none !important;
    line-height: 1 !important;
}
.navbar-nav .nav-link::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important; left: 13px !important;
    width: 0 !important; height: 2px !important;
    background: var(--orange);
    transition: width .22s ease;
    border-radius: 2px;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--orange) !important; }
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after { width: calc(100% - 26px) !important; }

/* ── LOGIN BUTTON in navbar ── */
/* FIX: contained within navbar height, no overflow */
.nav-login-btn {
    display: inline-flex !important;
    align-items: center !important;
    background: var(--orange) !important;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 25px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    margin-left: 6px !important;
    box-shadow: 0 3px 10px rgba(250,83,46,.28);
    white-space: nowrap;
    transition: var(--ease);
    text-decoration: none !important;
    /* FIX: prevent it from exceeding navbar */
    height: auto !important;
    line-height: 1 !important;
}
.nav-login-btn:hover {
    background: var(--navy) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(0,67,106,.22) !important;
}
/* FIX: remove the underline ::after from login button */
.navbar-nav .nav-item .nav-login-btn::after { display: none !important; }

/* ── OVERFLOW FIX — all dropdown containers must be visible ── */
header, .navbar, .navbar-nav,
.navbar-collapse, .nav-item,
.mega-wrapper, .nav-item.dropdown {
    overflow: visible !important;
}
/* Navbar itself: clip on Y to prevent scrollbar but allow X overflow for dropdowns */
.top-navbar {
    overflow-x: clip !important;
    overflow-y: visible !important;
}

/* ══════════════════════════════════════════════════
   SIMPLE DROPDOWN
══════════════════════════════════════════════════ */
.nav-item.dropdown { position: relative; }

.simple-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px); left: 0;
    background: #fff;
    min-width: 230px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 10px 8px;
    z-index: 1300;
    border: 1px solid rgba(0,0,0,.06);
    animation: ddFade .18s ease;
}
.nav-item.dropdown:hover > .simple-dropdown { display: block; }

.simple-dropdown a {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    color: var(--text); font-size: 13.5px; font-weight: 500;
    border-radius: 10px;
    transition: var(--ease);
}
.simple-dropdown a i { color: var(--orange); font-size: 13px; width: 16px; }
.simple-dropdown a:hover {
    background: var(--navy-l);
    color: var(--orange);
    padding-left: 16px;
}

@keyframes ddFade {
    from { opacity:0; transform: translateY(-6px); }
    to   { opacity:1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════
   MEGA MENU — 3 COLUMNS (L1 › L2 › L3)
   Exactly matching the image design
══════════════════════════════════════════════════ */
.mega-wrapper { position: relative; }

.mega-container {
    display: none;
    position: absolute;
    top: calc(100% + 2px); left: 0;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 14px;
    z-index: 1300;
    border: 1px solid rgba(0,0,0,.06);
    animation: ddFade .18s ease;
    align-items: flex-start;
    min-width: 240px;
}
.mega-wrapper:hover > .mega-container { display: flex; }

/* columns */
.mega-left { width: 240px; flex-shrink: 0; }

.mega-middle,
.mega-right {
    width: 240px; flex-shrink: 0;
    border-left: 1px solid var(--border);
    padding-left: 8px;
    display: none;
    flex-direction: column;
    max-height: 420px;
    overflow-y: auto;
}
.mega-middle::-webkit-scrollbar,
.mega-right::-webkit-scrollbar  { width: 4px; }
.mega-middle::-webkit-scrollbar-thumb,
.mega-right::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.mega-middle.active,
.mega-right.active { display: flex; }

/* items — exactly like image */
.mega-main-item,
.mega-sub-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    color: var(--text);
    font-size: 13.5px; font-weight: 500;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--ease);
    position: relative;
}
.mega-main-item:hover,
.mega-main-item.active,
.mega-sub-item:hover,
.mega-sub-item.active {
    background: var(--navy-l);
    color: var(--orange);
}
/* arrow › for items with children */
.mega-main-item[data-has-child="1"]::after,
.mega-sub-item.has-child::after {
    content: '›';
    font-size: 18px; color: #ccc;
    line-height: 1;
    margin-left: auto; padding-left: 8px;
}
.mega-main-item[data-has-child="1"]:hover::after,
.mega-main-item[data-has-child="1"].active::after,
.mega-sub-item.has-child:hover::after,
.mega-sub-item.has-child.active::after { color: var(--orange); }

/* ══════════════════════════════════════════════════
   MOBILE OFFCANVAS
══════════════════════════════════════════════════ */
.side-modal.offcanvas {
    width: min(300px, 90vw) !important;
    border: none;
}

.mobile-menu-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between;
}
.mobile-menu-header .logo-brand img { height: 70px !important; }

.custom-close-btn {
    width: 28px; height: 28px;
    background: var(--orange); color: #fff;
    border: none; border-radius: 50%;
    font-size: 15px; font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: var(--ease);
}
.custom-close-btn:hover { background: var(--orange-d,#d94020); }

.mobile-offcanvas-body {
    display: flex; flex-direction: column;
    height: 100%; padding: 0; overflow: hidden;
}

/* mobile search */
.mobile-search-area {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.universal-search-form { width: 100%; }
.universal-search-box  { position: relative; width: 100%; }
.universal-search-input {
    width: 100%; height: 46px;
    padding: 0 58px 0 18px;
    border-radius: 30px;
    border: 2px solid var(--border);
    font-size: 14px; outline: none;
    transition: border-color .2s;
}
.universal-search-input:focus { border-color: var(--orange); }
.universal-search-btn {
    position: absolute; right: 4px; top: 50%;
    transform: translateY(-50%);
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--orange); border: none;
    color: #fff; font-size: 15px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.universal-search-btn:hover { background: var(--orange-d,#d94020); }

/* mobile menu scroll */
.mobile-menu-scroll {
    flex: 1; overflow-y: auto;
    padding: 8px 14px 20px;
}
.mobile-menu-scroll::-webkit-scrollbar { width: 4px; }
.mobile-menu-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* mobile nav items */
.mobile-menu { list-style: none; padding: 0; margin: 0; }
.menu-item { border-bottom: 1px solid var(--border); }
.menu-item:last-child { border-bottom: none; }

.menu-item > a,
.menu-item > .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 4px;
    font-size: 15px; font-weight: 600;
    color: #222;
    text-decoration: none;
    background: none; border: none;
    width: 100%; text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color .2s;
}
.menu-item > a:hover,
.menu-item > .menu-toggle:hover { color: var(--orange); }

/* + icon */
.menu-icon {
    width: 24px; height: 24px; flex-shrink: 0;
    background: var(--navy-l);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--orange);
    font-size: 18px; font-weight: 700; line-height: 1;
    transition: transform .3s, background .2s;
}
.menu-item.open > .menu-toggle { color: var(--orange); }
.menu-item.open > .menu-toggle .menu-icon {
    transform: rotate(45deg);
    background: var(--orange); color: #fff;
}

/* submenu */
.submenu {
    list-style: none; padding: 0 0 0 10px; margin: 0;
    max-height: 0; overflow: hidden;
    transition: max-height .32s cubic-bezier(.4,0,.2,1);
}
.submenu li { border-bottom: 1px dashed #efefef; }
.submenu li:last-child { border-bottom: none; }
.submenu li a {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 4px;
    font-size: 13.5px; color: var(--muted);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color .2s;
}
.submenu li a::before { content:'›'; color:var(--orange); font-size:16px; line-height:1; }
.submenu li a:hover { color: var(--orange); }

/* ══════════════════════════════════════════════════
   GLOBAL UTILITIES
══════════════════════════════════════════════════ */
.add-to-cart, .btn-primary {
    background-color: var(--orange) !important;
    border-color: var(--orange) !important;
    color: #fff !important; font-weight: 600;
    transition: var(--ease);
}
.add-to-cart:hover, .btn-primary:hover {
    background-color: var(--navy) !important;
    border-color: var(--navy) !important;
    transform: translateY(-1px);
}

/* Table */
#projectTable {
    border: 2px solid #ddd; border-radius: 12px;
    border-collapse: separate; border-spacing: 0;
    overflow: hidden; width: 100%;
}
#projectTable th, #projectTable td { border: 1px solid #ddd; padding: 10px 14px; text-align: left; }
#projectTable thead th { background: #f5f7fa; font-weight: 700; }
#projectTable tbody tr:nth-child(even) { background: #f9fafb; }
#projectTable tbody tr:hover { background: #e8f0fe; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 991px) {
    /* topbar 38 + navbar 52 = 90 */
    body { padding-top: 90px !important; }

    .top-navbar { height: 52px !important; top: 38px !important; }
    .top-navbar nav.navbar { height: 52px !important; min-height: 52px !important; }
    .top-navbar .container-fluid.side-padding { height: 52px !important; }
    .navbar-nav { display: none !important; }
    .top-navbar .navbar-collapse { display: none !important; flex: none !important; }
    .burger-toggler { display: flex !important; }
    .mega-container { display: none !important; }
    .simple-dropdown { display: none !important; }
    .logo-brand img { height: 120px !important; }
    .logo-brand .logo-name { font-size: 50px; }
}
@media (max-width: 576px) {
    /* topbar 34 + navbar 52 = 86 */
    .top-header { height: 34px !important; }
    .top-navbar { top: 34px !important; }
    body { padding-top: 86px !important; }
    .th-container { gap: 10px; padding: 0 10px; }
    .top-link { font-size: 15px; }
    .float-search.open { width: 94vw; }
    .logo-brand img { height: 120px !important; }
    .logo-brand .logo-name { font-size: 16px; }
    .logo-brand .logo-sub  { font-size: 20px; color: #444 !important; display: block !important; }
}
