@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700;800&family=DM+Serif+Display&display=swap');

:root {
  --orange: #ff6b00;
  --orange-light: #fff3eb;
  --orange-dark: #e05500;
  --green: #00a651;
  --green-light: #e8f8f0;
  --bg: #f4f5f7;
  --white: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.07);
  --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.13);
  --radius: 12px;
  --radius-lg: 20px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 72px;
  font-size: 15px;
}

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

/* ── HEADER ─────────────────────────────── */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: var(--text);
  flex-shrink: 0;
}
.logo span { color: var(--orange); }

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 40px;
  overflow: hidden;
  background: #f9fafb;
  transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--orange); background: white; }

.search-bar select {
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  outline: none;
  cursor: pointer;
}
.search-bar input {
  border: none;
  background: transparent;
  padding: 10px 14px;
  flex: 1;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.search-bar button {
  background: var(--orange);
  border: none;
  color: white;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s;
}
.search-bar button:hover { background: var(--orange-dark); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  background: #f9fafb;
  border: 1px solid var(--border);
  font-size: 16px;
  transition: all 0.2s;
  cursor: pointer;
}
.icon-btn:hover { color: var(--orange); border-color: var(--orange); }

.sell-btn {
  background: var(--orange);
  color: white;
  padding: 10px 20px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; gap: 6px;
  transition: background 0.2s, transform 0.1s;
  border: none; cursor: pointer;
}
.sell-btn:hover { background: var(--orange-dark); transform: translateY(-1px); }

/* ── BOTTOM NAV ─────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  gap: 4px;
  cursor: pointer;
  transition: color 0.2s;
}
.nav-item i { font-size: 20px; }
.nav-item.active { color: var(--orange); }
.nav-item:hover { color: var(--orange); }

.nav-sell .nav-sell-btn {
  background: var(--orange);
  color: white;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-top: -20px;
  box-shadow: 0 4px 14px rgba(255,107,0,0.4);
}

/* ── HERO BANNER ────────────────────────── */
.hero-banner {
  background: linear-gradient(135deg, #ff6b00 0%, #ff9a3c 100%);
  padding: 22px 16px 28px;
  text-align: center;
  color: white;
}
.hero-banner h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  margin-bottom: 14px;
}
.hero-search {
  display: flex;
  background: white;
  border-radius: 40px;
  overflow: hidden;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.hero-search select {
  padding: 13px 14px;
  border: none; outline: none;
  font-size: 13px; font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border-right: 1px solid #f0f0f0;
}
.hero-search input {
  flex: 1;
  padding: 13px 16px;
  border: none; outline: none;
  font-size: 14px; font-family: inherit;
}
.hero-search button {
  background: var(--orange);
  color: white; border: none;
  padding: 13px 22px;
  font-weight: 700; font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

/* ── SECTION ────────────────────────────── */
.section { padding: 20px 16px; max-width: 960px; margin: 0 auto; }
.section-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-title a {
  font-size: 13px;
  color: var(--orange);
  font-weight: 600;
}

/* ── CATEGORIES ─────────────────────────── */
.categories-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }

.cat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 40px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
}
.cat-chip:hover, .cat-chip.active {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
}
.cat-chip span { font-size: 16px; }

/* ── PRODUCT GRID ───────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.product-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.product-img {
  height: 148px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  position: relative;
  overflow: hidden;
}
.product-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.product-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--orange);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}
.save-btn {
  position: absolute;
  top: 8px; right: 8px;
  background: white;
  border: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  color: var(--text-muted);
  transition: color 0.2s;
}
.save-btn:hover, .save-btn.saved { color: var(--orange); }

.product-info { padding: 10px 12px 12px; }
.product-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.product-price {
  color: var(--orange);
  font-weight: 800;
  font-size: 15px;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── FORMS ──────────────────────────────── */
.page-header {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.back-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  font-size: 15px;
}
.page-header h1 { font-size: 17px; font-weight: 700; }

.form-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px;
}
.form-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.form-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  background: white;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.08);
}

.btn-primary {
  width: 100%;
  background: var(--orange);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 40px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-outline {
  background: white;
  color: var(--orange);
  border: 2px solid var(--orange);
  padding: 13px;
  border-radius: 40px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}
.btn-outline:hover { background: var(--orange-light); }

/* ── ALERTS ─────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
  font-weight: 500;
}
.alert-success { background: var(--green-light); color: #065f46; display: block; }
.alert-error { background: #fef2f2; color: #dc2626; display: block; }
.alert-info { background: #eff6ff; color: #1d4ed8; display: block; }

/* ── STATUS BADGES ──────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-pending { background: #fef3c7; color: #b45309; }
.badge-approved { background: var(--green-light); color: #065f46; }
.badge-rejected { background: #fef2f2; color: #dc2626; }

/* ── LOGIN/SIGNUP ───────────────────────── */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #ff6b00 0%, #ff9a3c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  background: white;
  border-radius: 28px;
  padding: 36px 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.auth-logo {
  text-align: center;
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  margin-bottom: 6px;
}
.auth-logo span { color: var(--orange); }
.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}
.divider {
  text-align: center;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
  position: relative;
}
.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}
.divider::before { left: 0; }
.divider::after { right: 0; }

