/* MaxPlace Modern Digital Marketplace Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* --- Reset & Variables --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

:root {
  /* Default Dark Theme Variables */
  --bg-main: #0a0a0f;
  --bg-card: #12121a;
  --bg-input: #1a1a2e;
  --accent-start: #6c5ce7;
  --accent-end: #a29bfe;
  --color-success: #00b894;
  --color-danger: #e17055;
  --color-danger-dark: #d63031;
  --color-warning: #fdcb6e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b8;
  --text-muted: #6c6c80;
  --border-light: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(108, 92, 231, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-blur: blur(20px);
  --theme-toggle-color: #fdcb6e;
}

/* Light Theme Variables Overrides */
body.light-theme {
  --bg-main: #f5f6fa;
  --bg-card: #ffffff;
  --bg-input: #f1f2f6;
  --accent-start: #5f27cd;
  --accent-end: #341f97;
  --color-success: #10ac84;
  --color-danger: #ee5253;
  --color-danger-dark: #d63031;
  --color-warning: #f1a93c;
  --text-primary: #2c3e50;
  --text-secondary: #57606f;
  --text-muted: #8395a7;
  --border-light: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(95, 39, 205, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-blur: blur(20px);
  --theme-toggle-color: #5f27cd;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-input);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-start);
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.page-header {
  margin-bottom: 2rem;
  animation: fadeIn 0.5s ease-out;
}

.page-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* --- Navigation --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.nav-brand {
  font-size: 1.6rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--theme-toggle-color);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 1.15rem;
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(108, 92, 231, 0.2);
}

.nav-balance {
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.2);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--accent-end);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-balance:hover {
  background: rgba(108, 92, 231, 0.2);
  transform: translateY(-1px);
}

.notification-bell {
  position: relative;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.notification-bell:hover {
  color: var(--text-primary);
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: var(--color-danger-dark);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}

/* User Menu & Dropdown */
.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0.5rem;
  width: 220px;
  display: none;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  animation: slideUp 0.2s ease;
  z-index: 1001;
}

.user-menu-dropdown.show {
  display: flex;
}

.dropdown-item {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dropdown-item:hover {
  background: var(--bg-input);
  color: var(--text-primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.4rem 0;
}

/* --- Cards & Glassmorphism --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(108, 92, 231, 0.1);
  border-color: rgba(108, 92, 231, 0.2);
}

.card-header {
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-body {
  margin-bottom: 1.25rem;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: white;
}
.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border-light);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--text-secondary);
}

.btn-danger {
  background: rgba(225, 112, 85, 0.15);
  color: var(--color-danger);
  border-color: rgba(225, 112, 85, 0.3);
}
.btn-danger:hover {
  background: var(--color-danger-dark);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(214, 48, 49, 0.4);
}

.btn-success {
  background: rgba(0, 184, 148, 0.15);
  color: var(--color-success);
  border-color: rgba(0, 184, 148, 0.3);
}
.btn-success:hover {
  background: var(--color-success);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  border-radius: 6px;
}

.btn-lg {
  padding: 0.8rem 1.6rem;
  font-size: 1.05rem;
  border-radius: 10px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

/* --- Forms & Inputs --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-start);
  box-shadow: 0 0 0 3px var(--border-focus);
  background-color: rgba(108, 92, 231, 0.03);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.form-error {
  font-size: 0.82rem;
  color: var(--color-danger);
  margin-top: 0.4rem;
}

/* --- Tables --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  background: var(--bg-card);
  padding: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  padding: 1rem;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-success { background: rgba(0, 184, 148, 0.15); color: var(--color-success); }
.badge-danger { background: rgba(225, 112, 85, 0.15); color: var(--color-danger); }
.badge-warning { background: rgba(253, 203, 110, 0.15); color: var(--color-warning); }
.badge-info { background: rgba(9, 132, 227, 0.15); color: #0984e3; }
.badge-admin { background: rgba(108, 92, 231, 0.15); color: var(--accent-end); }

/* --- Stats & Dashboard --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Grids --- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

@media(max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* --- Product Cards --- */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.3;
}

.product-title:hover {
  color: var(--accent-end);
}

.product-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.product-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-end);
}

.product-stock {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-input);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

/* --- Banners & Carousel --- */
.banners-carousel {
  margin-bottom: 2.5rem;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 1.25rem !important;
  height: auto !important;
  overflow: visible !important;
}

.banner-card {
  width: 100%;
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  text-decoration: none;
  background-size: cover;
  transition: transform 0.3s ease;
  position: relative;
}

.banner-card:hover {
  transform: scale(1.01);
}

.banner-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.banner-desc {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 600px;
}

