/* ==================== GLOBAL STYLES - DARK MODE ==================== */
:root {
  /* Dark Theme Colors */
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --primary-light: #a78bfa;
  --secondary: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #22c55e;

  /* Dark Background Colors */
  --bg-dark: #0f0f23;
  --bg-darker: #070716;
  --bg-card: #1a1a2e;
  --bg-hover: #252541;

  /* Text Colors */
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  /* Border & Divider */
  --border: #2d2d44;
  --border-light: #3f3f5c;

  /* Shadows */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
  --glow: 0 0 20px rgba(139, 92, 246, 0.3);

  /* Border Radius */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

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

/* ==================== NAVBAR ==================== */
.navbar {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;  /* Chrome, Edge, Safari */
  background-clip: text;          /* Chuẩn – một số trình duyệt hỗ trợ */
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  text-shadow: var(--glow);
}


.search-box {
  display: flex;
  flex: 1;
  max-width: 500px;
}

.search-box input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-hover);
  border: 2px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: var(--glow);
}

.search-box button {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.2rem;
}

.search-box button:hover {
  transform: scale(1.05);
  box-shadow: var(--glow);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  background: var(--bg-hover);
  border-radius: var(--radius);
}

.cart-btn {
  position: relative;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow), var(--shadow-lg);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.logout-btn {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.logout-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* ==================== MAIN LAYOUT ==================== */
.main-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.sidebar h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 1rem 0;
  color: var(--text-primary);
  font-weight: 600;
}

