/* Header Layout Refactor */

/* Top header bar */
.main-header {
    background: white;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

@media (max-width: 992px) {
    .main-nav {
        gap: 0.5rem;
    }
}

/* Logo */
.logo {
    color: var(--primary-deep);
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* Search Bar Container */
.search-container {
    flex: 1;
    max-width: 600px;
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 4px;
    /* Slightly easier radius */
    padding: 0;
}

.search-catalog-dropdown {
    padding: 10px 15px;
    font-size: 0.9rem;
    color: var(--text-main);
    border-right: 1px solid #e2e8f0;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 10px 15px;
    font-size: 0.95rem;
}

.search-input:focus {
    outline: none;
    box-shadow: none;
}

/* Action Buttons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-auth-outline {
    border: 1px solid var(--primary-deep);
    color: var(--primary-deep);
    background: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-auth-outline:hover {
    background: #f0fdfa;
}

.btn-sell-filled {
    background-color: var(--primary-deep);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-sell-filled:hover {
    background-color: var(--primary-dark);
}

.action-icon {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-left: 8px;
    cursor: pointer;
}

/* Row 2: Navigation Links */
.header-bottom-nav {
    border-bottom: 1px solid var(--border);
    background: white;
}

@media (min-width: 993px) {
    .header-bottom-nav .container {
        display: flex;
        gap: 24px;
        padding: 0 24px;
        overflow-x: visible;
    }
}

.header-nav-link {
    display: inline-block;
    padding: 12px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.header-nav-link:hover {
    color: var(--primary-deep);
    border-bottom-color: var(--primary-deep);
}

/* Override nav-item for new layout */
.nav-item {
    position: static;
}

/* Adjust Mega Menu positioning for new layout */
.nav-item:hover .mega-menu {
    top: 100%;
    /* Relative to the nav item in the bottom row */
    margin-top: 0;
}

@media (max-width: 992px) {
    .search-container {
        display: none !important;
        /* Force hide to replace with menu icon as requested */
    }

    .nav-actions {
        margin-left: auto;
        /* Push icons to right */
        gap: 8px;
    }

    .action-icon {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    .logo span {
        display: none;
        /* Hide text on small mobiles to prevent x-scroll */
    }

    .action-icon {
        margin-left: 0;
        /* No explicit margin on small screens, rely on flex gap */
    }
}