/* =========================
ROOT VARIABLES
========================= */
:root {
    --cbw-yellow: #f4c430;
    --cbw-yellow-dark: #d9a900;
    --cbw-black: #1a1a1a;
    --cbw-gray: #6b6b6b;
    --cbw-border: #e6e6e6;
}

/* =========================
BASE
========================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    overflow-x: hidden;
}

.cbw-container {
    width: min(1280px, calc(100% - 32px));
    margin: auto;
}

/* =========================
TOPBAR
========================= */
.cbw-topbar {
    background: var(--cbw-black);
    color: #fff;
    font-size: 13px;
}

.cbw-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
}

.cbw-topbar-left,
.cbw-topbar-right {
    display: flex;
    gap: 18px;
}

.cbw-topbar i {
    color: var(--cbw-yellow);
}

/* =========================
HEADER
========================= */
.cbw-main-header {
    padding: 14px 0;
    border-bottom: 1px solid var(--cbw-border);
    background: #fff;
}

.cbw-main-header-inner {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    align-items: center;
    gap: 20px;
}

.cbw-logo {
    max-width: 100%;
}

/* =========================
SEARCH
========================= */
.cbw-search-wrap {
    max-width: 650px;
    width: 100%;
}

.cbw-search-field-wrap {
    display: flex;
    border: 1px solid var(--cbw-border);
    border-radius: 50px;
    overflow: hidden;
    height: 52px;
}

.cbw-search-input {
    flex: 1;
    border: none;
    padding: 0 15px;
    outline: none;
}

.cbw-search-btn {
    width: 55px;
    background: var(--cbw-yellow);
    border: none;
    cursor: pointer;
}

.cbw-search-btn:hover {
    background: var(--cbw-yellow-dark);
}

/* =========================
BUTTONS
========================= */
.cbw-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.cbw-action-btn {
    padding: 10px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.cbw-quote-btn {
    background: var(--cbw-yellow);
    color: #000;
}

.cbw-quote-btn:hover {
    background: var(--cbw-yellow-dark);
}

/* =========================
NAVBAR (STICKY)
========================= */
.cbw-nav {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--cbw-black);
    width: 100%;
}

.cbw-nav .cbw-container {
    display: flex;
    position: relative;
}

.cbw-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.cbw-menu-item {
    position: relative;
}

/* Hover bridge */
.cbw-menu-item::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -15px;
    width: 100%;
    height: 20px;
}

.cbw-menu-link {
    color: #fff;
    padding: 16px 18px;
    text-decoration: none;
    font-weight: 600;
    display: block;
}

.cbw-menu-link:hover {
    color: var(--cbw-yellow);
}

/* =========================
MEGA MENU
========================= */
.cbw-has-mega {
    position: relative;
}

.cbw-mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: #fff;
    padding: 30px;
    border-top: 3px solid var(--cbw-yellow);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);

    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 99999;
}

.cbw-menu-item.cbw-has-mega:hover > .cbw-mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Grid */
.cbw-mega-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    max-width: 1280px;
    margin: auto;
}

.cbw-mega-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--cbw-black);
}

.cbw-mega-link {
    display: block;
    padding: 6px 0;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.cbw-mega-link:hover {
    color: var(--cbw-yellow);
}

/* =========================
MOBILE
========================= */
.cbw-mobile-toggle,
.cbw-mobile-close {
    display: none;
}

@media (max-width: 991px) {

    .cbw-topbar {
        display: none;
    }

    /* HEADER LAYOUT */
    .cbw-main-header-inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    /* LOGO */
    .cbw-logo-wrap {
        display: flex;
        align-items: center;
    }

    .cbw-logo {
        max-width: 150px;
    }

    /* TOGGLE */
    .cbw-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--cbw-yellow);
        border-radius: 8px;
        border: none;
    }

    /* SEARCH */
    .cbw-search-wrap {
        width: 100%;
        margin-top: 10px;
        order: 3;
    }

    .cbw-search-field-wrap {
        width: 100%;
        height: 44px;
    }

    .cbw-search-input {
        font-size: 14px;
        padding: 0 10px;
    }

    .cbw-search-btn {
        width: 45px;
    }

    /* HIDE BUTTONS */
    .cbw-header-actions {
        display: none !important;
    }

    /* MOBILE NAV */
    .cbw-nav-wrap {
        position: fixed;
        right: -100%;
        top: 0;
        width: 280px;
        height: 100%;
        background: #fff;
        z-index: 99999;
        padding: 20px;
        transition: 0.3s;
        overflow-y: auto;
    }

    .cbw-nav-wrap.active {
        right: 0;
    }

    .cbw-mobile-close {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: var(--cbw-yellow);
        margin-left: auto;
        margin-bottom: 15px;
    }

    .cbw-menu {
        flex-direction: column;
    }

    .cbw-menu-link {
        color: #000;
        border-bottom: 1px solid var(--cbw-border);
    }

    .cbw-mega-menu {
        width: 100%;
        margin-left: 0;
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
        box-shadow: none;
        border: none;
        padding: 10px 0;
    }

    .cbw-has-mega.active .cbw-mega-menu {
        display: block;
    }

    .cbw-mega-grid {
        grid-template-columns: 1fr;
    }
}

/* SMALL MOBILE */
@media (max-width: 575px) {

    .cbw-logo {
        max-width: 140px;
    }

    .cbw-search-field-wrap {
        height: 42px;
    }

    .cbw-search-btn {
        width: 42px;
    }
}

/* =========================
CRITICAL FIX
========================= */
.cbw-header,
.cbw-nav,
.cbw-container {
    overflow: visible !important;
}