/* =============================================
   Responsive Design
============================================= */

/* Tablet and smaller devices */
@media (max-width: 1024px) {
  .container {
    padding: 0 30px;
  }

  .desktop-nav {
    display: none; /* Hide on smaller screens, handled by JS */
  }

  .mobile-menu-button {
    display: block; /* Show hamburger icon */
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .main-section .features-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* Mobile devices */
@media (max-width: 768px) {
  .hero-content-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text-content {
    padding-left: 0;
    order: 2; /* Ensure text is below image if it wraps */
  }

  .hero-image-content {
    order: 1;
    display: block; /* Show image on mobile */
    margin-bottom: 2rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .features-grid,
  .deals-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    text-align: center;
  }

  .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-social a {
    margin: 0 0.75rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 15px;
  }

  .save-big-cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .save-big-cta-title {
    font-size: 2rem;
  }

  .footer-info {
    align-items: center;
  }

  .footer-bottom-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  .footer-bottom-links .bottom-link {
    margin-left: 0;
  }

  .cta-expert-image {
    display: none; /* Hide image on smaller screens */
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
    width: 100%;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .save-big-cta-title {
    font-size: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   Inventory Page Responsive Design
============================================= */

/* Tablet and below */
@media (max-width: 1024px) {
  .inventory-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .filter-sidebar {
    width: 100%;
    position: relative;
  }

  .inventory-container {
    flex-direction: column;
  }

  .product-card {
    padding: 1rem;
  }
}

/* Mobile landscape and tablet portrait */
@media (max-width: 768px) {
  .inventory-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .product-card {
    padding: 0.8rem;
  }

  .product-brand {
    font-size: 1rem;
  }

  .product-model {
    font-size: 0.9rem;
  }

  .product-price {
    font-size: 1rem;
  }

  .product-specs {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .spec-item {
    padding: 0.4rem 0.3rem;
  }

  .spec-item strong {
    font-size: 0.55rem;
  }

  .spec-item .spec-value {
    font-size: 0.65rem;
  }

  .btn-info, .btn-add {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .filter-section {
    margin-bottom: 1rem;
  }

  .search-bar input {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  /* Modal responsive */
  .modal-content, .info-modal {
    width: 90% !important;
    max-width: 90% !important;
    padding: 1.5rem;
    margin: 1.5rem auto !important;
  }
  
  .modal-body {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 1.5rem !important;
  }
  
  .modal-image {
    max-height: 50vh !important;
  }
  
  .modal-image {
    max-height: 50vh !important;
  }
  
  .modal-thumbs {
    padding-bottom: 0.5rem;
  }
  
  .modal-thumb {
    width: 60px !important;
    height: 60px !important;
  }

  .modal-price-section {
    width: 100%;
    text-align: center;
  }

  .modal-actions-row {
    flex-direction: column;
  }

  .modal-price-section {
    width: 100%;
    text-align: center;
  }
}

/* Small mobile devices (inventory) */
@media (max-width: 480px) {
  .inventory-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .product-card {
    padding: 0.7rem;
  }

  .product-type-header {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }

  .product-image {
    height: 180px;
  }

  .product-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-info, .btn-add {
    width: 100%;
    padding: 0.7rem;
  }

  .product-specs {
    gap: 0.3rem;
  }

  .spec-item {
    padding: 0.35rem 0.25rem;
  }

  .filter-sidebar {
    padding: 1rem;
  }

  .search-bar {
    margin-bottom: 1rem;
  }

  /* Modal adjustments for small screens */
  .modal-content, .info-modal {
    width: 95% !important;
    max-width: 95% !important;
    height: auto;
    max-height: 90vh;
    margin: 1rem auto !important;
    padding: 1rem;
    border-radius: 12px;
    overflow-y: auto;
  }
  
  .modal-body {
    padding: 1rem 0.75rem !important;
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  
  .modal-header {
    padding: 1.25rem !important;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  .modal-title {
    font-size: 1.4rem !important;
  }
  
  .modal-close {
    top: 1rem !important;
    right: 1rem !important;
  }
  
  .modal-actions-row {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1rem 0;
    margin-top: auto;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  }

  .modal-image-gallery {
    flex-direction: column;
  }

  .modal-thumbs {
    flex-direction: row;
    overflow-x: auto;
  }

  .modal-specs {
    grid-template-columns: 1fr;
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .container {
    padding: 0 10px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .product-brand {
    font-size: 0.9rem;
  }

  .product-model {
    font-size: 0.8rem;
  }

  .product-price {
    font-size: 0.9rem;
  }

  .spec-item strong {
    font-size: 0.5rem;
  }

  .spec-item .spec-value {
    font-size: 0.6rem;
  }
}

/* Landscape mode adjustments */
@media (max-height: 600px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
    padding: 2rem 0;
  }

  .modal-content, .info-modal {
    max-height: 90vh;
    max-width: 95%;
    overflow-y: auto;
  }
}

/* Print styles */
@media print {
  .site-header,
  .footer,
  .btn,
  .mobile-menu-button,
  .filter-sidebar {
    display: none !important;
  }

  .inventory-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-card {
    break-inside: avoid;
  }
}