/* --- Reviews --- */
.review-item {
  border-left: 4px solid var(--border-light);
  background: var(--bg-card);
  padding: 1rem 1.25rem;
  border-radius: 0 12px 12px 0;
  margin-bottom: 1rem;
  animation: slideIn 0.3s ease;
}

.review-positive {
  border-left-color: var(--color-success);
}

.review-negative {
  border-left-color: var(--color-danger);
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.review-buyer {
  font-weight: 600;
  color: var(--text-primary);
}

.review-comment {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.review-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Avatars --- */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  text-transform: uppercase;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.6rem;
}

.profile-avatar-container {
  position: relative;
  width: 80px;
  height: 80px;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-light);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.profile-avatar-container:hover {
  border-color: var(--accent-start);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.3);
}

.profile-avatar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50%;
}

.profile-avatar-container:hover .profile-avatar-overlay {
  opacity: 1;
}


/* --- Admin Layout --- */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  min-height: calc(100vh - 160px);
}

.admin-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: fit-content;
}

.admin-nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.admin-nav-item:hover, .admin-nav-item.active {
  background: var(--bg-input);
  color: var(--text-primary);
}

.admin-nav-item.active {
  color: var(--accent-end);
  border-left: 3px solid var(--accent-start);
  border-radius: 0 8px 8px 0;
}

@media(max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

/* --- Modals & Overlays --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.4rem;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 3000;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 400px;
  animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 4px solid var(--accent-start);
}

.toast-success { border-left-color: var(--color-success); }
.toast-error { border-left-color: var(--color-danger); }
.toast-info { border-left-color: #0984e3; }
.toast-warning { border-left-color: var(--color-warning); }

/* --- Loading States & Empty --- */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.06);
  border-top-color: var(--accent-start);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.empty-state-icon {
  font-size: 3rem;
}

.empty-state-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab {
  padding: 0.75rem 1rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab:hover, .tab-active {
  color: var(--text-primary);
}

.tab-active {
  border-bottom: 2px solid var(--accent-start);
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

.text-gradient {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

/* --- Sold product card (muted) --- */
.product-card--sold {
  opacity: 0.7;
  position: relative;
}
.product-card--sold::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.04);
  border-radius: 12px;
  pointer-events: none;
}
.product-card--sold:hover {
  transform: none;
  box-shadow: none;
}

/* --- Light Theme Comprehensive Fixes --- */
body.light-theme .navbar {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

body.light-theme .card:hover {
  box-shadow: 0 12px 30px rgba(95, 39, 205, 0.08);
}

body.light-theme .user-menu-dropdown {
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  background: #ffffff;
}

body.light-theme .modal {
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

body.light-theme .modal-overlay {
  background: rgba(0,0,0,0.35);
}

body.light-theme .toast {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

body.light-theme .btn-secondary:hover {
  background: rgba(0,0,0,0.06);
  border-color: var(--text-muted);
}

body.light-theme .table tr:hover td {
  background: rgba(0,0,0,0.02);
}

body.light-theme .loading-spinner {
  border-color: rgba(0,0,0,0.08);
  border-top-color: var(--accent-start);
}

body.light-theme .nav-balance {
  background: rgba(95, 39, 205, 0.08);
  border-color: rgba(95, 39, 205, 0.15);
}

body.light-theme .nav-balance:hover {
  background: rgba(95, 39, 205, 0.14);
}

body.light-theme .stat-card {
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

body.light-theme .product-card--sold::after {
  background: rgba(255,255,255,0.15);
}

body.light-theme ::selection {
  background: rgba(95, 39, 205, 0.2);
  color: #2c3e50;
}

body.light-theme .admin-sidebar {
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

body.light-theme .review-item {
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* Ensure user-select for text content areas */
.form-textarea, .product-description, .review-comment, .modal-body {
  user-select: text;
}

/* --- Tronaccs-Style Product Rows --- */
.products-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.product-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.product-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-start), var(--accent-end));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.product-row:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2), 0 0 15px rgba(108, 92, 231, 0.05);
  background: rgba(255, 255, 255, 0.01);
}

body.light-theme .product-row:hover {
  box-shadow: 0 8px 30px rgba(95, 39, 205, 0.08);
  background: rgba(95, 39, 205, 0.01);
}

.product-row:hover::before {
  opacity: 1;
}

.product-row-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--accent-end);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.product-row:hover .product-row-icon-wrapper {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: #fff;
  transform: scale(1.05);
}

.product-row-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.product-row-title-link {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-row-title-link:hover {
  color: var(--accent-end);
}

.product-row-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.product-row-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.product-row-price-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  padding: 0 0.5rem;
}

.product-row-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.product-row-stock {
  font-size: 0.78rem;
  color: var(--color-success);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.product-row-action {
  flex-shrink: 0;
}

/* Responsive adjustment for Mobile */
@media (max-width: 768px) {
  .product-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
    padding: 1rem 1.25rem;
  }

  .product-row-icon-wrapper {
    grid-row: span 1;
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .product-row-details {
    grid-column: 2;
  }

  .product-row-price-section {
    grid-column: 1 / span 2;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 0.75rem;
    margin-top: 0.25rem;
  }

  .product-row-price {
    font-size: 1.2rem;
  }

  .product-row-action {
    grid-column: 1 / span 2;
    width: 100%;
  }

  .product-row-action .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Floating Left Sidebar Panel --- */
.sidebar-left-panel {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 999;
  background: linear-gradient(145deg, rgba(18, 18, 26, 0.95), rgba(10, 10, 15, 0.98));
  border: 1px solid rgba(108, 92, 231, 0.1);
  border-radius: 18px;
  padding: 0.6rem;
  width: 230px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 60px rgba(108, 92, 231, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: var(--glass-blur);
  transition: all 0.3s ease;
}

body.light-theme .sidebar-left-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(245, 246, 250, 0.98));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 0 60px rgba(95, 39, 205, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(95, 39, 205, 0.08);
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.sidebar-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  opacity: 0;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.12), rgba(162, 155, 254, 0.06));
  transition: opacity 0.3s ease;
}

.sidebar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.12), rgba(162, 155, 254, 0.06));
  border: 1px solid rgba(108, 92, 231, 0.12);
  flex-shrink: 0;
  transition: all 0.3s ease;
  position: relative;
}

