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

.main-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-inline: 20px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #f0f0f2;
    box-shadow: 0 4px 20px rgba(20, 20, 40, .045);
}

.top-header {
    width: 100%;
    background: transparent;
    position: relative;
    z-index: 5;
}

.top-header .wrapper {
    min-height: 76px;
}

.header-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo img {
    height: 42px;
    width: auto;
    display: block;
}

.search-box {
    max-width: 600px;
    width: 100%;
}

.search-input {
    height: 46px;
    border-radius: 14px;
    background: #f7f7f8;
    border: 1px solid transparent;
    padding-inline: 18px;
    font-size: 14px;
    color: #3f4064;
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.search-input::placeholder {
    color: #96999f;
}

.search-input:hover {
    background: #f3f3f5;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(239, 64, 86, .08);
    background: #fff;
    border-color: #e6e6e8;
}

.icon-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #ededf0;
    background: #fff;
    color: #3f4064;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.icon-btn:hover {
    color: #ef4056;
    border-color: #f1c7ce;
    background: #fff;
    box-shadow: 0 6px 16px rgba(20, 20, 40, .07);
    transform: translateY(-1px);
}

.login-btn {
    height: 42px;
    padding: 0 15px;
    border: 1px solid #e5e5e8;
    background: #fff;
    color: #3f4064;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 600;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.login-btn:hover {
    color: #ef4056;
    background: #fff7f8;
    border-color: #f0c5cb;
    transform: translateY(-1px);
}

/* =========================
   BOTTOM NAV
========================== */

.bottom-nav {
    background: transparent;
    border-top: 1px solid #f5f5f6;
    transition:
        max-height .3s ease,
        opacity .2s ease,
        padding .3s ease;
    overflow: visible;
    max-height: 62px;
    opacity: 1;
}

.bottom-nav > .header-container > .d-flex {
    min-height: 52px;
}

.bottom-nav.hide-nav {
    max-height: 0;
    opacity: 0;
    border-top: 0;
}

.bottom-nav .nav {
    align-items: center;
}

.bottom-nav .nav-link {
    color: #555866;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 2px;
    position: relative;
    transition: color .2s ease;
    white-space: nowrap;
}

.bottom-nav .nav-link::after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    bottom: 1px;
    height: 2px;
    border-radius: 999px;
    background: #ef4056;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}

.bottom-nav .nav-link:hover {
    color: #ef4056;
}

.bottom-nav .nav-link:hover::after {
    transform: scaleX(.7);
}

.location-btn {
    background: #fffaf0;
    border: 1px solid #f2e3bd;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #735b1d;
    padding: 7px 13px;
    white-space: nowrap;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.location-btn:hover {
    background: #fff6dc;
    border-color: #e9d49d;
    transform: translateY(-1px);
}

/* =========================
   MEGA MENU
========================== */

.mega-menu-item {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: 1100px;
    background: #fff;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 18px 45px rgba(20, 20, 40, .12);
    border: 1px solid #eeeef1;
    display: none;
    z-index: 2000;
    overflow: hidden;
}

.mega-menu-wrapper {
    display: flex;
    min-height: 500px;
}

.mega-menu-item:hover .mega-menu {
    display: block;
}

.mega-sidebar {
    width: 220px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #eee;
}

.mega-link {
    border: 0;
    background: transparent;
    text-align: right;
    padding: 14px 18px;
    font-size: 14px;
    color: #3f4064;
    transition: background .2s ease, color .2s ease;
}

.mega-link:hover,
.mega-link.active {
    background: #fff;
    color: #ef4056;
    font-weight: 700;
}

.mega-content {
    flex: 1;
    padding: 24px;
    background: #fff;
}

.mega-panel {
    display: none;
}

.mega-panel.active {
    display: block;
}

.mega-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.mega-columns h6 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
}

.mega-columns a {
    display: block;
    color: #5c5f66;
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 14px;
    transition: color .2s ease;
}

.mega-columns a:hover {
    color: #ef4056;
}

/* =========================
   MOBILE HEADER
========================== */

@media (max-width: 992px) {
    .main-header {
        padding-inline: 12px;
    }

    .top-header .wrapper {
        flex-wrap: wrap;
        min-height: auto;
        padding-block: 12px !important;
    }

    .search-box {
        order: 3;
        width: 100%;
        max-width: 100%;
    }

    .bottom-nav {
        overflow-x: auto;
    }

    .bottom-nav .nav {
        flex-wrap: nowrap;
        min-width: max-content;
    }

    .location-btn {
        display: none !important;
    }
}
