/* ==========================================================================
   AGGARWAL JEWELLERS — HEADER & NAVIGATION STYLES
   ========================================================================== */

/* Top Announcement Strip */
.top-bar {
  background: var(--deep-wine);
  color: var(--champagne);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 8px 0;
  border-bottom: 1px solid rgba(212, 160, 23, 0.3);
  position: relative;
  z-index: 1010;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-trust {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: var(--fw-medium);
}

.top-bar-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-bar-trust i {
  color: var(--premium-gold);
}

.top-bar-trust .dot {
  color: var(--light-gold);
  font-size: 0.5rem;
}

.top-bar-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar-links a {
  color: var(--champagne);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-bar-links a:hover {
  color: var(--light-gold);
}

/* Main Header */
.main-header {
  background: var(--ivory);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  position: relative;
  z-index: 1000;
  transition: var(--transition-base);
}

.header-sticky.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 253, 248, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(37, 21, 18, 0.08);
  padding: 10px 0;
  z-index: var(--z-header);
  animation: slideDown 0.35s ease;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Brand Logo */
.header-logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header-logo:hover {
  transform: scale(1.025);
}

.header-logo img {
  height: 72px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(212, 160, 23, 0.28));
  transition: var(--transition-base), filter 0.3s ease;
}

.header-logo:hover img {
  filter: drop-shadow(0 4px 16px rgba(212, 160, 23, 0.65));
}

.header-sticky.is-sticky .header-logo img {
  height: 54px;
}

/* Product Search Centre */
.header-search {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.search-form {
  display: flex;
  align-items: center;
  border: 1.5px solid rgba(212, 160, 23, 0.45);
  border-radius: 28px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(67, 6, 11, 0.04);
  transition: var(--transition-fast);
}

.search-form:focus-within {
  border-color: var(--primary-burgundy);
  box-shadow: 0 0 0 3.5px rgba(109, 7, 17, 0.1), 0 4px 14px rgba(212, 160, 23, 0.2);
}

.search-category-select {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--cream) 0%, #fff 100%);
  border-right: 1px solid var(--border-gold);
  font-size: 0.82rem;
  color: var(--dark-text);
  font-weight: var(--fw-medium);
  cursor: pointer;
}

.search-input {
  flex: 1;
  padding: 11px 18px;
  font-size: 0.88rem;
  color: var(--dark-text);
  background: transparent;
}

.search-input::placeholder {
  color: #9c8a86;
  font-style: italic;
  font-size: 0.84rem;
}

.search-btn {
  padding: 11px 22px;
  background: linear-gradient(135deg, var(--primary-burgundy) 0%, var(--deep-wine) 100%);
  color: var(--champagne);
  font-size: 0.95rem;
  border-radius: 0 28px 28px 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.search-btn:hover {
  background: linear-gradient(135deg, var(--deep-wine) 0%, #290306 100%);
  color: var(--light-gold);
  transform: scale(1.02);
}

/* Live Search Results Popup */
.search-results-popup {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: none;
  max-height: 440px;
  overflow-y: auto;
  z-index: 1050;
}

.search-results-popup.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--cream);
  transition: var(--transition-fast);
}

.search-result-item:hover {
  background: var(--cream);
}

.search-result-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.search-result-info {
  flex: 1;
}

.search-result-title {
  font-size: 0.88rem;
  font-weight: var(--fw-medium);
  color: var(--dark-text);
  margin-bottom: 2px;
}

.search-result-meta {
  font-size: 0.78rem;
  color: var(--secondary-text);
  display: flex;
  gap: 10px;
}

.search-result-price {
  font-weight: var(--fw-semibold);
  color: var(--primary-burgundy);
}

.search-view-all {
  display: block;
  text-align: center;
  padding: 12px;
  background: var(--cream);
  color: var(--primary-burgundy);
  font-weight: var(--fw-semibold);
  font-size: 0.85rem;
}

/* Action Icons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.action-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--primary-burgundy);
  position: relative;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  gap: 5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

/* Iconic Jewel Medallion for Icons */
.action-btn .action-icon-box,
.action-btn > i {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #ffffff 0%, #faf6ee 100%);
  border: 1.5px solid rgba(212, 160, 23, 0.42);
  box-shadow: 0 3px 10px rgba(37, 21, 18, 0.06), inset 0 0 6px rgba(212, 160, 23, 0.12);
  font-size: 1.15rem;
  color: var(--primary-burgundy);
  position: relative;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-btn:hover .action-icon-box,
.action-btn:hover > i {
  transform: translateY(-3px) scale(1.06);
  border-color: var(--premium-gold);
  color: var(--deep-wine);
  box-shadow: 0 6px 18px rgba(212, 160, 23, 0.35), inset 0 0 10px rgba(212, 160, 23, 0.25);
  background: #ffffff;
}

.action-btn:hover {
  color: var(--premium-gold);
}

/* Dedicated Royal Cart / Bag Button Styling */
.action-btn.cart-action-btn .action-icon-box,
.action-btn[title*="Bag"] > i,
.action-btn[title*="Cart"] > i,
.action-btn.action-cart-btn .action-icon-box,
.action-btn.action-cart-btn > i {
  background: linear-gradient(135deg, var(--primary-burgundy) 0%, var(--deep-wine) 100%);
  border: 1.5px solid var(--premium-gold);
  color: var(--champagne);
  box-shadow: 0 4px 14px rgba(109, 7, 17, 0.28), 0 0 0 2px rgba(212, 160, 23, 0.2);
  animation: cartAmbientPulse 4s infinite ease-in-out;
}

/* Continuous subtle ambient luxury glow */
@keyframes cartAmbientPulse {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(109, 7, 17, 0.28), 0 0 0 2px rgba(212, 160, 23, 0.2);
  }
  50% {
    box-shadow: 0 6px 20px rgba(212, 160, 23, 0.45), 0 0 0 3px rgba(212, 160, 23, 0.45);
    color: var(--light-gold);
  }
}

/* Hover dynamic shake/wiggle animation */
.action-btn.cart-action-btn:hover .action-icon-box,
.action-btn[title*="Bag"]:hover > i,
.action-btn[title*="Cart"]:hover > i,
.action-btn.action-cart-btn:hover .action-icon-box,
.action-btn.action-cart-btn:hover > i {
  animation: cartWiggle 0.65s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  background: linear-gradient(135deg, var(--deep-wine) 0%, #290306 100%);
  color: var(--light-gold);
  border-color: var(--light-gold);
  box-shadow: 0 6px 22px rgba(109, 7, 17, 0.45), 0 0 0 3px rgba(244, 201, 93, 0.4);
}

@keyframes cartWiggle {
  0%, 100% { transform: translateY(-3px) scale(1.08) rotate(0deg); }
  15% { transform: translateY(-4px) scale(1.1) rotate(-12deg); }
  30% { transform: translateY(-2px) scale(1.1) rotate(10deg); }
  45% { transform: translateY(-4px) scale(1.09) rotate(-8deg); }
  60% { transform: translateY(-3px) scale(1.08) rotate(6deg); }
  75% { transform: translateY(-3px) scale(1.08) rotate(-3deg); }
}

/* Reactive Add-to-Cart Pop Animation (Triggered on Add to Bag) */
@keyframes cartPopBounce {
  0% { transform: scale(1); }
  20% { transform: scale(1.4) rotate(-14deg); }
  40% { transform: scale(1.22) rotate(12deg); }
  60% { transform: scale(1.14) rotate(-6deg); }
  80% { transform: scale(1.05) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.cart-bounce-active {
  animation: cartPopBounce 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* Rotating Sparkle Jewel on Cart */
.cart-sparkle-dot {
  position: absolute;
  top: -4px;
  left: -3px;
  width: 12px;
  height: 12px;
  color: var(--light-gold);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: sparkleSpin 3s infinite linear;
}

@keyframes sparkleSpin {
  0% { transform: rotate(0deg) scale(0.85); opacity: 0.6; }
  50% { transform: rotate(180deg) scale(1.25); opacity: 1; filter: drop-shadow(0 0 4px #F4C95D); }
  100% { transform: rotate(360deg) scale(0.85); opacity: 0.6; }
}

/* Floating Action Badges (Counter) */
.action-btn .action-badge {
  position: absolute;
  top: -3px;
  right: 6px;
  background: var(--gold-gradient);
  color: var(--deep-wine);
  font-size: 0.68rem;
  font-weight: var(--fw-bold);
  min-width: 19px;
  height: 19px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  z-index: 5;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.action-icon-box .action-badge {
  top: -4px;
  right: -4px;
}

.cart-count-badge {
  animation: badgePulseGlow 2.5s infinite ease-in-out;
}

@keyframes badgePulseGlow {
  0%, 100% { box-shadow: 0 2px 6px rgba(0,0,0,0.25), 0 0 0 0 rgba(212, 160, 23, 0.4); }
  50% { box-shadow: 0 3px 8px rgba(0,0,0,0.3), 0 0 0 4px rgba(212, 160, 23, 0.35); }
}

/* Account Dropdown */
.account-dropdown-wrapper {
  position: relative;
}

.account-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 230px;
  background: #fff;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 12px 0;
  display: none;
  z-index: 1040;
}

.account-dropdown-wrapper:hover .account-dropdown-menu {
  display: block;
}

.account-dropdown-header {
  padding: 8px 18px 12px 18px;
  border-bottom: 1px solid var(--cream);
  margin-bottom: 6px;
}

.account-dropdown-header p {
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.account-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  font-size: 0.85rem;
  color: var(--dark-text);
}

.account-dropdown-menu a:hover {
  background: var(--cream);
  color: var(--primary-burgundy);
}

.account-dropdown-menu a i {
  font-size: 0.9rem;
  color: var(--premium-gold);
  width: 16px;
}

/* Navigation Bar */
.nav-bar {
  background: var(--primary-burgundy);
  border-bottom: 2px solid var(--premium-gold);
  position: relative;
  z-index: 990;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: static;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 14px 14px;
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease;
}

/* Iconic Menu Icons */
.nav-link i:first-child:not(.fa-angle-down) {
  font-size: 0.86rem;
  color: var(--light-gold);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease, filter 0.3s ease;
}

.nav-link:hover i:first-child:not(.fa-angle-down) {
  transform: translateY(-2px) scale(1.18);
  color: #fff;
  filter: drop-shadow(0 0 6px rgba(244, 201, 93, 0.8));
}

/* Sliding Golden Underline */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--gold-gradient);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 8px rgba(244, 201, 93, 0.6);
  transition: width 0.35s cubic-bezier(0.25, 1, 0.5, 1), left 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-link:hover::after,
.nav-item.active .nav-link::after {
  width: 100%;
  left: 0;
}

.nav-link:hover,
.nav-item.active .nav-link {
  color: var(--light-gold);
}

.nav-link i.fa-angle-down {
  font-size: 0.72rem;
  color: rgba(244, 201, 93, 0.75);
  transition: transform 0.25s ease;
}

.nav-item:hover .nav-link i.fa-angle-down {
  transform: rotate(180deg);
  color: var(--light-gold);
}

/* Standard Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-lg);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-fast);
  z-index: 1020;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 8px 18px;
  font-size: 0.85rem;
  color: var(--dark-text);
}

.dropdown-menu a:hover {
  background: var(--cream);
  color: var(--primary-burgundy);
  padding-left: 22px;
}

/* Luxury Mega Menu */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100vw;
  background: linear-gradient(180deg, #FFFDF8 0%, #FAF6EE 100%);
  border-top: 3px solid var(--premium-gold);
  border-bottom: 2px solid rgba(212, 160, 23, 0.4);
  box-shadow: 0 24px 60px rgba(37, 21, 18, 0.22), 0 0 25px rgba(212, 160, 23, 0.12);
  padding: 28px 0 32px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1030;
  pointer-events: none;
}

.nav-item:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 290px;
  gap: 20px;
  align-items: stretch;
}

.mega-column {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid rgba(212, 160, 23, 0.28);
  box-shadow: 0 4px 14px rgba(37, 21, 18, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.mega-column:hover {
  transform: translateY(-3px);
  border-color: var(--premium-gold);
  box-shadow: 0 8px 22px rgba(212, 160, 23, 0.16);
}

.mega-column-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--primary-burgundy);
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1.5px solid rgba(212, 160, 23, 0.35);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mega-column-title::before {
  content: '◆';
  font-size: 0.65rem;
  color: var(--premium-gold);
}

.mega-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-column ul li {
  margin-bottom: 8px;
}

.mega-column ul li a {
  font-size: 0.88rem;
  color: var(--dark-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
  padding: 3px 0;
}

.mega-column ul li a::before {
  content: '›';
  font-size: 1.1rem;
  color: var(--light-gold);
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.mega-column ul li a:hover {
  color: var(--primary-burgundy);
  padding-left: 5px;
  font-weight: 600;
}

.mega-column ul li a:hover::before {
  color: var(--primary-burgundy);
  transform: translateX(3px);
}

.mega-featured-card {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 24px rgba(67, 6, 11, 0.2);
  border: 1.5px solid var(--premium-gold);
  height: 100%;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.mega-featured-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mega-featured-card:hover img {
  transform: scale(1.06);
}

.mega-featured-overlay {
  position: relative;
  z-index: 2;
  padding: 18px;
  background: linear-gradient(180deg, rgba(67, 6, 11, 0) 0%, rgba(67, 6, 11, 0.75) 40%, rgba(43, 6, 11, 0.96) 100%);
  color: #fff;
}

.mega-featured-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--light-gold);
  margin-bottom: 6px;
  font-weight: 700;
}

.mega-featured-link {
  font-size: 0.8rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: var(--fw-semibold);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.mega-featured-link:hover {
  color: var(--light-gold);
  gap: 10px;
}

/* Mobile Header Elements */
.mobile-header-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--ivory);
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav-toggle {
  font-size: 1.45rem;
  color: var(--primary-burgundy);
  padding: 4px;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile Offcanvas Drawer */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(37, 21, 18, 0.6);
  backdrop-filter: blur(3px);
  z-index: var(--z-drawer);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
}

.mobile-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 310px;
  height: 100vh;
  background: var(--ivory);
  box-shadow: var(--shadow-lg);
  z-index: calc(var(--z-drawer) + 1);
  transition: left 0.35s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-drawer.active {
  left: 0;
}

.mobile-drawer-header {
  padding: 18px 20px;
  background: var(--deep-wine);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-drawer-close {
  color: var(--light-gold);
  font-size: 1.3rem;
}

.mobile-drawer-search {
  padding: 14px 18px;
  background: var(--cream);
  border-bottom: 1px solid var(--border-color);
}

.mobile-drawer-menu {
  padding: 12px 0;
  flex: 1;
}

.mobile-nav-item {
  border-bottom: 1px solid rgba(109, 7, 17, 0.06);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 0.92rem;
  color: var(--dark-text);
  font-weight: var(--fw-medium);
}

.mobile-nav-link:hover {
  color: var(--primary-burgundy);
}

.mobile-submenu {
  display: none;
  background: var(--cream);
  padding: 8px 0;
}

.mobile-submenu.open {
  display: block;
}

.mobile-submenu a {
  display: block;
  padding: 8px 32px;
  font-size: 0.85rem;
  color: var(--secondary-text);
}

.mobile-drawer-footer {
  padding: 20px;
  background: var(--cream);
  border-top: 1px solid var(--border-color);
}

.mobile-drawer-contact {
  font-size: 0.82rem;
  color: var(--secondary-text);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