.google-btn {
  width: 100%;
  background: white;
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 12px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color 0.2s;
}
.google-btn:hover { border-color: #ccc; }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-footer a { color: var(--orange); font-weight: 600; }

/* ── PRODUCT PAGE ───────────────────────── */
.product-detail-img {
  width: 100%;
  height: 280px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  overflow: hidden;
}
.product-detail-img img { width: 100%; height: 100%; object-fit: cover; }

.product-detail-info { padding: 20px 16px; max-width: 640px; margin: 0 auto; }
.product-detail-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--orange);
  margin: 8px 0 16px;
}
.detail-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.detail-tag {
  background: var(--bg);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.detail-section {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.detail-section h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.detail-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { width: 110px; color: var(--text-muted); font-weight: 500; }

.contact-actions {
  display: flex;
  gap: 10px;
  padding: 16px;
  max-width: 640px;
  margin: 0 auto;
  position: sticky;
  bottom: 72px;
  background: var(--bg);
}

/* ── SAFETY BANNER ──────────────────────── */
.safety-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  color: #1e40af;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 12px;
}

/* ── PROFILE ────────────────────────────── */
.profile-header {
  background: linear-gradient(135deg, #ff6b00, #ff9a3c);
  padding: 30px 20px 50px;
  text-align: center;
  color: white;
}
.profile-avatar {
  width: 80px; height: 80px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin: 0 auto 12px;
  border: 3px solid rgba(255,255,255,0.5);
}
.profile-name { font-size: 20px; font-weight: 700; }
.profile-email { font-size: 13px; opacity: 0.85; margin-top: 4px; }

.profile-stats {
  display: flex;
  background: white;
  border-radius: var(--radius-lg);
  margin: -28px 16px 0;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.stat-item {
  flex: 1;
  padding: 16px 10px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 22px; font-weight: 800; color: var(--orange); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.menu-list {
  background: white;
  border-radius: var(--radius-lg);
  margin: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid #f9fafb;
  cursor: pointer;
  transition: background 0.1s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: #fafafa; }
.menu-item-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--orange-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange);
  font-size: 16px;
}
.menu-item-text { flex: 1; font-size: 14px; font-weight: 500; }
.menu-item-arrow { color: var(--text-muted); font-size: 12px; }

/* ── IMAGE UPLOAD GRID ──────────────────── */
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.img-box {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1.5px dashed var(--border);
  background: #f9fafb;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--text-muted);
}
.img-box img { width: 100%; height: 100%; object-fit: cover; }
.img-remove {
  position: absolute; top: 4px; right: 4px;
  background: rgba(220,38,38,0.9);
  color: white; border: none;
  border-radius: 4px;
  width: 20px; height: 20px;
  font-size: 11px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ── SPECS BOX ──────────────────────────── */
.specs-box {
  background: var(--orange-light);
  border: 1px solid #fcd9b0;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.specs-box h4 { font-size: 12px; font-weight: 800; color: var(--orange); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; }

/* ── EMPTY STATE ────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 52px; opacity: 0.25; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 15px; font-weight: 500; }

/* ── ADMIN ──────────────────────────────── */
.admin-header { background: #1a1a2e; color: white; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; }
.admin-header .logo { color: white; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { background: #f8fafc; font-weight: 600; text-align: left; padding: 12px 14px; border-bottom: 2px solid var(--border); }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.admin-table tr:hover td { background: #fafafa; }
.btn-approve { background: var(--green); color: white; border: none; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-reject { background: #ef4444; color: white; border: none; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-delete { background: #6b7280; color: white; border: none; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; }
.tab-bar { display: flex; gap: 4px; margin-bottom: 20px; background: #f0f2f5; border-radius: 12px; padding: 4px; }
.tab { padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-muted); transition: all 0.2s; }
.tab.active { background: white; color: var(--orange); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .image-grid { grid-template-columns: repeat(4, 1fr); }
  .header-inner { gap: 8px; }
}
/* ── Skeleton loading ─────────────────────────────────────── */
@keyframes lhSkeletonPulse {
  0%,100% { opacity:1 }
  50%      { opacity:.45 }
}
.lh-skel {
  background: #e8ecf0;
  border-radius: 8px;
  animation: lhSkeletonPulse 1.4s ease infinite;
  display: block;
}
.lh-skel-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #eef2f6;
  overflow: hidden;
}
.lh-skel-card .lh-skel-img  { height:140px; background:#e8ecf0; animation:lhSkeletonPulse 1.4s ease infinite; }
.lh-skel-card .lh-skel-body { padding:8px; }
.lh-skel-card .lh-skel-line { height:10px; border-radius:6px; margin-bottom:6px; }
.lh-skel-card .lh-skel-line.w80 { width:80%; }
.lh-skel-card .lh-skel-line.w50 { width:50%; }
.lh-skel-card .lh-skel-line.w60 { width:60%; }

/* verified badge on cards */
.verified-badge-card {
  display:inline-flex;align-items:center;justify-content:center;
  width:14px;height:14px;background:#3b82f6;color:white;
  border-radius:50%;font-size:8px;font-weight:700;
  vertical-align:middle;margin-left:3px;
  flex-shrink:0;
}
