/* ==========================================================================
   FAST BICYCLE SHOP - Responsive Stylesheet
   Adapts the premium grid and animation system to laptops, tablets, and phones.
   ========================================================================== */

/* --- Medium Screens (Laptops / Small Desktops: <= 1199px) --- */
@media screen and (max-width: 1199px) {
  :root {
    --spacing-xl: 4rem;
  }
  
  .container {
    max-width: 960px;
  }
}

/* --- Tablets & Landscape Phones (<= 991px) --- */
@media screen and (max-width: 991px) {
  :root {
    --spacing-lg: 2.5rem;
    --spacing-xl: 3.5rem;
  }

  .container {
    max-width: 720px;
  }

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

  /* Navigation Mobile Toggle */
  .mobile-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--color-dark-carbon);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 6rem 2.5rem var(--spacing-lg);
    gap: 1.8rem;
    transition: var(--transition-medium);
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    font-size: 1.1rem;
    width: 100%;
    display: block;
  }

  .nav-actions {
    display: none; /* Hide desktop specific header button */
  }

  .nav-menu .btn-primary {
    display: flex;
    width: 100%;
    margin-top: 1rem;
  }

  /* Grid Conversions */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  /* Hero adjustments */
  .hero-title {
    font-size: 3.2rem;
  }

  .hero-desc {
    font-size: 1.05rem;
  }

  /* About section alignment */
  .about-text {
    text-align: center;
  }

  .section-title-wrap.left-aligned {
    text-align: center;
  }

  .section-title-wrap.left-aligned .section-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .about-keypoints {
    justify-content: center;
    max-width: 450px;
    margin: var(--spacing-sm) auto;
  }

  /* Timeline Process Grid */
  .process-timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg) var(--spacing-md);
  }

  .process-step:nth-child(even)::after {
    display: none; /* Break timeline flow line in half */
  }

  /* Spare parts grid */
  .parts-category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Products grid */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact layout */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  /* Footer Layout */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg) var(--spacing-md);
  }
}

/* --- Mobile Phones (Portrait: <= 767px) --- */
@media screen and (max-width: 767px) {
  .container {
    max-width: 540px;
  }

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

  /* Hero Section */
  .hero-title {
    font-size: 2.6rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* Grid Conversions */
  .grid-3 {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .products-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  /* Service Card styling */
  .service-card {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }

  /* Parts grid */
  .parts-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact form details */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form-panel {
    padding: 2rem 1.5rem;
  }

  .contact-info-panel {
    padding: 2.5rem 1.5rem;
  }

  /* Process Timeline */
  .process-timeline {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }

  .process-step::after {
    display: none !important;
  }

  /* Footer Bottom */
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-xs);
  }
}

/* --- Extra Small Devices (<= 480px) --- */
@media screen and (max-width: 480px) {
  :root {
    --spacing-sm: 0.8rem;
    --spacing-md: 1.2rem;
    --spacing-lg: 2rem;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

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

  .cta-title {
    font-size: 1.6rem;
  }

  .parts-category-grid {
    grid-template-columns: 1fr;
    max-width: 260px;
    margin: 0 auto;
  }

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

  /* Ensure floating action buttons do not overlay key content or navigation */
  .floating-actions-container {
    bottom: 20px;
    right: 20px;
    gap: 10px;
  }

  .btn-float {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }
}
