/* =========================================
   ULTRA-LUXURY HEADER MASTER CSS (EARTHY THEME)
   ========================================= */

@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Jost:wght@300;400;500;600&display=swap");

/* --- Header Base --- */
.header-ultra-luxury {
  position: fixed; /* Floats over the banner */
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  font-family: var(--font-body, "Jost", sans-serif);
  transition: transform 0.4s ease;
}

/* --- Ticker --- */
.ticker-wrap {
  background: linear-gradient(90deg, var(--color-primary-dark, #5c2314), var(--color-primary, #873823), var(--color-primary-dark, #5c2314));
  color: var(--color-text-inverse, #fdfbf6);
  height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(43, 29, 25, 0.3);
}
.ticker { display: flex; white-space: nowrap; animation: tickerScroll 30s linear infinite; }
.ticker-item { font-size: 0.75rem; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; padding: 0 3rem; }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- Transparent to Solid Glassmorphism --- */
.header-glass-v2 {
  position: relative;
  background: transparent;
  border-bottom: 1px solid rgba(253, 251, 246, 0.2);
  padding: 1.2rem 5%;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* SCROLLED STATE (Background) */
.header-ultra-luxury.scrolled .header-glass-v2 {
  background: var(--color-bg-base, #fdfbf6);
  border-bottom: 1px solid rgba(135, 56, 35, 0.15);
  box-shadow: 0 10px 30px rgba(43, 29, 25, 0.08);
}

.ambient-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 500px; height: 250px;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.header-grid {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 1600px; margin: 0 auto;
}

/* --- Navigation Links --- */
.nav-links { display: flex; gap: 2.5rem; list-style: none; padding: 0; margin: 0; }
.starlight-link {
  font-size: 0.85rem; font-weight: 500; color: #fdfbf6; text-transform: uppercase; letter-spacing: 2px; text-decoration: none; position: relative; padding-bottom: 6px; transition: color 0.4s ease; display: flex; align-items: center;
}
.dropdown-arrow { font-size: 0.55rem; margin-left: 6px; color: #fdfbf6; transition: color 0.4s ease, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); }

/* SCROLLED STATE (Links) */
.header-ultra-luxury.scrolled .starlight-link { color: var(--color-text-primary, #2b1d19); }
.header-ultra-luxury.scrolled .dropdown-arrow { color: var(--color-primary, #873823); }

.starlight-link::before {
  content: ""; position: absolute; bottom: 0; left: 50%; width: 0; height: 1px; background: linear-gradient(90deg, transparent, #d4af37, transparent); transition: width 0.5s ease, left 0.5s ease;
}
.starlight-link::after {
  content: ""; position: absolute; bottom: -1px; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: #f9f1d8; box-shadow: 0 0 8px 2px rgba(212, 175, 55, 0.5); opacity: 0; transform: translateX(-50%) scale(0); transition: all 0.3s ease;
}

/* Hover over Dark */
.starlight-link:hover { color: #d4af37; }
/* Hover over Light */
.header-ultra-luxury.scrolled .starlight-link:hover { color: var(--color-primary, #873823); }
.starlight-link:hover::before { width: 100%; left: 0; }
.starlight-link:hover::after { opacity: 1; transform: translateX(-50%) scale(1); transition-delay: 0.2s; }

@media (min-width: 1025px) {
  .has-mega-menu:hover .dropdown-arrow { transform: rotate(180deg); }
  .has-mega-menu:hover .mega-menu { opacity: 1; visibility: visible; transform: translateY(20px); }
}

/* --- Center Logo Image --- */
.brand-logo { display: flex; align-items: center; justify-content: center; position: relative; text-decoration: none; }
.brand-logo-img { max-height: 65px; width: auto; object-fit: contain; position: relative; z-index: 3; transition: transform 0.4s ease; }

/* Optional: Slight scaling on scroll or hover for premium effect */
.header-ultra-luxury.scrolled .brand-logo-img { transform: scale(0.95); }

/* --- Right Actions & Search --- */
.nav-right { display: flex; justify-content: flex-end; align-items: center; gap: 2rem; }
.search-elegant { display: flex; align-items: center; border-bottom: 1px solid rgba(253, 251, 246, 0.4); padding-bottom: 5px; transition: border-color 0.4s ease; }
.search-input { background: transparent; border: none; color: #fdfbf6; font-family: var(--font-body, "Jost", sans-serif); font-size: 0.85rem; width: 120px; outline: none; transition: width 0.5s ease, color 0.4s ease; padding: 0; }
.search-input::placeholder { color: rgba(253, 251, 246, 0.6); }

/* SCROLLED STATE (Search) */
.header-ultra-luxury.scrolled .search-elegant { border-bottom-color: var(--color-border-strong, rgba(135, 56, 35, 0.4)); }
.header-ultra-luxury.scrolled .search-elegant:focus-within { border-bottom-color: var(--color-primary, #873823); }
.header-ultra-luxury.scrolled .search-input { color: var(--color-text-primary, #2b1d19); }
.header-ultra-luxury.scrolled .search-input::placeholder { color: rgba(122, 105, 98, 0.6); }
.search-input:focus { width: 180px; }
.search-btn { background: transparent; border: none; padding: 0; cursor: pointer; display: flex; align-items: center; }

.action-icons { display: flex; gap: 1.5rem; }
.icon { width: 22px; height: 22px; stroke: #fdfbf6; stroke-width: 1.5; fill: none; transition: all 0.4s ease; }

/* SCROLLED STATE (Icons) */
.header-ultra-luxury.scrolled .icon { stroke: var(--color-text-primary, #2b1d19); }

.float-hover { position: relative; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.float-hover:hover .icon, .search-btn:hover .icon { stroke: #d4af37; transform: translateY(-4px); filter: drop-shadow(0 4px 6px rgba(212, 175, 55, 0.3)); }
.header-ultra-luxury.scrolled .float-hover:hover .icon, .header-ultra-luxury.scrolled .search-btn:hover .icon { stroke: var(--color-primary, #873823); filter: drop-shadow(0 4px 6px rgba(199, 141, 106, 0.25)); }

.cart-wrap { position: relative; }
.cart-badge { position: absolute; top: -8px; right: -10px; background-color: #d4af37; color: #050505; font-size: 0.65rem; font-weight: 700; height: 18px; min-width: 18px; padding: 0 4px; display: flex; align-items: center; justify-content: center; border-radius: 9px; border: 2px solid transparent; transition: all 0.4s ease; }
/* SCROLLED STATE (Cart Badge) */
.header-ultra-luxury.scrolled .cart-badge { background-color: var(--color-primary, #873823); color: var(--color-text-inverse, #fdfbf6); border-color: var(--color-bg-base, #fdfbf6); }
.float-hover:hover .cart-badge { transform: translateY(-4px) scale(1.1); }

/* --- Mega Menu Dropdown --- */
.nav-links li { position: relative; }
.mega-menu { position: absolute; top: 100%; left: -20px; width: 750px; background-color: var(--color-bg-surface, #ffffff); border: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15)); border-top: 3px solid var(--color-primary, #873823); box-shadow: var(--shadow-depth, 0 10px 30px rgba(43, 29, 25, 0.08)); border-radius: 0 0 var(--radius-lg, 8px) var(--radius-lg, 8px); padding: 2.5rem; opacity: 0; visibility: hidden; transform: translateY(15px); transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); z-index: 100; }
.hover-bridge { position: absolute; top: -25px; left: 0; width: 100%; height: 25px; background: transparent; }
.mega-grid { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 3rem; }
.mega-title { font-family: var(--font-heading, "Cinzel", serif); color: var(--color-text-primary, #2b1d19); font-size: 1rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 1.2rem; border-bottom: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15)); padding-bottom: 0.5rem; }
.mega-list { list-style: none; padding: 0; margin: 0; }
.mega-list li { margin-bottom: 0.8rem; }
.mega-list a { font-family: var(--font-body, "Jost", sans-serif); font-size: 0.85rem; color: var(--color-text-secondary, #7a6962); text-decoration: none; text-transform: capitalize; transition: all 0.3s ease; display: inline-block; position: relative; }
.mega-list a::after { content: ""; position: absolute; width: 0; height: 1px; bottom: 0; left: 0; background-color: var(--color-primary, #873823); transition: width 0.3s ease; }
.mega-list a:hover { color: var(--color-primary, #873823); transform: translateX(4px); }
.mega-list a:hover::after { width: 100%; }
.featured-column { border-left: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15)); padding-left: 3rem; }
.mega-featured-card { background: var(--color-bg-base, #fdfbf6); border: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15)); padding: 1.5rem; border-radius: var(--radius-md, 4px); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02); display: flex; flex-direction: column; align-items: flex-start; transition: box-shadow 0.3s ease; }
.mega-featured-card:hover { box-shadow: var(--shadow-glow, 0 0 15px rgba(199, 141, 106, 0.25)); }
.featured-badge { font-family: var(--font-body, "Jost", sans-serif); background: var(--color-primary, #873823); color: var(--color-text-inverse, #fdfbf6); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 2px; padding: 4px 8px; border-radius: 2px; margin-bottom: 1rem; }
.featured-name { font-family: var(--font-heading, "Cinzel", serif); color: var(--color-text-primary, #2b1d19); font-size: 1.3rem; margin-bottom: 0.5rem; }
.featured-desc { font-family: var(--font-body, "Jost", sans-serif); color: var(--color-text-secondary, #7a6962); font-size: 0.8rem; line-height: 1.5; margin-bottom: 1.5rem; }
.btn-mega-shop { font-family: var(--font-body, "Jost", sans-serif); color: var(--color-primary, #873823); font-size: 0.85rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--color-primary, #873823); padding-bottom: 2px; display: flex; align-items: center; gap: 8px; }
.btn-mega-shop:hover .arrow { transform: translateX(5px); }

/* =========================================
   MOBILE RESPONSIVENESS & DRAWER
   ========================================= */

.mobile-toggle, .mobile-overlay, .mobile-only { display: none; }

@media (max-width: 1024px) {
  .header-grid { grid-template-columns: auto 1fr auto; gap: 1rem; }
  .nav-left { display: flex; align-items: center; }
  .search-elegant { display: none; }
  .mobile-only { display: flex; }
  .brand-logo-img { max-height: 42px; }
  .action-icons { gap: 1rem; }
  .icon { width: 24px; height: 24px; }

  .mobile-toggle { display: block; background: transparent; border: none; cursor: pointer; padding: 0; }
  .mobile-toggle .icon { stroke: #fdfbf6; width: 28px; height: 28px; transition: stroke 0.4s ease; }
  .header-ultra-luxury.scrolled .mobile-toggle .icon { stroke: var(--color-primary, #873823); }

  .mobile-overlay { display: block; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(43, 29, 25, 0.6); backdrop-filter: blur(8px); z-index: 10000; opacity: 0; visibility: hidden; transition: all 0.4s ease; }
  .mobile-overlay.active { opacity: 1; visibility: visible; }

  .nav-drawer { position: fixed; top: 0; left: -100%; width: 85vw; max-width: 400px; height: 100vh; background: var(--color-bg-base, #fdfbf6); border-right: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15)); display: flex; flex-direction: column; transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1); z-index: 10001; overflow-y: auto; }
  .nav-drawer.active { left: 0; }

  .drawer-header { justify-content: space-between; align-items: center; padding: 1.5rem; border-bottom: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15)); }
  .mobile-close { background: transparent; border: none; cursor: pointer; }
  .mobile-close .icon { stroke: var(--color-primary, #873823) !important; width: 30px; height: 30px; }

  .drawer-search { align-items: center; padding: 1.5rem; border-bottom: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15)); }
  .drawer-search-input { width: 100%; background: rgba(135, 56, 35, 0.05); border: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15)); padding: 12px 16px; border-radius: 4px; color: var(--color-text-primary, #2b1d19) !important; font-family: var(--font-body, "Jost", sans-serif); outline: none; }
  .drawer-search-input::placeholder { color: rgba(122, 105, 98, 0.6); }
  .drawer-search-input:focus { border-color: var(--color-primary, #873823); }
  .drawer-search .search-btn { margin-left: -40px; }
  .drawer-search .search-btn .icon { stroke: var(--color-primary, #873823) !important; }

  .nav-links { display: flex; flex-direction: column; padding: 2rem 1.5rem; gap: 1.8rem; }
  .nav-drawer .starlight-link { font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; color: var(--color-text-primary, #2b1d19) !important; }
  .nav-drawer .dropdown-arrow { color: var(--color-primary, #873823) !important; }
  .starlight-link::before, .starlight-link::after { display: none; }

  .hover-bridge { display: none; }
  .mega-menu { position: static; width: 100%; background: transparent; box-shadow: none; border: none; padding: 1rem 0 0 1rem; transform: none; opacity: 1; visibility: visible; display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s ease; }
  .mega-grid { overflow: hidden; grid-template-columns: 1fr; gap: 1.5rem; }

  .has-mega-menu.accordion-active .mega-menu { grid-template-rows: 1fr; }
  .has-mega-menu.accordion-active .dropdown-arrow { transform: rotate(180deg); }

  .mega-title { color: var(--color-primary, #873823); font-size: 0.95rem; border-color: var(--color-border-subtle, rgba(135, 56, 35, 0.15)); }
  .mega-list a { color: var(--color-text-secondary, #7a6962); font-size: 0.9rem; }
  .featured-column { padding-left: 0; border-left: none; }
  .mega-featured-card { background: rgba(135, 56, 35, 0.05); border-color: var(--color-border-subtle, rgba(135, 56, 35, 0.15)); }
  .featured-name { color: var(--color-text-primary, #2b1d19); }
  .featured-desc { color: var(--color-text-secondary, #7a6962); }

  .drawer-socials { margin-top: auto; justify-content: center; gap: 2rem; padding: 2rem; background: rgba(135, 56, 35, 0.04); border-top: 1px solid var(--color-border-subtle, rgba(135, 56, 35, 0.15)); }
  .drawer-socials .icon { width: 24px; height: 24px; stroke: var(--color-text-primary, #2b1d19) !important; transition: all 0.3s ease; }
  .social-link:hover .icon { stroke: var(--color-primary, #873823) !important; transform: translateY(-3px); }
}