/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
  --primary: #FF6B6B;
  --primary-dark: #e05555;
  --secondary: #4ECDC4;
  --accent: #FFE66D;
  --purple: #A78BFA;
  --pink: #F472B6;
  --blue: #3B82F6;
  --green: #34D399;
  --orange: #FB923C;

  --bg: #FFF8F0;
  --bg-gray: #F3F4F6;
  --white: #FFFFFF;
  --text: #1A1A2E;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --transition: 0.2s ease;

  --container: 1200px;
}

/* ===== СБРОС ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

/* ===== КОНТЕЙНЕР ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ===== КНОПКИ ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); }

.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

.btn-danger { background: #EF4444; color: white; }
.btn-danger:hover { background: #DC2626; color: white; }

.btn-disabled { background: var(--bg-gray); color: var(--text-light); cursor: not-allowed; }

.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 17px; }
.btn-block { width: 100%; }

/* ===== ШАПКА ===== */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-icon { font-size: 32px; }
.logo-text {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav { display: flex; gap: 8px; }
.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  transition: var(--transition);
}
.nav-link:hover { background: var(--bg-gray); color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.cart-link {
  position: relative;
  font-size: 24px;
  padding: 6px;
  text-decoration: none;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-menu { position: relative; }
.user-menu-btn {
  background: var(--bg-gray);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}
.user-menu-btn:hover { background: var(--border); }

.user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  overflow: hidden;
  z-index: 50;
}
.user-menu:hover .user-dropdown { display: block; }

.user-dropdown a {
  display: block;
  padding: 12px 16px;
  color: var(--text);
  transition: var(--transition);
}
.user-dropdown a:hover { background: var(--bg-gray); }
.user-dropdown .logout-link:hover { background: #FEE2E2; color: #DC2626; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
  padding: 14px 20px;
  color: var(--text);
  border-bottom: 1px solid var(--bg-gray);
}
.mobile-menu a:hover { background: var(--bg-gray); }

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.main { flex: 1; }

.section { padding: 48px 0; }
.section-gray { background: var(--bg-gray); }

.section-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
}

.section-action { text-align: center; margin-top: 32px; }

.page-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
}

