/* ==========================================================================
   Smega Shared Header Styles (Matches Index Header Pixel-Perfect)
   ========================================================================== */

:root {
    --header-height: 97px;
    --header-bg: #ffffff;
    --border-color: #f1f5f9;
    --border-card: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-purple: #6366f1;
    --accent-purple-light: #e0e7ff;
    --accent-blue: #0b1c46;
    --accent-blue-hover: #07122e;
    --bg-main: #f8fafc;
}

.main-header {
    height: var(--header-height);
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-sizing: border-box;
    width: 100%;
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
}

.brand-logo-img {
    height: 40px;
    margin: 0;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.logo-container:hover .brand-logo-img {
    transform: scale(1.02);
}

.logo-text { 
    font-family: "Nunito Sans", sans-serif !important; 
    font-weight: 900 !important; 
    letter-spacing: -1.5px !important;
    font-size: 2.0rem;
    color: var(--text-primary);
}

.logo-emoji {
    font-size: 1.4rem;
}

/* Redesigned Premium Search Bar */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 680px;
    margin: 0 2rem;
    min-width: 0;
}

.search-bar-redesigned {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: 99px;
    padding: 4px 6px 4px 16px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.search-bar-redesigned:focus-within {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.search-field {
    display: flex;
    align-items: center;
    flex: 1.2;
    gap: 0.5rem;
    min-width: 0;
}

.search-field.location {
    flex: 0.8;
    border-left: 1px solid var(--border-color);
    padding-left: 1rem;
    min-width: 0;
}

.search-icon-inline {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.search-input-inline {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
}

.search-input-inline::placeholder {
    color: #94a3b8;
}

.location-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    width: 100%;
}

.location-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.caret-icon {
    color: var(--text-secondary);
    margin-left: auto;
    margin-right: 0.5rem;
}

.search-submit-btn-new {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-purple);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.search-submit-btn-new:hover {
    background: #4f46e5;
    transform: scale(1.05);
}

/* Header Right Options */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

.business-dash-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--border-card);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.business-dash-btn:hover {
    background: var(--bg-main);
    border-color: #cbd5e1;
}

/* Header Auth Pill Buttons */
.business-dash-btn.header-login-btn {
    border: none;
    background: none;
    font-weight: 700;
    color: var(--accent-blue);
    transition: all 0.2s ease;
    padding: 8px 12px;
}

.business-dash-btn.header-login-btn:hover {
    background: none;
    color: var(--accent-blue-hover);
    transform: translateY(-1px);
}

.business-dash-btn.header-signup-btn {
    background: var(--accent-blue);
    color: white;
    border: none;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.15);
}

.business-dash-btn.header-signup-btn:hover {
    background: var(--accent-blue-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 8px 12px -1px rgba(30, 58, 138, 0.25);
}

.business-dash-btn.header-signup-btn:active {
    transform: translateY(0);
}

/* User Account Display in Header */
.header-user-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 2px 6px;
    border-radius: 99px;
    text-decoration: none;
}

.header-user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: color 0.2s ease;
    white-space: nowrap;
}

.header-user-wrapper:hover .header-user-name {
    color: var(--accent-purple);
}

.header-user-wrapper:hover .user-avatar-btn {
    border-color: var(--accent-purple);
}

.user-avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s;
    flex-shrink: 0;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-btn:hover {
    border-color: var(--accent-purple);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Media Queries */
@media (max-width: 1100px) {
    .main-header {
        flex-wrap: wrap;
        height: auto;
        padding: 1rem 1.5rem;
        gap: 1rem;
    }

    .header-center {
        order: 3;
        margin: 0;
        max-width: 100%;
        flex: 1 1 100%;
    }

    .header-right {
        margin-left: auto;
    }
}

@media (max-width: 600px) {
    .main-header {
        padding: 0.75rem 1rem;
    }

    .search-field.location {
        display: none;
    }

    .brand-logo-img {
        height: 34px;
    }
}
