﻿/* ApexMotors Luxury Mobile-App UI & Minimalist Picture Ratio Design */
:root {
  --bg-app: #080c14;
  --bg-surface: #101624;
  --bg-card: rgba(19, 27, 43, 0.85);
  --bg-card-hover: rgba(28, 38, 60, 0.95);
  --bg-bottom-bar: rgba(10, 15, 26, 0.92);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #00e5ff;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dim: #64748b;
  
  --accent-cyan: #00e5ff;
  --accent-cyan-glow: rgba(0, 229, 255, 0.35);
  --accent-amber: #ff9100;
  --accent-gold: #eab308;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-blue: #3b82f6;

  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-sheet: 0 -10px 40px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 20px var(--accent-cyan-glow);
  
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-sheet: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-app: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --bg-bottom-bar: rgba(255, 255, 255, 0.94);
  --border-color: rgba(0, 0, 0, 0.08);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.06);
  --shadow-sheet: 0 -10px 30px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 84px; /* Space for mobile bottom bar */
  overflow-x: hidden;
  user-select: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; color: inherit; }

/* Mobile App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-bottom-bar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #00e5ff 0%, #0066ff 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

.app-brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.app-brand-name span {
  background: linear-gradient(135deg, #00e5ff, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.app-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition-fast);
}

.app-action-btn:active {
  transform: scale(0.92);
}

.app-badge-pill {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--accent-rose);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Horizontal Category Navigation Strip */
.category-strip {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
}
.category-strip::-webkit-scrollbar { display: none; }

.cat-pill {
  scroll-snap-align: start;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.cat-pill:active { transform: scale(0.95); }

.cat-pill.active {
  background: var(--accent-cyan);
  color: #000;
  font-weight: 700;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

/* Container */
.app-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 18px;
}

/* App Section Titles */
.section-head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 14px;
}

.section-head-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-head-count {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Minimalist Picture Ratio Vehicle Cards */
.compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

.compact-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-card);
}

.compact-card:hover {
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 6px 24px rgba(0, 229, 255, 0.12);
}

.compact-card:active {
  transform: scale(0.99);
}

/* Minimal Image Aspect Ratio (16:9 / max 135px height) */
.compact-media {
  position: relative;
  width: 100%;
  height: 135px; /* Minimal height */
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.4) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compact-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.compact-card:hover .compact-img {
  transform: scale(1.05);
}

.compact-badge-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
}

.badge-mini {
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.badge-mini-cyan { background: rgba(0, 229, 255, 0.2); color: var(--accent-cyan); border: 1px solid rgba(0, 229, 255, 0.4); }
.badge-mini-rose { background: rgba(244, 63, 94, 0.2); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.4); }
.badge-mini-amber { background: rgba(255, 145, 0, 0.2); color: var(--accent-amber); border: 1px solid rgba(255, 145, 0, 0.4); }
.badge-mini-gold { background: rgba(234, 179, 8, 0.2); color: var(--accent-gold); border: 1px solid rgba(234, 179, 8, 0.4); }

.compact-heart-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.compact-heart-btn:active { transform: scale(1.2); }
.compact-heart-btn.active { color: var(--accent-rose); background: rgba(244, 63, 94, 0.25); }

.compact-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.compact-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.compact-brand {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}

.compact-rating {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.compact-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 2px 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Micro Spec Chips */
.micro-specs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.micro-chip {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-xs);
  padding: 4px 6px;
  text-align: center;
}

.micro-chip-label { font-size: 0.62rem; color: var(--text-dim); text-transform: uppercase; }
.micro-chip-val { font-size: 0.78rem; font-weight: 700; color: var(--text-main); }

/* Compact Footer & Price */
.compact-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.compact-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.compact-unit {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.btn-app-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #00e5ff 0%, #0077ff 100%);
  color: #050b14;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-app-sm:active { transform: scale(0.95); }

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  background: var(--bg-bottom-bar);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 64px;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: var(--shadow-sheet);
}

.bottom-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  flex: 1;
}

.bottom-tab-btn:active { transform: scale(0.9); }

.bottom-tab-btn.active {
  color: var(--accent-cyan);
  font-weight: 700;
}

.bottom-tab-btn.active svg {
  stroke: var(--accent-cyan);
  filter: drop-shadow(0 0 6px var(--accent-cyan-glow));
}

/* Mobile Bottom Sheet (Modal Drawers) */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-sheet);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bottom-sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-height: 88vh;
  overflow-y: auto;
  padding: 12px 20px 32px;
  box-shadow: var(--shadow-sheet);
  transform: translateY(100%);
  transition: transform var(--transition-sheet);
  position: relative;
}

.bottom-sheet-overlay.open .bottom-sheet {
  transform: translateY(0);
}

.sheet-grab-bar {
  width: 44px;
  height: 5px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  margin: 0 auto 16px;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Form Controls */
.app-form-group {
  margin-bottom: 12px;
}

.app-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  display: block;
}

.app-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--text-main);
  outline: none;
}

.app-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
}

/* Button Full */
.btn-app-full {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #00e5ff 0%, #0077ff 100%);
  color: #050b14;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.btn-app-full:active { transform: scale(0.98); }
