/* ==========================================
   AWXCHANGE DESIGN SYSTEM & STYLES
   ========================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #080C14;
  --bg-secondary: #0E1524;
  --bg-tertiary: #162035;
  --accent-cyan: #00F2FE;
  --accent-blue: #4FACFE;
  --accent-magenta: #FF2E93;
  --accent-gold: #FFB800;

  /* RGB equivalents for transparency logic */
  --accent-cyan-rgb: 0, 242, 254;
  --accent-blue-rgb: 79, 172, 254;
  --accent-magenta-rgb: 255, 46, 147;
  
  /* Status Colors */
  --status-success: #10B981;
  --status-warning: #F59E0B;
  --status-danger: #EF4444;
  --status-info: #3B82F6;

  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #8F9CAE;
  --text-muted: #64748B;
  
  /* Layout & Cards */
  --glass-bg: rgba(14, 21, 36, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(var(--accent-cyan-rgb), 0.3);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --shadow-glow: 0 0 20px rgba(var(--accent-cyan-rgb), 0.15);
  --shadow-glow-magenta: 0 0 20px rgba(var(--accent-magenta-rgb), 0.15);
  
  /* Tables */
  --table-header-bg: rgba(22, 32, 53, 0.4);
  --table-row-hover: rgba(22, 32, 53, 0.2);

  /* Toast Notifications */
  --toast-bg: rgba(14, 21, 36, 0.95);
  --toast-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);

  /* Hero Section */
  --hero-bg-gradient: linear-gradient(135deg, #0f172a 0%, #090d16 100%);
  --hero-border: 1px solid rgba(255, 255, 255, 0.05);
  --hero-title-gradient: linear-gradient(135deg, #FFFFFF 40%, var(--text-secondary) 100%);
  --hero-desc-color: var(--text-secondary);

  /* Section Titles */
  --section-title-gradient: linear-gradient(135deg, #FFF 30%, var(--text-secondary) 100%);
  --reg-title-gradient: linear-gradient(135deg, #FFF, var(--accent-cyan));

  /* Navigation Header & Branding */
  --header-bg: rgba(8, 12, 20, 0.85);
  --logo-gradient: linear-gradient(135deg, #FFF, var(--accent-cyan));

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-theme="light"] {
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F5F9;
  
  --accent-cyan: #0284C7;
  --accent-blue: #0369A1;
  --accent-magenta: #C026D3;

  /* RGB equivalents for transparency logic in light theme */
  --accent-cyan-rgb: 2, 132, 199;
  --accent-blue-rgb: 3, 105, 161;
  --accent-magenta-rgb: 192, 38, 211;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-border-hover: rgba(2, 132, 199, 0.4);
  --shadow-glow: 0 8px 24px rgba(2, 132, 199, 0.08);
  --shadow-glow-magenta: 0 8px 24px rgba(192, 38, 211, 0.08);
  
  --table-header-bg: rgba(0, 0, 0, 0.04);
  --table-row-hover: rgba(0, 0, 0, 0.02);

  --toast-bg: rgba(255, 255, 255, 0.98);
  --toast-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);

  --hero-bg-gradient: linear-gradient(135deg, #FFFFFF 0%, #F1F5F9 100%);
  --hero-border: 1px solid rgba(15, 23, 42, 0.06);
  --hero-title-gradient: linear-gradient(135deg, #0F172A 40%, var(--text-secondary) 100%);
  --hero-desc-color: #475569;

  --section-title-gradient: linear-gradient(135deg, #0F172A 30%, var(--text-secondary) 100%);
  --reg-title-gradient: linear-gradient(135deg, #0F172A, var(--accent-blue));

  --header-bg: rgba(248, 250, 252, 0.9);
  --logo-gradient: linear-gradient(135deg, #0F172A, var(--accent-blue));
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

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

/* Layout Utilities */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

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

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 12px;
  color: var(--text-primary) !important;
  background: none !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  -webkit-background-clip: initial !important;
}
.section-header p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  gap: 8px;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: var(--bg-primary);
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(var(--accent-cyan-rgb), 0.35);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-secondary);
}

.btn-text {
  background: transparent;
  color: var(--accent-cyan);
  padding: 8px 16px;
}
.btn-text:hover {
  text-decoration: underline;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-magenta), #C62176);
  color: white;
  box-shadow: var(--shadow-glow-magenta);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(var(--accent-magenta-rgb), 0.35);
}

.btn-danger-outline {
  background: transparent;
  color: var(--status-danger);
  border: 1px solid var(--status-danger);
}
.btn-danger-outline:hover {
  background: var(--status-danger);
  color: white;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.35);
}

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

/* Navigation Header */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 16px 0;
}

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

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--logo-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-icon {
  width: 32px;
  height: 32px;
  stroke: var(--accent-cyan);
  fill: none;
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(var(--accent-cyan-rgb), 0.5));
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
  white-space: nowrap;
  margin-left: 40px;
  margin-right: auto;
}

nav.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

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

nav.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -22px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* User Status Pill in Nav */
.user-status-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}

#user-role-label {
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

#header-action-container {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}
.status-indicator.online {
  background: var(--status-success);
  box-shadow: 0 0 6px var(--status-success);
}

/* Dynamic Panel Transition */
main {
  min-height: calc(100vh - 73px);
  padding-bottom: 80px;
}
.view-panel {
  display: none;
}
.view-panel.active {
  display: block;
  animation: fadeIn var(--transition-normal);
}

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

/* Cards */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 24px;
  transition: all var(--transition-normal);
}
.card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), var(--shadow-glow);
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-control {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-family);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}
.form-control:focus {
  border-color: var(--accent-cyan);
  outline: none;
  box-shadow: var(--shadow-glow);
}
.form-control::placeholder {
  color: var(--text-muted);
}
textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Custom Flags, Badges, Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-verified {
  background: rgba(255, 184, 0, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 184, 0, 0.3);
}
.badge-role {
  background: rgba(var(--accent-cyan-rgb), 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.2);
}
.badge-condition {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}
.badge-condition.new {
  background: rgba(16, 185, 129, 0.15);
  color: var(--status-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-condition.refurbished {
  background: rgba(59, 130, 246, 0.15);
  color: var(--status-info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge-condition.used {
  background: rgba(245, 158, 11, 0.15);
  color: var(--status-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.flag {
  display: inline-flex;
  font-size: 1.1rem;
  vertical-align: middle;
}

/* ==========================================
   VIEW: LANDING (HOME, ABOUT, CONTACT)
   ========================================== */

/* Hero Section */
.hero-section {
  padding: 80px 0 60px 0;
  position: relative;
  text-align: center;
  background: var(--hero-bg-gradient);
  border-radius: var(--border-radius-md);
  border: var(--hero-border);
  border-top: 2px solid var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  margin-top: 20px;
  overflow: hidden;
}

.hero-subtitle {
  color: var(--accent-cyan);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
  display: inline-block;
  background: rgba(var(--accent-cyan-rgb), 0.08);
  padding: 6px 16px;
  border-radius: 30px;
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.2);
}

.hero-title {
  font-size: 3.8rem;
  line-height: 1.15;
  margin-bottom: 24px;
  background: var(--hero-title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-title span {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.25rem;
  max-width: 760px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
  color: var(--hero-desc-color);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 800px;
  margin: 0 auto;
  gap: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 32px;
}
.hero-stat-item h3 {
  font-size: 2.2rem;
  color: var(--accent-cyan);
  margin-bottom: 4px;
}
.hero-stat-item p {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .hero-desc { font-size: 1.1rem; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; max-width: 300px; margin: 0 auto 40px auto; }
}

/* Core Value Cards */
.value-prop-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--glass-border);
}
.value-card {
  text-align: center;
}
.value-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px auto;
  background: rgba(var(--accent-cyan-rgb), 0.08);
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}
.value-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.value-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

/* About Page Panel */
.about-section {
  padding: 80px 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-visual {
  position: relative;
  height: 380px;
  background: radial-gradient(circle at 70% 30%, rgba(79, 172, 254, 0.15), transparent 70%);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.about-visual-logo {
  font-size: 4rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.02);
  user-select: none;
}
.glow-globe {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px dashed rgba(var(--accent-cyan-rgb), 0.2);
  animation: spin 30s linear infinite;
}
.glow-globe-inner {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1.5px dashed rgba(var(--accent-magenta-rgb), 0.2);
  animation: spin-reverse 20s linear infinite;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes spin-reverse { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }

.about-features {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}
.about-feat-item {
  display: flex;
  gap: 16px;
}
.about-feat-icon {
  color: var(--accent-cyan);
  flex-shrink: 0;
  margin-top: 4px;
}
.about-feat-text h4 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { height: 260px; order: -1; }
}

/* Contact Section */
.contact-section {
  padding: 80px 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}
.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.contact-item {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}
.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}
.contact-details h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.contact-details p {
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info { margin-bottom: 40px; }
}

/* ==========================================
   VIEW: REGISTRATION (BUYER & SELLER)
   ========================================== */
.reg-container {
  max-width: 550px;
  margin: 60px auto;
}
.auth-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 12px;
}
.auth-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}
.auth-tab:hover {
  color: var(--text-primary);
}
.auth-tab.active {
  color: var(--accent-cyan);
}
.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}
.reg-header {
  text-align: center;
  margin-bottom: 32px;
}
.reg-header h2 {
  font-size: 2.2rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.reg-toggle-text {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
}

/* ==========================================
   VIEW: SELLER PORTAL
   ========================================== */

/* Dashboard Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}
.stat-card.sold::after {
  background: var(--accent-magenta);
  box-shadow: 0 0 10px var(--accent-magenta);
}
.stat-card.value::after {
  background: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold);
}
.stat-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.stat-card-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

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

/* Two-column Seller View */
.seller-content-grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 32px;
}
@media (max-width: 960px) {
  .seller-content-grid { grid-template-columns: 1fr; }
}

/* Profile Info Panel */
.seller-profile-card {
  height: fit-content;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
}
.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  font-size: 1.5rem;
  font-weight: 800;
}
.profile-user-info h3 {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-item-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 0.9rem;
  border-bottom: 1px dashed var(--glass-border);
}
.profile-item-row:last-child {
  border-bottom: none;
}
.profile-item-row span:first-child {
  color: var(--text-muted);
}
.profile-item-row span:last-child {
  font-weight: 600;
}

