/* ========================================
   AFRIMARKET — Design System
   ======================================== */

:root {
  --primary: #E8630A;
  --primary-dark: #C45208;
  --primary-light: #FFF3E8;
  --secondary: #1B4332;
  --secondary-light: #2D6A4F;
  --accent: #F4A261;
  --danger: #DC3545;
  --success: #198754;
  --warning: #FFC107;
  --info: #0DCAF0;
  --gray-50: #F8F9FA;
  --gray-100: #E9ECEF;
  --gray-200: #DEE2E6;
  --gray-300: #CED4DA;
  --gray-400: #ADB5BD;
  --gray-500: #6C757D;
  --gray-600: #495057;
  --gray-700: #343A40;
  --gray-800: #212529;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--gray-700);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ========================================
   UTILITIES
   ======================================== */

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.container-xs { max-width: 560px; margin: 0 auto; padding: 0 20px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }
.text-muted { color: var(--gray-500); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.w-full { width: 100%; }

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 8px 16px; font-size: 0.8125rem; }
.btn-lg { padding: 16px 32px; font-size: 1.0625rem; }

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}
.btn-secondary:hover:not(:disabled) { background: var(--secondary-light); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover:not(:disabled) { background: var(--primary); color: var(--white); }

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
}
.btn-ghost:hover:not(:disabled) { background: var(--gray-100); }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-success { background: var(--success); color: var(--white); }
.btn-white { background: var(--white); color: var(--gray-700); border-color: var(--gray-200); }
.btn-white:hover:not(:disabled) { border-color: var(--gray-400); }

.btn-icon {
  width: 40px; height: 40px; padding: 0;
  border-radius: 50%;
}

/* ========================================
   FORMS
   ======================================== */

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.form-label .required { color: var(--danger); margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  background: var(--white);
  color: var(--gray-700);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,99,10,0.12);
}
.form-input.error { border-color: var(--danger); }
.form-input.success { border-color: var(--success); }

.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.8125rem; color: var(--gray-500); margin-top: 4px; }
.form-error { font-size: 0.8125rem; color: var(--danger); margin-top: 4px; display: none; }
.form-error.visible { display: block; }

.form-check {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary);
}

/* ========================================
   CARDS
   ======================================== */

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-body { padding: 20px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  font-weight: 600;
}

/* ========================================
   NAVBAR
   ======================================== */

.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 20px;
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-brand span { color: var(--secondary); }
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.navbar-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all var(--transition);
}
.navbar-nav a:hover { color: var(--primary); background: var(--primary-light); }
.navbar-nav a.active { color: var(--primary); background: var(--primary-light); }

.navbar-actions { display: flex; align-items: center; gap: 12px; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-600);
  padding: 4px;
}

/* ========================================
   HERO
   ======================================== */

.hero {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  color: var(--white);
  padding: 80px 20px;
  text-align: center;
}
.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.hero h1 .highlight { color: var(--accent); }
.hero p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 32px;
  opacity: 0.9;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 600px;
  margin: 48px auto 0;
}
.hero-stat {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 20px;
  backdrop-filter: blur(10px);
}
.hero-stat .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}
.hero-stat .label {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-top: 4px;
}

/* ========================================
   PRODUCT GRID
   ======================================== */

.section { padding: 64px 20px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card { position: relative; }
.product-card .product-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--gray-100);
}
.product-card .product-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.product-card:hover .product-image img { transform: scale(1.05); }

.product-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--primary);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-card .card-body { padding: 16px; }
.product-card .product-name {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
.product-card .product-seller {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.product-price .current {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
}
.product-price .original {
  font-size: 0.875rem;
  color: var(--gray-400);
  text-decoration: line-through;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.8125rem;
}
.stars { color: var(--warning); }

/* ========================================
   CATEGORIES
   ======================================== */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.category-card {
  text-align: center;
  padding: 24px 16px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 2px solid var(--gray-100);
  transition: all var(--transition);
  cursor: pointer;
}
.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.category-card .icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.category-card .name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-700);
}

/* ========================================
   STEPPER (Registration)
   ======================================== */

.stepper {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
  position: relative;
}
.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  max-width: 140px;
}
.stepper-step::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.stepper-step:last-child::after { display: none; }

.stepper-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}
.stepper-label {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--gray-500);
  text-align: center;
  font-weight: 500;
}

.stepper-step.active .stepper-circle {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(232,99,10,0.2);
}
.stepper-step.active .stepper-label { color: var(--primary); font-weight: 600; }

