/* ============================================
   VOLTRA — Design System (Tesla-inspired)
   ============================================ */

/* ===== Reset & Base ===== */
*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Colors — Tesla clean palette */
  --black: #000000;
  --white: #ffffff;
  --bg: #ffffff;
  --bg-dark: #000000;
  --surface: #f5f5f5;
  --surface-2: #e8e8e8;
  --text: #181b21;
  --text-dim: #5c5e66;
  --text-light: #ffffff;
  --text-light-dim: #a2a2a2;
  --accent: #1a73e8;
  --accent-hover: #1557b0;
  --success: #00a832;
  --warning: #f5a623;
  --error: #d32f2f;
  --border: #e0e0e0;
  --border-dark: #2a2a2a;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
  --max-width: 1280px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ===== Typography ===== */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 600; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { color: var(--text-dim); }
.section-title { text-align: center; margin-bottom: 0.5rem; }
.section-sub { text-align: center; color: var(--text-dim); font-size: 1rem; margin-bottom: 3rem; }

/* ===== Layout ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section-dark { background: var(--bg-dark); color: var(--text-light); }
.section-dark p { color: var(--text-light-dim); }

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--transition);
}
.navbar.dark {
  background: rgba(0,0,0,0.85);
  border-bottom: 1px solid var(--border-dark);
  color: var(--text-light);
}
.navbar .logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}
.navbar.dark .logo { color: var(--text-light); }
.navbar .logo span { font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: opacity var(--transition);
  opacity: 0.85;
}
.navbar.dark .nav-links a { color: var(--text-light); }
.nav-links a:hover { opacity: 1; }
.nav-toggle { display: none; font-size: 1.5rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark {
  background: var(--text);
  color: white;
}
.btn-dark:hover { opacity: 0.85; }
.btn-light {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-light:hover { background: rgba(255,255,255,0.2); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--surface); }
.btn-lg { padding: 0.85rem 2.5rem; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--bg-dark);
  color: var(--text-light);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1492144534655-ae2c143ef1ab?w=1920&q=80') center/cover;
  opacity: 0.4;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 60%, rgba(0,0,0,0.6) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 0 1.5rem; }
.hero h1 { margin-bottom: 0.5rem; }
.hero p { color: var(--text-light-dim); font-size: 1.1rem; max-width: 480px; margin: 0 auto 2rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== Feature Grid ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.feature-item {
  padding: 2.5rem 2rem;
  text-align: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.feature-item:last-child { border-right: none; }
.feature-item .icon { font-size: 2rem; margin-bottom: 1rem; display: block; }
.feature-item h3 { margin-bottom: 0.5rem; }

/* ===== Car Cards ===== */
.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.car-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}
.car-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.car-card .car-img {
  aspect-ratio: 16/10;
  background: var(--surface);
  overflow: hidden;
  position: relative;
}
.car-card .car-img img { width: 100%; height: 100%; object-fit: cover; }
.car-card .car-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--black);
  color: white;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.car-card .car-body { padding: 1.2rem; }
.car-card .car-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.25rem; }
.car-card .car-sub { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.75rem; }
.car-card .car-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.car-card .price-month { font-size: 1.1rem; font-weight: 700; }
.car-card .price-label { font-size: 0.75rem; color: var(--text-dim); }
.car-card .car-specs {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}
.car-card .car-specs span { display: flex; align-items: center; gap: 0.25rem; }

/* ===== Filters Sidebar ===== */
.filters-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  align-items: center;
}
.filter-group { display: flex; flex-direction: column; gap: 0.3rem; }
.filter-group label { font-size: 0.75rem; color: var(--text-dim); font-weight: 500; }
.filter-group select,
.filter-group input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: white;
  outline: none;
  transition: border-color var(--transition);
}
.filter-group select:focus,
.filter-group input:focus { border-color: var(--accent); }
.sort-group { margin-left: auto; }

/* ===== Car Detail Page ===== */
.car-detail { padding-top: 56px; }
.car-hero {
  background: var(--bg-dark);
  color: white;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}
