/*
 * ╔══════════════════════════════════════════════════════════════╗
 * ║          LAVISH FINE JEWELLERS — DEDICATED HEADER CSS         ║
 * ║          TMC-Style Premium Layout & Responsiveness             ║
 * ╚══════════════════════════════════════════════════════════════╝
 */

.top-bar {
    display: none; /* We remove the simple top bar in favor of the premium top brown border and double-row layout */
}

.navbar {
    position: sticky;
    top: 0;
    background: rgba(250, 247, 242, 0.96); /* Elegant warm ivory background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-top: 4px solid var(--espresso); /* Thick brown border at the very top */
    border-bottom: 1px solid rgba(176, 141, 87, 0.15); /* Light copper border at bottom */
    transition: all 0.4s var(--ease);
}

.navbar.scrolled {
    background: rgba(250, 247, 242, 0.98);
    box-shadow: 0 4px 30px rgba(58, 46, 42, 0.06);
}

/* --- Left & Right Side Navigation Containers --- */
.nav-side-left {
    display: flex;
    align-items: center;
    gap: 22px; /* Balanced horizontal spacing for left menu items */
    justify-content: flex-start;
    height: 100%;
}

.nav-side-right {
    display: flex;
    align-items: center;
    gap: 22px; /* Balanced horizontal spacing for right menu items */
    justify-content: flex-end;
    height: 100%;
}

/* --- Navigation Typography & Links --- */
.nav-link {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--charcoal);
    position: relative;
    transition: color 0.3s;
    white-space: nowrap;
    padding: 6px 0;
    cursor: pointer;
    font-family: var(--font-body);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--espresso);
    transition: width 0.3s var(--ease);
}

.nav-link:hover::after,
.nav-item-has-menu:hover > .nav-link::after {
    width: 100%;
}

.nav-link:hover,
.nav-item-has-menu:hover > .nav-link {
    color: var(--espresso);
}

/* Secondary links (like BOOK AN APPOINTMENT) */
.nav-link-secondary {
    font-size: 10.5px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--espresso); /* Changed to rich theme color for high contrast */
    transition: color 0.3s;
    white-space: nowrap; /* Prevents Book an Appointment from wrapping onto two lines */
    position: relative;
    padding: 6px 0;
}

.nav-link-secondary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--espresso);
    transition: width 0.3s var(--ease);
}

.nav-link-secondary:hover::after {
    width: 100%;
}

/* --- Centered Premium Brand Logo --- */
.tmc-style-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--charcoal);
    height: 100%;
    padding: 8px 0;
    text-align: center;
}

.logo-monogram {
    font-family: var(--font-elegant);
    font-size: 40px;
    font-weight: 300;
    line-height: 0.75;
    letter-spacing: 1px;
    margin-bottom: 2px;
    color: var(--espresso);
    transition: transform 0.4s var(--ease);
}

.tmc-style-logo:hover .logo-monogram {
    transform: scale(1.05);
}

.logo-title {
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 7px;
    text-transform: uppercase;
    margin-bottom: 3px;
    color: var(--charcoal);
}

.logo-sub {
    font-family: var(--font-body);
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--copper);
}

/* --- Currency Dropdown --- */
.currency-selector {
    position: relative;
}

.currency-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--charcoal);
    padding: 6px 0;
    transition: color 0.3s;
    white-space: nowrap; /* Forces currency selector to remain on one single line */
}

.currency-trigger i {
    font-size: 9px;
    transition: transform 0.3s;
}

.currency-selector:hover .currency-trigger i {
    transform: rotate(180deg);
}

.currency-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #FAF7F2;
    border: 1px solid rgba(176, 141, 87, 0.15);
    box-shadow: 0 10px 30px rgba(58, 46, 42, 0.08);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1010;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s var(--ease);
}

.currency-selector:hover .currency-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.currency-dropdown a {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    /*color: var(--stone);*/
    white-space: nowrap;
    transition: color 0.3s;
}

.currency-dropdown a:hover {
    color: var(--espresso);
}

/* --- Nav Icons --- */
.nav-icons-group {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 10px;
}

.nav-icon-link {
    font-size: 19px;
    color: var(--charcoal);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-icon-link:hover {
    color: var(--copper);
}

.nav-cart-badge {
    position: absolute;
    top: -6px;
    right: -7px;
    background: var(--espresso);
    color: #FAF7F2;
    font-size: 8px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0;
}

/* ============================================================
   MEGA MENUS (DESKTOP)
   ============================================================ */
.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%); /* Center full-width mega menu */
    top: 100%;
    background: #FAF7F2;
    border-bottom: 2px solid var(--espresso);
    box-shadow: 0 20px 40px rgba(58, 46, 42, 0.05);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
    border-top: 1px solid rgba(176, 141, 87, 0.15);
}

/* Show mega menu on parent hover */
.nav-item-has-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-inner {
    max-width: 1520px;
    margin: 0 auto;
    padding: 48px 60px 58px;
}

.mega-menu-grid {
    display: grid;
    gap: 40px;
}

.mega-menu-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.mega-menu-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.mega-column h5 {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--charcoal);
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(176, 141, 87, 0.12);
    padding-bottom: 8px;
    font-family: var(--font-body);
}

.mega-column ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mega-column ul li a {
    font-family: var(--font-body);
    font-size: 15.5px;
    color: var(--espresso); /* Changed to rich espresso brown theme color */
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.mega-column ul li a:hover {
    color: var(--copper); /* Highlight with luxury copper gold on hover */
    transform: translateX(4px);
}

/* ============================================================
   MOBILE RESPONSIVENESS & HAMBURGER SYSTEM
   ============================================================ */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1010;
}

