/**
 * DRAK Header - Premium Navigation
 */

.drak-header-new {
  width: 100%;
  background-color: transparent;
}

/* BELKA 1: Info Bar */
.drak-info-bar {
  background: linear-gradient(90deg, #b91c1c, var(--draki-red) 50%, #b91c1c);
  color: #ffffff;
  padding: 6px 20px;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 32px;
  z-index: 10000;
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 2px 12px rgba(220, 38, 38, 0.25);
}

.drak-info-bar.hidden {
  transform: translateY(-100%);
  opacity: 0;
}

.drak-info-slider {
  position: relative;
  width: 100%;
}

.drak-info-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  text-align: center;
}

.drak-info-slide.active {
  opacity: 1;
  position: relative;
}

.drak-info-slide p {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
}

/* BELKA 2: Main Bar - Glassmorphism */
.drak-main-bar {
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  position: fixed;
  top: 32px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999;
  transition: all 0.4s var(--draki-ease, var(--draki-ease));
}

.drak-main-bar.scrolled {
  top: 0;
  background-color: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

body {
  padding-top: 0;
}

/* DESKTOP LAYOUT */
.drak-main-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 90px;
}

.drak-hamburger {
  display: none;
}

.drak-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.drak-logo a {
  display: block;
  transition: opacity 0.3s ease;
}

.drak-logo a:hover {
  opacity: 0.85;
}

.drak-logo img {
  display: block;
  height: 60px;
  width: auto;
  max-width: 180px;
}

/* Menu wrapper */
.drak-menu-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

/* TOP ROW */
.drak-top-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding: 8px 0 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drak-icons {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* BOTTOM ROW */
.drak-bottom-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  /* Więcej paddingu na dole niż na górze: wypycha wyśrodkowany tekst do góry, żeby
     napisy siedziały na środku między białą kreską a dolną krawędzią, a podkreślenie
     aktywnego linku nie ocierało/wyjeżdżało poza dół navu */
  padding: 8px 0 20px;
  gap: 40px;
}

/* Linki menu - z animowanym podkresleniem */
.drak-menu-link {
  font-family: 'Russo One', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  font-weight: 400;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
  text-align: center;
  position: relative;
  padding-bottom: 4px;
}

/* Animated underline */
.drak-menu-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--draki-red), #ef4444);
  transition: width 0.35s var(--draki-ease, var(--draki-ease));
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
}

.drak-menu-link:hover::after {
  width: 100%;
}

.drak-menu-link:hover {
  color: var(--draki-red);
}

/* Aktywny link */
.drak-menu-link.active {
  color: #ffffff;
}