body.light-theme .sidebar-icon {
  background: linear-gradient(135deg, rgba(95, 39, 205, 0.1), rgba(95, 39, 205, 0.04));
  border: 1px solid rgba(95, 39, 205, 0.1);
}

.sidebar-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent-end);
  transition: all 0.3s ease;
}

body.light-theme .sidebar-icon svg {
  color: var(--accent-start);
}

.sidebar-btn span.btn-text {
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.sidebar-btn:hover {
  color: var(--text-primary);
  transform: translateX(3px);
}

.sidebar-btn:hover::before {
  opacity: 1;
}

.sidebar-btn:hover .sidebar-icon {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.25), rgba(162, 155, 254, 0.15));
  border-color: rgba(108, 92, 231, 0.3);
  box-shadow: 0 0 16px rgba(108, 92, 231, 0.2);
  transform: scale(1.05);
}

body.light-theme .sidebar-btn:hover {
  color: var(--text-primary);
}

body.light-theme .sidebar-btn:hover::before {
  background: linear-gradient(135deg, rgba(95, 39, 205, 0.08), rgba(95, 39, 205, 0.03));
}

body.light-theme .sidebar-btn:hover .sidebar-icon {
  background: linear-gradient(135deg, rgba(95, 39, 205, 0.2), rgba(95, 39, 205, 0.1));
  border-color: rgba(95, 39, 205, 0.25);
  box-shadow: 0 0 16px rgba(95, 39, 205, 0.15);
}

.sidebar-btn:hover .sidebar-icon svg {
  color: #ffffff;
  filter: drop-shadow(0 0 4px rgba(162, 155, 254, 0.5));
}

body.light-theme .sidebar-btn:hover .sidebar-icon svg {
  color: var(--accent-start);
  filter: drop-shadow(0 0 4px rgba(95, 39, 205, 0.3));
}

/* Sidebar Responsive Mobile styling */
@media (max-width: 1024px) {
  .sidebar-left-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    top: auto;
    transform: none;
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    background: linear-gradient(180deg, rgba(18, 18, 26, 0.97), rgba(10, 10, 15, 0.99));
    border-top: 1px solid rgba(108, 92, 231, 0.1);
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 0.5rem 0.75rem;
    gap: 0.25rem;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
    border-radius: 16px 16px 0 0;
    backdrop-filter: var(--glass-blur);
  }

  body.light-theme .sidebar-left-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 246, 250, 0.99));
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
  }

  .sidebar-btn {
    flex: 1;
    justify-content: center;
    padding: 0.45rem;
    border-radius: 10px;
    background: transparent;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.68rem;
  }

  .sidebar-btn::before {
    display: none;
  }

  .sidebar-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .sidebar-icon svg {
    width: 16px;
    height: 16px;
  }

  .sidebar-btn:hover {
    transform: none;
    background: rgba(108, 92, 231, 0.08);
  }

  .sidebar-btn span.btn-text {
    display: inline;
    font-size: 0.65rem;
    text-align: center;
  }

  /* Shift main space on mobile to prevent navbar covering */
  body {
    padding-bottom: 80px;
  }
}