.car-hero h1 { margin-bottom: 0.25rem; }
.car-hero .car-meta { color: var(--text-light-dim); font-size: 0.95rem; }
.car-gallery {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.car-gallery-main {
  aspect-ratio: 16/9;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
}
.car-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.car-gallery-thumbs { display: flex; gap: 0.5rem; overflow-x: auto; }
.car-gallery-thumbs img {
  width: 100px; height: 65px; object-fit: cover; border-radius: var(--radius-sm);
  cursor: pointer; border: 2px solid transparent; transition: border-color var(--transition);
}
.car-gallery-thumbs img.active { border-color: var(--accent); }

.car-info-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.car-specs-table { width: 100%; }
.car-specs-table .spec-row {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}
.car-specs-table .spec-label { color: var(--text-dim); }
.car-specs-table .spec-value { font-weight: 500; }

/* ===== Rental Calculator ===== */
.rental-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}
.rental-box h3 { margin-bottom: 0.25rem; }
.rental-box .rental-sub { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 1.5rem; }
.rental-box .price-display {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.rental-box .price-display .price { font-size: 2.5rem; font-weight: 700; }
.rental-box .price-display .price-label { font-size: 0.85rem; color: var(--text-dim); }
.rental-box .duration-selector { margin-bottom: 1.5rem; }
.rental-box .duration-selector label { font-size: 0.85rem; font-weight: 600; display: block; margin-bottom: 0.5rem; }
.duration-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.duration-option {
  padding: 0.6rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
  background: white;
}
.duration-option:hover { border-color: var(--accent); }
.duration-option.active { background: var(--accent); color: white; border-color: var(--accent); }
.rental-box .summary { margin-bottom: 1.5rem; }
.rental-box .summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.9rem;
}
.rental-box .summary-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}
.rental-box .deposit-info {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

/* ===== Admin Panel ===== */
.admin-page { padding-top: 56px; }
.admin-header {
  background: var(--bg-dark);
  color: white;
  padding: 2rem 1.5rem;
}
.admin-header h1 { margin-bottom: 0.25rem; }
.admin-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.admin-form {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group { margin-bottom: 1rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group .hint { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.25rem; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.admin-table th { font-weight: 600; background: var(--surface); }
.admin-table .actions { display: flex; gap: 0.5rem; }
.admin-table .btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

/* ===== How It Works ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}
.step { padding: 1rem; }
.step .step-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700;
  margin: 0 auto 1rem;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { font-size: 0.9rem; }

/* ===== Testimonials ===== */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.testimonial {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.testimonial .stars { color: #ffc107; font-size: 1rem; margin-bottom: 0.75rem; }
.testimonial .quote { font-size: 0.95rem; color: var(--text); margin-bottom: 1rem; line-height: 1.6; }
.testimonial .author { font-size: 0.85rem; font-weight: 600; }
.testimonial .author-sub { font-size: 0.8rem; color: var(--text-dim); }

/* ===== Video Section ===== */
.video-section {
  position: relative;
  height: 60vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: black;
}
.video-section video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
}
.video-section .video-overlay {
  position: relative;
  z-index: 2;
  color: white;
  padding: 0 1.5rem;
}
.video-section .video-overlay h2 { margin-bottom: 0.5rem; }
.video-section .video-overlay p { color: var(--text-light-dim); }

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 3rem 1.5rem 2rem;
}
.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 { margin-bottom: 1rem; font-size: 0.85rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--text-light-dim); font-size: 0.85rem; }
.footer-col a:hover { color: white; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-dark);
  font-size: 0.8rem;
  color: var(--text-light-dim);
}

/* ===== Badges & Pills ===== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-available { background: rgba(0,168,50,0.1); color: var(--success); }
.badge-rented { background: rgba(245,166,35,0.1); color: var(--warning); }
.badge-premium { background: rgba(26,115,232,0.1); color: var(--accent); }

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
}
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { margin-bottom: 0.5rem; }
.empty-state p { margin-bottom: 1.5rem; }

/* ===== Modal / Payment ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.5rem;
}
.modal-overlay.active { display: flex; }
.modal {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 2rem;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h3 { margin-bottom: 0.5rem; }
.modal .modal-sub { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 1.5rem; }
.modal .payment-summary {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.modal .payment-summary .row {
  display: flex; justify-content: space-between; padding: 0.3rem 0; font-size: 0.9rem;
}
.modal .payment-summary .row.total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.5rem; }
.modal .crypto-info {
  background: linear-gradient(135deg, #f7931a15, #62759815);
  border: 1px solid rgba(247,147,26,0.2);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.modal .crypto-info .crypto-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.modal .crypto-info p { font-size: 0.85rem; margin: 0; }

/* ===== Alerts ===== */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.alert-success { background: rgba(0,168,50,0.1); color: var(--success); }
.alert-error { background: rgba(211,47,47,0.1); color: var(--error); }
.alert-info { background: rgba(26,115,232,0.1); color: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .car-info-grid { grid-template-columns: 1fr; }
  .rental-box { position: static; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }
  .navbar.dark .nav-links.open { background: var(--bg-dark); }
  .nav-links.open a { color: var(--text); }
  .navbar.dark .nav-links.open a { color: var(--text-light); }
  .form-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .duration-options { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 2rem; }
  .section { padding: 2.5rem 0; }
}
@media (max-width: 480px) {
  .duration-options { grid-template-columns: repeat(2, 1fr); }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .sort-group { margin-left: 0; }
}