/* Upload template and Drag-drop zone */
.template-card {
  margin-bottom: 24px;
}
.template-actions {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.upload-zone {
  border: 2px dashed var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 40px 24px;
  text-align: center;
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}
.upload-zone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(var(--accent-cyan-rgb), 0.04);
}
.upload-zone-icon {
  color: var(--text-muted);
  margin-bottom: 16px;
}
.upload-zone:hover .upload-zone-icon {
  color: var(--accent-cyan);
  transform: translateY(-2px);
  transition: transform var(--transition-fast);
}
.upload-zone p {
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.file-input {
  display: none;
}

/* Interactive inventory listing table */
.inventory-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  margin-top: 12px;
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  background: var(--glass-bg);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
table.data-table th, table.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
}
table.data-table th {
  background: var(--table-header-bg);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
table.data-table tbody tr {
  transition: background var(--transition-fast);
}
table.data-table tbody tr:hover {
  background: var(--table-row-hover);
}
table.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Action button icons */
.action-btn-group {
  display: flex;
  gap: 8px;
}
.act-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  border-radius: 4px;
  transition: all var(--transition-fast);
}
.act-btn:hover {
  color: var(--accent-cyan);
}
.act-btn.delete:hover {
  color: var(--status-danger);
}

/* Modal for listing details or adding details manually */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}
.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}
.modal-backdrop.active .modal-content {
  transform: scale(1);
}
.close-modal {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}
.close-modal:hover {
  color: var(--text-primary);
}