.drak-menu-link.active::after {
  width: 100%;
  background: linear-gradient(90deg, var(--draki-red), #ef4444, var(--draki-red));
  background-size: 200% 100%;
  animation: underlineShimmer 2s ease-in-out infinite;
}

@keyframes underlineShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.drak-menu-link.active .letter {
  display: inline-block;
  animation: letterWave 3s ease-in-out infinite;
}

.drak-menu-link.active .letter:nth-child(1) { animation-delay: 0s; }
.drak-menu-link.active .letter:nth-child(2) { animation-delay: 0.08s; }
.drak-menu-link.active .letter:nth-child(3) { animation-delay: 0.16s; }
.drak-menu-link.active .letter:nth-child(4) { animation-delay: 0.24s; }
.drak-menu-link.active .letter:nth-child(5) { animation-delay: 0.32s; }
.drak-menu-link.active .letter:nth-child(6) { animation-delay: 0.40s; }
.drak-menu-link.active .letter:nth-child(7) { animation-delay: 0.48s; }
.drak-menu-link.active .letter:nth-child(8) { animation-delay: 0.56s; }
.drak-menu-link.active .letter:nth-child(9) { animation-delay: 0.64s; }
.drak-menu-link.active .letter:nth-child(10) { animation-delay: 0.72s; }
.drak-menu-link.active .letter:nth-child(11) { animation-delay: 0.80s; }
.drak-menu-link.active .letter:nth-child(12) { animation-delay: 0.88s; }
.drak-menu-link.active .letter:nth-child(13) { animation-delay: 0.96s; }
.drak-menu-link.active .letter:nth-child(14) { animation-delay: 1.04s; }

@keyframes letterWave {
  0%, 100% { color: #ffffff; }
  50% { color: var(--draki-red); }
}

/* DRAK MOTO - highlight link */
.drak-menu-link--highlight.active .letter {
  animation: letterWaveHighlight 3s ease-in-out infinite;
}

@keyframes letterWaveHighlight {
  0%, 100% { color: var(--draki-red); }
  50% { color: #ffffff; }
}

.drak-menu-link--highlight {
  color: var(--draki-red);
}

.drak-menu-link--highlight:hover {
  color: #ffffff;
}

.drak-menu-link--highlight::after {
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.6));
}

/* Ikony - z hover scale */
.drak-icon-link,
.drak-search-btn,
.drak-lang-btn,
.drak-cart-link {
  color: #ffffff;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: color 0.3s ease, transform 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drak-icon-link:hover,
.drak-search-btn:hover,
.drak-lang-btn:hover,
.drak-cart-link:hover {
  color: var(--draki-red);
  transform: scale(1.1);
}

/* Przycisk muzyki */
.drak-music-btn {
  position: relative;
}

/* Przekreślenie nutki gdy muzyka wyłączona */
.drak-music-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-45deg);
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.drak-music-btn.is-playing::after {
  opacity: 0;
}

.drak-music-btn.is-playing {
  color: var(--draki-red);
}

.drak-music-btn.is-playing .drak-music-icon-on {
  animation: drak-music-pulse 1.5s ease-in-out infinite;
}

@keyframes drak-music-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.drak-lang-btn {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.drak-lang-active {
  font-size: 16px;
  font-weight: 700;
  color: var(--draki-red);
}

.drak-lang-inactive {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
}

.drak-cart-link {
  position: relative;
}

.drak-cart-count {
  position: absolute;
  top: -4px;
  right: -8px;
  background-color: var(--draki-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.5);
  animation: cartPop 0.3s var(--draki-ease-back, cubic-bezier(0.34, 1.56, 0.64, 1));
}

@keyframes cartPop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.drak-mobile-overlay {
  display: none;
}

.drak-icons-mobile {
  display: none;
}

/* ============================================
   MOBILE STYLES
   ============================================ */
@media (max-width: 990px) {
  body {
    padding-top: 0;
  }

  .drak-main-bar {
    top: 28px;
  }

  .drak-main-container {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 6px;
    padding: 0 10px;
    min-height: 44px;
    justify-items: center;
    align-items: center;
  }

  .drak-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-self: start;
    gap: 4px;
    width: 38px;
    height: 38px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
  }

  .drak-hamburger:hover {
    background: rgba(220, 38, 38, 0.25);
    border-color: var(--draki-red);
  }

  .drak-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--draki-red);
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    transform-origin: center;
  }

  .drak-hamburger.active {
    background: var(--draki-red);
    border-color: var(--draki-red);
  }

  .drak-hamburger.active span {
    background-color: #0a0a0a;
  }

  .drak-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .drak-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .drak-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .drak-logo {
    justify-content: center;
  }

  .drak-logo img {
    height: 38px;
  }

  .drak-icons {
    display: none !important;
  }

  .drak-icons-mobile {
    display: flex;
    gap: 2px;
    justify-self: end;
  }

  .drak-icons-mobile .drak-icon-link {
    padding: 3px;
  }

  .drak-icons-mobile svg {
    width: 18px;
    height: 18px;
  }

  /* Menu drawer */
  .drak-menu-wrapper {
    position: fixed;
    top: 72px;
    left: 0;
    width: 280px;
    height: calc(100vh - 72px);
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(-100%);
    transition: transform 0.35s var(--draki-ease);
    z-index: 9998;
    padding: 24px;
    overflow-y: auto;
    border-right: 1px solid rgba(220, 38, 38, 0.15);
  }

  .drak-menu-wrapper.active {
    transform: translateX(0);
  }

  .drak-top-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 0 16px 0;
    margin-bottom: 16px;
    justify-content: flex-start;
  }

  .drak-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0;
  }

  .drak-menu-link {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    font-size: 20px;
    text-align: left;
  }

  .drak-menu-link::after {
    bottom: -1px;
    height: 2px;
  }

  /* Mobile overlay */
  .drak-mobile-overlay {
    display: block;
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    height: calc(100vh - 72px);
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 9997;
  }

  .drak-mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .drak-info-bar {
    padding: 4px 12px;
    min-height: 28px;
  }

  .drak-info-slide p {
    font-size: 12px;
    line-height: 1.3;
    padding: 0 8px;
    letter-spacing: 0.5px;
  }
}

/* ============================================
   TABLET STYLES
   ============================================ */
@media (min-width: 750px) and (max-width: 990px) {
  .drak-main-container {
    gap: 24px;
  }

  .drak-logo img {
    height: 55px;
  }
}
