* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Top Bar Styles */
.top-bar {
    background-color: #3C1E12;
    color: #ffffff;
    padding: 3.5px 0;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.top-bar-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.top-bar-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 20px;
}

.social-icons {
    display: flex;
    gap: 30px;
    align-items: center;
}

.social-icons a {
    color: #ffffff;
    font-size: 14px;
    transition: opacity 0.3s;
}

.social-icons a:hover {
    opacity: 0.8;
}

.promo-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
    font-weight: 400;

}

.promo-text strong {
    font-weight: 600;
}

.top-bar-right {
    display: flex;
    gap: 45px;
    align-items: center;
}

.top-bar-right a {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    transition: opacity 0.3s;
}

.top-bar-right a:hover {
    opacity: 0.8;
}

.top-bar-right i {
    font-size: 14px;
}

/* Main Header Styles */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 3px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 1.5px;
    text-decoration: none;
}

.logo-img {
    height: 55px;
    width: auto;
}

.logo-text {
    font-family: 'Jomolhari', serif;
    color: #1a1a1a;
    font-weight: 400;
    line-height: 1.2;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.logo-text .perfect {
    display: block;
    font-size: 35px;
    font-weight: 600;
    letter-spacing: 0.9px;
    color: #3C1E12;
}

.logo-text .opticals {
    display: block;
    font-size: 11px;
    letter-spacing: 13px;
    color: #4a4f58;
    text-transform: uppercase;
    margin-top: -2px;
}

/* Navigation Menu */
.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-menu a {
    color: #333333;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-menu a:hover {
    color: #3C1E12;
}

.nav-menu a.active {
    color: #3C1E12;
}

.nav-menu .dropdown-icon {
    font-size: 10px;
}

/* Header Icons */
.header-icons {
    display: flex;
    gap: 22px;
    align-items: center;
}

.header-icons>a {
    color: #3C1E12;
    font-size: 18px;
    transition: color 0.25s, transform 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icons>a:hover {
    color: #8B5E3C;
    transform: translateY(-1px);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #3b82f6;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Profile Dropdown ─────────────────────────────── */
.profile-dropdown {
    position: relative;
}

.profile-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #3C1E12;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: color 0.25s, transform 0.2s, background 0.2s;
    line-height: 1;
}

.profile-icon-btn:hover {
    color: #8B5E3C;
    transform: translateY(-1px);
    background: rgba(139, 94, 60, 0.08);
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    min-width: 190px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    overflow: hidden;
}

/* Arrow pointer */
.profile-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 14px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    transform: rotate(45deg);
    border-radius: 2px 0 0 0;
}

/* Show on hover OR when .open class is set (keyboard/touch fallback) */
.profile-dropdown:hover .profile-dropdown-menu,
.profile-dropdown.open .profile-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover bridge — fills the gap between icon and panel so the menu
   doesn't disappear while the cursor travels downward */
.profile-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 14px;
    /* matches top: calc(100% + 14px) on the menu */
    background: transparent;
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 12px;
    color: #3C1E12;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    background: #fdf8f5;
}

.profile-dropdown-header i {
    font-size: 20px;
    color: #8B5E3C;
}

.profile-dropdown-divider {
    height: 1px;
    background: #f0ece8;
    margin: 0;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #333333;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, padding-left 0.18s;
    cursor: pointer;
}

.profile-dropdown-item i {
    font-size: 13px;
    width: 16px;
    text-align: center;
    color: #888;
    transition: color 0.18s;
    flex-shrink: 0;
}

.profile-dropdown-item:hover {
    background: #fdf8f5;
    color: #3C1E12;
    padding-left: 20px;
}

.profile-dropdown-item:hover i {
    color: #8B5E3C;
}

.profile-dropdown-item--danger {
    color: #c0392b;
}

.profile-dropdown-item--danger i {
    color: #e74c3c;
}

.profile-dropdown-item--danger:hover {
    background: #fff5f5;
    color: #a93226;
    padding-left: 20px;
}

.profile-dropdown-item--danger:hover i {
    color: #c0392b;
}


/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    color: #333333;
    cursor: pointer;
    z-index: 1100;
    position: relative;
}

/* Mobile Nav Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
     backdrop-filter: blur(2px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Nav Menu */
.nav-menu.mobile-open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: #ffffff;
    z-index: 2000;
    padding: 80px 30px 30px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

/* Nav Close Button (mobile sidebar) */
.nav-close-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-close-btn:hover {
    background: #f0f0f0;
}

.nav-menu.mobile-open .nav-close-btn {
    display: block;
}

/* Responsive Styles */

