/* Shared header styles (nav + auth + dropdown) */
.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.dropdown-label {
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 190px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .25s ease;
  z-index: 999;
}

.dropdown-menu a {
  display: block;
  padding: 10px 18px;
  color: #222;
  text-decoration: none;
  font-weight: 500;
}

.dropdown-menu a:hover {
  background: #f2f7fa;
  color: #00a3c8;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-feedback {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #00a3c8;
  text-decoration: none;
}

.nav-feedback:hover {
  color: #0089a8;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00a3c8;
  box-shadow: 0 0 0 0 rgba(0,163,200,0.5);
  animation: navPulse 1.8s ease-in-out infinite;
}

@keyframes navPulse {
  0% { box-shadow: 0 0 0 0 rgba(0,163,200,0.45); }
  70% { box-shadow: 0 0 0 10px rgba(0,163,200,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,163,200,0); }
}

.nav-mobile-auth {
  display: none;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  align-items: center;
}

.nav-mobile-auth a,
.nav-mobile-auth button {
  font-weight: 700;
  font-size: 16px;
  color: #00a3c8;
  text-decoration: none;
  background: transparent;
  border: 2px solid rgba(0, 163, 200, 0.25);
  padding: 10px 18px;
  border-radius: 999px;
  width: min(260px, 90%);
  text-align: center;
}

.nav-mobile-auth button {
  cursor: pointer;
}

.nav-mobile-logout {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-dropdown {
  position: relative;
}

.lang-form {
  position: relative;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 163, 200, 0.25);
  background: #f5fcff;
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lang-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 163, 200, 0.18);
}

.lang-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .25s ease;
  z-index: 999;
}

.lang-form:hover .lang-menu,
.lang-form:focus-within .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  color: #1f2937;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.lang-option:hover {
  background: #f2f7fa;
  color: #00a3c8;
}

.lang-option.is-active {
  color: #00a3c8;
  background: #eef9fc;
}

.lang-code {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
  text-decoration: none;
  color: #00a3c8;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 163, 200, 0.2);
  background: #f5fcff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 163, 200, 0.18);
}

.cart-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background-image: var(--cart-icon-url);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

.cart-count {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #00a3c8;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.btn-auth {
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  background: #00a3c8;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0, 163, 200, 0.2);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #00a3c8;
  width: 36px;
  height: 28px;
  padding: 0;
  cursor: pointer;
}

.menu-toggle .menu-icon {
  position: relative;
  width: 24px;
  height: 16px;
  display: inline-block;
}

.menu-toggle .menu-icon::before,
.menu-toggle .menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.menu-toggle .menu-icon::before { top: 0; }
.menu-toggle .menu-icon::after { bottom: 0; }
.menu-toggle .menu-icon { box-shadow: 0 7px 0 0 currentColor; }

.btn-auth:hover {
  background: #0089a8;
  color: #fff;
  transform: translateY(-1px);
}

.btn-auth.outline {
  background: transparent;
  color: #00a3c8;
  border: 2px solid #00a3c8;
  box-shadow: none;
}

.btn-auth.outline:hover {
  background: #00a3c8;
  color: #fff;
}

.btn-auth.logout {
  background: #ff4f4f;
  box-shadow: 0 10px 20px rgba(255, 79, 79, 0.2);
}

.btn-auth.logout:hover {
  background: #e63e3e;
}

.lang-switch {
  display: flex;
  justify-content: flex-end;
  padding: 8px 5%;
  background: #fff;
}

.lang-switch form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-switch select {
  border: 1px solid rgba(0, 163, 200, 0.25);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  font-weight: 600;
  color: #0f172a;
}

.lang-switch button {
  border: 1px solid rgba(0, 163, 200, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  background: #f5fcff;
  color: #00a3c8;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 768px) {
  .main-header {
    gap: 10px;
    z-index: 3000;
  }
  .auth-buttons {
    display: none;
  }

  .cart-link {
    margin-right: 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 3;
  }

  .cart-link {
    order: 2;
  }

  .nav-links {
    order: 4;
    z-index: 3100;
  }

  .auth-buttons {
    order: 5;
  }

  .nav-links.active .nav-mobile-auth {
    display: flex;
    margin-top: 6px;
  }
}
