/* ============================================================
   FUTURE YOUTH — Global Navbar
   Används på ALLA sidor. Ändra här → slår igenom överallt.

   Innehåll:
   - CSS-variabler (brand colors)
   - Mobile menu overlay (checkbox hack, svart overlay, star burst)
   - Navbar 16 (pink, grid desktop, flex mobil)
   - Hamburger → X animation
   - Media queries (≤768px mobil)
   ============================================================ */

:root {
  --yellow: #FFE600;
  --pink: #FF3366;
  --cyan: #00D4FF;
  --black: #111111;
  --white: #FFFEF5;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* =============================================
   MOBILE MENU — checkbox hack
   ============================================= */
#menu-toggle { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 1001;
  padding: 8px;
  mix-blend-mode: normal;
  position: relative;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}

.hamburger:hover span:nth-child(1) { transform: translateX(4px); }
.hamburger:hover span:nth-child(3) { transform: translateX(-4px); }

/* Menu overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 50px;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow-y: auto;
}

.menu-overlay::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(var(--white) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.04;
  pointer-events: none;
}

#menu-toggle:checked ~ .menu-overlay { transform: translateX(0); }

/* Logo in menu */
.menu-logo {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 2rem;
  color: var(--yellow);
  text-decoration: none;
  margin-bottom: 50px;
  letter-spacing: -1px;
}

.menu-logo span { font-style: italic; color: var(--pink); }

/* Menu nav links */
.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.menu-nav a {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  color: var(--white);
  text-decoration: none;
  letter-spacing: -2px;
  line-height: 1.1;
  padding: 12px 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.menu-nav a::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 100%;
  color: var(--yellow);
  transition: top 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-nav a:hover { color: var(--yellow); padding-left: 20px; }
.menu-nav a:hover::before { top: 12px; }
.menu-nav a::after { content: none; }

/* Comic burst in menu */
.menu-burst {
  position: absolute;
  bottom: 40px;
  right: 40px;
  width: 120px;
  height: 120px;
}

.menu-burst svg {
  width: 100%;
  height: 100%;
  animation: spin-slow 12s linear infinite;
}

/* Close button */
.menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 1002;
}

.menu-close:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: transparent;
  transform: rotate(90deg);
}

/* Hamburger → X animation */
#menu-toggle:checked ~ .fy-navbar .hamburger span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#menu-toggle:checked ~ .fy-navbar .hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#menu-toggle:checked ~ .fy-navbar .hamburger span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

body.menu-open { overflow: hidden; }

/* =============================================
   NAVBAR 16 — PRODUCTION (desktop + mobil)
   ============================================= */
.fy-navbar {
  display: block;
  background: var(--pink);
  border-bottom: 5px solid var(--black);
  position: relative;
  z-index: 100;
}

.fy-navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--yellow) 2px, transparent 2px);
  background-size: 10px 10px;
  opacity: 0.2;
  pointer-events: none;
}

.fy-navbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.9rem 2rem;
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 0 auto;
  gap: 20px;
}

.fy-navbar-logo { justify-self: start; }
.fy-navbar-links { justify-self: center; }
.fy-navbar-actions { justify-self: end; }

.fy-navbar-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  text-decoration: none;
  text-transform: none;
  letter-spacing: -1px;
  text-shadow: 2px 2px 0 var(--black);
}

.fy-navbar-logo span { color: var(--yellow); font-style: italic; }

.fy-navbar-links {
  display: flex;
  gap: 0;
  list-style: none;
  position: relative;
}

.fy-navbar-links > li { position: relative; }

.fy-navbar-links > li > a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 1.2rem;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--white);
  text-decoration: none;
  transition: all 0.15s;
  border: 2px solid transparent;
}

.fy-navbar-links > li > a:hover {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--black);
}

.fy-navbar-links > li > a::after { content: '▾'; font-size: 0.7rem; }
.fy-navbar-links > li > a::after {
  display: inline;
  position: static;
  width: auto;
  height: auto;
  background: transparent;
  transition: color 0.15s;
}
.fy-navbar-links > li.no-arrow > a::after { content: ''; display: none; }
.fy-navbar-links > li > a:hover::after { color: var(--black); }

.fy-navbar-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--yellow);
  border: 3px solid var(--black);
  min-width: 200px;
  display: none;
  z-index: 200;
}

.fy-navbar-links > li:hover .fy-navbar-dropdown,
.fy-navbar-links > li:focus-within .fy-navbar-dropdown { display: block; }

.fy-navbar-dropdown a {
  display: block;
  padding: 0.7rem 1.2rem;
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--black);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  transition: background 0.1s;
}

.fy-navbar-dropdown a:last-child { border-bottom: none; }
.fy-navbar-dropdown a:hover { background: var(--pink); color: var(--white); }
.fy-navbar-logo::after,
.fy-navbar-dropdown a::after { content: none; }

.fy-navbar-cart {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cyan);
  color: var(--black);
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid var(--black);
  cursor: pointer;
  position: relative;
  z-index: 100;
  box-shadow: 3px 3px 0 var(--black);
  font-family: 'Work Sans', sans-serif;
}

.fy-navbar-cart:hover { box-shadow: 1px 1px 0 var(--black); transform: translate(2px, 2px); }
.fy-navbar-cart-icon { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }

.fy-navbar-cart-count {
  background: var(--black);
  color: var(--yellow);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
}

.fy-navbar-actions { display: flex; align-items: center; gap: 10px; }

/* =============================================
   MOBILE — ≤768px
   ============================================= */
@media (max-width: 768px) {
  .hamburger { display: flex !important; }

  .fy-navbar-inner {
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }
  .fy-navbar-logo { justify-self: auto; }
  .fy-navbar-links { justify-self: auto; display: none !important; }
  .fy-navbar-actions { justify-self: auto; }

  .fy-navbar-cart { margin-left: 0; padding: 0.4rem 0.7rem; font-size: 0; }
  .fy-navbar-cart span:not(.fy-navbar-cart-count) { display: none; }
  .fy-navbar-cart .fy-navbar-cart-icon { width: 20px; height: 20px; }
  .fy-navbar-cart .fy-navbar-cart-count { width: 22px; height: 22px; font-size: 0.75rem; }
}
