/* ========== БАЗОВЫЕ СТИЛИ ========== */

/* Сброс и базовые настройки */
* {
  box-sizing: border-box;
  /* cursor: none !important; - отключено для улучшения производительности */
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  background-color: #fff;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* cursor: none !important; - отключено для улучшения производительности */
}

/* Кастомный курсор - простой кружочек */
/* ОТКЛЮЧЕН для улучшения производительности */
.cursor {
  display: none !important;
  /* position: fixed;
  width: 12px;
  height: 12px;
  background: #2d5a27;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 8px rgba(45, 90, 39, 0.8); */
}

.cursor.hover {
  /* width: 20px;
  height: 20px;
  background: #4a7c59;
  box-shadow: 0 0 12px rgba(74, 124, 89, 0.9); */
  display: none !important;
}

/* Кастомный курсор отключен для улучшения производительности */
/* Используется стандартный системный курсор */

/* Классы для блокировки прокрутки */
body.no-scroll,
body.noscroll,
.no-scroll,
.noscroll {
  overflow: hidden;
  height: 100vh;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

html {
  overflow-y: scroll;
}

/* ========== МОБИЛЬНЫЙ ВЕРХНИЙ БАР ========== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  z-index: 998;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  backdrop-filter: blur(10px);
}

.mobile-menu-button {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border: 1.5px solid rgba(127, 179, 20, 0.2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.mobile-menu-button:hover {
  background: linear-gradient(135deg, #7fb314 0%, #6a9810 100%);
  border-color: #7fb314;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(127, 179, 20, 0.3);
}

.mobile-menu-button:hover .hamburger-line {
  background: #fff;
}

.mobile-menu-button.active {
  background: linear-gradient(135deg, #7fb314 0%, #6a9810 100%);
  border-color: #7fb314;
}

.mobile-menu-button.active .hamburger-line {
  background: #fff;
}

.mobile-menu-button .hamburger-line {
  width: 20px;
  height: 2.5px;
  background: #45555f;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-button.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-button.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.mobile-menu-button.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-logo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.mobile-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-logo img {
  height: 50px;
  width: auto;
  object-fit: contain;
  max-width: 100%;
}

.mobile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-action-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border: 1.5px solid rgba(127, 179, 20, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  color: #45555f;
}

.mobile-action-btn:hover {
  background: linear-gradient(135deg, #7fb314 0%, #6a9810 100%);
  border-color: #7fb314;
  transform: scale(1.05);
  color: #fff;
  box-shadow: 0 4px 12px rgba(127, 179, 20, 0.3);
}

.mobile-action-btn:active {
  transform: scale(0.95);
}

.mobile-cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, #e63946, #dc2626);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  padding: 2px 6px;
  line-height: 1.2;
  min-width: 18px;
  text-align: center;
  display: none;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(230, 57, 70, 0.4);
  animation: badgePulse 2s infinite;
}

.mobile-cart-badge.show {
  display: inline-block;
}

/* ========== БОКОВАЯ ШАПКА ========== */
.sidebar-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  height: 100vh;
  width: 280px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
  border-right: 1px solid #e5e7eb;
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.12);
  transform: translateX(0); /* Видна по умолчанию на десктопе */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Анимированный фон */
.sidebar-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* На мобильных экранах фон должен принимать клики для закрытия меню */
@media (max-width: 1025px) {
  .sidebar-header.open .sidebar-background {
    pointer-events: auto;
    cursor: pointer;
  }
}

.bg-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      circle at 20% 80%,
      rgba(127, 179, 20, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(69, 85, 95, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(127, 179, 20, 0.05) 0%,
      transparent 50%
    );
  animation: particleFloat 20s ease-in-out infinite;
}

.bg-gradient {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(127, 179, 20, 0.03) 0%,
    transparent 30%,
    transparent 70%,
    rgba(69, 85, 95, 0.03) 100%
  );
  animation: gradientShift 15s ease-in-out infinite;
}

@keyframes particleFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-10px) rotate(1deg);
  }
  66% {
    transform: translateY(5px) rotate(-1deg);
  }
}

@keyframes gradientShift {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.sidebar-header .sidebar-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0px;
  overflow-y: auto;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header .sidebar-panel.open {
  transform: translateX(0);
}

/* Кнопка гамбургер для мобильных */
.sidebar-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border: 2px solid rgba(127, 179, 20, 0.2);
  border-radius: 14px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(127, 179, 20, 0.15);
  backdrop-filter: blur(10px);
}

.sidebar-toggle:hover {
  background: linear-gradient(135deg, #7fb314 0%, #6a9810 100%);
  border-color: #7fb314;
  transform: scale(1.08);
  box-shadow: 0 6px 25px rgba(127, 179, 20, 0.3),
    0 4px 12px rgba(127, 179, 20, 0.2);
}

.sidebar-toggle:hover .hamburger-line {
  background: #fff;
}

.sidebar-toggle.active {
  background: linear-gradient(135deg, #7fb314 0%, #6a9810 100%);
  border-color: #7fb314;
  box-shadow: 0 6px 25px rgba(127, 179, 20, 0.4),
    0 4px 12px rgba(127, 179, 20, 0.3);
}

.sidebar-toggle.active .hamburger-line {
  background: #fff;
}

.hamburger-line {
  width: 22px;
  height: 2.5px;
  background: #45555f;
  border-radius: 3px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.sidebar-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
  width: 22px;
}

.sidebar-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.sidebar-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
  width: 22px;
}

/* Оверлей для мобильных */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: none;
  transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
}

.sidebar-overlay[x-cloak] {
  display: none !important;
}

/* Логотип в боковой шапке */
.sidebar-logo {
  display: flex;
  align-items: center;
  margin-bottom: 0px;
  position: relative;
  transition: all 0.3s ease;
  justify-content: center;
  padding: 0% 24px 8px 24px;
}

.sidebar-logo::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  opacity: 0.6;
}

.sidebar-logo img {
  width: 240px;
  height: 80px;
  object-fit: contain;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  justify-content: center;
  margin-top: 10px;
}

.sidebar-logo:hover img {
  transform: scale(1.05) rotate(2deg);
}

/* Навигация в боковой шапке */
.sidebar-nav {
  flex: 1;
  padding: 8px 24px 8px 24px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  margin: 0;
}

/* Разделитель "Админки" */
.nav-divider {
  margin: 16px 0;
  padding: 0 16px;
}

.divider-content {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.divider-text {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(148, 163, 184, 0.3) 20%,
    rgba(148, 163, 184, 0.5) 50%,
    rgba(148, 163, 184, 0.3) 80%,
    transparent 100%
  );
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #64748b;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  overflow: hidden;
  margin-bottom: 4px;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(135deg, #7fb314, #6a9810);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  border-radius: 12px;
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #7fb314, #6a9810);
  transform: translateX(6px);
  box-shadow: 0 4px 12px rgba(127, 179, 20, 0.3);
}

.nav-link.active::before {
  width: 100%;
}

.nav-link:hover {
  color: #fff;
  background: linear-gradient(135deg, #7fb314, #6a9810);
  transform: translateX(6px);
  box-shadow: 0 4px 12px rgba(127, 179, 20, 0.3);
}

.nav-link:hover::before {
  width: 100%;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  color: #fff;
  transform: scale(1.1);
}

.nav-link:hover .nav-text,
.nav-link.active .nav-text {
  transform: translateX(2px);
}

.nav-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.nav-icon {
  color: #94a3b8;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.nav-text {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

.nav-indicator {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #7fb314;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
}

.nav-link.active .nav-indicator {
  opacity: 1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-50%) scale(1.2);
    opacity: 0.7;
  }
}

/* Контакты в боковой шапке */
.sidebar-contacts {
  padding: 0px 24px 0px;
  border-top: 1px solid rgba(229, 231, 235, 0.6);
  margin-top: auto;
  position: relative;
}

.sidebar-contacts::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #7fb314, transparent);
  opacity: 0.6;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  min-height: 48px;
}