.sidebar h3:first-child {
  margin-top: 0;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.75rem 1rem;
  background: var(--bg-hover);
  border: 2px solid transparent;
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-btn:hover {
  background: var(--bg-darker);
  color: var(--primary-light);
  border-color: var(--primary);
  transform: translateX(5px);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-color: var(--primary-light);
  box-shadow: var(--glow);
}

.reset-btn {
  width: 100%;
  padding: 0.75rem;
  margin-top: 1.5rem;
  background: transparent;
  color: var(--danger);
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.reset-btn:hover {
  background: var(--danger);
  color: white;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* ==================== CONTENT ==================== */
.content {
  min-height: 500px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.content-header h2 {
  font-size: 1.75rem;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.view-toggle button {
  padding: 0.5rem 1rem;
  background: var(--bg-hover);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.view-toggle button:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.view-toggle button:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.view-toggle button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.view-toggle button:hover:not(.active) {
  background: var(--bg-darker);
  border-color: var(--primary);
}

/* ==================== PRODUCT GRID ==================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  opacity: 0;
  transition: var(--transition);
  z-index: 0;
}

.product-card:hover::before {
  opacity: 0.05;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl), var(--glow);
  border-color: var(--primary);
}

.product-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bg-darker);
  position: relative;
  z-index: 1;
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-info {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.product-category {
  font-size: 0.75rem;
  color: var(--primary-light);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.product-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
  line-height: 1.5;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stars {
  color: var(--warning);
  font-size: 0.9rem;
}

.rating-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;

  -webkit-text-fill-color: transparent;
}

.add-to-cart-btn {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.add-to-cart-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--glow), var(--shadow-lg);
}

/* ==================== CART SIDEBAR ==================== */
.cart-sidebar {
  position: fixed;
  right: -450px;
  top: 0;
  width: 450px;
  height: 100vh;
  background: var(--bg-card);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 2px solid var(--border);
  background: var(--bg-darker);
}

.cart-header h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.close-btn {
  background: var(--bg-hover);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  transform: rotate(90deg);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--bg-dark);
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.cart-item:hover {
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-darker);
}

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

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

.cart-item-price {
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

.quantity-btn {
  width: 32px;
  height: 32px;
  background: var(--bg-hover);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.quantity-btn:hover {
  background: var(--primary);
  color: white;
  box-shadow: var(--glow);
}

.quantity-display {
  padding: 0.5rem 1rem;
  background: var(--bg-darker);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.remove-btn {
  padding: 0.5rem 1rem;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  margin-left: auto;
  font-weight: 600;
}

.remove-btn:hover {
  background: #dc2626;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.cart-footer {
  padding: 1.5rem;
  border-top: 2px solid var(--border);
  background: var(--bg-darker);
}

.cart-summary {
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.summary-row.total {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-light);
  padding-top: 0.75rem;
  border-top: 2px solid var(--border);
  margin-top: 0.75rem;
}

.discount {
  color: var(--success);
  font-weight: 600;
}

.checkout-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow), var(--shadow-lg);
}

.clear-cart-btn {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  color: var(--danger);
  border: 2px solid var(--danger);
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.clear-cart-btn:hover {
  background: var(--danger);
  color: white;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* ==================== MODAL ==================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-hover);
  border: 2px solid var(--border);
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-secondary);
  width: 50px;
  height: 50px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
  transform: rotate(90deg);
}

.modal-body {
  padding: 2rem;
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: -100px;
  right: 2rem;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3000;
  min-width: 300px;
  border: 2px solid var(--border);
  font-weight: 500;
}

.toast.show {
  bottom: 2rem;
}

.toast.success {
  background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
  color: white;
  border-color: var(--success);
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.5);
}

.toast.error {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: white;
  border-color: var(--danger);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.5);
}

/* ==================== LOGIN PAGE ==================== */
.login-page {
  background: var(--bg-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0.1;
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1200px;
  width: 90%;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.login-left {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.login-branding {
  position: relative;
  z-index: 1;
}

.login-branding h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.login-branding>p {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 3rem;
}

.features {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.feature {
  display: flex;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.feature:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(10px);
}

.feature-icon {
  font-size: 2rem;
}

.feature h4 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.feature p {
  opacity: 0.9;
  font-size: 0.9rem;
  line-height: 1.5;
}

.login-right {
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-darker);
}

.login-box {
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--text-secondary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.input-group input {
  padding: 0.75rem 1rem;
  background: var(--bg-hover);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: var(--glow);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.checkbox input {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.forgot-link {
  color: var(--primary-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.forgot-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.auth-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow), var(--shadow-lg);
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.google-btn {
  width: 100%;
  padding: 1rem;
  background: var(--bg-hover);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
}

.google-btn:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.google-btn img {
  width: 20px;
  height: 20px;
}

.switch-form {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 1rem;
}

.switch-form a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.switch-form a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.auth-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
  display: none;
  font-weight: 500;
}

.auth-message.show {
  display: block;
}

.auth-message.success {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
  border: 2px solid var(--success);
}

.auth-message.error {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: 2px solid var(--danger);
}

/* ==================== LOADING SPINNER ==================== */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .login-container {
    grid-template-columns: 1fr;
  }

  .login-left {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
    padding: 0 1rem;
  }

  .nav-left {
    flex-direction: column;
    width: 100%;
  }

  .search-box {
    max-width: 100%;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .main-container {
    padding: 0 1rem;
  }
}

/* ==================== LIST VIEW ==================== */
.product-grid.list-view {
  grid-template-columns: 1fr;
}

.product-grid.list-view .product-card {
  flex-direction: row;
}

.product-grid.list-view .product-image {
  width: 250px;
  height: 200px;
}

.product-grid.list-view .product-info {
  flex: 1;
}

/* ==================== SCROLLBAR ANIMATIONS ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.product-card {
  animation: fadeIn 0.5s ease forwards;
}

.product-card:nth-child(1) {
  animation-delay: 0.05s;
}

.product-card:nth-child(2) {
  animation-delay: 0.1s;
}

.product-card:nth-child(3) {
  animation-delay: 0.15s;
}

.product-card:nth-child(4) {
  animation-delay: 0.2s;
}

.product-card:nth-child(5) {
  animation-delay: 0.25s;
}

.product-card:nth-child(6) {
  animation-delay: 0.3s;
}
