/* ============================================
   MAISON NOIR — Mega Navigation
   Inspired by Puma's mega menu architecture
   ============================================ */

:root {
  --nav-h: 64px;
  --ann-h: 40px;
  --header-total: calc(var(--nav-h) + var(--ann-h));
  --mega-gold: #c9a96e;
  --mega-noir: #0d0d0d;
  --mega-white: #f8f6f2;
  --mega-sale: #c0392b;
  --mega-border: rgba(255,255,255,0.1);
  --mega-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── push body content below sticky header ─── */
body { padding-top: var(--header-total); }

/* ════════════════════════════════════════════
   ANNOUNCEMENT BAR
   ════════════════════════════════════════════ */
.announce-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--ann-h);
  background: #0a0a0a;
  border-bottom: 1px solid rgba(201, 169, 110, 0.2);
  z-index: 1001;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.ann-track-wrap {
  flex: 1;
  overflow: hidden;
  text-align: center;
}

.ann-track {
  display: flex;
  transition: transform 0.5s var(--mega-ease);
  will-change: transform;
}

.ann-slide {
  min-width: 100%;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(248,246,242,0.85);
  padding: 0 0.5rem;
}

.ann-slide a {
  color: var(--mega-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ann-slide strong { color: var(--mega-gold); }

.ann-arrow {
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.75rem;
  line-height: 1;
  transition: color 0.2s;
  flex-shrink: 0;
}

.ann-arrow:hover { color: var(--mega-white); }

.ann-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0 0.875rem;
  transition: color 0.2s;
  flex-shrink: 0;
}

.ann-close:hover { color: var(--mega-white); }

/* ════════════════════════════════════════════
   HEADER SHELL
   ════════════════════════════════════════════ */
.mega-header {
  position: fixed;
  top: var(--ann-h);
  left: 0; right: 0;
  z-index: 1000;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition:
    top 0.35s var(--mega-ease),
    background 0.45s var(--mega-ease),
    border-color 0.45s var(--mega-ease),
    box-shadow 0.35s,
    backdrop-filter 0.45s;
}

.mega-header.ann-hidden { top: 0; }

.mega-header.scrolled {
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 40px rgba(0,0,0,0.55);
}

.mega-nav-wrap {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 2rem;
  gap: 0;
  position: relative;
  z-index: 999;
}

/* ─── LOGO ─── */
.mega-logo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--mega-white);
  text-decoration: none;
  white-space: nowrap;
  margin-right: 2.5rem;
  flex-shrink: 0;
  transition: opacity 0.25s, letter-spacing 0.3s var(--mega-ease);
}

.mega-logo:hover { opacity: 0.85; letter-spacing: 0.26em; }
.mega-logo span { color: var(--mega-gold); }

/* ════════════════════════════════════════════
   PRIMARY NAV
   ════════════════════════════════════════════ */
.mega-nav {
  display: flex;
  align-items: stretch;
  flex: 1;
  height: 100%;
}

.mega-item {
  position: static;
  display: flex;
  align-items: stretch;
}

/* ─── TRIGGER BUTTONS ─── */
.mega-trigger {
  display: flex;
  align-items: center;
  padding: 0 1.1rem;
  height: 100%;
  background: none;
  border: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(248, 246, 242, 0.92);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.25s;
  text-decoration: none;
}

.mega-trigger::after {
  content: '';
  position: absolute;
  bottom: 0; left: 1.1rem; right: 1.1rem;
  height: 2px;
  background: var(--mega-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--mega-ease);
}

.mega-trigger:hover,
.mega-item.active .mega-trigger {
  color: var(--mega-white);
}

.mega-item.active .mega-trigger::after,
.mega-trigger:hover::after { transform: scaleX(1); }

.mega-trigger-link { text-decoration: none; }

.sale-trigger { color: var(--mega-sale) !important; }
.sale-trigger:hover { color: #e74c3c !important; }
.sale-trigger::after { background: var(--mega-sale) !important; }

/* ════════════════════════════════════════════
   MEGA DROPDOWN PANEL
   ════════════════════════════════════════════ */
.mega-dropdown {
  position: fixed;
  top: var(--header-total);
  left: 0; right: 0;
  background: #111;
  border-top: 2px solid var(--mega-gold);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.28s var(--mega-ease),
    transform 0.28s var(--mega-ease),
    visibility 0.28s;
  pointer-events: none;
  z-index: 999;
  max-height: calc(100vh - var(--header-total) - 2rem);
  overflow-y: auto;
}

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

.mega-inner {
  display: flex;
  gap: 0;
  max-width: 1300px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  align-items: flex-start;
}

/* ─── LINK COLUMN ─── */
.mega-col-links {
  flex: 0 0 160px;
  padding: 0 1.5rem 0 0;
  border-right: 1px solid rgba(255,255,255,0.07);
  margin-right: 1.5rem;
}

.mega-col-links:last-of-type { border-right: none; }

.mega-col-title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mega-gold);
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mega-col-links ul {
  list-style: none;
  margin-bottom: 1.25rem;
}

.mega-col-links ul li { margin-bottom: 0.05rem; }