/* Large Desktop (1400px - 1800px) */
@media (max-width: 1400px) {
    .top-bar-left {
        gap: 400px;
    }
}

/* Desktop (1200px - 1400px) */
@media (max-width: 1200px) {
    .top-bar-container {
        padding: 0 30px;
    }

    .header-container {
        padding: 8px 30px;
        max-width: 1200px;
    }

    .top-bar-left {
        gap: 250px;
    }

    .top-bar-right {
        gap: 30px;
    }

    .logo-text .perfect {
        font-size: 30px;
    }

    .logo-text .opticals {
        letter-spacing: 10px;
    }

    .nav-menu ul {
        gap: 20px;
    }

    .nav-menu a {
        font-size: 12px;
    }
}

/* Tablet Landscape (992px - 1200px) */
@media (max-width: 992px) {
    .top-bar-container {
        padding: 0 20px;
    }

    .header-container {
        padding: 10px 20px;
        gap: 15px;
    }

    .top-bar-left {
        gap: 150px;
    }

    .top-bar-right {
        gap: 20px;
    }

    .top-bar {
        font-size: 12px;
    }

    .social-icons {
        gap: 20px;
    }

    .social-icons a {
        font-size: 12px;
    }

    .nav-menu {
        display: none;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-menu ul li {
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu ul li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        padding: 14px 0;
        font-size: 14px;
        display: block;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .logo-img {
        height: 50px;
    }

    .logo a {
        gap: 8px;
    }

    .logo-text .perfect {
        font-size: 28px;
        letter-spacing: 0.5px;
    }

    .logo-text .opticals {
        font-size: 10px;
        letter-spacing: 8px;
    }

    .header-icons {
        gap: 15px;
    }

    .header-icons>a,
    .profile-icon-btn {
        font-size: 16px;
    }

    .profile-wrapper {
        display: none;
    }
}

/* Tablet Portrait (768px - 992px) */
@media (max-width: 768px) {
    .top-bar {
        font-size: 11px;
        padding: 4px 0;
    }

    .top-bar-container {
        padding: 0 15px;
    }

    .header-container {
        padding: 8px 15px;
    }

    .top-bar-left {
        gap: 80px;
    }

    .top-bar-right {
        gap: 15px;
    }

    .top-bar-right a {
        font-size: 10px;
    }

    .top-bar-right i {
        font-size: 11px;
    }

    .social-icons {
        gap: 15px;
    }

    .social-icons a {
        font-size: 11px;
    }

    .promo-text {
        font-size: 10px;
    }

    .logo-img {
        height: 45px;
    }

    .logo a {
        gap: 6px;
    }

    .logo-text .perfect {
        font-size: 24px;
        letter-spacing: 0.3px;
    }

    .logo-text .opticals {
        font-size: 9px;
        letter-spacing: 6px;
    }

    .header-icons {
        gap: 12px;
    }

    .header-icons>a,
    .profile-icon-btn {
        font-size: 16px;
    }

    .cart-count {
        font-size: 9px;
        min-width: 16px;
        height: 16px;
        padding: 2px 5px;
    }
}

/* Mobile Landscape (576px - 768px) */
@media (max-width: 576px) {
    .top-bar {
        font-size: 10px;
        padding: 3px 0;
    }

    .top-bar-container {
        flex-direction: column;
        gap: 7px;
        text-align: center;
    }

    .header-container {
        padding: 6px 10px;
    }

    .top-bar-left,

    .top-bar-right {
        width: 100%;
        justify-content: center;
    }

    .top-bar-right a {
        font-size: 9px;
    }

    .top-bar-right a i {
        display: none;
    }

    .social-icons {
        gap: 10px;
    }

    .social-icons a {
        font-size: 10px;
    }

    .promo-text {
        position: static;
        /* remove absolute */
        transform: none;
        margin-top: 4px;
        white-space: normal;
    }

    .logo-img {
        height: 38px;
    }

    .logo a {
        gap: 4px;
    }

    .logo-text .perfect {
        font-size: 20px;
        letter-spacing: 0.2px;
    }

    .logo-text .opticals {
        font-size: 8px;
        letter-spacing: 4px;
    }

    .header-icons {
        gap: 10px;
    }

    .header-icons>a,
    .profile-icon-btn {
        font-size: 15px;
    }

    .mobile-menu-toggle {
        font-size: 20px;
    }
}

/* Mobile Portrait (320px - 576px) */
@media (max-width: 480px) {
    .top-bar {
        font-size: 9px;
        padding: 3px 0;
    }

    .top-bar-container {
        padding: 0 8px;
    }

    .header-container {
        padding: 5px 8px;
    }

    .top-bar-left {
        gap: 15px;
    }

    .top-bar-right {
        gap: 8px;
    }

    .social-icons {
        display: none;
    }

    .promo-text {
        font-size: 8px;
    }

    .top-bar-right a {
        font-size: 8px;
    }

    .logo-img {
        height: 32px;
    }

    .logo a {
        gap: 3px;
    }

    .logo-text .perfect {
        font-size: 16px;
        letter-spacing: 0.1px;
    }

    .logo-text .opticals {
        font-size: 7px;
        letter-spacing: 3px;
    }

    .header-icons {
        gap: 8px;
    }

    .header-icons>a,
    .profile-icon-btn {
        font-size: 14px;
    }

    /* Keep dropdown within viewport on small screens */
    .profile-dropdown-menu {
        right: -10px;
        min-width: 175px;
    }

    .cart-count {
        font-size: 8px;
        min-width: 14px;
        height: 14px;
        padding: 1px 4px;
    }

    .mobile-menu-toggle {
        font-size: 18px;
    }
}

/* Extra Small Mobile (< 375px) */
@media (max-width: 375px) {
    .top-bar {
        font-size: 8px;
    }

    .top-bar-left {
        gap: 10px;
    }

    .promo-text {
        font-size: 7px;
    }

    .top-bar-right a {
        font-size: 7px;
    }

    .logo-img {
        height: 28px;
    }

    .logo-text .perfect {
        font-size: 14px;
    }

    .logo-text .opticals {
        font-size: 6px;
        letter-spacing: 2px;
    }

    .header-icons>a,
    .profile-icon-btn {
        font-size: 13px;
    }

    .header-icons {
        gap: 6px;
    }
}

/* ─────────────────────────────────────────────────────────
   Mobile-only Profile / Account section inside hamburger
   ───────────────────────────────────────────────────────── */

/* Hidden on desktop — shown only when the mobile drawer is open */
.mobile-nav-profile-item {
    display: none;
}

.nav-menu.mobile-open .mobile-nav-profile-item {
    display: block;
    list-style: none;
}

/* Divider line above the profile row */
.mobile-nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e8ddd5, transparent);
    margin: 12px 0 4px;
}

