/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 45px;
  z-index: 100;
  background: rgba(32, 17, 0, 0.8);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  box-sizing: border-box;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.logo {
  font-size: 1.6rem;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  /* text-shadow: 0 0 7px rgba(0, 0, 0, 0.85); */
}
.gold {
  background: linear-gradient(90deg, #b6894b, #d2aa67);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 600px) {
  .logo {
    font-size: 1rem;
  }
}

.main-nav a {
  margin-left: 0.5rem;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color 0.2s;
}
.main-nav a:hover {
  color: #d2aa67;
}

/* ===== КОРЗИНА В ШАПКЕ ===== */
.cart-icon {
  position: relative;
  font-size: 22px;
  padding-right: 5px;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s, color 0.2s;
}
.cart-icon:hover {
  color: #d2aa67;
  transform: scale(1.1);
}

#cart-count {
  position: absolute;
  top: 15px;
  right: 2px;
  background: #d2ab67;
  color: #2b1800;
  font-weight: 700;
  font-size: 12px;
  border-radius: 50%;
  padding: 3px;
  min-width: 15px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.cart-icon-inner {
  display: inline-block;
  transition: transform 0.3s;
}

/* ===== Бургер ===== */
.burger {
  display: none;
  margin-right: 10px;
  width: 28px;
  height: 21px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 150;
}
.burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #f2e0b6;
  border-radius: 3px;
  transition: 0.3s;
}
.burger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.user-icon {
  display: flex;
  align-items: center;
  margin: 0;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
}

.user-icon-inner {
  cursor: pointer;
  font-size: 1.2em;
  margin-right: 6px;
}

.username {
  white-space: nowrap;
  color: #d4a857; /* мягкое золото */
}

.username-mini {
  display: none;
  color: #d4a857; /* мягкое золото */
}

@media (max-width: 380px) {
  .username {
    display: none;
  }
  .username-mini {
    display: block;
  }
}

/* ===== Мобильная навигация ===== */
@media (max-width: 1100px) {
  .burger {
    display: flex;
  }

  .header-center {
    display: none;
  }

  .header-right {
    margin-left: auto;
  }

  .main-nav {
    position: fixed;
    top: 65px;
    right: 0;
    width: 200px;
    background: rgba(32, 17, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-bottom-left-radius: 12px;
    border-top-left-radius: 12px;
    backdrop-filter: blur(4px);
  }

  .main-nav a {
    color: #fff;
    margin: 0.5rem 0;
  }

  .main-nav.open {
    transform: translateX(0);
  }
}

/* ==== Выпадающее меню пользователя (для PHP-сессий) ==== */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(32, 17, 0, 0.95);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 300;
  width: 100%;
  min-width: 120px;
}

.user-dropdown.open {
  display: block;
  border-radius: 2px;
}

.user-menu:hover .user-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Внутренние элементы */
.user-dropdown .dropdown-link,
.user-dropdown button {
  display: block;
  width: 90%;
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px;
  /* margin-top: 5px; */
  /* padding: 0.4rem 0.6rem; */
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s;
  text-decoration: none;
}

.user-dropdown .dropdown-link:hover,
.user-dropdown button:hover {
  background-color: rgba(210, 170, 103, 0.25);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 5px;
}

.lang-item img {
  width: 26px;
  min-width: 26px;
  height: 26px;
  border-radius: 4px;
  opacity: 0.6;
  transition: 0.25s;
}

.lang-item:hover img {
  opacity: 1;
  transform: scale(1.09);
}

.lang-item.active img {
  opacity: 1;
  box-shadow: 0 0 5px rgba(200, 150, 50, 0.9);
}
