/* ============================================
   ILORIN CARS - Main Stylesheet
   Premium Automobile Dealership
   ============================================ */

/* ---- CSS Variables ---- */
:root {
  --black: #0d0d0d;
  --black-soft: #1a1a1a;
  --white: #ffffff;
  --silver: #c0c0c0;
  --silver-light: #e8e8e8;
  --silver-dark: #8a8a8a;
  --dark-gray: #222222;
  --dark-gray-soft: #2a2a2a;
  --accent-blue: #2d7ff9;
  --accent-blue-hover: #1a6ae0;
  --accent-blue-light: rgba(45, 127, 249, 0.1);
  --accent-blue-glow: rgba(45, 127, 249, 0.3);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --gradient-primary: linear-gradient(
    135deg,
    #0d0d0d 0%,
    #1a1a2e 50%,
    #16213e 100%
  );
  --gradient-silver: linear-gradient(
    135deg,
    #c0c0c0 0%,
    #e8e8e8 50%,
    #a0a0a0 100%
  );
  --gradient-accent: linear-gradient(135deg, #2d7ff9 0%, #6366f1 100%);
  --gradient-glass: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.4);
  --shadow-blue: 0 4px 20px rgba(45, 127, 249, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.6s cubic-bezier(0.65, 0, 0.35, 1);

  --font-primary:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;

  --sidebar-width: 320px;
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background-color: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body.light-mode {
  --black: #ffffff;
  --black-soft: #f5f5f5;
  --white: #0d0d0d;
  --silver: #666666;
  --silver-light: #e0e0e0;
  --silver-dark: #999999;
  --dark-gray: #f0f0f0;
  --dark-gray-soft: #e8e8e8;
  background-color: #fafafa;
  color: #1a1a1a;
}

body.light-mode .glass-card,
body.light-mode .skeleton-card,
body.light-mode .empty-state {
  background: #f3f5f8;
  border-color: rgba(13, 13, 13, 0.1);
  box-shadow: 0 12px 32px rgba(13, 13, 13, 0.08);
}

body.light-mode .form-input,
body.light-mode select,
body.light-mode textarea,
body.light-mode input {
  background-color: #eef1f5;
  border-color: rgba(13, 13, 13, 0.14);
  color: #0d0d0d;
}

body.light-mode .form-input:focus,
body.light-mode select:focus,
body.light-mode textarea:focus,
body.light-mode input:focus {
  background-color: #ffffff;
  border-color: var(--accent-blue);
}

body.light-mode .btn-outline,
body.light-mode .btn-white {
  background: #edf1f6;
  border-color: rgba(45, 127, 249, 0.55);
  color: var(--accent-blue);
}

body.light-mode .btn-white:hover,
body.light-mode .btn-outline:hover {
  background: var(--accent-blue);
  color: #ffffff;
}

::selection {
  background: var(--accent-blue);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--black-soft);
}

::-webkit-scrollbar-thumb {
  background: var(--silver-dark);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--silver);
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}
h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}
h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}
h4 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-blue-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---- Utility Classes ---- */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header .section-subtitle {
  display: inline-block;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent-blue);
  margin-bottom: 12px;
  font-weight: 600;
}

.section-header .section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 16px;
}

.section-header .section-desc {
  font-size: 1.1rem;
  color: var(--silver);
  max-width: 600px;
  margin: 0 auto;
}

.glass-card {
  background: rgba(34, 34, 34, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
}

.silver-text {
  background: var(--gradient-silver);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0.5px;
  font-family: var(--font-primary);
}

.btn-primary {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(45, 127, 249, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent-blue);
  color: var(--accent-blue);
}

.btn-outline:hover {
  background: var(--accent-blue);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--black);
}

.btn-white:hover {
  background: var(--silver-light);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.1rem;
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--silver);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px 16px;
}

.btn-link:hover {
  color: var(--accent-blue);
}

.btn-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn.loading .btn-text {
  visibility: hidden;
}