.mega-link {
  display: block;
  padding: 0.45rem 0;
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(248,246,242,0.65);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
  position: relative;
  white-space: nowrap;
}

.mega-link:hover {
  color: var(--mega-white);
  padding-left: 0.5rem;
}

.mega-link::before {
  content: '';
  position: absolute;
  left: -2px; top: 50%;
  width: 0; height: 1px;
  background: var(--mega-gold);
  transform: translateY(-50%);
  transition: width 0.2s;
}

.mega-link:hover::before { width: 8px; }

.mega-link.hot { color: var(--mega-white); font-weight: 600; }
.mega-link.sale-link { color: var(--mega-sale); font-weight: 600; }

.mega-shop-all {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mega-gold);
  text-decoration: none;
  border-bottom: 1.5px solid var(--mega-gold);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.mega-shop-all:hover { color: var(--mega-white); border-color: var(--mega-white); }

/* ─── BANNER COLUMN ─── */
.mega-col-banner {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-left: auto;
}

.mega-col-banner.wide-banner { flex: 0 0 280px; }

.mega-banner {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  flex: 1;
  min-height: 200px;
  cursor: pointer;
}

.mega-banner.small { min-height: 110px; flex: 0 0 110px; }
.mega-banner.tall { min-height: 100%; flex: 1; }

.banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.75) 0%, rgba(10,10,10,0.15) 60%);
  transition: background 0.4s;
}

.mega-banner:hover .banner-overlay {
  background: linear-gradient(to top, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.25) 60%);
}

.banner-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.25rem;
  color: white;
}

.banner-tag {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--mega-gold);
  color: #0d0d0d;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  margin-bottom: 0.4rem;
}

.sale-tag { background: var(--mega-sale); color: white; }

.banner-content h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.banner-content p {
  font-size: 0.68rem;
  opacity: 0.75;
  margin-bottom: 0.6rem;
}

.banner-cta {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: white;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  padding-bottom: 1px;
  transition: border-color 0.2s, color 0.2s;
}

.banner-cta:hover { border-color: var(--mega-gold); color: var(--mega-gold); }
.sale-cta { color: #ff6b6b; border-color: rgba(255,107,107,0.5); }

/* ─── SPOTLIGHT COLUMN (New Arrivals) ─── */
.mega-col-spotlight {
  flex: 1;
  padding-left: 1.5rem;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.875rem;
}

.spotlight-item {
  text-decoration: none;
  color: inherit;
  display: block;
}

.spotlight-img {
  aspect-ratio: 3/4;
  border-radius: 6px;
  background-size: cover;
  background-position: center top;
  background-color: #222;
  margin-bottom: 0.5rem;
  overflow: hidden;
  transition: transform 0.4s var(--mega-ease);
}

.spotlight-item:hover .spotlight-img { transform: scale(1.03); }

.spotlight-info strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(248,246,242,0.9);
  margin-bottom: 0.15rem;
}

.spotlight-info span {
  font-size: 0.72rem;
  color: rgba(248,246,242,0.45);
}

/* ─── MEGA BACKDROP ─── */
.mega-backdrop {
  position: fixed;
  top: var(--header-total);
  left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.28);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
}

.mega-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

/* ════════════════════════════════════════════
   UTILITY ICONS
   ════════════════════════════════════════════ */
.mega-utils {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1.5rem;
  flex-shrink: 0;
}

.util-btn {
  position: relative;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(248, 246, 242, 0.88);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

.util-btn:hover {
  color: var(--mega-white);
  background: rgba(255,255,255,0.1);
}

.util-btn svg {
  width: 20px; height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.util-btn-wrap { position: relative; }

.util-count {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  background: var(--mega-gold);
  color: var(--mega-noir);
  font-size: 0.58rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--mega-noir);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.25s, transform 0.25s cubic-bezier(0.22,1,0.36,1);
}

.util-count.visible { opacity: 1; transform: scale(1); }
.util-count.hidden { display: none; }

.cart-count { background: var(--mega-gold); }

.util-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.util-hamburger:hover { background: rgba(255,255,255,0.08); }

.util-hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: rgba(248,246,242,0.8);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, width 0.3s;
  pointer-events: none;
}

.util-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.util-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.util-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ════════════════════════════════════════════
   SEARCH EXPAND
   ════════════════════════════════════════════ */
.search-expand {
  position: relative;
  z-index: 999;
  background: #111;
  border-top: 2px solid var(--mega-gold);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--mega-ease);
}

.search-expand.open { max-height: 420px; }

.search-expand-inner {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.search-expand-inner svg {
  width: 20px; height: 20px;
  stroke: rgba(248,246,242,0.4);
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.search-expand-inner input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  color: var(--mega-white);
  background: transparent;
}

.search-expand-inner input::placeholder { color: rgba(255,255,255,0.28); }

.search-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: rgba(255,255,255,0.38);
  padding: 4px 8px;
  transition: color 0.2s;
}

.search-close-btn:hover { color: var(--mega-white); }