/* The profile row link */
.mobile-nav-profile-link {
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 14px 10px !important;
    border-radius: 10px;
    text-decoration: none;
    color: #3C1E12 !important;
    background: transparent;
    transition: background 0.22s ease, padding-left 0.22s ease;
    cursor: pointer;
    font-size: 14px !important;
    font-family: 'Inter', sans-serif;
}

.mobile-nav-profile-link:hover,
.mobile-nav-profile-link:focus {
    background: rgba(60, 30, 18, 0.06);
    padding-left: 16px !important;
    outline: none;
}

/* Circular icon container */
.mobile-nav-profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5ece4 0%, #e8d5c4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #3C1E12;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(60, 30, 18, 0.12);
    transition: box-shadow 0.22s, transform 0.22s;
}

.mobile-nav-profile-link:hover .mobile-nav-profile-icon {
    box-shadow: 0 4px 14px rgba(60, 30, 18, 0.2);
    transform: scale(1.05);
}

/* Text block: name + subtitle */
.mobile-nav-profile-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 2px;
}

.mobile-nav-profile-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.2;
}

.mobile-nav-profile-sub {
    font-size: 11px;
    color: #888;
    font-weight: 400;
    line-height: 1.2;
}

/* Trailing chevron */
.mobile-nav-profile-arrow {
    font-size: 11px;
    color: #bbb;
    flex-shrink: 0;
    transition: transform 0.2s, color 0.2s;
}

.mobile-nav-profile-link:hover .mobile-nav-profile-arrow {
    transform: translateX(3px);
    color: #8B5E3C;
}

/* Logout variant — red accent */
.mobile-nav-logout-link {
    color: #c0392b !important;
}

.mobile-nav-logout-link .mobile-nav-profile-icon {
    background: linear-gradient(135deg, #fff0ef 0%, #ffdad9 100%);
    color: #c0392b;
}

.mobile-nav-logout-link .mobile-nav-profile-name {
    color: #c0392b;
}

.mobile-nav-logout-link:hover,
.mobile-nav-logout-link:focus {
    background: rgba(192, 57, 43, 0.06) !important;
}

.mobile-nav-logout-link:hover .mobile-nav-profile-icon {
    box-shadow: 0 4px 14px rgba(192, 57, 43, 0.2);
}

.mobile-nav-logout-link:hover .mobile-nav-profile-arrow {
    color: #c0392b;
}