/* ═══════════════════════════════════════════════════════════════
   RedLineCAD — Stores Hub Stylesheet
   Dark theme, blue accent (#3b82f6), universal economy marketplace
   ═══════════════════════════════════════════════════════════════ */

/* ── Root layout ─────────────────────────────────────────────── */
.sh-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #0a0a0f;
  color: #e2e8f0;
  font-family: 'Rajdhani', 'Segoe UI', sans-serif;
  overflow: hidden;
}

/* ── Top Bar ─────────────────────────────────────────────────── */
.sh-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: #0d0d14;
  border-bottom: 1px solid #1e2030;
  flex-shrink: 0;
}
.sh-topbar-left { flex: 0 0 auto; }
.sh-topbar-center { flex: 1; max-width: 480px; margin: 0 auto; }
.sh-topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.sh-logo { display: flex; align-items: center; gap: 10px; }
.sh-logo-icon { font-size: 32px; }
.sh-logo-title { font-size: 22px; font-weight: 700; letter-spacing: 2px; color: #e2e8f0; }
.sh-logo-title span { color: #3b82f6; }
.sh-logo-sub { font-size: 9px; letter-spacing: 2px; color: #64748b; }

.sh-search-wrap { display: flex; align-items: center; background: #13131f; border: 1px solid #2d3148; border-radius: 4px; overflow: hidden; }
.sh-search { flex: 1; background: transparent; border: none; outline: none; color: #e2e8f0; padding: 8px 12px; font-size: 13px; }
.sh-search::placeholder { color: #4a5568; }
.sh-search-btn { background: transparent; border: none; color: #64748b; padding: 8px 12px; cursor: pointer; font-size: 14px; }
.sh-search-btn:hover { color: #3b82f6; }

.sh-wallet { text-align: right; }
.sh-wallet-label { font-size: 9px; letter-spacing: 1px; color: #64748b; }
.sh-wallet-amount { font-size: 16px; font-weight: 700; color: #22c55e; }

.sh-icon-btn { position: relative; background: #13131f; border: 1px solid #2d3148; border-radius: 4px; color: #94a3b8; padding: 7px 10px; cursor: pointer; font-size: 16px; transition: border-color 0.2s; }
.sh-icon-btn:hover { border-color: #3b82f6; color: #e2e8f0; }
.sh-badge { position: absolute; top: -6px; right: -6px; background: #3b82f6; color: #fff; font-size: 9px; font-weight: 700; border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }

.sh-user-chip { display: flex; align-items: center; gap: 8px; background: #13131f; border: 1px solid #2d3148; border-radius: 4px; padding: 6px 10px; cursor: pointer; }
.sh-user-avatar { width: 28px; height: 28px; background: #3b82f6; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.sh-user-name { font-size: 12px; font-weight: 600; }
.sh-user-id { font-size: 10px; color: #64748b; }

/* ── Tab Bar ─────────────────────────────────────────────────── */
.sh-tabs {
  display: flex;
  gap: 0;
  background: #0d0d14;
  border-bottom: 1px solid #1e2030;
  padding: 0 20px;
  flex-shrink: 0;
  overflow-x: auto;
}
.sh-tabs::-webkit-scrollbar { height: 3px; }
.sh-tabs::-webkit-scrollbar-thumb { background: #2d3148; }

.sh-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #64748b;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.sh-tab:hover { color: #94a3b8; }
.sh-tab-active { color: #e2e8f0; border-bottom-color: #3b82f6; }

/* ── Body ────────────────────────────────────────────────────── */
.sh-body {
  display: flex;
  gap: 16px;
  flex: 1;
  overflow: hidden;
  padding: 16px 20px;
}
.sh-main { flex: 1; overflow-y: auto; padding-right: 8px; }
.sh-main::-webkit-scrollbar { width: 4px; }
.sh-main::-webkit-scrollbar-thumb { background: #2d3148; border-radius: 2px; }
.sh-right { width: 300px; flex-shrink: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.sh-right::-webkit-scrollbar { width: 4px; }
.sh-right::-webkit-scrollbar-thumb { background: #2d3148; border-radius: 2px; }

/* ── Section header ──────────────────────────────────────────── */
.sh-section-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #94a3b8;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sh-view-all { font-size: 10px; color: #3b82f6; cursor: pointer; letter-spacing: 1px; }
.sh-view-all:hover { text-decoration: underline; }

/* ── Hero Banner ─────────────────────────────────────────────── */
.sh-hero {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.sh-hero-left { flex: 1; }
.sh-hero-right { width: 200px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; justify-content: center; }

.sh-hero-img {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #533483 100%);
  border-radius: 6px;
  height: 160px;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid #2d3148;
}
.sh-hero-img::before {
  content: '🌆';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 80px;
  opacity: 0.3;
}
.sh-hero-overlay h2 { font-size: 20px; font-weight: 800; letter-spacing: 1px; margin: 0 0 6px 0; line-height: 1.2; }
.sh-hero-overlay p { font-size: 11px; color: #94a3b8; margin: 0 0 12px 0; line-height: 1.5; }
.sh-hero-btn { background: #3b82f6; border: none; color: #fff; padding: 8px 16px; font-size: 11px; font-weight: 700; letter-spacing: 2px; cursor: pointer; border-radius: 3px; }
.sh-hero-btn:hover { background: #2563eb; }

.sh-trust-item { display: flex; align-items: center; gap: 10px; background: #13131f; border: 1px solid #2d3148; border-radius: 4px; padding: 10px 12px; }
.sh-trust-icon { font-size: 20px; color: #3b82f6; }
.sh-trust-item strong { font-size: 11px; letter-spacing: 1px; display: block; }
.sh-trust-item div div { font-size: 10px; color: #64748b; }

/* ── Category Grid ───────────────────────────────────────────── */
.sh-cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.sh-cat-card {
  background: #13131f;
  border: 1px solid #2d3148;
  border-radius: 6px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.sh-cat-card:hover { border-color: #3b82f6; background: #1a1a2e; }
.sh-cat-icon { font-size: 28px; margin-bottom: 6px; }
.sh-cat-name { font-size: 11px; font-weight: 700; letter-spacing: 1px; margin-bottom: 4px; }
.sh-cat-sub { font-size: 9px; color: #64748b; line-height: 1.4; margin-bottom: 6px; }
.sh-cat-count { font-size: 9px; color: #3b82f6; font-weight: 600; }

/* ── Items Grid ──────────────────────────────────────────────── */
.sh-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.sh-item-card {
  background: #13131f;
  border: 1px solid #2d3148;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s, transform 0.15s;
}
.sh-item-card:hover { border-color: #3b82f6; transform: translateY(-2px); }

.sh-card-img {
  height: 100px;
  background: linear-gradient(135deg, #1a1a2e, #0f3460);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.sh-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid;
}
.sh-card-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #94a3b8;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sh-card-fav:hover { color: #ef4444; }

.sh-card-body { padding: 10px; }
.sh-card-name { font-size: 12px; font-weight: 700; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-card-sub { font-size: 10px; color: #64748b; margin-bottom: 6px; }
.sh-card-price { font-size: 15px; font-weight: 700; color: #22c55e; margin-bottom: 4px; }
.sh-card-original { font-size: 11px; color: #64748b; text-decoration: line-through; margin-left: 6px; }
.sh-card-meta { font-size: 9px; color: #64748b; margin-bottom: 8px; }
.sh-card-actions { display: flex; gap: 6px; }
.sh-btn-detail { flex: 1; background: transparent; border: 1px solid #2d3148; color: #94a3b8; padding: 5px 8px; font-size: 9px; font-weight: 700; letter-spacing: 1px; cursor: pointer; border-radius: 3px; transition: border-color 0.2s; }
.sh-btn-detail:hover { border-color: #3b82f6; color: #3b82f6; }
.sh-btn-cart { background: #3b82f6; border: none; color: #fff; padding: 5px 8px; font-size: 9px; font-weight: 700; letter-spacing: 1px; cursor: pointer; border-radius: 3px; white-space: nowrap; }
.sh-btn-cart:hover { background: #2563eb; }
.sh-btn-cart-added { background: #22c55e; }

/* ── Right Panels ────────────────────────────────────────────── */
.sh-panel {
  background: #13131f;
  border: 1px solid #2d3148;
  border-radius: 6px;
  padding: 12px;
}
.sh-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1e2030;
}
.sh-panel-count { color: #3b82f6; }
.sh-view-all-sm { font-size: 9px; color: #3b82f6; cursor: pointer; }
.sh-view-all-sm:hover { text-decoration: underline; }

/* Cart */
.sh-cart-items { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; }
.sh-cart-items::-webkit-scrollbar { width: 3px; }
.sh-cart-items::-webkit-scrollbar-thumb { background: #2d3148; }
.sh-empty-cart { font-size: 11px; color: #4a5568; text-align: center; padding: 12px 0; }
.sh-cart-item { display: flex; align-items: center; gap: 8px; }
.sh-cart-item-img { font-size: 20px; flex-shrink: 0; }
.sh-cart-item-info { flex: 1; min-width: 0; }
.sh-cart-item-name { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-cart-item-sub { font-size: 9px; color: #64748b; }
.sh-cart-item-price { font-size: 11px; font-weight: 700; color: #22c55e; white-space: nowrap; }
.sh-cart-remove { background: transparent; border: none; color: #4a5568; cursor: pointer; font-size: 11px; padding: 2px 4px; }
.sh-cart-remove:hover { color: #ef4444; }
.sh-cart-total { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 8px; padding-top: 8px; border-top: 1px solid #1e2030; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.sh-cart-total-amount { font-size: 16px; color: #22c55e; }
.sh-checkout-btn { width: 100%; background: #3b82f6; border: none; color: #fff; padding: 10px; font-size: 11px; font-weight: 700; letter-spacing: 1px; cursor: pointer; border-radius: 4px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.sh-checkout-btn:hover { background: #2563eb; }

/* Popular */
.sh-popular-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #1a1a2a; }
.sh-popular-item:last-child { border-bottom: none; }
.sh-popular-img { font-size: 22px; flex-shrink: 0; }
.sh-popular-info { flex: 1; min-width: 0; }
.sh-popular-name { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-popular-sub { font-size: 9px; color: #64748b; }
.sh-popular-price { font-size: 11px; font-weight: 700; color: #22c55e; white-space: nowrap; }

/* Daily Deal */
.sh-deal-panel { border-color: #f59e0b44; }
.sh-deal-countdown { font-size: 9px; color: #f59e0b; font-weight: 700; letter-spacing: 1px; }
.sh-deal-item { display: flex; align-items: center; gap: 10px; }
.sh-deal-img { font-size: 32px; }
.sh-deal-info { flex: 1; }
.sh-deal-name { font-size: 12px; font-weight: 700; }
.sh-deal-sub { font-size: 10px; color: #64748b; margin-bottom: 4px; }
.sh-deal-prices { display: flex; align-items: center; gap: 6px; }
.sh-deal-price { font-size: 13px; font-weight: 700; color: #22c55e; }
.sh-deal-original { font-size: 10px; color: #64748b; text-decoration: line-through; }
.sh-deal-badge { background: #ef4444; color: #fff; font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 2px; }

/* Recently Viewed */
.sh-recent-strip { display: flex; gap: 6px; }
.sh-recent-thumb { width: 44px; height: 44px; background: linear-gradient(135deg, #1a1a2e, #0f3460); border: 1px solid #2d3148; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; }
.sh-recent-thumb:hover { border-color: #3b82f6; }


/* ── Status Bar ──────────────────────────────────────────────── */
.sh-statusbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 20px;
  background: #0d0d14;
  border-top: 1px solid #1e2030;
  flex-shrink: 0;
}
.sh-status-item { display: flex; align-items: center; gap: 8px; font-size: 10px; }
.sh-status-item span { color: #4a5568; letter-spacing: 1px; font-size: 9px; display: block; }
.sh-status-item strong { font-size: 10px; font-weight: 600; display: block; }

/* ── Modal ───────────────────────────────────────────────────── */
.sh-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.sh-modal { background: #13131f; border: 1px solid #2d3148; border-radius: 8px; padding: 20px; width: 340px; }
.sh-modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.sh-modal-title { font-size: 16px; font-weight: 700; }
.sh-modal-sub { font-size: 11px; color: #64748b; }
.sh-modal-close { background: transparent; border: none; color: #64748b; font-size: 16px; cursor: pointer; }
.sh-modal-close:hover { color: #ef4444; }
.sh-modal-img { font-size: 64px; text-align: center; padding: 20px; background: linear-gradient(135deg, #1a1a2e, #0f3460); border-radius: 6px; margin-bottom: 12px; }
.sh-modal-price { font-size: 22px; font-weight: 700; color: #22c55e; text-align: center; margin-bottom: 4px; }
.sh-modal-original { font-size: 12px; color: #64748b; text-decoration: line-through; text-align: center; margin-bottom: 12px; }
.sh-modal-actions { display: flex; gap: 8px; }

/* ── Toast ───────────────────────────────────────────────────── */
.sh-toast { position: fixed; bottom: 60px; right: 20px; background: #1e2030; border: 1px solid #3b82f6; color: #e2e8f0; padding: 10px 16px; border-radius: 4px; font-size: 12px; z-index: 10000; opacity: 0; transform: translateY(10px); transition: opacity 0.3s, transform 0.3s; }
.sh-toast-show { opacity: 1; transform: translateY(0); }

/* ── Empty state ─────────────────────────────────────────────── */
.sh-empty-state { text-align: center; padding: 40px; color: #4a5568; font-size: 13px; }