.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  margin: 0.25rem 0.5rem;
}

.sidebar-btn-accent .sidebar-icon {
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.15), rgba(0, 136, 204, 0.05));
  border-color: rgba(0, 136, 204, 0.15);
}

.sidebar-icon-tg svg {
  color: #0088cc !important;
  width: 18px;
  height: 18px;
}

.sidebar-btn-accent:hover .sidebar-icon {
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.3), rgba(0, 136, 204, 0.15));
  border-color: rgba(0, 136, 204, 0.35);
  box-shadow: 0 0 16px rgba(0, 136, 204, 0.25);
}

.sidebar-btn-accent:hover .sidebar-icon svg {
  color: #ffffff !important;
  filter: drop-shadow(0 0 4px rgba(0, 136, 204, 0.5));
}

/* --- Rules Page Specific styles --- */
.rules-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.rules-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rules-item {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.rules-item strong {
  color: var(--text-primary);
}

/* --- Ticket status colors --- */
.badge-ticket-pending {
  background: rgba(253, 203, 110, 0.15);
  color: var(--color-warning);
}

.badge-ticket-processing {
  background: rgba(9, 132, 227, 0.15);
  color: #0984e3;
}

.badge-ticket-completed {
  background: rgba(0, 184, 148, 0.15);
  color: var(--color-success);
}

/* Premium Catalog Badges and Buttons */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.76rem;
  font-weight: 500;
  border-radius: 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

/* Light Theme overrides for premium badges */
body.light-theme .premium-badge {
  background: #f1f2f6;
  border-color: #e4e7eb;
  color: #2c3e50;
}

/* Specific badge classes now inherit uniform styling to keep design low-key */
.badge-country, .badge-chats, .badge-contacts {
  background: var(--bg-input);
  border-color: var(--border-light);
  color: var(--text-secondary);
}

body.light-theme .badge-country, 
body.light-theme .badge-chats, 
body.light-theme .badge-contacts {
  background: #f1f2f6;
  border-color: #e4e7eb;
  color: #2c3e50;
}

/* Unified Theme-Adaptive Price */
.product-row-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff; /* White on dark theme */
}

body.light-theme .product-row-price {
  color: #1e1e2e !important; /* solid black on light theme */
}

/* Fix dropdown options white-on-white bug in dark/light themes */
.form-select option {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

/* Property Grid for Details Page (mimicking Photo 2 but low-key) */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  width: 100%;
}

.property-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.property-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-end);
}

.property-label {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

body.light-theme .property-label {
  background: #f1f2f6;
  border-color: #e4e7eb;
  color: #2c3e50;
}

.property-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Catalog Search and Filter Bar Height Alignment */
.catalog-search-row .form-input,
.catalog-search-row .btn,
.catalog-search-row .form-select {
  height: 42px !important;
  box-sizing: border-box !important;
  font-size: 0.92rem !important;
  margin: 0 !important;
}

.catalog-search-row .form-input {
  display: inline-block !important;
  line-height: 40px !important; /* height minus 2px borders */
  padding: 0 1.25rem !important;
}

.catalog-search-row .form-select {
  display: inline-block !important;
  line-height: 40px !important; /* height minus 2px borders */
  padding: 0 2.5rem 0 1.25rem !important; /* room for select dropdown arrow */
}

.catalog-search-row .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 1.5rem !important;
  white-space: nowrap !important;
}

/* =================================================================
   COMPREHENSIVE RESPONSIVE DESIGN SYSTEM
   Breakpoints:
   - Desktop XL:    > 1280px  (default styles above)
   - Desktop:       ≤ 1280px  (small desktops / large laptops)
   - Laptop:        ≤ 1024px  (laptops / landscape tablets)
   - Tablet:        ≤ 768px   (portrait tablets / large phones)
   - Phablet:       ≤ 640px   (large phones)
   - Mobile:        ≤ 480px   (small phones)
================================================================= */

/* --- Mobile Menu Toggle Button (hidden by default) --- */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
  flex-shrink: 0;
}

.mobile-menu-toggle:hover {
  background: rgba(108, 92, 231, 0.15);
  border-color: var(--accent-start);
}

.mobile-menu-toggle.active {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: white;
  border-color: transparent;
}

/* =========================
   ≤ 1280px — Small Desktop / Large Laptop
========================= */
@media (max-width: 1280px) {
  .container {
    max-width: 100%;
    padding: 1.5rem 1.25rem;
  }

  .sidebar-left-panel {
    width: 200px;
    left: 12px;
  }

  .navbar {
    padding: 0.85rem 1.5rem;
  }
}

