/* ===== HEADER COMPONENT ===== */

.pg-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--pg-z-fixed);
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: var(--pg-border-width) solid var(--pg-border);
  transition: all var(--pg-transition);
}

.pg-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--pg-space-3);
  height: 70px; /* Fixed height mobile */
}

/* Desktop fixed height */
@media (min-width: 768px) {
  .pg-header__inner {
    height: 90px;
  }
}

/* ===== LOGO ===== */
.pg-header__logo {
  flex-shrink: 0;
  z-index: var(--pg-z-fixed);
  display: flex;
  align-items: center;
}

.pg-logo {
  display: flex;
  align-items: center;
  transition: transform var(--pg-transition);
}

.pg-logo:hover {
  transform: scale(1.05);
}

.pg-logo__image {
  height: clamp(50px, 7vw, 70px);
  width: auto;
  display: block;
}

/* ===== NAVIGATION ===== */
.pg-header__nav {
  display: none;
  flex: 1;
  justify-content: flex-end;
}

.pg-nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--pg-space-6);
}

.pg-nav-menu li {
  position: relative;
}

.pg-nav-menu a {
  display: block;
  color: var(--pg-text-primary);
  text-decoration: none;
  font-size: var(--pg-text-base);
  font-weight: var(--pg-font-medium);
  padding: var(--pg-space-2) var(--pg-space-3);
  border-radius: var(--pg-border-radius);
  transition: all var(--pg-transition);
  position: relative;
}

.pg-nav-menu a:hover,
.pg-nav-menu a:focus {
  color: var(--pg-primary);
  background-color: rgba(236, 8, 240, 0.1);
}

.pg-nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pg-primary), var(--pg-primary-light));
  transform: translateX(-50%);
  transition: width var(--pg-transition);
}

.pg-nav-menu a:hover::after,
.pg-nav-menu a:focus::after {
  width: 80%;
}

/* Current page indicator */
.pg-nav-menu .current-menu-item > a,
.pg-nav-menu .current_page_item > a {
  color: var(--pg-primary);
}

.pg-nav-menu .current-menu-item > a::after,
.pg-nav-menu .current_page_item > a::after {
  width: 100%;
}

/* ===== MOBILE TOGGLE ===== */
.pg-header__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--pg-space-2);
  border-radius: var(--pg-border-radius);
  transition: background-color var(--pg-transition);
}

.pg-header__toggle:hover {
  background-color: rgba(236, 8, 240, 0.1);
}

.pg-header__toggle-line {
  width: 24px;
  height: 2px;
  background-color: var(--pg-text-primary);
  margin: 2px 0;
  transition: all var(--pg-transition);
  transform-origin: center;
}

/* Hamburger animation */
.pg-header__toggle[aria-expanded="true"] .pg-header__toggle-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 4px);
}

.pg-header__toggle[aria-expanded="true"] .pg-header__toggle-line:nth-child(2) {
  opacity: 0;
}

.pg-header__toggle[aria-expanded="true"] .pg-header__toggle-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -4px);
}

/* ===== MOBILE MENU ===== */
.pg-mobile-menu {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--pg-bg-dark);
  border-bottom: var(--pg-border-width) solid var(--pg-border);
  padding: var(--pg-space-4) 0;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all var(--pg-transition);
}

.pg-mobile-menu[aria-hidden="false"] {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.pg-mobile-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pg-mobile-nav li {
  border-bottom: var(--pg-border-width) solid var(--pg-border);
}

.pg-mobile-nav li:last-child {
  border-bottom: none;
}

.pg-mobile-nav a {
  display: block;
  color: var(--pg-text-primary);
  text-decoration: none;
  font-size: var(--pg-text-lg);
  font-weight: var(--pg-font-medium);
  padding: var(--pg-space-4) var(--pg-container-padding);
  transition: all var(--pg-transition);
}

.pg-mobile-nav a:hover,
.pg-mobile-nav a:focus {
  color: var(--pg-primary);
  background-color: rgba(236, 8, 240, 0.05);
  padding-left: calc(var(--pg-container-padding) + var(--pg-space-2));
}

/* Current page in mobile */
.pg-mobile-nav .current-menu-item > a,
.pg-mobile-nav .current_page_item > a {
  color: var(--pg-primary);
  background-color: rgba(236, 8, 240, 0.1);
}

/* Special styling for Promozioni link */
.pg-nav-menu .pg-promotions-link > a,
.pg-mobile-nav .pg-promotions-link > a {
  position: relative;
  color: var(--pg-text-primary);
  background: linear-gradient(135deg, rgba(236, 8, 240, 0.1), rgba(236, 8, 240, 0.05));
  border-radius: var(--pg-border-radius);
  transition: all var(--pg-transition);
}

.pg-nav-menu .pg-promotions-link > a:hover,
.pg-mobile-nav .pg-promotions-link > a:hover {
  color: var(--pg-primary);
  background: linear-gradient(135deg, rgba(236, 8, 240, 0.2), rgba(236, 8, 240, 0.1));
  transform: translateY(-1px);
}

/* Special icon for promotions link */
.pg-nav-menu .pg-promotions-link > a::before,
.pg-mobile-nav .pg-promotions-link > a::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: var(--pg-space-1);
  background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><defs><linearGradient id="sparkle-gradient" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23ec08f0;stop-opacity:1" /><stop offset="100%" style="stop-color:%23ff69b4;stop-opacity:1" /></linearGradient></defs><path d="M8 1L9.5 5.5L14 7L9.5 8.5L8 13L6.5 8.5L2 7L6.5 5.5Z" fill="url(%23sparkle-gradient)" stroke="currentColor" stroke-width="0.5"/><circle cx="12" cy="3" r="1" fill="currentColor" opacity="0.7"/><circle cx="4" cy="12" r="0.8" fill="currentColor" opacity="0.5"/><circle cx="13" cy="11" r="0.6" fill="currentColor" opacity="0.6"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablet and up */
@media (min-width: 768px) {
  .pg-header__nav {
    display: flex;
  }
  
  .pg-header__toggle {
    display: none;
  }
  
  .pg-mobile-menu {
    display: none;
  }
}

/* Large screens */
@media (min-width: 1024px) {
  .pg-header__inner {
    padding-block: var(--pg-space-4);
  }
  
  .pg-nav-menu {
    gap: var(--pg-space-8);
  }
  
  .pg-nav-menu a {
    font-size: var(--pg-text-lg);
    padding: var(--pg-space-3) var(--pg-space-4);
  }
}