:root {
  /* Основная фиолетовая палитра */
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --primary-light: #a78bfa;
  --primary-cancel:#c21649;
  --primary-neutral:#382e55;
  --primary-good:#3b971e;
  --primary-soft: rgba(139, 92, 246, 0.1);
  
  /* Нейтральные цвета */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  
  /* Тени */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Размеры и отступы */
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --container-width: 1280px;
  
  /* Переходы */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Сброс и базовые стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  background: var(--bg-page);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Шапка — минималистичная, без анимации фона */
.header {
  background: var(--bg-surface);
  color: var(--text-main);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--primary-dark);
  cursor: pointer;
  transition: var(--transition);
}
.logo-icon {
  width: 40px;
  height: 40px;
  padding-top: 20px;
  filter: brightness(0) saturate(100%) invert(35%) sepia(85%) saturate(2890%) hue-rotate(245deg) brightness(101%) contrast(94%);
}
.logo:hover {
  color: var(--primary);
}

/* Навигация — чистая, без белых блоков */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

.nav-item a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition);
}

.nav-item a:hover,
.nav-item a.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
/* Секции кнопок */
.auth-user-section,
.auth-guest-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Приветствие пользователя */
.user-greeting {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-soft);
  border-radius: var(--radius-md);
  color: var(--primary-dark);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.user-greeting:hover {
  background: var(--primary-light);
  color: white;
}

.user-icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
}

/* Кнопки с иконками */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  background: none;
  line-height: 1;
}

.btn svg {
  width: 1.125rem;
  height: 1.125rem;
  stroke-width: 2;
}

/* Кнопка входа */
.btn-login {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}

.btn-login:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

/* Кнопка регистрации */
.btn-register {
  background: white;
  color: var(--primary);
  border-color: var(--primary-light);
}

.btn-register:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}
/* Стили корзины */
.cart-modal {
  max-width: 700px;
}

.cart-body {
  padding: 2rem !important;
}

.cart-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.cart-items-list {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  padding-right: 0.5rem;
}

/* Пустая корзина */
.cart-empty {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.cart-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  stroke-width: 1.5;
  opacity: 0.5;
}

.cart-empty p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

/* Элемент корзины */
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

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

.cart-item-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.cart-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--bg-page);
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: white;
  color: var(--text-main);
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qty-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary-light);
  color: var(--primary-dark);
}

.cart-item-qty {
  min-width: 50px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.cart-item-price {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-item-total {
  font-weight: 600;
  color: var(--text-main);
  min-width: 80px;
  text-align: right;
}

.remove-item-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.remove-item-btn:hover {
  background: #fef2f2;
  color: #ef4444;
}

/* Футер корзины */
.cart-footer {
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.cart-total-sum {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.cart-actions {
  display: flex;
  gap: 1rem;
}

.cart-actions .btn {
  flex: 1;
  padding: 0.875rem;
  font-size: 1rem;
}

/* Уведомления */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 500;
  z-index: 9999;
  animation: slideIn 0.3s ease;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.orders-table th, .orders-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}
.status-pending { color: orange; }
.status-completed { color: green; }

.notification-success {
  background: #10b981;
  
}

.notification-error {
  background: #ef4444;
}

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

/* Адаптивность */
@media (max-width: 640px) {
  .cart-body {
    padding: 1.5rem !important;
  }
  
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .cart-item-price {
    width: 100%;
    justify-content: space-between;
  }
  
  .cart-actions {
    flex-direction: column;
  }
  
  .cart-item-total {
    text-align: left;
  }
}

/* Кнопка корзины */
.btn-cart {
  background: white;
  color: var(--text-main);
  border: 1px solid var(--border-light);
  position: relative;
}

.btn-cart:hover {
  background: var(--bg-page);
  border-color: var(--primary-light);
  color: var(--primary-dark);
}

/* Кнопка выхода */
.btn-logout {
  background: white;
  color: var(--primary-cancel);
  border: 1px solid #fee2e2;
}

.btn-logout:hover {
  background: #fef2f2;
  border-color: var(--primary-cancel);
}

.btn-logout svg {
  stroke: var(--primary-cancel);
}

/* Адаптивность */
@media (max-width: 640px) {
  .auth-user-section,
  .auth-guest-section {
    flex-wrap: wrap;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.813rem;
  }
  
  .user-greeting {
    padding: 0.375rem 0.75rem;
  }
}

a {
  text-decoration: none;
  color: inherit;
}

/* Основной контент */
main {
  flex: 1;
  padding: 2.5rem 0;
}

/* Карточки — лаконичные, с легким эффектом парения */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  perspective: 1000px;
}

.card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover img {
  transform: scale(1.03);
}

.card-content {
  padding: 1.25rem;
}

.card-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.card-content p {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.fullscreen-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fullscreen-content {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.05);
  border: 1px solid var(--border-light);
  animation: slideUp 0.3s ease;
}

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

.fullscreen-body {
  display: flex;
  flex-direction: row;
  gap: 2.5rem;
  padding: 2.5rem;
}

.fullscreen-img {
  flex: 1;
  max-width: 45%;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.fullscreen-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fullscreen-info h2 {
  font-size: 1.75rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.fullscreen-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 1rem 0 1.5rem 0;
  font-weight: 400;
}

.fullscreen-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-good);
  margin: 0 0 2rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.fullscreen-price b {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 1rem;
}

.fullscreen-buttons {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.back-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 450;
  font-size: 0.938rem;
  cursor: pointer;
  transition: var(--transition);
  flex: 1;
}

.back-btn:hover {
  background: var(--bg-page);
  border-color: var(--primary-light);
  color: var(--primary-dark);
}

.add-to-cart-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 450;
  font-size: 0.938rem;
  cursor: pointer;
  transition: var(--transition);
  flex: 2;
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.1);
}