.contact-item > div,
.contact-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.contact-label {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 2px;
  line-height: 1.2;
  display: block;
}

.contact-item:hover {
  background: rgba(127, 179, 20, 0.05);
  transform: translateX(4px);
}

.contact-icon {
  color: #94a3b8;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
  color: #7fb314;
  transform: scale(1.1);
}

.contact-link {
  color: #64748b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  word-break: break-word;
}

.contact-link:hover {
  color: #7fb314;
  transform: translateX(2px);
}

/* Действия пользователя */
.sidebar-actions {
  display: flex;
  gap: 12px;
  padding: 8px 24px 8px 24px;

  position: relative;
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  border-top: 1px solid rgba(229, 231, 235, 0.6);
}

.sidebar-actions::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #7fb314, transparent);
  opacity: 0.6;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 12px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  font-weight: 500;
  font-size: 14px;
}

.action-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #7fb314, #6a9810);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.action-btn:hover {
  color: #fff;
  border-color: #7fb314;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(127, 179, 20, 0.4);
}

.action-btn:hover::before {
  left: 0;
}

.action-btn:hover .action-icon-wrapper,
.action-btn:hover .action-text {
  position: relative;
  z-index: 1;
}

.action-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.action-btn:hover .action-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.action-text {
  transition: all 0.3s ease;
  font-weight: 500;
}

.action-btn:hover .action-text {
  transform: translateX(2px);
}

.action-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
  pointer-events: none;
}

.action-ripple.active {
  width: 100px;
  height: 100px;
  opacity: 0;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #e63946, #dc2626);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 50%;
  padding: 3px 6px;
  line-height: 1;
  min-width: 20px;
  text-align: center;
  display: none;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.4);
  animation: badgePulse 2s infinite;
}

.cart-badge.show {
  display: inline-block;
}