/* =========================
   ≤ 1024px — Laptop / Landscape Tablet
   Major breakpoint: sidebar becomes bottom bar, hamburger appears
========================= */
@media (max-width: 1024px) {
  /* Show hamburger */
  .mobile-menu-toggle {
    display: flex;
    order: 2;
  }

  /* Hide nav links by default, show on toggle */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem;
    gap: 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    z-index: 999;
    animation: slideUp 0.25s ease;
  }

  body.light-theme .nav-links {
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  }

  .nav-links.mobile-open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    width: 100%;
  }

  .nav-links .nav-link:hover,
  .nav-links .nav-link.active {
    background: var(--bg-input);
  }

  .nav-links .nav-link.active::after {
    display: none;
  }

  /* Navbar order: brand | hamburger | actions */
  .navbar {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    position: relative;
  }

  .nav-brand {
    order: 1;
    font-size: 1.4rem;
  }

  .nav-actions {
    order: 3;
    gap: 0.75rem;
  }

  /* Nav username hide on medium screens */
  #nav-username {
    display: none;
  }

  /* Admin panel & cart goes single column */
  .admin-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .admin-sidebar {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
  }

  .admin-nav-item {
    white-space: nowrap;
    padding: 0.6rem 0.8rem;
    font-size: 0.82rem;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .admin-nav-item.active {
    border-left: none;
    border-bottom: 2px solid var(--accent-start);
    border-radius: 8px;
  }

  /* Profile page stats grid */
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
  }

  /* Grids */
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 1.8rem;
  }

  /* Banner carousel */
  .banners-carousel {
    grid-template-columns: 1fr !important;
  }

  .banner-title {
    font-size: 1.4rem;
  }
}

/* =========================
   ≤ 768px — Portrait Tablet / Large Phone
========================= */
@media (max-width: 768px) {
  .container {
    padding: 1rem 0.75rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .page-subtitle {
    font-size: 0.95rem;
  }

  /* Card spacing */
  .card {
    padding: 1.15rem;
    border-radius: 10px;
  }

  .card:hover {
    transform: none;
    box-shadow: none;
  }

  /* Stats */
  .stat-value {
    font-size: 1.6rem;
  }

  .stat-card {
    padding: 1rem;
    border-radius: 10px;
  }

  /* Buttons touch-friendly */
  .btn {
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    min-height: 42px;
  }

  .btn-sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    min-height: 36px;
  }

  /* Form inputs */
  .form-input, .form-textarea, .form-select {
    font-size: 16px; /* prevents iOS zoom */
    padding: 0.7rem 0.85rem;
  }

  /* Modal */
  .modal {
    width: 95%;
    max-width: none;
    margin: 0.5rem;
    border-radius: 14px;
  }

  .modal-header {
    padding: 1rem 1.15rem;
  }

  .modal-body {
    padding: 1.15rem;
    max-height: 60vh;
  }

  .modal-footer {
    padding: 0.85rem 1.15rem;
    flex-wrap: wrap;
  }

  .modal-footer .btn {
    flex: 1;
    min-width: 0;
  }

  /* Toast */
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .toast {
    min-width: 0;
    max-width: none;
    width: 100%;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
  }

  /* Tables */
  .table th, .table td {
    padding: 0.65rem 0.5rem;
    font-size: 0.8rem;
  }

  .table th {
    font-size: 0.72rem;
    letter-spacing: 0.3px;
  }

  /* Profile header */
  .profile-avatar-container {
    width: 64px;
    height: 64px;
  }

  /* Review items */
  .review-item {
    padding: 0.85rem 1rem;
  }

  /* Product cards grid on tablet */
  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
  }

  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
  }

  /* Property grid for product detail */
  .property-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.85rem;
  }

  .property-card {
    padding: 1rem;
    border-radius: 10px;
  }

  /* Catalog search row stacks on tablet */
  .catalog-search-row {
    flex-direction: column !important;
    gap: 0.5rem !important;
    align-items: stretch !important;
  }

  .catalog-search-row > * {
    width: 100% !important;
    flex: none !important;
  }

  .catalog-search-row .form-input,
  .catalog-search-row .btn,
  .catalog-search-row .form-select {
    width: 100% !important;
  }

  /* Notifications dropdown - absolute under bell trigger */
  .notification-bell .user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    bottom: auto;
    right: 0;
    left: auto;
    width: 300px !important;
    max-width: calc(100vw - 2rem);
    border-radius: 12px;
  }

  /* User dropdown - absolute under avatar trigger */
  .user-menu .user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    bottom: auto;
    right: 0;
    left: auto;
    width: 220px !important;
    border-radius: 12px;
  }

  /* Nav balance compact */
  .nav-balance {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
  }
}

