/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* ---- Tablet (max-width: 1024px) ---- */
@media (max-width: 1024px) {
  .cars-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .about-grid {
    gap: var(--spacing-lg);
  }

  .single-car-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
  }

  .contact-grid {
    gap: var(--spacing-lg);
  }

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

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

/* ---- Mobile (max-width: 768px) ---- */
@media (max-width: 768px) {
  /* Header */
  .main-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--color-primary-dark);
    flex-direction: column;
    justify-content: flex-start;
    padding: 5rem 1.5rem 2rem;
    transition: right var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-xl);
  }

  body.nav-open .main-nav {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .main-nav ul li {
    width: 100%;
  }

  .main-nav ul li a {
    display: block;
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
  }

  .header-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero Carousel */
  .hero-carousel {
    min-height: 85vh;
  }

  .hero-slides {
    height: 85vh;
  }

  .hero-content {
    height: 85vh;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }

  .hero-carousel-btn {
    width: 40px;
    height: 40px;
  }

  .hero-carousel-prev {
    left: 1rem;
  }

  .hero-carousel-next {
    right: 1rem;
  }

  .hero-carousel-dots {
    bottom: 2rem;
  }

  /* Grids */
  .cars-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

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

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

  .about-image img {
    height: 300px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

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

  /* Single car */
  .single-car-layout {
    grid-template-columns: 1fr;
  }

  .car-info {
    position: static;
  }

  .car-info-title {
    font-size: 1.5rem;
  }

  .car-info-price {
    font-size: 1.75rem;
  }

  .car-gallery-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }

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

  /* Filters */
  .filter-form {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .filter-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .filter-actions .btn {
    flex: 1;
  }

  /* Page banner */
  .page-banner {
    padding: 6rem 0 2rem;
  }

  .page-banner h1 {
    font-size: 1.75rem;
  }

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

  .enquiry-form-wrapper {
    padding: var(--spacing-lg);
  }

  /* Owner section */
  .owner-section {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .owner-photo {
    margin: 0 auto;
    width: 150px;
    height: 150px;
  }

  /* Section spacing */
  .section {
    padding: var(--spacing-xl) 0;
  }

  /* CTA buttons */
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
  }

  /* Lightbox */
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }

  /* Back to top */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  /* Map */
  .map-wrapper {
    height: 300px;
  }

  /* Car share */
  .car-share {
    flex-wrap: wrap;
  }

  .share-btn {
    flex: 1;
    min-width: 100px;
    justify-content: center;
  }
}

/* ---- Small Mobile (max-width: 480px) ---- */
@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .container {
    padding: 0 1rem;
  }

  .hero-carousel {
    min-height: 75vh;
  }

  .hero-slides, .hero-content {
    height: 75vh;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .hero-carousel-btn {
    display: none;
  }

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

  .filter-bar {
    padding: 1rem;
    margin: -1.5rem 0.5rem var(--spacing-lg);
  }

  .car-card-body {
    padding: 1rem;
  }

  .car-card-price {
    font-size: 1.2rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .page-banner h1 {
    font-size: 1.5rem;
  }

  .specs-table td {
    padding: 0.5rem 0;
    font-size: 0.9rem;
  }

  .btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 0.95rem;
  }
}

/* ---- Print Styles ---- */
@media print {
  .site-header,
  .site-footer,
  .hamburger,
  .mobile-overlay,
  .filter-bar,
  .cta-banner,
  .enquiry-section,
  .lightbox-overlay,
  .back-to-top,
  .btn {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .page-banner {
    background: none;
    color: #000;
    padding: 1rem 0;
  }

  .page-banner h1 {
    color: #000;
  }

  .car-card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

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