/* ==========================================================================
   LumiSnow — global header (homepage style, all pages)
   Loaded after style.css on every page.
   ========================================================================== */

:root {
  --hv-purple: #7244e8;
  --hv-purple-deep: #5a2fc4;
  --hv-purple-soft: #8a5cf0;
  --hv-lavender: #f5f2fb;
  --hv-lavender-soft: #f8f7fd;
  --hv-gold: #f4bd58;
  --hv-gold-deep: #c9a86a;
  --hv-ink: #2e2b3b;
  --hv-ink-soft: #4d495e;
  --hv-muted: #6b6478;
  --hv-line: #ebe8f5;
  --hv-dark: #1c0b33;
}

/* Top bar */
.hv-topbar {
  background: var(--hv-lavender, #f4eefc);
  color: var(--hv-ink);
  font-size: 0.74rem;
}

/* Keep the language menu above the sticky header. The header has z-index 100
   and would otherwise cover the dropdown as soon as it overflows the top bar. */
.topbar,
.hv-topbar {
  position: relative;
  z-index: 110;
}

.hv-topbar .topbar-inner {
  min-height: 42px;
}

.hv-topbar .topbar-contact a {
  color: var(--hv-ink);
  font-weight: 500;
}

.hv-topbar .topbar-contact a:hover {
  color: var(--hv-purple);
}

.hv-topbar-social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hv-topbar-social a {
  display: inline-flex;
  color: var(--hv-ink);
}

.hv-topbar-social a:hover {
  color: var(--hv-purple);
}

/* Header */
.hv-header {
  background: #fff;
  border-bottom: 0;
  box-shadow: none;
}

.hv-header.is-scrolled {
  box-shadow: 0 8px 30px rgba(46, 26, 80, 0.08);
}

.hv-header .header-inner {
  min-height: 112px;
}

.hv-brand .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8a5cf0, #6b43d6);
  box-shadow: 0 6px 16px rgba(114, 68, 232, 0.26);
}