.stepper-step.completed .stepper-circle {
  background: var(--success);
  color: var(--white);
}
.stepper-step.completed::after { background: var(--success); }
.stepper-step.completed .stepper-label { color: var(--success); }

/* ========================================
   OTP INPUT
   ======================================== */

.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}
.otp-input {
  width: 52px; height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all var(--transition);
}
.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,99,10,0.12);
}
.otp-input.filled { border-color: var(--success); background: #f0fdf4; }

.otp-timer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-500);
}
.otp-timer .countdown { font-weight: 700; color: var(--primary); }
.otp-resend {
  background: none; border: none;
  color: var(--primary); font-weight: 600;
  cursor: pointer; font-size: 0.875rem;
}
.otp-resend:disabled { color: var(--gray-400); cursor: not-allowed; }

/* ========================================
   FILE UPLOAD
   ======================================== */

.file-upload {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
}
.file-upload:hover { border-color: var(--primary); background: var(--primary-light); }
.file-upload.dragover { border-color: var(--primary); background: var(--primary-light); }
.file-upload.has-file { border-color: var(--success); border-style: solid; }

.file-upload .upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.file-upload .upload-text { font-weight: 600; color: var(--gray-700); }
.file-upload .upload-hint { font-size: 0.8125rem; color: var(--gray-500); margin-top: 4px; }

.file-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  margin-top: 12px;
}
.file-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.file-preview .file-info { flex: 1; }
.file-preview .file-name { font-weight: 600; font-size: 0.875rem; }
.file-preview .file-size { font-size: 0.75rem; color: var(--gray-500); }
.file-preview .file-remove {
  background: none; border: none; color: var(--danger);
  cursor: pointer; font-size: 1.25rem;
}

/* ========================================
   TYPE SELECTOR
   ======================================== */

.type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}
.type-option {
  padding: 24px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  background: var(--white);
}
.type-option:hover { border-color: var(--primary); }
.type-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(232,99,10,0.12);
}
.type-option .type-icon { font-size: 2.5rem; margin-bottom: 12px; }
.type-option .type-name { font-weight: 700; font-size: 1.0625rem; color: var(--gray-800); }
.type-option .type-desc { font-size: 0.8125rem; color: var(--gray-500); margin-top: 8px; line-height: 1.5; }
.type-option .type-docs {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
  text-align: left;
}
.type-option .type-docs li {
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin-bottom: 4px;
  padding-left: 20px;
  position: relative;
}
.type-option .type-docs li::before {
  content: '✓';
  position: absolute; left: 0;
  color: var(--success); font-weight: 700;
}

/* ========================================
   DASHBOARD
   ======================================== */

.dashboard { display: flex; min-height: calc(100vh - 64px); }

.sidebar {
  width: 260px;
  background: var(--white);
  border-right: 1px solid var(--gray-100);
  padding: 24px 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all var(--transition);
}
.sidebar-nav li a:hover { background: var(--gray-50); color: var(--primary); }
.sidebar-nav li a.active {
  background: var(--primary-light);
  color: var(--primary);
  border-right: 3px solid var(--primary);
  font-weight: 600;
}
.sidebar-nav .nav-icon { font-size: 1.1rem; width: 24px; text-align: center; }

.main-content {
  flex: 1;
  padding: 32px;
  max-width: calc(100% - 260px);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--gray-800); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--gray-100);
}
.stat-card .stat-label {
  font-size: 0.8125rem;
  color: var(--gray-500);
  font-weight: 500;
  margin-bottom: 8px;
}
.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-800);
}
.stat-card .stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.stat-card .stat-change.up { color: var(--success); }
.stat-card .stat-change.down { color: var(--danger); }

/* ========================================
   TABLE
   ======================================== */

.table-wrapper {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}
.table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.table-title { font-weight: 600; font-size: 1.0625rem; }

table {
  width: 100%;
  border-collapse: collapse;
}
th {
  background: var(--gray-50);
  padding: 12px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--gray-100);
}
td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-50);
  font-size: 0.9375rem;
}
tr:hover td { background: var(--gray-50); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ========================================
   PRODUCT DETAIL
   ======================================== */

.product-detail { padding: 32px 20px; }

.product-gallery {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
}
.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gallery-thumb {
  width: 80px; height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition);
}
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.gallery-main {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--gray-100);
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }

.product-info { padding: 0 0 0 32px; }
.product-info h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.3;
  margin-bottom: 12px;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.product-detail-price {
  padding: 20px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}