@keyframes badgePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Адаптивность для мобильных */
@media (max-width: 1025px) {
  /* Показываем мобильный верхний бар */
  .mobile-header {
    display: flex;
  }

  /* ========== НОВАЯ РЕАЛИЗАЦИЯ SIDEBAR OPEN ========== */

  /* Sidebar как модальное окно на мобильных */
  .sidebar-header {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar-header.open {
    opacity: 1;
    pointer-events: all;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
  }

  /* Оверлей с плавным появлением */
  .sidebar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
  }

  .sidebar-header.open .sidebar-overlay {
    opacity: 1;
  }

  /* Панель sidebar - slide-in справа */
  .sidebar-header .sidebar-panel {
    position: relative;
    z-index: 2;
    width: 85vw;
    max-width: 420px;
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #ffffff 100%);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12),
      -4px 0 16px rgba(127, 179, 20, 0.08);
    border-left: 1px solid rgba(127, 179, 20, 0.15);
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
      opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .sidebar-header.open .sidebar-panel {
    transform: translateX(0);
    opacity: 1;
  }

  /* Sidebar panel должен скроллиться на мобильных */
  .sidebar-header .sidebar-panel {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(127, 179, 20, 0.3) transparent;
  }

  .sidebar-header .sidebar-panel::-webkit-scrollbar {
    width: 6px;
  }

  .sidebar-header .sidebar-panel::-webkit-scrollbar-track {
    background: transparent;
  }

  .sidebar-header .sidebar-panel::-webkit-scrollbar-thumb {
    background: rgba(127, 179, 20, 0.3);
    border-radius: 3px;
  }

  .sidebar-header .sidebar-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(127, 179, 20, 0.5);
  }

  .sidebar-toggle {
    display: none; /* Используем кнопку в mobile-header вместо этой */
  }

  /* Кнопка закрытия меню - улучшенный дизайн */
  .sidebar-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid rgba(229, 231, 235, 0.6);
    border-radius: 12px;
    color: #64748b;
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: scale(0.8) rotate(-90deg);
  }

  .sidebar-header.open .sidebar-close-btn {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    transition-delay: 0.2s;
  }

  .sidebar-close-btn:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #ef4444;
    color: #dc2626;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  }

  .sidebar-close-btn:active {
    transform: scale(0.95) rotate(90deg);
  }

  /* Скрываем кнопку закрытия на больших экранах, где сайдбар всегда открыт */
  @media (min-width: 1026px) {
    .sidebar-close-btn {
      display: none !important;
    }
  }

  /* Анимация появления элементов навигации */
  .sidebar-header:not(.open) .nav-item {
    opacity: 0;
    transform: translateX(0);
  }

  .sidebar-header.open .nav-item {
    animation: slideInFromRight 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94)
      forwards;
  }

  .sidebar-header.open .nav-item:nth-child(1) {
    animation-delay: 0.1s;
  }

  .sidebar-header.open .nav-item:nth-child(2) {
    animation-delay: 0.15s;
  }

  .sidebar-header.open .nav-item:nth-child(3) {
    animation-delay: 0.2s;
  }

  .sidebar-header.open .nav-item:nth-child(4) {
    animation-delay: 0.25s;
  }

  .sidebar-header.open .nav-item:nth-child(5) {
    animation-delay: 0.3s;
  }

  .sidebar-header.open .nav-item:nth-child(6) {
    animation-delay: 0.35s;
  }

  .sidebar-header.open .nav-item:nth-child(7) {
    animation-delay: 0.4s;
  }

  .sidebar-header.open .nav-item:nth-child(8) {
    animation-delay: 0.45s;
  }

  @keyframes slideInFromRight {
    from {
      opacity: 0;
      transform: translateX(0);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  body {
    overscroll-behavior: contain;
  }

  /* Логотип с плавной анимацией */
  .sidebar-header:not(.open) .sidebar-logo {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }

  .sidebar-header.open .sidebar-logo {
    animation: fadeInScale 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.05s;
  }

  @keyframes fadeInScale {
    from {
      opacity: 0;
      transform: translateY(-10px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  /* Улучшенный логотип для мобильных */
  .sidebar-logo {
    padding: 32px 24px 28px;
    margin-bottom: 24px;
    background: linear-gradient(
      135deg,
      rgba(127, 179, 20, 0.04) 0%,
      transparent 100%
    );
    flex-shrink: 0;
    position: relative;
  }

  .sidebar-logo::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    opacity: 0.4;
  }

  .sidebar-logo img {
    width: 140px;
    height: 140px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
  }

  .sidebar-logo:hover img {
    transform: scale(1.05) rotate(2deg);
  }

  /* Навигация для мобильных */
  .sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
    min-height: 0;
  }

  /* Улучшенные ссылки навигации для мобильных */
  .nav-link {
    padding: 14px 18px;
    margin-bottom: 6px;
    font-size: 15px;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(127, 179, 20, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
  }

  .nav-link:active {
    transform: translateX(2px) scale(0.98);
  }

  .nav-link:hover,
  .nav-link.active {
    background: linear-gradient(135deg, #7fb314 0%, #6a9810 100%);
    color: #fff;
    border-color: #7fb314;
    box-shadow: 0 4px 16px rgba(127, 179, 20, 0.35),
      0 2px 8px rgba(127, 179, 20, 0.2);
    transform: translateX(4px);
  }

  .nav-link:hover .nav-icon,
  .nav-link.active .nav-icon {
    color: #fff;
    transform: scale(1.1);
  }

  /* Контакты для мобильных */
  .sidebar-contacts {
    padding: 24px 24px 20px;
    flex-shrink: 0;
    border-top: 1px solid rgba(229, 231, 235, 0.5);
    margin-top: auto;
    background: linear-gradient(
      135deg,
      rgba(127, 179, 20, 0.02) 0%,
      transparent 100%
    );
    position: relative;
  }

  .sidebar-contacts::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #7fb314 50%, transparent);
    opacity: 0.4;
  }

  /* Действия пользователя для мобильных */
  .sidebar-actions {
    flex-shrink: 0;
    background: linear-gradient(
      135deg,
      rgba(127, 179, 20, 0.02) 0%,
      transparent 100%
    );
    position: relative;
  }

  .sidebar-actions::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #7fb314 50%, transparent);
    opacity: 0.4;
  }

  .action-btn {
    padding: 14px 20px;
    border-radius: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(127, 179, 20, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #7fb314 0%, #6a9810 100%);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border: none;
  }

  .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(127, 179, 20, 0.4);
    background: linear-gradient(135deg, #6a9810 0%, #5a7f0e 100%);
  }

  .action-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(127, 179, 20, 0.3);
  }

  /* Плавное появление контактов и действий */
  .sidebar-header:not(.open) .sidebar-contacts,
  .sidebar-header:not(.open) .sidebar-actions {
    opacity: 0;
    transform: translateY(10px);
  }

  .sidebar-header.open .sidebar-contacts,
  .sidebar-header.open .sidebar-actions {
    animation: fadeInUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.5s;
    opacity: 0;
  }

  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 768px) {
  /* Панель sidebar - немного шире на планшетах */
  .sidebar-header .sidebar-panel {
    width: 90vw;
    max-width: 380px;
  }

  .sidebar-close-btn {
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .sidebar-logo {
    padding: 28px 24px 24px;
  }

  .sidebar-logo img {
    width: 130px;
    height: 130px;
  }

  .sidebar-nav {
    padding: 0 18px;
  }

  .nav-link {
    padding: 13px 16px;
    font-size: 15px;
    margin-bottom: 5px;
  }

  .sidebar-contacts {
    display: none; /* Скрываем контакты в мобильной версии боковой шапки */
  }

  .sidebar-actions {
    padding: 18px 24px 20px;
  }

  .action-btn {
    height: 50px;
    font-size: 14px;
    padding: 13px 18px;
  }

  /* Мобильный хедер для маленьких экранов */
  .mobile-header {
    height: 64px;
    padding: 0 12px;
  }

  .mobile-menu-button,
  .mobile-action-btn {
    width: 40px;
    height: 40px;
  }

  .mobile-logo img {
    height: 45px;
  }
}

@media (max-width: 480px) {
  /* Панель sidebar на очень маленьких экранах - почти на всю ширину */
  .sidebar-header .sidebar-panel {
    width: 92vw;
    max-width: 92vw;
  }

  .sidebar-close-btn {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .sidebar-logo {
    padding: 24px 20px 20px;
  }

  .sidebar-logo img {
    width: 120px;
    height: 120px;
  }

  .sidebar-nav {
    padding: 0 16px;
  }

  .nav-link {
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 4px;
  }

  .sidebar-contacts {
    display: none; /* Скрываем контакты в мобильной версии боковой шапки */
  }

  .sidebar-actions {
    padding: 16px 20px 18px;
  }

  .action-btn {
    height: 48px;
    font-size: 14px;
    padding: 12px 16px;
  }

  /* Мобильный хедер для очень маленьких экранов */
  .mobile-header {
    height: 60px;
    padding: 0 10px;
    gap: 8px;
  }

  .mobile-menu-button,
  .mobile-action-btn {
    width: 36px;
    height: 36px;
  }

  .mobile-menu-button .hamburger-line {
    width: 18px;
    height: 2px;
  }

  .mobile-logo img {
    height: 40px;
  }

  body {
    padding-top: 60px; /* Уменьшаем отступ под мобильный хедер */
  }
}

/* ========== ОСНОВНОЙ КОНТЕНТ ========== */
body {
  margin-left: 280px; /* Отступ для боковой шапки на десктопе */
  /* transition: margin-left убран для производительности - редко меняется */
}

@media (max-width: 1025px) {
  body {
    margin-left: 0; /* Убираем отступ на мобильных */
    overflow-x: hidden; /* Предотвращаем горизонтальный скролл */
    padding-top: 70px; /* Отступ для мобильного верхнего бара */
  }
}

/* ========== СТАРАЯ ШАПКА (СКРЫТА) ========== */
.site-header {
  display: none; /* Скрываем старую шапку */
}

.site-header.hidden {
  opacity: 0;
  pointer-events: none;
}

.site-header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.98);
}

.logo img {
  height: 60px;
}

.logo-top {
  display: none;
  position: relative;
  z-index: 150;
  background: #fff;
  padding: 12px 0;
  text-align: center;
}

.logo-top img {
  height: 48px;
  max-width: 100%;
}

/* Навигация */
.nav-links {
  display: flex;
  gap: 30px;
  flex-grow: 1;
  justify-content: center;
}

.nav-links a {
  text-decoration: none;
  color: #45555f;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #7fb314;
  text-decoration: underline;
}

.nav-links a.active {
  color: #7fb314;
  font-weight: 600;
  position: relative;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(135deg, #7fb314 0%, #2d5a27 100%);
  border-radius: 1px;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-nav-links a {
  color: #45555f;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
  transition: color 0.2s ease;
  display: block;
}

.mobile-nav-links a:hover {
  color: #2f3c44;
}

.mobile-nav-links a.active {
  color: #7fb314;
  font-weight: 600;
}

/* Контакты */
.contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 200px;
  margin-right: 20px;
  flex-shrink: 0;
  word-break: break-word;
}

.contacts span {
  transition: color 0.3s ease;
}

.contacts span:hover {
  color: #45555f;
  cursor: pointer;
}

/* ========== КНОПКИ ========== */
.btn {
  width: 100%;
  font-size: 18px;
  font-weight: 400;
  padding: 10px 0;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-logo {
  background-color: #45555f;
  color: white;
}

.btn-logo:hover {
  background-color: #2f3c44;
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn-cart {
  background: linear-gradient(135deg, #7fb314, #6a9810);
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(127, 179, 20, 0.3);
}

.btn-cart:hover {
  background: linear-gradient(135deg, #6a9810, #5a7f0e);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(127, 179, 20, 0.4);
}

.btn-projection {
  background-color: #45555f;
  color: white;
}

.btn-projection:hover {
  background-color: #2f3c44;
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* ========== ПОЛНОЭКРАННЫЙ ОВЕРЛЕЙ ========== */
.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgb(255, 255, 255);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.fullscreen-image-container {
  position: relative;
  width: 90%;
  height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fullscreen-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  will-change: transform, opacity;
}

.fullscreen-image-container.sliding-right img {
  animation: slideRight 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fullscreen-image-container.sliding-left img {
  animation: slideLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideRight {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(100%) scale(0.8);
    opacity: 0.3;
  }
  51% {
    transform: translateX(-100%) scale(0.8);
    opacity: 0.3;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes slideLeft {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(-100%) scale(0.8);
    opacity: 0.3;
  }
  51% {
    transform: translateX(100%) scale(0.8);
    opacity: 0.3;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

.fullscreen-overlay .fullscreen-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #45555f;
  font-size: 3rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10000;
}

.fullscreen-overlay .fullscreen-prev,
.fullscreen-overlay .fullscreen-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #45555f;
  font-size: 4rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10000;
}

.fullscreen-overlay .fullscreen-prev {
  left: 20px;
}

.fullscreen-overlay .fullscreen-next {
  right: 20px;
}

/* ========== ГЛОБАЛЬНЫЙ ЛОАДЕР СТРАНИЦЫ ========== */
.page-loader-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  pointer-events: all;
  /* Блокируем скролл когда лоадер виден */
  overflow: hidden;
}

/* Блокируем скролл body когда лоадер активен */
body:has(#page-loader:not(.hidden)) {
  overflow: hidden !important;
}

html:has(#page-loader:not(.hidden)) {
  overflow: hidden !important;
}

.page-loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 40px 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-loader-spinner {
  display: inline-block;
  position: relative;
  width: 64px;
  height: 64px;
}

.page-loader-spinner div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 51px;
  height: 51px;
  margin: 6px;
  border: 4px solid #7fb314;
  border-radius: 50%;
  animation: page-loader-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #7fb314 transparent transparent transparent;
}

.page-loader-spinner div:nth-child(1) {
  animation-delay: -0.45s;
}

.page-loader-spinner div:nth-child(2) {
  animation-delay: -0.3s;
}

.page-loader-spinner div:nth-child(3) {
  animation-delay: -0.15s;
}

@keyframes page-loader-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ========== ЛОКАЛЬНЫЙ ЛОАДЕР ========== */
.loader-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.9);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s;
  pointer-events: all;
}

.loader {
  display: flex;
  gap: 8px;
}

.loader div {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #45555f;
  opacity: 0.7;
  animation: loaderBounce 0.8s infinite alternate;
}

.loader div:nth-child(2) {
  animation-delay: 0.2s;
}
.loader div:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loaderBounce {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.3);
  }
}

@keyframes bounce {
  to {
    transform: translateY(-16px);
  }
}

/* ========== КНОПКА "ВВЕРХ" ========== */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(69, 85, 95, 0.9);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  z-index: 200;
  min-height: 44px;
}

.scroll-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  background: rgba(44, 62, 80, 0.95);
  transform: translateY(-4px);
}

.scroll-top svg {
  width: 24px;
  height: 24px;
}

/* ========== КАРТОЧКИ ТОВАРОВ ========== */
.card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #e5e7eb;
  user-select: none;
}

.card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card img {
  max-width: 100%;
  border-radius: 8px;
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 220px;
}

.card-name {
  font-weight: 600;
  font-size: 20px;
  color: #0f172a;
}

.card-price {
  color: #555;
  font-weight: 600;
}

/* ========== КАРУСЕЛЬ ========== */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.carousel {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
  align-items: center;
}

.scroll-left,
.scroll-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  color: #45555f;
}