.search-suggestions {
  padding: 0 2rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.ss-group { margin-bottom: 1rem; }

.ss-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
  margin-bottom: 0.6rem;
}

.ss-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.ss-chip {
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(248,246,242,0.55);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ss-chip:hover {
  background: var(--mega-gold);
  border-color: var(--mega-gold);
  color: var(--mega-noir);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.5rem 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(255,255,255,0.04); }

.sri-img {
  width: 40px; height: 50px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  background-color: #222;
  flex-shrink: 0;
}

.sri-name { font-size: 0.82rem; font-weight: 600; color: rgba(248,246,242,0.9); }
.sri-cat { font-size: 0.7rem; color: rgba(248,246,242,0.4); }
.sri-price { font-size: 0.82rem; font-weight: 600; color: var(--mega-gold); margin-left: auto; }

/* ════════════════════════════════════════════
   MOBILE DRAWER
   ════════════════════════════════════════════ */
.mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1099;
}

.mobile-overlay.show { display: block; }

.mobile-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(320px, 85vw);
  background: #111;
  z-index: 1100;
  transform: translateX(-100%);
  transition: transform 0.4s var(--mega-ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.mob-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: var(--mega-noir);
  flex-shrink: 0;
}

.mob-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--mega-white);
}

.mob-logo span { color: var(--mega-gold); }

.mob-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.7);
  width: 32px; height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.mob-close:hover { background: rgba(255,255,255,0.2); color: white; }

.mob-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0;
  scrollbar-width: none;
}

.mob-body::-webkit-scrollbar { display: none; }

/* Accordion */
.mob-accordion { border-bottom: 1px solid rgba(255,255,255,0.07); }

.mob-acc-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(248,246,242,0.9);
  cursor: pointer;
  transition: background 0.15s;
}

.mob-acc-trigger:hover { background: rgba(255,255,255,0.05); }

.mob-acc-trigger span {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.32);
  transition: transform 0.3s, color 0.2s;
  line-height: 1;
}

.mob-acc-trigger.open span { transform: rotate(45deg); color: var(--mega-gold); }

.mob-acc-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--mega-ease);
  background: rgba(255,255,255,0.03);
}

.mob-acc-panel.open { max-height: 400px; }

.mob-link {
  display: block;
  padding: 0.625rem 2rem;
  font-size: 0.82rem;
  color: rgba(248,246,242,0.55);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.2s, padding-left 0.2s;
}

.mob-link:last-child { border-bottom: none; }
.mob-link:hover { color: var(--mega-white); padding-left: 2.5rem; }
.mob-link-sale { color: var(--mega-sale) !important; font-weight: 600; }

.mob-top-link {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(248,246,242,0.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s, color 0.15s;
}

.mob-top-link:hover { background: rgba(255,255,255,0.05); color: var(--mega-gold); }

.mob-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 0.5rem 1.5rem;
}

.mob-util-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(248,246,242,0.5);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.mob-util-link:hover { background: rgba(255,255,255,0.05); color: var(--mega-white); }

.mob-util-link svg {
  width: 18px; height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* ════════════════════════════════════════════
   SCROLLED STATE
   ════════════════════════════════════════════ */
.mega-header.scrolled .mega-logo {
  font-size: 1.1rem;
  letter-spacing: 0.2em;
}

/* ════════════════════════════════════════════
   ACCOUNT DROPDOWN (inherit from style.css
   but fix z-index for mega-nav context)
   ════════════════════════════════════════════ */
.account-dropdown {
  top: calc(100% + 0.75rem);
  z-index: 1200;
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .mega-trigger { padding: 0 0.85rem; }
}

@media (max-width: 1100px) {
  .mega-col-banner.wide-banner { flex: 0 0 220px; }
  .mega-col-banner { flex: 0 0 170px; }
  .spotlight-grid { grid-template-columns: repeat(3, 1fr); }
  .spotlight-item:nth-child(4) { display: none; }
  .mega-col-links { flex: 0 0 140px; }
  .mega-trigger { padding: 0 0.65rem; font-size: 0.68rem; }
  .mega-logo { margin-right: 1.5rem; }
}

@media (max-width: 960px) {
  .mega-nav { display: none; }
  .util-hamburger { display: flex; }
  .mega-logo { margin-right: auto; }
  .mega-utils { gap: 0; }
}

@media (max-width: 600px) {
  :root { --nav-h: 56px; --ann-h: 36px; }
  .mega-nav-wrap { padding: 0 1rem; }
  .mega-logo { font-size: 1rem; }
  .search-expand-inner { padding: 0.875rem 1rem; }
  .search-suggestions { padding: 0 1rem 1rem; }
  .ann-arrow { padding: 0 0.5rem; }
}

@media (max-width: 420px) {
  #wishlist-btn { display: none; }
  .mega-utils { gap: 0; }
  .util-btn { width: 36px; height: 36px; }
  .mega-logo { font-size: 0.9rem; letter-spacing: 0.16em; }
}

/* ════════════════════════════════════════════
   OVERRIDE old nav styles that conflict
   ════════════════════════════════════════════ */
.nav { display: none !important; }
.nav-mobile { display: none !important; }
