/* Google Font */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");

:root {
  --primary: #e67e22;
  --primary-dark: #d35400;
  --dark: #1a1a2e;
  --darker: #0f0f1e;
  --light: #f8f9fa;
  --gray: #6c757d;
  --gray-light: #e9ecef;
  --orange-glow: rgba(230, 126, 34, 0.2);
  --glass: rgba(255, 255, 255, 0.95);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: var(--light);
  color: var(--dark);
  overflow-x: hidden;
}

/* ================= HEADER ================= */
.header {
  position: sticky;
  top: 0;
  background: white;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
}

.nav {
  max-width: 1400px;
  margin: auto;
  padding: 15px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  height: 70px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.logo:hover {
  transform: scale(1.05);
}

nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

nav a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: 8px;
  position: relative;
  transition: all 0.3s ease;
}

nav a:not(.btn):hover {
  color: var(--primary);
  background: rgba(230, 126, 34, 0.05);
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--dark);
  border-radius: 3px;
  transition: 0.3s;
}

/* ================= BUTTONS ================= */
.btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 10px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px var(--orange-glow);
}

.btn:active {
  transform: translateY(-1px);
}

.btn.big {
  padding: 16px 40px;
  font-size: 16px;
  border-radius: 12px;
}

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

.btn.outline:hover {
  background: var(--primary);
  color: white;
}

/* ================= HERO ================= */
.hero {
  min-height: 60vh;
  background:
    linear-gradient(135deg, rgba(26, 26, 46, 0.85), rgba(15, 15, 30, 0.9)),
    url("https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?w=1920")
      center/cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--orange-glow), transparent);
  top: -250px;
  right: -250px;
  animation: float 20s infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(-50px, 50px) rotate(180deg);
  }
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease;
  line-height: 1.2;
}

.hero p {
  font-size: 20px;
  opacity: 0.95;
  margin-bottom: 40px;
  animation: fadeInUp 1s ease 0.2s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= SEARCH BOX ================= */
.search-box {
  background: var(--glass);
  padding: 25px;
  border-radius: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-width: 900px;
  width: 90%;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 1s ease 0.4s backwards;
}

/* LOGIN MODAL */
.login-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.login-modal.active {
  display: flex;
}

.login-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.login-popup {
  position: relative;
  background: white;
  width: 400px;
  max-width: 90%;
  padding: 40px;
  border-radius: 15px;
  z-index: 10;
  animation: popupFade 0.3s ease;
}

.login-popup h2 {
  margin-bottom: 10px;
}

.sub-text {
  color: var(--gray);
  margin-bottom: 25px;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
}

@keyframes popupFade {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.search-box select,
.search-box input {
  padding: 14px 18px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: white;
  min-width: 160px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  outline: none;
}

.search-box select:focus,
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--orange-glow);
}

.search-box button {
  min-width: 140px;
}

/* ================= SECTIONS ================= */
.section {
  padding: 100px 5%;
  text-align: center;
  max-width: 1400px;
  margin: auto;
}

.section h2 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--dark);
  position: relative;
  display: inline-block;
}

.section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 2px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--gray);
  margin-bottom: 60px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ================= CAR GRID ================= */
.cars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 35px;
  margin-top: 50px;
}

.car-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.car-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--orange-glow), transparent);
  opacity: 0;
  transition: 0.4s;
  z-index: 1;
}

.car-card:hover {
  transform: translateY(-15px);
  box-shadow: var(--shadow-lg);
}

.car-card:hover::before {
  opacity: 1;
}

.car-img {
  position: relative;
  overflow: hidden;
  height: 220px;
  background: var(--gray-light);
}

.car-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.car-card:hover .car-img img {
  transform: scale(1.15);
}

.badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--primary);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
  text-transform: uppercase;
}

.car-info {
  padding: 25px;
  position: relative;
  z-index: 2;
}

.car-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--dark);
}

.car-specs {
  display: flex;
  gap: 15px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.spec {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray);
  font-weight: 500;
}

.spec-icon {
  width: 18px;
  height: 18px;
}

.car-price {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  margin: 15px 0;
}

.car-card a {
  display: inline-block;
  margin-top: 15px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: 0.3s;
  padding: 8px 0;
}