.hamburger span {
    width: 22px;
    height: 1.5px;
    background: var(--charcoal);
    transition: 0.3s;
    display: block;
}

/* Toggle hamburger animation when menu is open */
.hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile toolbar layout */
.mobile-toolbar {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    padding: 0 20px;
}

.mobile-toolbar .logo-wordmark {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--charcoal);
}

.mobile-toolbar .logo-wordmark span {
    display: block;
    font-size: 8px;
    letter-spacing: 3px;
    color: var(--copper);
    margin-top: 2px;
}

/* Collapsible Mobile Menu Drawer */
.mobile-menu {
    display: none;
    position: fixed;
    top: 76px; /* Sits directly below the mobile toolbar */
    left: 0;
    width: 100%;
    height: calc(100vh - 76px);
    background: #FAF7F2;
    z-index: 998;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.4s var(--ease);
    border-top: 1px solid rgba(176, 141, 87, 0.1);
}

.mobile-menu.open {
    display: flex;
    transform: translateX(0);
    align-items: flex-start;
    justify-content: flex-start;
    height: auto;
}

.mobile-nav-item {
    width: 100%;
}

.mobile-nav-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 400;
    color: var(--charcoal);
    letter-spacing: 2px;
    text-transform: uppercase;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.mobile-nav-trigger i {
    font-size: 13px;
    transition: transform 0.3s;
}

.mobile-nav-trigger.active i {
    transform: rotate(180deg);
}

/* Mobile Collapsible Submenu Panel */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-left: 10px;
}

.mobile-submenu.open {
    max-height: 800px;
    padding-top: 18px;
    padding-bottom: 6px;
}

.mobile-subcolumn {
    margin-bottom: 12px;
}

.mobile-subcolumn h6 {
    font-size: 13px;
    font-family: var(--font-body);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--copper-dark);
    font-weight: 600;
    margin-bottom: 8px;
}

.mobile-subcolumn ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-subcolumn ul li a {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--espresso); /* Consistent deep espresso brown */
    transition: color 0.3s;
}

.mobile-subcolumn ul li a:hover {
    color: var(--copper);
}

/* Single mobile action links */
.mobile-link-direct {
    display: block;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--charcoal);
    border-bottom: 1px solid rgba(176, 141, 87, 0.1);
}

.mobile-menu-footer {
    margin-top: auto;
    padding-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-menu-footer .currency-selector {
    border: 1px solid rgba(176, 141, 87, 0.2);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Responsive Toggles */
@media (max-width: 1024px) {
    .nav-side-left,
    .nav-side-right,
    .tmc-style-logo { display: none !important; }
    .nav-main { display: none !important; }
    .mobile-toolbar { display: flex !important; }
    .hamburger { display: flex !important; }
}

/* ============================================================
   SEARCH DRAWER STYLING (TMC STYLE)
   ============================================================ */
.search-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(58, 46, 42, 0.4); /* Espresso dark tint */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
}

.search-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.search-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 520px;
    max-width: 100vw;
    height: 100vh;
    background: #FAF7F2; /* Luxury warm ivory background */
    box-shadow: -10px 0 40px rgba(58, 46, 42, 0.15);
    z-index: 1060;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    border-left: 1px solid rgba(176, 141, 87, 0.15);
}

.search-drawer.open {
    transform: translateX(0);
}

.search-drawer-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 40px;
}

.search-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.search-drawer-header h2 {
    font-family: var(--font-elegant);
    font-size: 26px;
    letter-spacing: 3px;
    color: var(--espresso);
    margin: 0;
    font-weight: 300;
}

.search-drawer-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--charcoal);
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    padding: 0;
}

.search-drawer-close:hover {
    color: var(--copper);
}

.search-drawer-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow-y: auto;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 35px;
    border-bottom: 2px solid var(--espresso);
    display: flex;
    align-items: center;
}

.search-input-icon {
    font-size: 20px;
    color: var(--stone);
    margin-right: 12px;
}

#searchDrawerInput {
    border: none;
    background: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 16px;
    padding: 12px 0;
    width: 100%;
    color: var(--charcoal);
    letter-spacing: 1px;
}

#searchDrawerInput::placeholder {
    color: #b3b3b3;
}

.search-input-clear {
    background: none;
    border: none;
    color: var(--stone);
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
}

.search-input-clear:hover {
    color: var(--charcoal);
}

.search-results-section {
    display: flex;
    flex-direction: column;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(176, 141, 87, 0.12);
    padding-bottom: 8px;
}

.search-results-header h3 {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--stone);
    font-weight: 600;
    text-transform: uppercase;
    margin: 0;
}

.search-view-all {
    font-size: 11px;
    color: var(--espresso);
    text-decoration: underline;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.search-view-all:hover {
    color: var(--copper);
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    transition: transform 0.3s;
}

.search-result-item:hover {
    transform: translateX(4px);
}

.search-result-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    background: #fff;
    border: 1px solid rgba(176, 141, 87, 0.12);
    border-radius: 2px;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.search-result-name {
    font-family: var(--font-elegant);
    font-size: 14.5px;
    color: var(--espresso);
    line-height: 1.3;
    letter-spacing: 0.5px;
}

.search-result-price {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--copper-dark);
    font-weight: 500;
}

.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 0;
    color: var(--stone);
    font-size: 14px;
}

.search-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(176, 141, 87, 0.15);
    border-top-color: var(--espresso);
    border-radius: 50%;
    animation: search-spin 0.8s linear infinite;
}

@keyframes search-spin {
    to { transform: rotate(360deg); }
}

.search-no-results {
    text-align: center;
    padding: 40px 0;
    color: var(--stone);
    font-size: 14px;
}


.nav-item-has-menu{
    display: flex;
    align-content: center;
    justify-content: center;
}