.scroll-left:hover,
.scroll-right:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #2f3c44;
  transform: translateY(-50%) scale(1.1);
}

.scroll-left:active,
.scroll-right:active {
  transform: translateY(-50%) scale(0.95);
  outline: none;
}

.scroll-left:focus,
.scroll-right:focus {
  outline: none;
}

.scroll-left {
  left: 0;
}

.scroll-right {
  right: 0;
}

.scroll-left:disabled,
.scroll-right:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: translateY(-50%);
  color: #d7d7d7;
}

.scroll-left:disabled:hover,
.scroll-right:disabled:hover {
  transform: translateY(-50%);
  background: none;
  color: #d7d7d7;
  opacity: 0.5;
}

/* ========== МОДАЛЬНЫЕ ОКНА ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  /* Оптимизация рендеринга */
  contain: layout style paint;
  will-change: opacity;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transform: translateY(20px) translateZ(0);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-height: 90vh;
  overflow-y: auto;
  /* Оптимизация рендеринга */
  contain: layout style paint;
  will-change: transform, opacity;
}

@media (max-width: 768px) {
  .modal {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
  }

  .modal-body {
    flex: 1;
    overflow-y: auto;
  }

  .modal-overlay {
    padding: 0;
    align-items: stretch;
  }

  .modal-overlay.active {
    pointer-events: auto;
  }
}

.modal-overlay.active .modal {
  transform: translateY(0) translateZ(0);
  opacity: 1;
}

.modal h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
  color: #45555f;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.modal-actions button {
  padding: 8px 16px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.modal-actions .btn-cancel {
  background: #e5e7eb;
  color: #45555f;
}

.modal-actions .btn-apply {
  background: #7fb314;
  color: white;
}

/* ========== ЧЕКБОКСЫ ========== */
.checkbox-wrapper-12 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-wrapper-12 span {
  display: inline-block;
  line-height: 1;
}

.checkbox-wrapper-12 * {
  box-sizing: border-box;
  vertical-align: middle;
}

/* Стили для cbx внутри checkbox-wrapper-12 */
.checkbox-wrapper-12 .cbx {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
}

.checkbox-wrapper-12 .cbx input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border: 2px solid #bfbfc0;
  border-radius: 50%;
  position: relative;
  margin: 0;
  transition: all 0.3s ease;
}

.checkbox-wrapper-12 .cbx label {
  display: block;
  width: 24px;
  height: 24px;
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.checkbox-wrapper-12 .cbx svg {
  position: absolute;
  top: 5px;
  left: 4px;
  width: 15px;
  height: 14px;
  pointer-events: none;
  z-index: 2;
}

.checkbox-wrapper-12 .cbx svg path {
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 19;
  stroke-dashoffset: 19;
  transition: stroke-dashoffset 0.3s ease;
  transition-delay: 0.2s;
}

.checkbox-wrapper-12 .cbx input:checked + label + svg path {
  stroke-dashoffset: 0;
}

.checkbox-wrapper-12 .cbx input:checked {
  background-color: #7fb314;
  border-color: #7fb314;
  animation: splash-12 0.6s ease forwards;
}

/* Старые стили для обратной совместимости (если нет .cbx) */
.checkbox-wrapper-12 input[type="checkbox"]:not(.cbx input) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border: 2px solid #bfbfc0;
  border-radius: 50%;
  position: relative;
  margin: 0;
}

.checkbox-wrapper-12 label:not(.cbx label) {
  display: block;
  width: 24px;
  height: 24px;
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
}

.checkbox-wrapper-12 svg:not(.cbx svg) {
  position: absolute;
  top: 5px;
  left: 4px;
  width: 15px;
  height: 14px;
  pointer-events: none;
}

.checkbox-wrapper-12 svg:not(.cbx svg) path {
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 19;
  stroke-dashoffset: 19;
  transition: stroke-dashoffset 0.3s ease;
  transition-delay: 0.2s;
}

.checkbox-wrapper-12 input:checked:not(.cbx input) + label + svg path {
  stroke-dashoffset: 0;
}

.checkbox-wrapper-12 input:checked:not(.cbx input) {
  background-color: #7fb314;
  border-color: #7fb314;
  animation: splash-12 0.6s ease forwards;
}

@keyframes splash-12 {
  40% {
    box-shadow: 0 -18px 0 -8px #7fb314, 16px -8px 0 -8px #7fb314,
      16px 8px 0 -8px #7fb314, 0 18px 0 -8px #7fb314, -16px 8px 0 -8px #7fb314,
      -16px -8px 0 -8px #7fb314;
  }
  100% {
    box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent,
      32px 16px 0 -10px transparent, 0 36px 0 -10px transparent,
      -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent;
  }
}

/* ========== СЛАЙДЕР ========== */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  background: #d9d9d9;
  border-radius: 9999px;
  outline: none;
  margin: 12px 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  background: #6b7a84;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
  width: 32px;
  height: 32px;
  background: #6b7a84;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
}