/* ===== ГЕРОЙ ===== */
.hero {
  background: linear-gradient(135deg, #FFF0F0 0%, #F0F0FF 50%, #F0FFF4 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-content { max-width: 600px; position: relative; z-index: 2; }

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-decoration { position: absolute; top: 0; right: 0; bottom: 0; width: 50%; }

.float-emoji {
  position: absolute;
  font-size: 48px;
  animation: float 6s ease-in-out infinite;
  opacity: 0.7;
}
.float-1 { top: 10%; right: 20%; animation-delay: 0s; }
.float-2 { top: 30%; right: 40%; animation-delay: 1s; font-size: 36px; }
.float-3 { top: 55%; right: 15%; animation-delay: 2s; }
.float-4 { top: 20%; right: 60%; animation-delay: 3s; font-size: 40px; }
.float-5 { top: 70%; right: 50%; animation-delay: 4s; font-size: 32px; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

/* ===== КАТЕГОРИИ ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
  border: 2px solid transparent;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--cat-color);
  color: var(--text);
}

.category-emoji { font-size: 40px; }
.category-name { font-weight: 600; font-size: 14px; text-align: center; }

/* ===== ТОВАРЫ ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  position: relative;
  text-decoration: none;
}

.product-emoji { font-size: 64px; transition: var(--transition); }
.product-card:hover .product-emoji { transform: scale(1.1); }

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-warning { background: var(--orange); }
.badge-danger { background: #EF4444; }

.product-info { padding: 16px; }

.product-name {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.4;
}
.product-name:hover { color: var(--primary); }

.product-category {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.product-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.product-price { font-size: 18px; font-weight: 700; color: var(--primary); }
.product-old-price {
  font-size: 14px;
  color: var(--text-light);
  text-decoration: line-through;
}

/* ===== ПРЕИМУЩЕСТВА ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.feature-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 14px; }

/* ===== КАТАЛОГ ===== */
.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.results-count { color: var(--text-secondary); font-size: 14px; }

.catalog-layout { display: flex; gap: 32px; }

.catalog-sidebar {
  width: 240px;
  flex-shrink: 0;
}

.catalog-content { flex: 1; min-width: 0; }

.search-form { display: flex; margin-bottom: 24px; }
.search-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}
.search-input:focus { border-color: var(--primary); }
.search-btn {
  padding: 10px 16px;
  background: var(--primary);
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-size: 16px;
}

.sidebar-block { margin-bottom: 24px; }
.sidebar-block h3 { font-size: 16px; margin-bottom: 12px; color: var(--text); }

.filter-link {
  display: block;
  padding: 8px 12px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
}
.filter-link:hover { background: var(--bg-gray); color: var(--text); }
.filter-link.active {
  background: var(--primary);
  color: white;
}
.filter-link.active:hover { color: white; }

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.page-link {
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  transition: var(--transition);
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== СТРАНИЦА ТОВАРА ===== */
.breadcrumbs {
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--primary); }

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.product-detail-image {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  min-height: 400px;
}
.product-detail-emoji { font-size: 120px; }

.product-detail-category {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-detail-title {
  font-size: 32px;
  font-weight: 700;
  margin: 8px 0 16px;
  line-height: 1.3;
}

.product-detail-price {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.price-current { font-size: 32px; font-weight: 700; color: var(--primary); }
.price-old { font-size: 20px; color: var(--text-light); text-decoration: line-through; }
.price-discount {
  background: #FEE2E2;
  color: #DC2626;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.product-detail-stock { margin-bottom: 16px; }
.stock-badge { font-size: 14px; font-weight: 500; }
.stock-ok { color: var(--green); }
.stock-low { color: var(--orange); }
.stock-out { color: #EF4444; }

.product-detail-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.product-detail-form {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-gray);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}
.qty-btn:hover { background: var(--border); }
.qty-input {
  width: 50px;
  height: 40px;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.product-detail-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.mini-feature {
  padding: 8px 16px;
  background: var(--bg-gray);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
}

.related-section { margin-top: 48px; }

/* ===== КОРЗИНА ===== */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 32px;
  align-items: start;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.cart-item-image {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.cart-item-name:hover { color: var(--primary); }
.cart-item-price-each { font-size: 13px; color: var(--text-light); }

.cart-item-quantity { display: flex; align-items: center; }
.qty-form { display: flex; align-items: center; gap: 0; }
.qty-form .qty-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius-sm);
  font-size: 16px;
  cursor: pointer;
}
.qty-form .qty-btn:hover { background: var(--bg-gray); }
.qty-display {
  width: 40px;
  text-align: center;
  font-weight: 600;
}

.cart-item-price { font-weight: 700; font-size: 16px; white-space: nowrap; }

.cart-item-remove {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.cart-item-remove:hover { color: #EF4444; background: #FEE2E2; }

.cart-summary {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  position: sticky;
  top: 90px;
}
.cart-summary h3 { margin-bottom: 16px; }
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}
.free-delivery { color: var(--green); font-weight: 500; }
.cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 700;
  padding-top: 16px;
  border-top: 2px solid var(--bg-gray);
  margin-bottom: 20px;
}
.cart-summary .btn { margin-bottom: 8px; }

/* ===== ОФОРМЛЕНИЕ ЗАКАЗА ===== */
.checkout-layout { }
.checkout-form {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.form-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.form-section h3 { margin-bottom: 20px; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
  background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
}

.checkout-summary {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  position: sticky;
  top: 90px;
}
.checkout-summary h3 { margin-bottom: 16px; }

.checkout-items { margin-bottom: 16px; }
.checkout-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--bg-gray);
}
.checkout-item-emoji { font-size: 24px; }
.checkout-item-info { flex: 1; }
.checkout-item-name { display: block; font-size: 13px; font-weight: 500; }
.checkout-item-qty { display: block; font-size: 12px; color: var(--text-light); }
.checkout-item-price { font-weight: 600; font-size: 14px; white-space: nowrap; }

.checkout-total {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 2px solid var(--bg-gray);
  margin-bottom: 16px;
}
.checkout-total-price { font-size: 22px; font-weight: 700; color: var(--primary); }
.checkout-summary .btn { margin-bottom: 8px; }

/* ===== ЗАКАЗ ОФОРМЛЕН ===== */
.order-success { max-width: 800px; margin: 0 auto; }
.order-success-header { text-align: center; margin-bottom: 32px; }
.success-icon { font-size: 64px; display: block; margin-bottom: 12px; }
.order-success-header h1 { font-size: 28px; margin-bottom: 8px; }

.order-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.order-info-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.order-info-card h3 { margin-bottom: 16px; }
.order-info-card p { margin-bottom: 6px; font-size: 14px; color: var(--text-secondary); }

.order-item-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--bg-gray);
}
.order-item-total {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  font-weight: 700;
  font-size: 16px;
}

.order-actions { text-align: center; display: flex; gap: 12px; justify-content: center; }

/* ===== СТАТУСЫ ЗАКАЗОВ ===== */
.order-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.status-new { background: #DBEAFE; color: #1D4ED8; }
.status-processing { background: #FEF3C7; color: #D97706; }
.status-shipped { background: #D1FAE5; color: #059669; }
.status-delivered { background: #E0E7FF; color: #4338CA; }
.status-cancelled { background: #FEE2E2; color: #DC2626; }

/* ===== АВТОРИЗАЦИЯ ===== */
.auth-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px;
}

.auth-title { text-align: center; margin-bottom: 28px; font-size: 24px; }
.auth-form { margin-bottom: 20px; }
.auth-form .btn { margin-top: 8px; }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-secondary); }

.auth-demo {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-gray);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.auth-demo p { margin-bottom: 4px; }
.auth-demo code {
  background: var(--white);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* ===== ПРОФИЛЬ ===== */
.profile-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 32px;
  align-items: start;
}

.profile-info-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.profile-info-card h3 { margin-bottom: 16px; }
.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-gray);
  font-size: 14px;
}
.profile-label { color: var(--text-secondary); }

.profile-orders h3 { margin-bottom: 16px; }

.orders-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
}
.order-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--text); }

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.order-number { font-weight: 600; }
.order-card-body {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-secondary);
}
.order-total { font-weight: 600; color: var(--text); }