/* ==========================================
   VIEW: BUYER PORTAL & MARKETPLACE
   ========================================== */

/* Search bar & Advanced filters */
.filter-bar-card {
  margin-bottom: 32px;
}
.search-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr) auto;
  gap: 12px;
  align-items: center;
}
@media (max-width: 1024px) {
  .search-grid {
    grid-template-columns: 1fr 1fr;
  }
  .search-grid .btn {
    grid-column: span 2;
  }
}
@media (max-width: 580px) {
  .search-grid {
    grid-template-columns: 1fr;
  }
  .search-grid .btn {
    grid-column: span 1;
  }
}

/* Marketplace Products Layout */
.market-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

/* Product Listing Grid item */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-card-img-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.03);
}
.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform var(--transition-normal);
}
.product-card:hover .product-card-img {
  transform: scale(1.05);
  opacity: 1;
}
.product-placeholder-svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-muted);
  stroke-width: 1.5;
  fill: none;
}
.product-card-origin {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
}
.product-card-condition-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.product-card-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.product-card-meta {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.product-card-title {
  font-size: 1.15rem;
  margin-bottom: 8px;
  font-weight: 600;
  line-height: 1.3;
}
.product-card-desc {
  font-size: 0.85rem;
  margin-bottom: 16px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6em; /* locks size */
}
.product-card-seller {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--glass-border);
}
.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
.product-card-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ==========================================
   VIEW: INDIVIDUAL PRODUCT PAGE
   ========================================== */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  margin-top: 24px;
}
@media (max-width: 900px) {
  .product-detail-layout { grid-template-columns: 1fr; }
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gallery-main {
  width: 100%;
  height: 360px;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-main-placeholder {
  width: 64px;
  height: 64px;
  stroke: var(--text-muted);
}
.gallery-thumbs {
  display: flex;
  gap: 12px;
}
.gallery-thumb-item {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.6;
  transition: all var(--transition-fast);
}
.gallery-thumb-item.active, .gallery-thumb-item:hover {
  opacity: 1;
  border-color: var(--accent-cyan);
}
.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-specs {
  margin-top: 32px;
}
.product-specs h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
}
.specs-table {
  width: 100%;
  border-collapse: collapse;
}
.specs-table td {
  padding: 10px 0;
  font-size: 0.9rem;
  border-bottom: 1px dashed var(--glass-border);
}
.specs-table td:last-child {
  font-weight: 600;
  text-align: right;
}
.specs-table td:first-child {
  color: var(--text-muted);
}

.purchase-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.purchase-price-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.price-tag {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.qty-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}
.qty-input {
  width: 50px;
  height: 40px;
  border: none;
  background: var(--bg-primary);
  color: var(--text-primary);
  text-align: center;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  outline: none;
}

.seller-info-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 20px;
}
.seller-box-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.seller-box-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================
   VIEW: SHOPPING CART & CHECKOUT
   ========================================== */