/* =========================
   ≤ 640px — Phablet
========================= */
@media (max-width: 640px) {
  /* Stats grid to 2 columns */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 0.85rem;
    gap: 0.35rem;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  .stat-label {
    font-size: 0.72rem;
  }

  /* Profile page header adjustments */
  .profile-avatar-container {
    width: 56px;
    height: 56px;
  }

  /* Product rows */
  .product-row {
    padding: 1rem;
    gap: 0.75rem;
    border-radius: 12px;
  }

  .product-row-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.1rem;
  }

  .product-row-title-link {
    font-size: 1rem;
  }

  .product-row-meta-item {
    font-size: 0.72rem;
  }

  .product-row-price {
    font-size: 1.1rem;
  }

  /* Badge sizes */
  .badge {
    font-size: 0.68rem;
    padding: 0.2rem 0.4rem;
  }

  /* Grid all single column */
  .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Banner compact */
  .banner-card {
    padding: 1.25rem;
  }

  .banner-title {
    font-size: 1.2rem;
  }

  .banner-desc {
    font-size: 0.85rem;
  }

  /* Admin sidebar scrollable */
  .admin-sidebar {
    gap: 0.15rem;
    padding: 0.4rem;
  }

  .admin-nav-item {
    font-size: 0.75rem;
    padding: 0.5rem 0.6rem;
    gap: 0.4rem;
  }

  .admin-nav-item svg {
    width: 14px;
    height: 14px;
  }
}