/* ===== АДМИН-ПАНЕЛЬ ===== */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}

.admin-sidebar {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  position: sticky;
  top: 90px;
}
.admin-sidebar h3 { font-size: 16px; margin-bottom: 16px; }
.admin-sidebar hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }

.admin-nav-link {
  display: block;
  padding: 10px 12px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
  margin-bottom: 4px;
}
.admin-nav-link:hover { background: var(--bg-gray); color: var(--text); }
.admin-nav-link.active { background: var(--primary); color: white; }
.admin-nav-link.active:hover { color: white; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
  border-top: 4px solid;
}
.stat-blue { border-color: var(--blue); }
.stat-green { border-color: var(--green); }
.stat-purple { border-color: var(--purple); }
.stat-orange { border-color: var(--orange); }

.stat-number { display: block; font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.stat-label { font-size: 14px; color: var(--text-secondary); }

.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.admin-table th {
  background: var(--bg-gray);
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bg-gray);
  font-size: 14px;
}
.admin-table tr:hover td { background: #FAFAFA; }

.product-table-emoji { font-size: 24px; }
.badge-featured {
  display: inline-block;
  background: var(--accent);
  color: #92400E;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  margin-left: 6px;
}

.table-actions { display: flex; gap: 6px; }
.inline-form { display: inline; }
.text-danger { color: #EF4444; }

.status-form select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
}

.order-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.filter-btn {
  padding: 6px 16px;
  border: 2px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Форма товара */
.product-edit-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.full-width { grid-column: 1 / -1; }
.form-actions { margin-top: 24px; display: flex; gap: 12px; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  padding-top: 28px;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */
.empty-state {
  text-align: center;
  padding: 64px 20px;
}
.empty-state.small { padding: 32px 20px; }
.empty-icon { font-size: 64px; display: block; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); margin-bottom: 20px; }
.empty-state h1 { margin-bottom: 12px; }

/* ===== УВЕДОМЛЕНИЯ ===== */
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 14px 24px;
  border-radius: var(--radius);
  color: white;
  font-weight: 500;
  font-size: 14px;
  z-index: 1000;
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 3s forwards;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.toast-success { background: var(--green); }
.toast-error { background: #EF4444; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-10px); pointer-events: none; }
}

/* ===== ALERT ===== */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
}
.alert-info { background: #DBEAFE; color: #1E40AF; }
.alert-info a { color: #1E40AF; font-weight: 600; text-decoration: underline; }
.text-muted { color: var(--text-secondary); }

/* ===== ПОДВАЛ ===== */
.footer {
  background: var(--text);
  color: #D1D5DB;
  padding: 48px 0 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 32px;
  padding-bottom: 32px;
}

.footer .logo-text {
  background: none;
  -webkit-text-fill-color: white;
  font-size: 22px;
}
.footer-desc { font-size: 14px; margin-top: 12px; line-height: 1.6; }

.footer-col h4 { color: white; margin-bottom: 16px; font-size: 16px; }
.footer-col a {
  display: block;
  color: #D1D5DB;
  font-size: 14px;
  margin-bottom: 8px;
  transition: var(--transition);
}
.footer-col a:hover { color: white; }
.footer-col p { font-size: 14px; margin-bottom: 8px; }

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: #9CA3AF;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 1024px) {
  .catalog-layout { flex-direction: column; }
  .catalog-sidebar { width: 100%; }
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
  .checkout-form { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .order-details-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero { padding: 40px 0; }
  .hero-title { font-size: 32px; }
  .hero-decoration { display: none; }
  .nav { display: none; }
  .header-actions .btn { display: none; }
  .mobile-menu-btn { display: block; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-item { flex-wrap: wrap; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .product-edit-form .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px; }
}