/* ========== СТИЛИ ФОРМ ========== */
.form-container {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.form-header {
  text-align: center;
  margin-bottom: 32px;
}

.form-title {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
}

.form-subtitle {
  font-size: 16px;
  color: #6b7280;
}

/* Старые стили формы (для других форм на сайте) - не перезаписываем для profile */
.form-group:not(.auth-form .form-group):not(.profile-form .form-group) {
  margin-bottom: 24px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #ffffff;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #7fb314;
  box-shadow: 0 0 0 3px rgba(127, 179, 20, 0.1);
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-validation {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-validation.success {
  color: #10b981;
}

.form-validation.error {
  color: #ef4444;
}

.form-validation-icon {
  width: 16px;
  height: 16px;
}

.form-error {
  color: #ef4444;
  font-size: 14px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-success {
  color: #10b981;
  font-size: 14px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.form-button {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.form-button-primary {
  background: linear-gradient(135deg, #7fb314 0%, #6a9a0f 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(127, 179, 20, 0.3);
}

.form-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(127, 179, 20, 0.4);
}

.form-button-secondary {
  background: #f9fafb;
  color: #374151;
  border: 2px solid #e5e7eb;
}

.form-button-secondary:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.form-tabs {
  display: flex;
  background: #f9fafb;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 32px;
}

.form-tab {
  flex: 1;
  padding: 12px 16px;
  text-align: center;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #6b7280;
}

.form-tab.active {
  background: white;
  color: #1f2937;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-link {
  text-align: center;
  margin-top: 24px;
}

.form-link a {
  color: #7fb314;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.form-link a:hover {
  color: #6a9a0f;
}

/* ========== УТИЛИТЫ ========== */
.empty {
  text-align: center;
  font-size: 18px;
  color: #6b7280;
  margin-top: 40px;
}

.load-more-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin: 40px 0 56px;
}

.load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 9999px;
  border: 1px solid rgba(127, 179, 20, 0.35);
  background: linear-gradient(
    135deg,
    rgba(127, 179, 20, 0.95),
    rgba(90, 127, 14, 0.95)
  );
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(127, 179, 20, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease,
    opacity 0.25s ease;
  min-height: 48px;
}

.load-more:not(:disabled):hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 34px rgba(127, 179, 20, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  background: linear-gradient(
    135deg,
    rgba(116, 165, 18, 0.98),
    rgba(82, 116, 12, 0.98)
  );
}

.load-more:not(:disabled):active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 8px 18px rgba(127, 179, 20, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.load-more:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: 0 6px 16px rgba(127, 179, 20, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.glass-loader {
  display: flex;
  justify-content: center;
  width: 100%;
}

.glass-loader-glass {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.glass-loader-spinner {
  position: relative;
  width: 48px;
  height: 48px;
}

.glass-loader-spinner div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 38px;
  height: 38px;
  margin: 5px;
  border: 3px solid #7fb314;
  border-radius: 50%;
  animation: page-loader-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #7fb314 transparent transparent transparent;
}

.glass-loader-spinner div:nth-child(1) {
  animation-delay: -0.45s;
}

.glass-loader-spinner div:nth-child(2) {
  animation-delay: -0.3s;
}

.glass-loader-spinner div:nth-child(3) {
  animation-delay: -0.15s;
}

/* ========== АДАПТИВ ========== */
@media (max-width: 720px) {
  .logo-top {
    display: flex !important;
    justify-content: center;
    padding: 12px 0;
  }

  .contacts {
    display: none !important;
  }

  .logo-top img {
    height: 48px;
  }

  .site-header {
    height: 40px !important;
    position: relative !important;
  }

  .site-header .logo {
    display: none;
  }

  .nav-links {
    justify-content: center;
    gap: 20px;
    width: 100%;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 16px;
    background: #fff;
    height: 100%;
    position: absolute;
  }

  .profile-icon svg,
  .cart-icon svg {
    width: 28px; /* одинаковая ширина */
    height: 28px; /* одинаковая высота */
    display: block;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s;
  }

  .cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e63946;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50%;
    padding: 2px 6px;
    line-height: 1;
    min-width: 18px;
    text-align: center;
    display: none; /* скрыт по умолчанию */
    z-index: 10;
  }

  .cart-badge.show {
    display: inline-block;
  }

  .profile-icon,
  .cart-icon {
    margin-right: 20px;
  }

  .cart-icon {
    position: absolute !important;
    top: 50%;
    right: 10px; /* отступ справа */
    transform: translateY(-50%);
  }

  .scroll-top {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 12px;
  }

  .card-name {
    font-size: 14px;
  }

  .card-price {
    font-size: 13px;
  }

  .load-more-section {
    margin: 32px 0 40px;
    gap: 14px;
  }

  .load-more {
    width: 100%;
    max-width: 280px;
    padding: 12px 24px;
    font-size: 15px;
    min-height: 44px;
  }

  .glass-loader-glass {
    padding: 14px 20px;
  }

  .glass-loader-spinner {
    width: 40px;
    height: 40px;
  }

  .glass-loader-spinner div {
    width: 32px;
    height: 32px;
    margin: 4px;
  }
}

/* ========== ДОСТУПНОСТЬ ========== */
button,
.load-more,
.card {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

a:focus,
button:focus,
input:focus,
select:focus {
  outline: 3px solid rgba(69, 85, 95, 0.12);
  outline-offset: 2px;
}

/* ========== КОРЗИНА ========== */
.cart-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  transition: opacity 0.2s ease;
  /* Оптимизация рендеринга */
  contain: layout style paint;
  will-change: opacity;
}

/* Затемнение для корзины */
.cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  /* backdrop-filter: blur(2px); - отключено для производительности */
}

@media (max-width: 768px) {
  .cart-overlay {
    pointer-events: none; /* На мобильных overlay не реагирует на клики */
  }
}

.admin-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0) !important;
  /* backdrop-filter: blur(2px); - отключено для производительности */
}

/* Стили для cart-modal-overlay (используется в админке) */
.cart-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  /* backdrop-filter отключен для производительности */
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* Оптимизация рендеринга */
  contain: layout style paint;
  will-change: opacity;
}

@media (max-width: 768px) {
  .admin-overlay {
    pointer-events: none; /* На мобильных overlay не реагирует на клики */
  }

  .cart-modal-overlay {
    padding: 0;
  }

  .cart-modal-overlay .cart-modal {
    width: 100%;
    height: 100vh;
  }

  .cart-modal-overlay .cart-panel {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
  }
}

/* Панель корзины справа */
.cart-panel {
  position: relative;
  width: 600px;
  max-width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  border-radius: 12px 0 0 12px;
  overflow: hidden;
  animation: slideIn 0.2s ease;
  /* Оптимизация рендеринга */
  contain: layout style paint;
  transform: translateZ(0);
}

@media (max-width: 768px) {
  .cart-modal {
    justify-content: center;
  }

  .cart-panel {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}

.cart-panel.slide-out {
  animation: slideOut 0.3s ease forwards;
}

.slide-in {
  animation: slideIn 0.3s ease forwards;
}

.slide-out {
  animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%) translateZ(0);
    opacity: 0;
  }
  to {
    transform: translateX(0) translateZ(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0) translateZ(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%) translateZ(0);
    opacity: 0;
  }
}

/* Заголовок корзины */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 18px;
  font-weight: 600;
  color: #45555f;
}

.cart-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #6b7280;
  transition: color 0.2s;
}

/* ========== ПЕРЕКЛЮЧАТЕЛЬ КОРЗИНЫ ========== */
.cart-toggle-wrapper {
  position: relative;
}

.cart-toggle-btn {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #e5e7eb;
  background: white;
  color: #6b7280;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  z-index: 1;
}

.cart-toggle-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(127, 179, 20, 0.15);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
}

.cart-toggle-btn:hover::before {
  width: 300px;
  height: 300px;
}

.cart-toggle-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
  z-index: 1;
}

.cart-toggle-btn:hover::after {
  left: 100%;
}

/* Активное состояние кнопки */
.cart-toggle-btn.active {
  background: linear-gradient(135deg, #7fb314 0%, #6a9810 100%) !important;
  color: white !important;
  border-color: #6a9810 !important;
  box-shadow: 0 6px 20px rgba(127, 179, 20, 0.35) !important;
  transform: scale(1.03) !important;
}

.cart-toggle-btn.active::before {
  background: rgba(255, 255, 255, 0.2);
}

/* Hover для неактивных кнопок */
.cart-toggle-btn:not(.active):hover {
  border-color: #7fb314 !important;
  color: #7fb314 !important;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 6px 16px rgba(127, 179, 20, 0.2) !important;
}

/* Active состояние при клике */
.cart-toggle-btn:active {
  transform: scale(0.98) !important;
}

/* Анимация появления кнопок */
.cart-toggle-btn {
  animation: cartToggleButtonFadeIn 0.5s ease-out both;
}

.cart-toggle-btn:nth-child(1) {
  animation-delay: 0.1s;
}

.cart-toggle-btn:nth-child(2) {
  animation-delay: 0.2s;
}

@keyframes cartToggleButtonFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .cart-toggle-btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .cart-toggle-btn:not(.active):hover {
    transform: none !important;
  }

  .cart-toggle-btn:active {
    transform: scale(0.97) !important;
  }
}