.car-card a:hover {
  gap: 10px;
}

.car-card a::after {
  content: "→";
  margin-left: 8px;
  display: inline-block;
  transition: 0.3s;
}

.car-card a:hover::after {
  transform: translateX(5px);
}

/* ================= FEATURES ================= */
.features {
  background: linear-gradient(135deg, var(--dark), var(--darker));
  color: white;
  text-align: center;
}

.features h2::after {
  background: linear-gradient(90deg, white, var(--gray-light));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.feature-card {
  text-align: center;
  padding: 40px 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
}

.feature-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 25px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.feature-card h3 {
  font-size: 22px;
  margin-bottom: 15px;
}

.feature-card p {
  color: var(--gray-light);
  line-height: 1.6;
}

/* ================= SELL CTA ================= */
.sell-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 100px 5%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sell-cta::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
  bottom: -200px;
  left: -200px;
}

.sell-cta h2 {
  font-size: 48px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.sell-cta h2::after {
  display: none;
}

.sell-cta p {
  font-size: 20px;
  margin-bottom: 40px;
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

.sell-cta .btn {
  background: white;
  color: var(--primary);
  position: relative;
  z-index: 1;
}

.sell-cta .btn:hover {
  background: var(--light);
}

/* ================= FORMS ================= */
.sell-form,
.login-form {
  background: white;
  max-width: 500px;
  margin: 50px auto;
  padding: 45px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.sell-form {
  max-width: 1200px;
}

/* Horizontal Form Row Layout */
.form-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 0;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
  font-size: 14px;
}

.sell-form input,
.sell-form select,
.sell-form textarea,
.login-form input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 2px solid var(--gray-light);
  font-size: 15px;
  transition: all 0.3s ease;
  font-family: inherit;
  background: var(--light);
}

.sell-form input:focus,
.sell-form select:focus,
.sell-form textarea:focus,
.login-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--orange-glow);
  background: white;
}

.sell-form textarea {
  min-height: 120px;
  resize: vertical;
}

.sell-form button,
.login-form button {
  width: 100%;
  margin-top: 10px;
}

/* ================= DETAILS PAGE ================= */
.detail-container {
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 5%;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 50px;
  margin-top: 40px;
}

.detail-img-container {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

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

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.gallery-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s;
  border: 3px solid transparent;
}

.gallery-thumb:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

.detail-info {
  background: white;
  padding: 40px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: 36px;
  margin-bottom: 20px;
  color: var(--dark);
}

.detail-price {
  font-size: 42px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 30px;
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 30px 0;
}

.spec-item {
  padding: 15px;
  background: var(--light);
  border-radius: 12px;
}

.spec-item strong {
  display: block;
  font-size: 12px;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 5px;
  font-weight: 600;
}

.spec-item span {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
}

.detail-description {
  margin: 30px 0;
  line-height: 1.8;
  color: var(--gray);
}

.contact-seller {
  margin-top: 30px;
  width: 100%;
}

/* ================= FOOTER ================= */
footer {
  background: var(--dark);
  color: white;
  padding: 60px 5% 30px;
}

.footer-content {
  max-width: 1400px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 20px;
  margin-bottom: 20px;
}

.footer-section p,
.footer-section a {
  color: var(--gray-light);
  line-height: 2;
  text-decoration: none;
  display: block;
  transition: 0.3s;
}

.footer-section a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-light);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 968px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 38px;
  }

  .hero p {
    font-size: 16px;
  }

  .section h2 {
    font-size: 32px;
  }

  .cars {
    grid-template-columns: 1fr;
  }

  nav {
    position: fixed;
    top: 90px;
    left: -100%;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: 0.3s;
  }

  nav.active {
    left: 0;
  }

  nav a {
    width: 100%;
    text-align: center;
    padding: 15px;
  }

  .menu-toggle {
    display: flex;
  }

  .search-box {
    padding: 20px;
  }

  .search-box select,
  .search-box input {
    width: 100%;
    min-width: auto;
  }

  .detail-specs {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .logo {
    height: 50px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .section {
    padding: 60px 5%;
  }

  .sell-form,
  .login-form {
    padding: 30px 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

#dropdownMenu {
  display: none;
}

#dropdownMenu.show {
  display: block;
}