/* =========================
   ≤ 480px — Small Phone
========================= */
@media (max-width: 480px) {
  .container {
    padding: 0.75rem 0.5rem;
  }

  .page-title {
    font-size: 1.3rem;
    margin-bottom: 0.35rem;
  }

  .page-subtitle {
    font-size: 0.85rem;
  }

  /* Navbar ultra-compact */
  .navbar {
    padding: 0.6rem 0.75rem;
  }

  .nav-brand {
    font-size: 1.2rem;
  }

  .nav-brand svg {
    width: 18px;
    height: 18px;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .theme-toggle-btn {
    width: 34px;
    height: 34px;
  }

  .mobile-menu-toggle {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  /* Notification dropdown — contained on small phones */
  .notification-bell .user-menu-dropdown {
    position: fixed !important;
    top: 60px !important;
    bottom: auto !important;
    left: 0.5rem !important;
    right: 0.5rem !important;
    width: auto !important;
    max-width: none !important;
    max-height: 50vh !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45) !important;
    z-index: 9999 !important;
  }

  /* User menu dropdown — same treatment */
  .user-menu .user-menu-dropdown {
    position: fixed !important;
    top: 60px !important;
    bottom: auto !important;
    right: 0.5rem !important;
    left: auto !important;
    width: 220px !important;
    max-width: calc(100vw - 1rem) !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45) !important;
    z-index: 9999 !important;
  }

  /* Cart grid — stack columns on phone */
  .admin-layout[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .nav-balance {
    padding: 0.3rem 0.5rem;
    font-size: 0.78rem;
    border-radius: 6px;
  }

  .nav-balance svg {
    display: none;
  }

  /* Cards */
  .card {
    padding: 1rem;
    border-radius: 10px;
  }

  /* Stats 2-column even tighter */
  .stats-grid {
    gap: 0.5rem;
  }

  .stat-card {
    padding: 0.75rem;
  }

  .stat-value {
    font-size: 1.15rem;
  }

  .stat-label {
    font-size: 0.65rem;
    letter-spacing: 0.3px;
  }

  /* Buttons ultra-compact */
  .btn {
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
  }

  .btn-lg {
    padding: 0.65rem 1.2rem;
    font-size: 0.95rem;
  }

  /* Profile */
  .profile-avatar-container {
    width: 50px;
    height: 50px;
  }

  .profile-avatar-overlay svg {
    width: 18px;
    height: 18px;
  }

  /* Product rows */
  .product-row {
    padding: 0.85rem;
    gap: 0.6rem;
  }

  .product-row-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .product-row-title-link {
    font-size: 0.92rem;
  }

  .product-row-price {
    font-size: 1rem;
  }

  /* Property grid */
  .property-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .property-card {
    padding: 0.85rem;
    border-radius: 8px;
    gap: 0.5rem;
  }

  .property-label {
    font-size: 0.72rem;
    padding: 0.25rem 0.6rem;
  }

  .property-value {
    font-size: 1rem;
  }

  /* Modal centered on mobile as requested by user */
  .modal {
    width: 92% !important;
    margin: 1rem !important;
    border-radius: 16px !important;
    max-height: 85vh;
  }

  .modal-overlay.show {
    align-items: center;
  }

  .modal-header {
    padding: 0.85rem 1rem;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 1rem;
    max-height: 55vh;
  }

  .modal-footer {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  /* Tables extremely compact */
  .table th, .table td {
    padding: 0.5rem 0.35rem;
    font-size: 0.72rem;
  }

  /* Reviews */
  .review-item {
    padding: 0.75rem;
    border-radius: 0 8px 8px 0;
  }

  .review-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  /* Empty states */
  .empty-state {
    padding: 2rem 1rem;
  }

  .empty-state-icon svg {
    width: 36px;
    height: 36px;
  }

  .empty-state-text {
    font-size: 0.95rem;
  }

  /* Toast ultra-compact */
  .toast {
    padding: 0.6rem 0.85rem;
    font-size: 0.8rem;
    border-radius: 6px;
  }

  /* Rules page */
  .rules-container {
    gap: 1.25rem;
  }

  .rules-item {
    font-size: 0.88rem;
  }

  /* Banners */
  .banner-card {
    padding: 1rem;
    border-radius: 10px;
  }

  .banner-title {
    font-size: 1.05rem;
  }

  .banner-desc {
    font-size: 0.78rem;
  }
}

/* =========================
   Landscape Phone Fix
========================= */
@media (max-height: 500px) and (orientation: landscape) {
  .modal-body {
    max-height: 50vh;
  }

  .sidebar-left-panel {
    padding-bottom: 0.35rem;
  }

  body {
    padding-bottom: 60px;
  }
}

/* =========================
   Touch Device Enhancements
========================= */
@media (hover: none) and (pointer: coarse) {
  /* Disable hover transforms on touch (prevents sticky hover on mobile) */
  .card:hover {
    transform: none;
    box-shadow: none;
  }

  .product-row:hover {
    transform: none;
  }

  .product-row:hover .product-row-icon-wrapper {
    transform: none;
    background: var(--bg-input);
    color: var(--accent-end);
  }

  .btn:hover {
    transform: none;
  }

  .nav-balance:hover {
    transform: none;
  }

  .theme-toggle-btn:hover {
    transform: none;
  }

  .profile-avatar-container:hover {
    transform: none;
  }

  .property-card:hover {
    transform: none;
  }

  .banner-card:hover {
    transform: none;
  }

  /* Slightly larger tap targets */
  .dropdown-item {
    padding: 0.75rem 0.85rem;
    min-height: 44px;
  }

  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* =========================
   Print Styles
========================= */
@media print {
  .navbar, .sidebar-left-panel, .toast-container,
  .modal-overlay, .mobile-menu-toggle {
    display: none !important;
  }

  body {
    padding-bottom: 0;
    background: #fff;
    color: #000;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}

/* =========================
   Page-specific Responsive Overrides
   (for inline styles in JS templates that need !important)
========================= */

/* Profile header card — flex layout stacking */
@media (max-width: 768px) {
  .card.flex.flex-between.flex-wrap {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 1.25rem !important;
    gap: 1rem !important;
  }

  /* Profile stats grid — override inline repeat(4, 1fr) */
  .card .stats-grid[style] {
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 100% !important;
    gap: 0.5rem !important;
  }

  /* Profile username smaller */
  #profile-username {
    font-size: 1.35rem !important;
  }
}

@media (max-width: 480px) {
  /* Even tighter profile */
  .card.flex.flex-between.flex-wrap {
    padding: 1rem !important;
  }

  .card .stats-grid[style] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .card .stats-grid[style] .stat-card {
    padding: 0.6rem 0.5rem !important;
  }

  .card .stats-grid[style] .stat-value {
    font-size: 1.1rem !important;
  }

  .card .stats-grid[style] .stat-label {
    font-size: 0.65rem !important;
  }

  #profile-username {
    font-size: 1.15rem !important;
  }
}

/* Sidebar divider hidden on bottom bar mobile layout */
@media (max-width: 1024px) {
  .sidebar-divider {
    display: none;
  }
}

/* Admin quick-action buttons wrap responsively */
@media (max-width: 640px) {
  .admin-layout .flex-between {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .admin-layout .flex-between .btn {
    width: 100%;
    justify-content: center;
  }
  
  #admin-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Global inline padding overrides for cards to optimize mobile space */
@media (max-width: 768px) {
  .card[style*="padding"] {
    padding: 1.25rem !important;
  }
}

@media (max-width: 480px) {
  .card[style*="padding"] {
    padding: 1rem !important;
  }
  
  /* Drag and drop zone padding override for mobile */
  #drop-zone {
    padding: 1.25rem !important;
  }
  
  /* Reduce grid gap on small devices to maximize space */
  .grid, .grid-2, .grid-3, .grid-4 {
    gap: 0.75rem !important;
  }
  
  #admin-stats-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Premium bottom bar layout & styling under 768px (hides text, circular tab bar) */
@media (max-width: 768px) {
  .sidebar-left-panel {
    padding: 0.4rem 0.5rem !important;
    border-radius: 16px 16px 0 0 !important;
    height: 58px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    gap: 0.25rem !important;
  }
  .sidebar-btn {
    padding: 0.3rem 0 !important;
    gap: 0 !important;
    flex-direction: column !important;
  }
  .sidebar-btn span.btn-text {
    display: none !important;
  }
  .sidebar-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
  }
  .sidebar-icon svg {
    width: 20px !important;
    height: 20px !important;
  }
  body {
    padding-bottom: 68px !important;
  }
}

/* Prevents admin dashboard horizontal stretching & overflow */
.admin-layout, .admin-sidebar, .admin-content, .grid, .grid-2, .grid-3, .grid-4 {
  min-width: 0 !important;
}
.admin-layout {
  overflow-x: hidden !important;
}

/* --- Premium Toggle Switch --- */
.switch-container {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.switch-container:hover {
  color: var(--text-primary);
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 2px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch input:checked + .slider {
  background-color: var(--accent-start);
  border-color: var(--accent-start);
}

.switch input:checked + .slider:before {
  transform: translateX(18px);
  background-color: #ffffff;
}

.switch input:focus-visible + .slider {
  box-shadow: 0 0 0 2px var(--border-focus);
}

/* --- Custom Premium Checkbox Styling --- */
.custom-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  vertical-align: middle;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: relative;
  display: inline-block;
  height: 18px;
  width: 18px;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-checkbox:hover input ~ .checkmark {
  border-color: var(--accent-start);
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.25);
}

.custom-checkbox input:checked ~ .checkmark {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.35);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
  display: block;
}

/* --- Premium Footer --- */
.footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-light);
  padding: 2.25rem 0 1.75rem 0;
  margin-top: 3rem;
  width: 100%;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr;
  gap: 3rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-brand {
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-description {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.5rem;
  text-align: left;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-heading {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  width: 100%;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-align: left;
}

.footer-link:hover {
  color: var(--accent-end);
  transform: translateX(3px);
}

.footer-link-support {
  color: var(--accent-end);
  font-weight: 600;
}

.footer-link-support:hover {
  filter: brightness(1.15);
}

.footer-schedule {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-left: 2px solid var(--accent-start);
  padding-left: 0.75rem;
  margin-top: 1.25rem;
  text-align: left;
}

.schedule-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.schedule-value {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.footer-btn-tg {
  justify-content: flex-start !important;
  width: 100%;
  border: 1px solid var(--border-light) !important;
  background-color: var(--bg-input) !important;
  padding: 0.55rem 0.85rem !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

.footer-btn-tg:hover {
  background-color: rgba(34, 165, 226, 0.08) !important;
  border-color: rgba(34, 165, 226, 0.4) !important;
  color: #22a5e2 !important;
  box-shadow: 0 4px 12px rgba(34, 165, 226, 0.15);
}

/* --- Footer Responsive Overrides --- */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .footer-brand-col {
    grid-column: 1 / -1;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 2.5rem 0 2rem 0;
  }
  
  .footer-container {
    padding: 0 1.25rem;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-brand-col {
    grid-column: auto;
  }
  
  .footer-column {
    align-items: stretch;
  }
  
  .footer-links {
    align-items: stretch;
  }
}

/* --- Notification Item Styling --- */
.notification-item {
  position: relative;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
  width: 100%;
  box-sizing: border-box;
}

#notifications-list {
  align-items: stretch !important;
}

.notification-item:hover {
  background: var(--bg-input);
  border-color: rgba(108, 92, 231, 0.3);
}

.notification-item.notification-unread {
  background: rgba(108, 92, 231, 0.06);
  border-color: rgba(108, 92, 231, 0.2);
}

.notification-item.notification-unread::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 7px;
  height: 7px;
  background-color: var(--accent-start);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-start);
}

/* --- Cart Page Item Card --- */
.cart-item-card {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-light);
}

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

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

/* Responsive cart card stacking on phones */
@media (max-width: 480px) {
  .cart-item-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding: 1rem !important;
  }
  
  .cart-item-info {
    width: 100% !important;
  }

  .cart-item-actions {
    width: 100% !important;
    justify-content: space-between !important;
    border-top: 1px solid var(--border-light) !important;
    padding-top: 0.75rem !important;
    flex-shrink: 0 !important;
  }
}