.add-to-cart-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(139, 92, 246, 0.2);
}

/* Стили для скроллбара */
.fullscreen-content::-webkit-scrollbar {
  width: 6px;
}

.fullscreen-content::-webkit-scrollbar-track {
  background: transparent;
}

.fullscreen-content::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

.fullscreen-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

@media (max-width: 768px) {
  .fullscreen-modal {
    padding: 0.75rem;
  }
  
  .fullscreen-body {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .fullscreen-img {
    max-width: 100%;
    max-height: 280px;
  }
  
  .fullscreen-info h2 {
    font-size: 1.5rem;
  }
  
  .fullscreen-description {
    font-size: 0.938rem;
    margin: 0.75rem 0 1.25rem 0;
  }
  
  .fullscreen-price {
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
  }
  
  .fullscreen-buttons {
    flex-direction: column;
  }
  
  .back-btn,
  .add-to-cart-btn {
    width: 100%;
  }
}


.auth-container {
  max-width: 420px;
  margin: 2rem auto;
  background: var(--bg-surface);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--primary-dark);
  text-align: center;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--bg-page);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.btn-submit {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
}

.btn-submit:hover {
  background: var(--primary-dark);
}

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-muted);
}

.auth-links a {
  color: var(--primary-dark);
  font-weight: 500;
}

.dashboard-container {
  background: var(--bg-surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.info {
  background: var(--primary-soft);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  color: var(--primary-dark);
}
.info.btn {
    background: var(--primary);
  color: white;
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}

.footer {
  text-align: center;
  padding: 1.5rem 0;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  margin-top: auto;
  font-size: 0.875rem;
}

.hid {
  display: none !important;
}

.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--primary-soft);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
  margin: 3rem auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
/* Адаптивность */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .fullscreen-body {
    flex-direction: column;
    padding: 1.5rem;
  }
  
  .fullscreen-img {
    max-width: 100%;
  }
  
  .cards-grid {
    gap: 1rem;
  }
}
.orders-container {
    padding: 20px;
}

.order-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.order-id {
    font-weight: bold;
    font-size: 1.1em;
}

.order-date {
    color: #666;
    margin-left: 15px;
}

.order-status {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-processing { background: #cce5ff; color: #004085; }
.status-shipped { background: #d4edda; color: #155724; }
.status-delivered { background: #d1e7dd; color: #0f5132; }
.status-cancelled { background: #f8d7da; color: #721c24; }

.order-details {
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.order-total {
    font-weight: bold;
    font-size: 1.2em;
    color: #2ecc71;
}

.order-items {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.order-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.item-info {
    flex: 1;
}

.item-name {
    display: block;
    font-weight: bold;
}

.item-quantity {
    color: #666;
    font-size: 0.9em;
}

.item-total {
    font-weight: bold;
    margin-left: 15px;
}

.empty-orders, .error-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loader {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loader:after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