.profile-modal .cart-close {
  background: none !important;
  border: none !important;
  font-size: 28px !important;
  cursor: pointer;
  color: #6b7280 !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
}

.profile-modal .cart-close:hover {
  color: #000 !important;
}

/* Контент корзины */
.cart-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Элементы корзины - список товаров */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

/* Элемент корзины */
.cart-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 10px;
  transition: background-color 0.2s;
}

.cart-item:hover {
  background-color: #f9fafb;
}

.cart-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cart-item-image {
  position: relative;
}

.cart-item-image img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-image img.projection-image {
  border: 2px solid #007bff;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

.projection-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #007bff;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-item-details h3 {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.price-per-item,
.price-total {
  font-size: 14px;
  color: #6b7280;
  margin-top: 14px;
  margin-bottom: 0px;
}

.price-total span {
  font-weight: 600;
  color: #000;
}

/* Управление количеством товара */
.quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-controls button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.quantity-controls button:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.quantity-controls input {
  width: 100px;
  min-width: 60px;
  text-align: center;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 4px;
  font-size: 14px;
}

.quantity-controls span {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
}

/* Футер корзины */
.cart-footer {
  border-top: 1px solid #e5e7eb;
  padding: 16px;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  justify-content: flex-start;
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.cart-icon {
  position: relative;
  cursor: pointer;
  border-radius: 70%;
  transition: background-color 0.3s;
}

.cart-options {
  font-size: 14px;
  color: #555;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Стили для отображения проекции в корзине */
.projection-info {
  margin-top: 8px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #007bff;
}

.projection-label {
  font-weight: 600;
  color: #007bff;
  font-size: 13px;
  margin-bottom: 4px;
}

.projection-zones {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.projection-zone {
  font-size: 12px;
  color: #6c757d;
  background: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

.projection-zone span {
  font-family: "Courier New", monospace;
  font-weight: 500;
}

/* Кнопка удаления товара из корзины */
.remove-btn {
  background-color: transparent;
  color: rgba(240, 0, 0, 0.6);
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 28px;
  transition: color 0.2s;
}

.remove-btn:hover {
  color: #ff0000;
}

/* Кнопки действий корзины */
.btn-secondary {
  background: #45555f;
  color: white;
  border: none;
  padding: 10px 30px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 20px;
  transition: background-color 0.3s;
}

.btn-secondary:hover {
  background: #555;
}

.btn-primary {
  font-size: 20px;
  padding: 10px 30px;
  background: #7fb314;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-primary:hover {
  background: #6a9810;
}

/* Детали элементов корзины */
.item-image {
  flex-shrink: 0;
}

.item-image img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.item-details {
  flex: 1;
  min-width: 0;
}

.item-details h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  word-wrap: break-word;
}

.item-details p {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #6b7280;
}

.item-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.item-price,
.item-total {
  text-align: right;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

/* ========== СТИЛИ ПРОФИЛЯ ========== */
.profile-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  /* backdrop-filter: blur(2px); - отключено для производительности */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  min-height: 100vh;
  overflow-y: auto;
  /* Оптимизация рендеринга */
  contain: layout style paint;
  will-change: opacity;
}

.profile-modal {
  width: 100%;
  max-width: 650px;
  max-height: calc(100vh - 40px);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(127, 179, 20, 0.2);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Оптимизация рендеринга */
  contain: layout style paint;
  transform: translateZ(0);
}

@media (min-width: 768px) and (max-width: 1024px) {
  .profile-modal {
    width: 600px;
    max-height: calc(100vh - 40px);
  }
}

@media (max-width: 768px) {
  .profile-modal-overlay {
    padding: 0;
    align-items: stretch;
  }

  .profile-modal {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Заголовок профиля */
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(127, 179, 20, 0.2);
  margin-bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(127, 179, 20, 0.05) 0%,
    transparent 100%
  );
  flex-shrink: 0;
}

.profile-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  background: linear-gradient(135deg, #7fb314, #6a9810);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-close-btn {
  width: 36px;
  height: 36px;
  border: 2px solid #e5e7eb;
  background: white;
  color: #6b7280;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-close-btn:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: #fef2f2;
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2);
}

/* Контент профиля с прокруткой */
.profile-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(127, 179, 20, 0.3) transparent;
  min-height: 0; /* Позволяет flex-элементу уменьшаться */
}

.profile-content::-webkit-scrollbar {
  width: 8px;
}

.profile-content::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 10px;
  margin: 10px;
}

.profile-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7fb314 0%, #6a9810 100%);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6a9810 0%, #5a7f0e 100%);
  border: 1px solid transparent;
  background-clip: padding-box;
}

/* Форма профиля - базовые стили */
.profile-form {
  width: 100%;
  padding: 0;
  margin: 0;
}

