/* ========================================== */
/* HEADER STYLES (Dr Pathik - Final)          */
/* ========================================== */

:root {
    --bg-color: #FFFDF9;
    --section-bg: #F0E4D2;
    --heading-color: #493321;
    --btn-color: #805633;
    --body-text: #30271F;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

.topbar-container {
    background-color: var(--bg-color);
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid var(--section-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    position: relative;
    z-index: 1000;
}

/* Desktop: Flex Row */
.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
}

/* --- LEFT: Logo --- */

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;        
    overflow: hidden;          
    background: #fff;          
    border: 1px solid #ddd;  
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;         
    display: block;
    border-radius: 50%;        
}
.topbar-left { flex-shrink: 0; }
.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.logo-icon {
    width: 60px;
    height: 60px;
    background-color: var(--section-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.logo-icon svg { width: 20px; height: 20px; }
.brand-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--heading-color);
    letter-spacing: -0.3px;
    white-space: nowrap;
}

/* --- CENTER: Search Bar --- */
.topbar-center { 
    flex-grow: 1;
    max-width: 650px;
    min-width: 0;
}

.search-form {
    display: flex;
    background: white;
    border: 1.5px solid #FBCFE8;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 40px;
}
.search-form:focus-within {
    border-color: var(--btn-color);
    box-shadow: 0 0 0 3px rgba(128, 86, 51, 0.1);
}
.search-input {
    width: 100%;
    padding: 0 12px;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--body-text);
    background: transparent;
    min-width: 0;
}
.search-input::placeholder { color: #A39A91; }
.search-btn {
    background-color: var(--btn-color);
    border: none;
    padding: 0 18px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
.search-btn:hover { background-color: #6A4527; }
.search-btn svg { width: 16px; height: 16px; }

/* --- RIGHT: Actions --- */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.auth-btn {
    text-decoration: none;
    color: var(--heading-color);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 16px;
    border: 1.5px solid var(--section-bg);
    border-radius: 24px;
    transition: all 0.2s;
    background-color: transparent;
    white-space: nowrap;
}
.auth-btn:hover {
    border-color: var(--btn-color);
    background-color: white;
}

.grid-menu-btn {
    background: #F3EFE9;
    border: 1px solid #E2DCD3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}
.grid-menu-btn svg { width: 20px; height: 20px; display: block; }
.grid-menu-btn:hover { background: #EAE3D9; border-color: #D1C7B8; }

/* ========================================== */
/* SIDEBAR MENU                               */
/* ========================================== */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

.sidebar-menu {
    position: fixed;
    top: 0;
    right: -700px;
    width: 700px;
    max-width: 90%;
    height: 100vh;
    background-color: #FFFFFF;
    box-shadow: -5px 0 25px rgba(0,0,0,0.08);
    z-index: 1999;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar-menu.active { right: 0; }

.sidebar-menu-inner {
    padding: 24px 30px 50px 30px;
    display: flex;
    flex-direction: column;
}

.sidebar-menu-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #F0E4D2;
}
.menu-brand-badge {
    background-color: #493321;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.badge-star { color: #FCD34D; }
.menu-top-actions { display: flex; align-items: center; gap: 10px; }
.menu-login-btn {
    text-decoration: none;
    color: #493321;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 14px;
    border: 1.5px solid #E2DCD3;
    border-radius: 20px;
    transition: all 0.2s;
    white-space: nowrap;
}
.menu-login-btn:hover { border-color: #805633; }
.menu-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #A39A91;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
}
.menu-close-btn:hover { color: #493321; }

.upgrade-bar {
    background: #FFF5F5;
    color: #EC4899;
    padding: 8px 14px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 24px;
    display: inline-block;
    align-self: flex-start;
    border: 1px solid #FBCFE8;
}

.sidebar-menu-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}
.menu-column { display: flex; flex-direction: column; }
.menu-heading {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #A39A91;
    font-weight: 600;
    margin-bottom: 12px;
    margin-top: 0;
}
.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.menu-list li a {
    padding: 6px 0 !important;
    font-size: 14px !important;
    font-weight: 500;
    line-height: 1.4;
    color: #374151 !important;
    margin-bottom: 2px;
    text-decoration: none;
    cursor: pointer;
    display: block;
    background: transparent !important;
    border-radius: 6px;
    transition: color .12s;
}
.menu-list li a:hover { color: #805633 !important; }

.social-icons { display: flex; gap: 10px; }
.social-icon {
    width: 34px;
    height: 34px;
    background: #F0E4D2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #493321;
    font-size: 0.65rem;
    font-weight: bold;
    font-family: var(--font-body);
    transition: all 0.2s;
}
.social-icon:hover { background: #805633; color: white; }

.app-download-btn { display: inline-block; transition: opacity 0.2s; }
.app-download-btn:hover { opacity: 0.8; }

/* ========================================== */
/* RESPONSIVE (Mobile - One Row Same Design)  */
/* ========================================== */

/* Desktop pe Login dikhe */
@media (min-width: 769px) {
    .hide-on-mobile { display: inline-block; }
}

/* Mobile (<= 768px) */
@media (max-width: 768px) {
    .topbar-inner {
        padding: 0 10px;
        gap: 6px;
        flex-wrap: nowrap;
    }
    
    .topbar-left { order: 1; flex-shrink: 0; }
    .topbar-center { order: 2; flex-grow: 1; min-width: 0; }
    .topbar-right { order: 3; flex-shrink: 0; }

    /* Login Button Hide */
    .hide-on-mobile { display: none !important; }

    /* Logo chhota */
    .logo-icon { width: 34px; height: 34px; }
    .logo-icon svg { width: 18px; height: 18px; }
    
    /* Brand Name */
    .brand-name { 
        font-size: 0.9rem;
    }

    /* Search bar */
    .search-form { height: 36px; }
    .search-input { 
        font-size: 12px; 
        padding: 0 8px; 
    }
    .search-btn { padding: 0 12px; }
    .search-btn svg { width: 14px; height: 14px; }

    /* Grid Button */
    .grid-menu-btn { width: 34px; height: 34px; }
    .grid-menu-btn svg { width: 16px; height: 16px; }

    /* Sidebar Mobile */
    .sidebar-menu-content { grid-template-columns: 1fr; }
    .sidebar-menu { width: 100%; max-width: 100%; right: -100%; }
    .sidebar-menu-inner { padding: 20px 20px 40px 20px; }
}

/* Extra Small (<= 480px) - Brand name hide */
@media (max-width: 480px) {
    .brand-name { display: none; }
    .logo-icon { width: 32px; height: 32px; }
    .grid-menu-btn { width: 32px; height: 32px; }
    .search-input { font-size: 11px; }
}

.main-nav {
    width: 100%;
    background-color: var(--bg-color);
    border-top: 1px solid var(--section-bg);
    /* border-bottom: 1px solid var(--section-bg); */
    padding: 0;
    margin-top: 10px;
}

.nav-list {
    list-style: none;
    margin: 0 auto;
    padding: 12px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    max-width: 100%;
}

.nav-list li {
    display: inline-block;
}

.nav-list li a {
    text-decoration: none;
    color: #30271F;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    padding: 6px 0;
    position: relative;
    transition: color 0.25s ease;
    white-space: nowrap;
}

.nav-list li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--btn-color);
    transition: width 0.3s ease;
}

.nav-list li a:hover {
    color: var(--btn-color);
}

.nav-list li a:hover::after {
    width: 100%;
}

@media (max-width: 992px) {
    .nav-list {
        gap: 20px;
        padding: 10px 20px;
    }
    .nav-list li a {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
}