.hv-brand .brand-word {
  background: linear-gradient(100deg, #8a5cf0, #6b43d6 60%, #5a2fc4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.9rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.hv-header .nav-link {
  padding: 10px 15px;
  border-radius: 0;
  color: var(--hv-ink);
  font-size: 0.96rem;
  font-weight: 500;
}

.hv-header .nav-link.is-active {
  color: var(--hv-ink);
}

.hv-header .nav-link:hover,
.hv-header .nav-link.is-active:hover {
  background: transparent;
  color: var(--hv-purple);
}

.hv-header .dropdown-inner {
  border-color: var(--hv-line);
}

.hv-header .dropdown-link:hover {
  background: var(--hv-lavender);
  color: var(--hv-purple);
}

/* Products mega menu: full-width, five illustrated columns */
.hv-header .nav-item-mega { position: static; }

.hv-header .dropdown-mega {
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  padding-top: 0;
  transform: translateY(8px);
}

.hv-header .nav-item-mega.has-dropdown:hover .dropdown-mega,
.hv-header .nav-item-mega.has-dropdown:focus-within .dropdown-mega,
.hv-header .nav-item-mega.is-open .dropdown-mega {
  transform: translateY(0);
}

.mega-panel {
  background: #fff;
  border-top: 1px solid var(--hv-line);
  border-bottom: 1px solid var(--hv-line);
  box-shadow: 0 24px 44px rgba(46, 26, 80, 0.1);
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 1460px;
  margin: 0 auto;
  padding: 0 12px;
}

.mega-grid.mega-cols-1 { grid-template-columns: minmax(0, 1fr); }
.mega-grid.mega-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mega-grid.mega-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mega-grid.mega-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.mega-col {
  min-width: 0;
  padding: 26px 22px 22px;
  border-left: 1px solid var(--hv-line);
}

.mega-col:first-child { border-left: 0; }

.mega-title {
  display: block;
  margin-bottom: 14px;
  color: var(--hv-ink);
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.mega-title:hover { color: var(--hv-purple); }

.mega-thumb {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 2px;
  background: var(--hv-lavender);
}

.mega-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mega-col:hover .mega-thumb img { transform: scale(1.035); }

.mega-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 12px;
  color: var(--hv-muted);
  font-size: 0.82rem;
  text-align: center;
}

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

.mega-links li { border-top: 1px solid var(--hv-line); }

.mega-links a {
  display: block;
  padding: 12px 0;
  color: var(--hv-ink-soft);
  font-size: 0.86rem;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.mega-links a:hover { color: var(--hv-purple); }

.mega-all {
  display: inline-block;
  margin-top: 14px;
  color: var(--hv-purple);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
}

.mega-all:hover {
  color: var(--hv-purple-deep);
  text-decoration: underline;
}

@media (max-width: 1180px) {
  .hv-header .mega-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mega-col { border-top: 1px solid var(--hv-line); }
}

@media (max-width: 1000px) {
  .hv-header .dropdown-mega {
    position: static;
    width: auto;
    padding-top: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
  }
  .hv-header .nav-item.is-open .dropdown-mega { display: block; }
  .mega-panel {
    margin: 4px 0 8px;
    border: 0;
    border-radius: 10px;
    background: var(--hv-lavender);
    box-shadow: none;
    overflow: hidden;
  }
  .hv-header .mega-grid {
    grid-template-columns: 1fr;
    padding: 2px 12px 8px;
  }
  .mega-col { padding: 14px 4px; border-left: 0; }
  .mega-thumb { display: none; }
}

.hv-header-cta,
.hv-header .btn-primary {
  min-height: 44px;
  padding: 0 26px;
  border-radius: 7px;
  background: var(--hv-purple);
  font-size: 0.92rem;
  box-shadow: 0 6px 16px rgba(114, 68, 232, 0.2);
}

.hv-header-cta:hover,
.hv-header .btn-primary:hover {
  background: var(--hv-purple-deep);
}

/* Responsive */
@media (max-width: 1180px) {
  .hv-header .header-inner {
    min-height: 92px;
  }
  .hv-brand .brand-word {
    font-size: 1.58rem;
  }
}

@media (max-width: 1000px) {
  .hv-header .main-nav {
    background: #fff;
  }
  .hv-header .nav-link {
    justify-content: space-between;
    padding: 13px 14px;
    border-radius: 10px;
    font-size: 1rem;
  }
  .hv-header .dropdown-inner {
    background: var(--hv-lavender);
  }
  .hv-header .dropdown-link {
    color: var(--hv-ink-soft);
  }
  .hv-header .mobile-nav-actions .btn-primary {
    background: var(--hv-purple);
  }
}

@media (max-width: 760px) {
  .hv-topbar .topbar-inner {
    min-height: 38px;
  }
  .hv-topbar-social {
    gap: 13px;
  }
  .hv-header .header-inner {
    min-height: 74px;
  }
  .hv-brand .brand-word {
    font-size: 1.32rem;
  }
}

/* Language switcher (top bar, all pages) */
.hv-topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang-switch {
  position: relative;
  display: inline-flex;
}

.lang-switch summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  color: inherit;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.lang-switch summary:hover {
  color: var(--hv-purple);
}

.lang-switch summary::-webkit-details-marker,
.lang-switch summary::marker {
  display: none;
  content: "";
}

.lang-switch summary svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.lang-switch summary .lang-chevron {
  transition: transform 0.18s ease;
}

.lang-switch[open] summary {
  color: var(--hv-purple);
}

.lang-switch[open] summary .lang-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 176px;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: 8px;
  display: grid;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--hv-line);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(42, 29, 22, 0.18), 0 2px 8px rgba(42, 29, 22, 0.06);
  z-index: 140;
  animation: langMenuIn 0.16s ease-out;
}

@keyframes langMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--hv-ink);
  font-size: 0.82rem;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-menu a:hover,
.lang-menu a.is-active {
  background: var(--hv-lavender);
  color: var(--hv-purple);
}

.lang-menu a.is-active {
  font-weight: 600;
}

.lang-menu .lang-check {
  color: var(--hv-purple);
  font-size: 0.78rem;
  line-height: 1;
}

@media (max-width: 760px) {
  .hv-topbar-right {
    gap: 12px;
  }
  .lang-switch summary span {
    display: none;
  }
  .lang-menu {
    right: -8px;
    min-width: 150px;
  }
}