.auth-form .form-group:nth-child(1),
.profile-form .form-group:nth-child(1) {
  animation-delay: 0.05s;
}
.auth-form .form-group:nth-child(2),
.profile-form .form-group:nth-child(2) {
  animation-delay: 0.1s;
}
.auth-form .form-group:nth-child(3),
.profile-form .form-group:nth-child(3) {
  animation-delay: 0.15s;
}
.auth-form .form-group:nth-child(4),
.profile-form .form-group:nth-child(4) {
  animation-delay: 0.2s;
}
.auth-form .form-group:nth-child(5),
.profile-form .form-group:nth-child(5) {
  animation-delay: 0.25s;
}
.auth-form .form-group:nth-child(6),
.profile-form .form-group:nth-child(6) {
  animation-delay: 0.3s;
}
.auth-form .form-group:nth-child(7),
.profile-form .form-group:nth-child(7) {
  animation-delay: 0.35s;
}
.auth-form .form-group:nth-child(8),
.profile-form .form-group:nth-child(8) {
  animation-delay: 0.4s;
}
.auth-form .form-group:nth-child(9),
.profile-form .form-group:nth-child(9) {
  animation-delay: 0.45s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== МОБИЛЬНАЯ АДАПТАЦИЯ КОРЗИНЫ ========== */
@media (max-width: 768px) {
  .cart-modal {
    width: 95vw !important;
    height: 95vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 2.5vh auto !important;
    padding: 16px !important;
  }

  .cart-header {
    padding: 12px 0 !important;
    margin-bottom: 16px !important;
  }

  .cart-header h2 {
    font-size: 20px !important;
  }

  .cart-content {
    padding: 0 !important;
    gap: 12px !important;
  }

  .cart-item {
    padding: 12px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .cart-item .item-image {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  .cart-item .item-image img {
    width: 120px !important;
    height: 120px !important;
  }

  .cart-item .item-details {
    width: 100% !important;
    min-width: auto !important;
    margin-right: 0 !important;
    text-align: center !important;
  }

  .cart-item .item-details h4 {
    font-size: 16px !important;
    margin-bottom: 8px !important;
  }

  .cart-item .item-details p {
    font-size: 14px !important;
    margin-bottom: 6px !important;
  }

  .cart-item .item-controls {
    width: 100% !important;
    flex-direction: column !important;
    gap: 12px !important;
    align-items: center !important;
  }

  .cart-item .quantity-controls {
    flex-direction: row !important;
    gap: 8px !important;
  }

  .cart-item .quantity-controls button {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }

  .cart-item .quantity-controls input {
    width: 60px !important;
    height: 36px !important;
    font-size: 14px !important;
  }

  .cart-item .item-price {
    font-size: 16px !important;
  }

  .cart-item .item-total {
    font-size: 18px !important;
  }

  .cart-footer {
    padding: 16px 0 !important;
    gap: 12px !important;
  }

  .cart-footer .cart-total {
    font-size: 18px !important;
  }

  .cart-footer .cart-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .cart-footer .cart-actions button {
    width: 100% !important;
    padding: 12px !important;
    font-size: 16px !important;
  }

  /* Кнопка удаления товара */
  .cart-item button[aria-label="Удалить товар"] {
    top: 8px !important;
    right: 8px !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
  }

  /* Кнопка закрытия корзины */
  .cart-close-btn {
    top: 8px !important;
    right: 8px !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
  }
}

/* ========== МОБИЛЬНАЯ АДАПТАЦИЯ ПРОФИЛЯ ========== */
@media (max-width: 768px) {
  .profile-modal {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: calc(100vh - 20px) !important;
    border-radius: 16px !important;
  }

  .profile-modal-overlay {
    padding: 10px !important;
    align-items: flex-start !important;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }

  .profile-header {
    padding: 16px 20px 12px !important;
  }

  .profile-header h2 {
    font-size: 20px !important;
  }

  .profile-close-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
  }

  .profile-tabs {
    margin: 0 16px 16px !important;
    padding: 4px !important;
  }

  .profile-tabs button {
    padding: 10px 14px !important;
    font-size: 13px !important;
  }

  .profile-content {
    padding: 16px 20px !important;
  }

  .profile-form {
    padding: 0 !important;
  }

  .auth-form .form-group,
  .profile-form .form-group {
    margin-bottom: 10px !important;
  }

  .auth-form .form-group label,
  .profile-form .form-group label {
    font-size: 12px !important;
    margin-bottom: 4px !important;
  }

  .form-group input {
    padding: 10px 12px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
  }

  .profile-form button {
    padding: 12px 16px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
  }

  .user-info {
    padding: 12px !important;
    margin-bottom: 12px !important;
  }

  .user-avatar {
    width: 50px !important;
    height: 50px !important;
    font-size: 20px !important;
    margin-bottom: 8px !important;
  }

  .user-info h3 {
    font-size: 16px !important;
  }

  .user-info p {
    font-size: 12px !important;
  }

  .error-message {
    padding: 8px !important;
    font-size: 12px !important;
    margin-top: 6px !important;
  }

  .profile-close-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 14px !important;
  }
}

/* Контейнер для переключения форм профиля */
.profile-forms-container {
  position: relative;
  overflow: hidden;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== УЛУЧШЕННЫЕ АНИМАЦИИ ДЛЯ АВТОРИЗАЦИИ ========== */

/* Анимация появления модального окна профиля */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Анимация переключения между формами профиля */
@keyframes formSlideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Анимация для кнопок */
.reg-button,
.login-button {
  animation: buttonPulse 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  animation-delay: 0.5s;
  animation-fill-mode: both;
}

@keyframes buttonPulse {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Анимация для сообщений об ошибках */
.error-message {
  animation: errorSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes errorSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Анимация для успешных сообщений */
.success-message {
  animation: successBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successBounce {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.1);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Улучшенные эффекты для полей ввода (для старых форм) */
.form-input:focus:not(.auth-form .form-input):not(.profile-form .form-input) {
  animation: inputFocusGlow 0.3s ease-out;
}

@keyframes inputFocusGlow {
  from {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }
  to {
    box-shadow: 0 0 0 4px rgba(127, 179, 20, 0.15),
      0 8px 24px rgba(127, 179, 20, 0.2);
  }
}

/* Анимация для декоративных полосок */
.form-group div[style*="background: linear-gradient(90deg, #7fb314"] {
  animation: progressBarFill 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes progressBarFill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Анимация для иконок в кнопках */
.reg-button span:first-child,
.login-button span:first-child {
  animation: iconSpin 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  animation-delay: 0.2s;
  animation-fill-mode: both;
}

@keyframes iconSpin {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

/* Анимация для декоративных элементов кнопок */
.reg-button div[style*="background: linear-gradient(45deg"],
.login-button div[style*="background: linear-gradient(45deg"] {
  animation: shimmerEffect 2s ease-in-out infinite;
}

@keyframes shimmerEffect {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Улучшенные переходы для вкладок */
.profile-tabs .tab-background {
  animation: tabSlide 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes tabSlide {
  from {
    transform: translateX(0) scale(0.8);
    opacity: 0.7;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

/* Анимация для декоративных элементов вкладок */
.profile-tabs div[style*="radial-gradient"] {
  animation: backgroundFloat 8s ease-in-out infinite;
}

@keyframes backgroundFloat {
  0%,
  100% {
    opacity: 0.1;
    transform: scale(1);
  }
  50% {
    opacity: 0.2;
    transform: scale(1.1);
  }
}

/* Улучшенные эффекты при наведении для форм профиля */
.auth-form .form-group:hover label,
.profile-form .form-group:hover label {
  transform: translateX(4px);
  color: #7fb314;
}

.auth-form .form-group:hover .form-input,
.profile-form .form-group:hover .form-input {
  transform: translateY(-1px) scale(1.005);
}

/* Улучшенные эффекты для активных состояний */
.profile-tabs button.active {
  animation: activeTabPulse 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes activeTabPulse {
  from {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  to {
    transform: scale(1);
  }
}

/* Анимация для закрытия модального окна */
.profile-modal.closing {
  animation: modalSlideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
}

/* Улучшенные эффекты для мобильных устройств */
@media (max-width: 768px) {
  .profile-modal {
    animation: modalSlideInMobile 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: calc(100vh - 20px);
  }

  @keyframes modalSlideInMobile {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .auth-form .form-group,
  .profile-form .form-group {
    animation-delay: 0.05s;
    margin-bottom: 10px !important;
  }

  .reg-button,
  .login-button {
    animation-delay: 0.3s;
    padding: 12px 16px !important;
  }

  /* Компактные стили для форм авторизации/регистрации */
  .profile-tabs {
    margin: 0 16px 12px !important;
  }

  .profile-forms-container {
    padding: 0 16px !important;
  }

  /* Уменьшаем padding кнопок на мобильных */
  .reg-button,
  .login-button {
    gap: 8px !important;
  }

  .reg-button span:first-child,
  .login-button span:first-child {
    font-size: 18px !important;
  }

  .reg-button span:last-child,
  .login-button span:last-child {
    font-size: 15px !important;
  }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
  .profile-modal {
    width: 600px;
    max-height: calc(100vh - 40px);
  }

  .auth-form .form-group,
  .profile-form .form-group {
    margin-bottom: 12px;
  }

  .profile-tabs {
    margin: 0 20px 24px;
  }
}

/* Экраны с малой высотой (ландшафтная ориентация, низкие мониторы) */
@media (max-height: 700px) {
  .profile-modal {
    max-height: calc(100vh - 20px);
  }

  .profile-modal-overlay {
    padding: 10px;
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .profile-header {
    padding: 12px 20px 10px;
  }

  .profile-header h2 {
    font-size: 20px;
  }

  .profile-content {
    padding: 16px 20px;
  }
}

/* Очень низкие экраны */
@media (max-height: 500px) {
  .profile-modal {
    max-height: calc(100vh - 10px);
  }

  .profile-header {
    padding: 10px 16px 8px;
  }

  .profile-header h2 {
    font-size: 18px;
  }

  .profile-content {
    padding: 12px 16px;
  }

  .auth-form .form-group,
  .profile-form .form-group {
    margin-bottom: 8px;
  }
}

/* Валидация полей форм профиля */
.auth-form .form-input:valid,
.profile-form .form-input:valid {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.auth-form .form-input:invalid:not(:placeholder-shown),
.profile-form .form-input:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Анимация для загрузки */
.loading {
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.98);
  }
}

/* Улучшенные эффекты для фокуса */
.auth-form .form-input:focus,
.profile-form .form-input:focus,
.reg-button:focus,
.login-button:focus,
.logout-button:focus {
  outline: none;
  animation: focusRing 0.3s ease-out;
}

@keyframes focusRing {
  from {
    box-shadow: 0 0 0 0 rgba(127, 179, 20, 0.4);
  }
  to {
    box-shadow: 0 0 0 4px rgba(127, 179, 20, 0.15);
  }
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ФОРМ ========== */

/* Контейнер формы */
.auth-form,
.profile-form .auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Группа полей формы */
.auth-form .form-group,
.profile-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
  width: 100%;
  min-width: 0;
  animation: fadeInUp 0.4s ease-out forwards;
  animation-fill-mode: both;
  box-sizing: border-box;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0;
  transition: color 0.3s ease;
}

/* Стили для полей ввода в формах профиля */
.auth-form .form-input,
.profile-form .form-input {
  width: 100%;
  max-width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  color: #1f2937;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-sizing: border-box;
}

.auth-form .form-input::placeholder,
.profile-form .form-input::placeholder {
  color: #9ca3af;
}

.auth-form .form-input:hover,
.profile-form .form-input:hover {
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.auth-form .form-input:focus,
.profile-form .form-input:focus {
  border-color: #7fb314;
  box-shadow: 0 0 0 4px rgba(127, 179, 20, 0.1),
    0 4px 12px rgba(127, 179, 20, 0.15);
  transform: translateY(-2px);
}

.auth-form .form-input:disabled,
.profile-form .form-input:disabled {
  background: #f3f4f6;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Сообщения об ошибках */
.error-message {
  padding: 8px 12px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-left: 3px solid #ef4444;
  border-radius: 6px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
}

.error-message.error-general {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-left: 3px solid #ef4444;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
}

/* Сообщения об успехе */
.success-message {
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-left: 3px solid #10b981;
  border-radius: 6px;
  color: #059669;
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
}

/* Кнопки */
.reg-button,
.login-button,
.logout-button {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #7fb314 0%, #6a9810 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(127, 179, 20, 0.25);
  position: relative;
  overflow: hidden;
}

.reg-button:hover,
.login-button:hover {
  background: linear-gradient(135deg, #6a9810 0%, #5a7f0e 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(127, 179, 20, 0.35);
}

.reg-button:active,
.login-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(127, 179, 20, 0.25);
}

.logout-button {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.logout-button:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.logout-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.reg-button span:first-child,
.login-button span:first-child,
.logout-button span:first-child {
  font-size: 18px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.reg-button:hover span:first-child,
.login-button:hover span:first-child,
.logout-button:hover span:first-child {
  transform: scale(1.2) rotate(5deg);
}

/* Переключатель между формами */
.form-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  font-size: 14px;
  color: #6b7280;
}

/* Класс switch-link больше не используется - кликабельны сами надписи */

/* Заголовок информации о пользователе */
.user-info-header {
  animation: fadeInUp 0.4s ease-out;
}

/* Адаптивность для форм профиля */
@media (max-width: 768px) {
  .auth-form,
  .profile-form .auth-form {
    gap: 12px;
  }

  .auth-form .form-group,
  .profile-form .form-group {
    gap: 4px;
  }

  .auth-form .form-input,
  .profile-form .form-input {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px;
  }

  .auth-form .form-group label,
  .profile-form .form-group label {
    font-size: 12px;
  }

  .error-message,
  .success-message {
    padding: 10px 12px;
    font-size: 12px;
  }

  .reg-button,
  .login-button,
  .logout-button {
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 10px;
  }

  .form-switch {
    font-size: 13px;
    padding: 10px;
  }

  /* Стили для кликабельных надписей переключения форм теперь inline в HTML */
}

/* ========== КОНЕЦ УЛУЧШЕННЫХ АНИМАЦИЙ ========== */

/* ========== ПОДВАЛ САЙТА ========== */
.site-footer {
  position: relative;
  background: transparent;
  margin-top: 100px;
  border-top: 2px solid rgba(214, 214, 214, 0.25);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(127, 179, 20, 0.4),
    transparent
  );
}

.site-footer::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(127, 179, 20, 0.4),
    transparent
  );
}

.footer-content {
  position: relative;
  z-index: 1;
}

.footer-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  margin-bottom: 48px;
  justify-items: center;
}

.footer-section {
  position: relative;
}

.footer-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-dark, #1a1a1a);
  position: relative;
  padding-bottom: 12px;
}

.footer-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #7fb314, #2d5a27);
  border-radius: 2px;
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(127, 179, 20, 0.15);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.footer-contact-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(127, 179, 20, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.footer-contact-item:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(127, 179, 20, 0.3);
  box-shadow: 0 4px 12px rgba(45, 90, 39, 0.1);
}

.footer-contact-item:hover::before {
  left: 100%;
}

.footer-contact-item .contact-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(127, 179, 20, 0.15),
    rgba(45, 90, 39, 0.15)
  );
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.footer-contact-item:hover .contact-icon {
  transform: scale(1.1) rotate(5deg);
}

.footer-contact-item .contact-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.footer-contact-item .contact-info a {
  color: #2d5a27;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
}

.footer-contact-item .contact-info a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7fb314, #2d5a27);
  transition: width 0.3s ease;
}

.footer-contact-item .contact-info a:hover {
  color: #7fb314;
}

.footer-contact-item .contact-info a:hover::after {
  width: 100%;
}

.footer-contact-item .contact-info span {
  font-size: 14px;
  color: var(--text-light, #666666);
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-nav a {
  color: var(--text-dark, #1a1a1a);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 16px;
  padding: 10px 16px;
  border-radius: 8px;
  position: relative;
  display: inline-block;
  width: fit-content;
}

.footer-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0;
  background: linear-gradient(135deg, #7fb314, #2d5a27);
  border-radius: 2px;
  transition: height 0.3s ease;
}

.footer-nav a:hover {
  color: #7fb314;
  padding-left: 24px;
  background: rgba(127, 179, 20, 0.08);
}

.footer-nav a:hover::before {
  height: 60%;
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(127, 179, 20, 0.25);
  text-align: center;
  position: relative;
}

.footer-bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #7fb314, transparent);
}

.footer-copyright {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.footer-copyright p {
  margin: 0;
  font-size: 15px;
  color: var(--text-light, #666666);
  line-height: 1.6;
}

.design-copyright {
  font-size: 13px !important;
  color: var(--text-light, #999999) !important;
  opacity: 0.8;
  font-style: italic;
}

/* Декоративные элементы подвала */
.footer-decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(127, 179, 20, 0.12) 0%,
    transparent 70%
  );
  animation: float 12s ease-in-out infinite;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(45, 90, 39, 0.1) 0%,
    rgba(74, 124, 89, 0.1) 100%
  );
  animation: float 6s ease-in-out infinite;
}

.footer-circle-1 {
  width: 150px;
  height: 150px;
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.footer-circle-2 {
  width: 120px;
  height: 120px;
  bottom: 15%;
  right: 8%;
  animation-delay: 6s;
}

.decoration-line {
  position: absolute;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(127, 179, 20, 0.15),
    transparent
  );
  animation: lineMove 15s ease-in-out infinite;
}

.footer-line {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  transform: translateY(-50%);
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.6;
  }
  33% {
    transform: translate(20px, -20px) scale(1.1);
    opacity: 0.8;
  }
  66% {
    transform: translate(-15px, 15px) scale(0.9);
    opacity: 0.7;
  }
}

@keyframes lineMove {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-50%) translateX(20px);
    opacity: 0.6;
  }
}

/* Адаптивность подвала */
@media (max-width: 768px) {
  .site-footer {
    padding: 60px 0 30px;
    margin-top: 60px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
  }

  .footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .footer-contact-item {
    padding: 14px;
    gap: 12px;
  }

  .footer-contact-item .contact-icon {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .footer-nav a {
    font-size: 15px;
    padding: 8px 12px;
  }

  .footer-copyright p {
    font-size: 14px;
  }

  .footer-circle-1,
  .footer-circle-2 {
    display: none;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 40px 0 24px;
  }

  .footer-main {
    gap: 24px;
  }

  .footer-contact-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-contact-item .contact-icon {
    margin-bottom: 8px;
  }
}
/* ========== КОНЕЦ ПОДВАЛА САЙТА ========== */
