:root {
  --color-bg: #0a0a0a;
  --color-text: #f5f5f5;
  --color-primary: #d4af37;
  /* Gold/Bronze accent */
  --color-secondary: #1a1a1a;
  --color-accent: #e53935;
  /* Red for call to actions/highlights */
  --font-heading: 'Outfit', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

html,
body {
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) #1a1a1a;
}

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

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-primary);
  border-radius: 4px;
  border: 2px solid #1a1a1a;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* Utility Classes */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background-color: var(--color-primary);
  color: var(--color-bg);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: var(--transition);
}

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

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

.btn-outline:hover {
  background-color: var(--color-text);
  color: var(--color-bg);
}

.section-padding {
  padding: 8rem 0;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.2rem;
  color: #888;
  text-align: center;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition);
}

header.scrolled {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-heading);
  letter-spacing: 2px;
}

.logo span {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  gap: 3rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-inbox-link {
  display: none;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 2px solid var(--color-text);
  border-radius: 0;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: var(--transition);
  margin-right: 0;
}

.mobile-menu-btn {
  display: none !important;
}

.mobile-nav-dropdown {
  display: none !important;
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-inbox-link:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* Hero Section */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.4);
}

.hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 2rem;
  animation: fadeUp 1s ease forwards;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 6rem;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.text-gradient {
  background: linear-gradient(to bottom, #ffffff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 2.5rem;
  color: #ccc;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

/* Inventory Section */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.car-card {
  background-color: var(--color-secondary);
  border-radius: 4px;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.car-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.car-image-container {
  height: 300px;
  /* Increased height to show more car */
  overflow: hidden;
  position: relative;
}

.car-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  /* Move image up slightly */
  transition: transform 0.5s ease;
}

.car-card:hover .car-image-container img {
  transform: scale(1.05);
}

.car-details {
  padding: 2rem;
}

.car-make {
  font-size: 0.9rem;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.car-model {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.car-price {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #ccc;
}

.car-description {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1.5rem;
}

/* Sell Section */
.sell-section {
  position: relative;
  text-align: center;
  overflow: hidden;
}

.sell-section::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  right: -50px;
  bottom: -50px;
  width: auto;
  height: auto;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/assets/porsche-rear.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  filter: blur(8px);
  z-index: -1;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.location-map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.15rem;
  opacity: 0.85;
}

.location-map-link:hover {
  opacity: 1;
  color: var(--color-primary);
}

.location-map-icon {
  display: block;
  font-size: 20px;
  line-height: 1;
}

.contact-social {
  align-items: center;
}

.contact-social-links {
  display: flex;
  gap: 0.6rem;
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #444;
  background: #111;
  color: #f5f5f5;
}

.social-icon-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

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

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  background-color: var(--color-secondary);
  border: 1px solid #333;
  color: var(--color-text);
  margin-bottom: 1rem;
  font-family: var(--font-body);
}

.contact-form textarea {
  height: 150px;
  resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Car Detail Modal */
.car-detail-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.car-detail-modal.active {
  display: flex;
}

.car-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.car-image-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2100;
}

.car-image-modal.active {
  display: flex;
}

.car-image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}

.car-image-modal-content {
  position: relative;
  background: #111;
  border-radius: 12px;
  border: 1px solid #333;
  max-width: 1200px;
  width: calc(100% - 1.5rem);
  max-height: 94vh;
  padding: 1rem;
  z-index: 1;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}

.car-image-modal-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  margin-top: 0.75rem;
}

.car-image-modal-frame img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.car-image-modal-close {
  position: absolute;
  top: 0.2rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

.car-detail-content {
  position: relative;
  background: #111;
  border-radius: 8px;
  max-width: 1220px;
  width: 95%;
  z-index: 1;
  padding: 1.5rem;
  border: 1px solid #333;
}

.car-detail-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.car-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.5rem;
  align-items: stretch;
}

.car-detail-image {
  position: relative;
}

.car-detail-image-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  /* 16:9 */
  overflow: hidden;
  border-radius: 6px;
  background: #000;
}

.car-detail-image-frame img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.car-detail-fullscreen {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  padding: 0.3rem 0.9rem;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  cursor: pointer;
}

.car-detail-fullscreen:hover {
  background: rgba(0, 0, 0, 0.9);
}

.car-detail-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.car-detail-nav.prev {
  left: 0.5rem;
}

.car-detail-nav.next {
  right: 0.5rem;
}

.car-detail-info h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.car-detail-price {
  font-size: 1.2rem;
  color: #ccc;
  margin-bottom: 1rem;
}

.car-detail-description {
  font-size: 0.95rem;
  color: #ddd;
  max-height: 260px;
  overflow-y: auto;
}

.car-detail-indicators {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.car-detail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
}

.car-detail-dot.active {
  background: var(--color-primary);
}

/* Footer */
footer {
  background-color: var(--color-secondary);
  padding: 4rem 0 2rem;
  border-top: 1px solid #333;
  position: relative;
  z-index: 10;
  display: block;
}

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

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
  margin-bottom: 1rem;
}

.footer-links h4 {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-links ul li {
  margin-bottom: 0.8rem;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #333;
  color: #666;
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.service-item {
  text-align: center;
  padding: 2rem 1.5rem;
  background: #111;
  border: 1px solid #222;
  border-radius: 8px;
  transition: var(--transition);
}

.service-item:hover {
  transform: translateY(-5px);
  border-color: #333;
  background: #151515;
}

.service-icon {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  display: inline-block;
}

.service-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #f5f5f5;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero {
    overflow: visible;
  }

  .hero h1 {
    font-size: 2.4rem;
    letter-spacing: 0;
  }

  .hero-content {
    max-width: 400px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  .hero-btns {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-btns .btn,
  .hero-btns .btn-outline {
    width: 100%;
    text-align: center;
  }

  .nav-links {
    display: none;
  }

  .mobile-inbox-link {
    display: inline-flex;
  }

  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    z-index: 1002;
    padding: 0.5rem;
  }

  .mobile-menu-btn span {
    font-size: 2rem;
  }

  .mobile-nav-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
  }

  .mobile-nav-dropdown.active {
    transform: translateY(0);
  }

  .mobile-nav-dropdown a {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    transition: color 0.3s ease;
  }

  .mobile-nav-dropdown a:hover {
    color: var(--color-primary);
  }

  /* Prevent scrolling when menu is open */
  body.menu-open {
    overflow: hidden;
  }

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

  .section-title {
    font-size: 2.5rem;
  }

  .car-detail-content {
    max-width: 100%;
    width: 100%;
    height: 100%;
    border-radius: 0;
    padding-top: 3rem;
  }

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

  .car-detail-description {
    max-height: none;
  }

  .car-detail-fullscreen {
    right: 0.5rem;
    top: 0.5rem;
    font-size: 0.7rem;
    padding: 0.25rem 0.8rem;
  }

  .car-detail-close {
    top: 0.5rem;
    right: 0.5rem;
  }

  .car-image-modal-content {
    width: calc(100% - 1.25rem);
    padding: 0.75rem;
    border-radius: 10px;
  }
}

/* Very Small Devices (e.g. iPhone SE) */
@media (max-width: 480px) {
  .hero {
    align-items: flex-start;
  }

  .hero-content {
    max-width: 320px;
    padding: 6.5rem 0.75rem 0;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

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