.btn.loading .btn-loader {
  display: block;
  position: absolute;
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-available {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-reserved {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-sold {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-new {
  background: rgba(45, 127, 249, 0.2);
  color: var(--accent-blue);
  border: 1px solid rgba(45, 127, 249, 0.3);
}

/* ---- Preloader ---- */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--black);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity var(--transition-smooth),
    visibility var(--transition-smooth);
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  text-align: center;
}

.preloader-logo {
  width: 120px;
  margin-bottom: 32px;
  animation: pulse 2s ease-in-out infinite;
}

.preloader-bar {
  width: 200px;
  height: 3px;
  background: var(--dark-gray);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.preloader-progress {
  width: 0%;
  height: 100%;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  animation: progressLoad 1.5s ease-in-out forwards;
}

/* ---- Login Page ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px;
}

.login-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.login-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(13, 13, 13, 0.92) 0%,
    rgba(26, 26, 46, 0.85) 50%,
    rgba(22, 33, 62, 0.9) 100%
  );
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
}

.login-card {
  padding: 48px 40px;
  animation: fadeInUp 0.6s ease-out;
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.logo-container {
  margin-bottom: 24px;
}

.login-logo {
  width: 100px;
  margin: 0 auto;
  filter: brightness(1.2);
}

.login-title {
  font-size: 2rem;
  margin-bottom: 8px;
  font-family: var(--font-display);
}

.login-subtitle {
  color: var(--silver);
  font-size: 0.95rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--silver-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-blue);
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--accent-blue-light);
  background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
  color: var(--silver-dark);
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--silver);
  cursor: pointer;
  padding: 4px;
}

.password-toggle .eye-icon {
  width: 20px;
  height: 20px;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--silver);
  font-size: 0.85rem;
}

.checkbox-label input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--silver-dark);
  border-radius: 4px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-label input:checked + .checkmark {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.checkbox-label input:checked + .checkmark::after {
  content: "";
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.forgot-password {
  color: var(--accent-blue);
  font-size: 0.85rem;
  font-weight: 500;
}

.form-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: none;
}

.form-error.show {
  display: block;
  animation: shake 0.4s ease;
}

.form-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: none;
}

.form-success.show {
  display: block;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-login {
  width: 100%;
  padding: 16px;
  font-size: 1.05rem;
  margin-top: 8px;
  position: relative;
}

.login-divider {
  display: flex;
  align-items: center;
  margin: 28px 0;
  color: var(--silver-dark);
  font-size: 0.85rem;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.login-divider span {
  padding: 0 16px;
}

.login-footer {
  text-align: center;
}

.login-footer p {
  color: var(--silver);
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.login-footer .btn {
  width: 100%;
}

/* ---- Particles ---- */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent-blue);
  border-radius: 50%;
  animation: floatUp linear infinite;
  opacity: 0;
}

/* ---- Scroll to Top ---- */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-blue);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(45, 127, 249, 0.5);
}

.scroll-to-top svg {
  width: 20px;
  height: 20px;
}

/* ---- Floating WhatsApp ---- */
.floating-whatsapp {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all var(--transition-normal);
  animation: pulse-green 2s ease-in-out infinite;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp svg {
  width: 28px;
  height: 28px;
}

/* ---- Theme Toggle ---- */
.theme-toggle {
  background: transparent;
  border: 2px solid var(--silver-dark);
  color: var(--silver);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* ---- Toast Notifications ---- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 280px;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation:
    slideInRight 0.3s ease-out,
    fadeOut 0.3s ease-out 2.7s forwards;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-success {
  background: #10b981;
}
.toast-error {
  background: #ef4444;
}
.toast-warning {
  background: #f59e0b;
}
.toast-info {
  background: #3b82f6;
}

/* ---- Skeleton Loader ---- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--dark-gray) 25%,
    var(--dark-gray-soft) 50%,
    var(--dark-gray) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-img {
  height: 200px;
  border-radius: var(--radius-md);
}

.skeleton-card {
  padding: 20px;
  border-radius: var(--radius-lg);
}

/* ---- Custom 404 ---- */
.not-found-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.not-found-code {
  font-size: 10rem;
  font-weight: 900;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.not-found-title {
  font-size: 2rem;
  margin: 20px 0;
}

.not-found-desc {
  color: var(--silver);
  margin-bottom: 32px;
  max-width: 500px;
}
