/* Sticky Base */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

/* Left Section */
.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #222;
  text-decoration: none;
}

/* Burger Button */
.burger-btn {
  display: flex; /* Bleibt auf PC und Mobile sichtbar */
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger-btn span {
  width: 100%;
  height: 2px;
  background-color: #333;
  transition: all 0.3s ease;
}

/* Center Searchbar */
.header-search {
  flex: 1;
  max-width: 500px;
}

.header-search form {
  display: flex;
  align-items: center;
  background: #f4f4f5;
  border-radius: 20px;
  padding: 5px 15px;
}

.header-search input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 6px 10px;
  font-size: 0.95rem;
  outline: none;
}

.header-search button {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: #666;
}

/* Right Icons */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  position: relative;
  text-decoration: none;
}

.search-toggle {
  display: none; /* hidden on Desktop */
}

.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #e11d48;
  color: #fff;
  font-size: 0.7rem;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Globaler Off-Canvas Side-Drawer (Slide-In von links für PC & Mobil) */
.mobile-nav {
  position: fixed;
  top: 0;
  left: -350px; /* Standardmäßig außerhalb des Bildschirms */
  width: 100%;
  max-width: 320px; /* Feste Breite auf dem PC */
  height: 100vh;
  background: #ffffff;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1002;
  display: flex;
  flex-direction: column;
}

.cart-flyout {
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 380px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 15px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1002; /* BZW. HÖHER als das Overlay! */
}

/* Wird per JS aktiviert */
.mobile-nav.active {
  left: 0; /* Gleitet sanft von links hinein */
}

/* Nav Header */
.mobile-nav-header {
  padding: 18px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-nav-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #222;
}

.nav-close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

.nav-close-btn:hover {
  color: #e11d48;
}

/* Menüpunkte */
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 10px 0;
}

.mobile-nav li a {
  display: block;
  padding: 14px 24px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f8f8f8;
  font-weight: 500;
  font-size: 1.05rem;
  transition: all 0.2s ease;
}

.mobile-nav li a:hover {
  background-color: #fafafa;
  color: #e11d48;
  padding-left: 28px; /* Kleiner Rutsch-Effekt beim Drüberfahren */
}

/* RESPONSIVE DESIGN (Mobile Breakpoint) */
@media (max-width: 768px) {
  .search-toggle {
    display: flex;
  }

  .header-search {
    display: none; /* Mobile hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 10px 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    max-width: none;
  }

  .header-search.active {
    display: block;
  }
}

.nav-close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s ease;
}

.nav-close-btn:hover {
  color: #e11d48; /* Schöner Rot-Ton beim Drüberfahren */
}

.side-nav-legal {
  margin-top: auto; /* Schiebt die Links ganz nach unten im Menü */
  padding: 20px;
  border-top: 1px solid #eee;
  font-size: 0.8rem;
  color: #777;
  text-align: center;
}

.side-nav-legal a {
  color: #555;
  text-decoration: none;
}