.product-detail-price .current-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}
.product-detail-price .original-price {
  font-size: 1.125rem;
  color: var(--gray-400);
  text-decoration: line-through;
  margin-left: 12px;
}
.product-detail-price .discount-tag {
  display: inline-block;
  background: var(--danger);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-left: 12px;
}

.variant-group { margin-bottom: 20px; }
.variant-label { font-weight: 600; font-size: 0.875rem; margin-bottom: 8px; }
.variant-options { display: flex; gap: 8px; flex-wrap: wrap; }
.variant-btn {
  padding: 8px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--transition);
}
.variant-btn:hover { border-color: var(--primary); }
.variant-btn.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  width: 44px; height: 44px;
  background: var(--gray-50);
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-600);
  transition: background var(--transition);
}
.qty-btn:hover { background: var(--gray-200); }
.qty-value {
  width: 60px;
  text-align: center;
  font-weight: 600;
  font-size: 1.0625rem;
  border: none;
  border-left: 2px solid var(--gray-200);
  border-right: 2px solid var(--gray-200);
  outline: none;
  height: 44px;
}

.add-to-cart-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.product-tabs { margin-top: 48px; }
.tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  gap: 0;
}
.tab-btn {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-weight: 600;
  color: var(--gray-500);
  font-size: 0.9375rem;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-panel { padding: 24px 0; }

/* Reviews */
.review-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-100);
}
.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.review-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
}
.review-author { font-weight: 600; font-size: 0.9375rem; }
.review-date { font-size: 0.8125rem; color: var(--gray-500); }
.review-text { font-size: 0.9375rem; line-height: 1.6; color: var(--gray-600); }

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state .empty-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.3; }
.empty-state .empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 8px;
}
.empty-state .empty-desc {
  font-size: 0.9375rem;
  color: var(--gray-500);
  max-width: 400px;
  margin: 0 auto;
}

/* ========================================
   ALERTS & TOASTS
   ======================================== */

.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

.toast-container {
  position: fixed;
  top: 80px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  font-size: 0.9375rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 300px;
  animation: slideIn 0.3s ease;
  border-left: 4px solid var(--gray-400);
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-info { border-left-color: var(--info); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ========================================
   MODAL
   ======================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
}
.modal-title { font-weight: 700; font-size: 1.125rem; }
.modal-close {
  background: none; border: none;
  font-size: 1.5rem; cursor: pointer;
  color: var(--gray-500);
  padding: 4px;
}
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ========================================
   RECAP (Step 6)
   ======================================== */

.recap-section {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}
.recap-section h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.recap-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.9375rem;
}
.recap-row:last-child { border-bottom: none; }
.recap-row .label { color: var(--gray-500); }
.recap-row .value { font-weight: 600; color: var(--gray-800); }

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background: var(--gray-800);
  color: var(--gray-400);
  padding: 48px 20px 24px;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { font-size: 1.25rem; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.footer-desc { font-size: 0.875rem; line-height: 1.6; }
.footer h4 { color: var(--white); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a { color: var(--gray-400); font-size: 0.875rem; }
.footer ul li a:hover { color: var(--white); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--gray-700);
  text-align: center;
  font-size: 0.8125rem;
}

/* ========================================
   LOADING SKELETON
   ======================================== */

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-title { height: 24px; width: 60%; margin-bottom: 12px; }
.skeleton-image { aspect-ratio: 1; }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .sidebar { width: 220px; }
  .main-content { max-width: calc(100% - 220px); padding: 24px; }
}

@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .navbar-nav { display: none; }
  .navbar-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--white);
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-md);
  }

  .hero { padding: 48px 20px; }
  .hero h1 { font-size: 1.75rem; }
  .hero-stats { grid-template-columns: 1fr; max-width: 200px; }

  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }

  .sidebar { display: none; }
  .main-content { max-width: 100%; padding: 16px; }
  .dashboard { flex-direction: column; }

  .stepper { gap: 0; overflow-x: auto; }
  .stepper-label { font-size: 0.625rem; }

  .type-selector { grid-template-columns: 1fr; }

  .product-gallery { grid-template-columns: 1fr; }
  .gallery-thumbs { flex-direction: row; order: 2; }
  .product-info { padding: 24px 0 0; }
  .product-detail .flex { flex-direction: column; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

  .otp-input { width: 44px; height: 52px; font-size: 1.25rem; }

  .add-to-cart-row { flex-direction: column; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
}