/* =========================================================
   LAYOUT.CSS
   GLOBAL LAYOUT SYSTEM

   Header
   Navigation
   Mega menu
   Mobile drawer
   Footer
   Back to top
========================================================= */

/* BRAND STRIP */

.brand-strip {
  position: sticky;
  top: 0;
  z-index: 96;
  border-bottom: 1px solid rgba(216,170,82,.20);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px);
  transition: transform .32s var(--ease), opacity .32s var(--ease);
}

.brand-strip.hide {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.brand-strip-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-main {
  width: min(210px, 58vw);
  opacity: .74;
  transition: .28s var(--ease);
}

/* HEADER */

.site-header {
  position: sticky;
  top: 92px;
  z-index: 90;
  background: rgba(255,255,255,.91);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229,232,236,.78);
  box-shadow: 0 12px 30px rgba(10,2,28,.045);
  transition:
    top .32s var(--ease),
    background .28s var(--ease),
    box-shadow .28s var(--ease);
}

.site-header.scrolled {
  top: 0;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 45px rgba(10,2,28,.075);
}

.nav {
  min-height: 70px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 0 10px;
}

.sticky-logo {
  width: 132px;
  opacity: 0;
  transform: translateY(-8px) scale(.96);
  pointer-events: none;
  transition: .28s var(--ease);
}

.site-header.scrolled .sticky-logo {
  opacity: .75;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.menu-trigger {
  width: 48px;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 25px;
}

/* NAVIGATION */

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  margin-left: 18px;
}

.nav-links > li > a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border-radius: 14px;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: -.01em;
  color: #120a24;
  transition: all .24s var(--ease);
  overflow: visible;
}

.nav-links > li > a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(121,74,250,.10),
    rgba(255,107,107,.08)
  );
  opacity: 0;
  transition: .24s var(--ease);
  border-radius: inherit;
}

.nav-links > li > a::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  transform: scaleX(0);
  transform-origin: center;
  transition: .24s var(--ease);
}

.nav-links > li > a span,
.nav-links > li > a i {
  position: relative;
  z-index: 2;
}

.nav-links > li > a:hover {
  color: var(--purple);
  transform: translateY(-1px);
}

.nav-links > li > a:hover::before {
  opacity: 1;
}

.nav-links > li > a:hover::after {
  transform: scaleX(1);
}

/* MEGA MENU */

.has-mega {
  position: relative;
}

.mega-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: min(1080px, calc(100vw - 36px));
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: .28s var(--ease);
}

.has-mega:hover .mega-menu {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mega-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 1.25fr;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(229,232,236,.88);
  background: rgba(255,255,255,.96);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}

.mega-col h4 {
  margin-bottom: 12px;
  color: var(--ink);
}

.mega-col a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-weight: 600;
}

.mega-col a:hover {
  color: var(--purple);
}

.mega-product {
  position: relative;
  min-height: 200px;
  overflow: hidden;
  border-radius: 24px;
  background: #111;
}

.mega-product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .82;
}

.mega-product div {
  position: absolute;
  inset: auto 16px 16px 16px;
  color: #fff;
}

/* MOBILE DRAWER */

.mobile-panel {
  position: fixed;
  inset: 0;
  z-index: 300;
  visibility: hidden;
  pointer-events: none;
}

.mobile-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10,2,28,.58);
  opacity: 0;
  transition: .28s var(--ease);
}

.mobile-panel.active {
  visibility: visible;
  pointer-events: auto;
}

.mobile-panel.active::before {
  opacity: 1;
}

.mobile-drawer {
  position: absolute;
  left: 0;
  top: 0;
  width: min(340px, 88vw);
  height: 100%;
  padding: 20px;
  background: linear-gradient(180deg,#fff,#fff8eb);
  box-shadow: 30px 0 90px rgba(0,0,0,.25);
  transform: translateX(-105%);
  transition: .34s var(--ease);
  overflow-y: auto;
}

.mobile-panel.active .mobile-drawer {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-logo {
  width: 150px;
  opacity: .72;
}

.drawer-close {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-size: 25px;
  box-shadow: 0 18px 38px rgba(10,2,28,.20);
}

.drawer-note {
  margin: 18px 0;
  padding: 14px 15px;
  border-radius: 16px;
  background: rgba(121,74,250,.08);
  color: var(--purple-dark);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

.drawer-links {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.drawer-links a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 6px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -.01em;
  color: var(--ink);
  transition: .22s var(--ease);
}

.drawer-links a:hover {
  color: var(--purple);
  transform: translateX(3px);
}

/* FOOTER */

.footer {
  padding: 70px 0 28px;
  color: rgba(255,255,255,.76);
  background:
    radial-gradient(circle at 20% 0, rgba(121,74,250,.28), transparent 30rem),
    linear-gradient(180deg,#130b24,#080411);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1.35fr;
  gap: 32px;
}

.footer h3 {
  color: #fff;
  margin-bottom: 14px;
}

.footer a:hover {
  color: #ffd48a;
}

.footer li {
  margin: 8px 0;
}

.footer-bottom {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-logo {
  width: 95px;
  opacity: .88;
  filter: brightness(1.8);
}

/* BACK TO TOP */

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 330;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--purple);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: .25s var(--ease);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}