.cart-checkout-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 32px;
  margin-top: 24px;
}
@media (max-width: 960px) {
  .cart-checkout-grid { grid-template-columns: 1fr; }
}

/* Cart list styling */
.cart-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cart-item {
  display: grid;
  grid-template-columns: 80px 1.5fr auto auto auto;
  gap: 20px;
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 16px;
}
.cart-item-img {
  width: 80px;
  height: 80px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item-details h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}
.cart-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.cart-item-subtotal {
  font-weight: 700;
  font-size: 1.05rem;
  min-width: 80px;
  text-align: right;
}

@media (max-width: 600px) {
  .cart-item {
    grid-template-columns: 60px 1fr;
    gap: 12px;
  }
  .cart-item-img { width: 60px; height: 60px; }
  .cart-item-details { grid-column: span 1; }
  .cart-item > *:nth-child(3),
  .cart-item > *:nth-child(4),
  .cart-item > *:nth-child(5) {
    grid-column: span 2;
    margin-top: 8px;
    justify-self: flex-start;
  }
  .cart-item-subtotal { text-align: left; }
}

/* Summary Panel */
.summary-card {
  height: fit-content;
  position: sticky;
  top: 96px;
}
.summary-title {
  font-size: 1.25rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.summary-row.total {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-cyan);
  border-top: 1px solid var(--glass-border);
  padding-top: 16px;
  margin-top: 16px;
}
.summary-row span:first-child {
  color: var(--text-secondary);
}
.summary-row.total span:first-child {
  color: var(--text-primary);
}

/* Order Confirmation Screen */
.order-success-card {
  text-align: center;
  max-width: 600px;
  margin: 60px auto;
  padding: 48px;
}
.success-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--status-success);
  margin: 0 auto 24px auto;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}
.success-icon-wrapper svg {
  width: 40px;
  height: 40px;
}
.order-success-card h2 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}
.order-number {
  font-family: monospace;
  font-size: 1.1rem;
  background: var(--bg-secondary);
  padding: 8px 16px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 24px;
  color: var(--accent-cyan);
  border: 1px solid var(--glass-border);
}

/* ==========================================
   NOTIFICATIONS / TOAST
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  width: 90%;
}
.toast {
  background: var(--toast-bg);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--border-radius-sm);
  padding: 16px 20px;
  color: var(--text-primary);
  box-shadow: var(--toast-shadow);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
}
.toast.active {
  transform: translateX(0);
}
.toast-success { border-left-color: var(--status-success); }
.toast-success .toast-icon { color: var(--status-success); }
.toast-warning { border-left-color: var(--status-warning); }
.toast-warning .toast-icon { color: var(--status-warning); }
.toast-error { border-left-color: var(--status-danger); }
.toast-error .toast-icon { color: var(--status-danger); }
.toast-info { border-left-color: var(--accent-cyan); }
.toast-info .toast-icon { color: var(--accent-blue); }
.toast-icon {
  margin-top: 2px;
  flex-shrink: 0;
  display: inline-flex;
}
.toast-content {
  flex-grow: 1;
}
.toast-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.toast-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.toast-close {
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.toast-close:hover {
  color: var(--text-primary);
}

/* Custom Grid layout for Category cards on homepage */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.category-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 24px;
  text-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
}
.category-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}
.category-card-icon {
  width: 48px;
  height: 48px;
  background: rgba(var(--accent-cyan-rgb), 0.05);
  border: 1px solid rgba(var(--accent-cyan-rgb), 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  color: var(--accent-cyan);
}
.category-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.category-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}
@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr; }
}

/* Simple visual chart */
.chart-container {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 24px;
  height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 180px;
  padding-top: 10px;
}
.chart-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}
.chart-bar {
  width: 60%;
  max-width: 40px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 4px 4px 0 0;
  min-height: 5px;
  transition: height 1s ease-out;
  position: relative;
}
.chart-bar:hover::after {
  content: attr(data-value);
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  font-weight: bold;
}
.chart-bar-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.site-footer {
  margin-top: 80px;
  padding: 40px 0;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
}
.site-footer a:hover {
  text-decoration: underline !important;
  opacity: 0.85;
}
