/* ==========================================================================
   TYREPRO - Master Responsive Engine
   Enforces perfect Mobile & Tablet responsiveness across all 14 pages
   Desktop styles (> 1024px) remain 100% UNTOUCHED.
   ========================================================================== */

/* Prevent horizontal scroll globally */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
}

/* Base Responsive Media Overrides */
img, svg, video, canvas, iframe {
  max-width: 100%;
  height: auto;
}
iframe {
  max-width: 100%;
}

/* ==========================================================================
   1. TABLET BREAKPOINT (max-width: 1024px)
   ========================================================================== */
@media screen and (max-width: 1024px) {

  /* --- Container & Layout --- */
  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  /* --- Header & Navigation --- */
  .site-header {
    height: var(--header-height, 75px);
  }

  .nav-menu {
    display: none !important;
  }

  .header-actions > .btn,
  .call-pill {
    display: none !important;
  }

  .hamburger-btn {
    display: flex !important;
  }

  /* --- Hero Sections --- */
  .hero-grid,
  .hero-v2-grid,
  .split-grid,
  .about-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .hero-title,
  .hero-v2-title {
    font-size: clamp(2.2rem, 5vw, 3.2rem) !important;
  }

  .hero-visual-col,
  .hero-v2-stats-card {
    margin-top: 1rem;
  }

  /* --- Grids scaling down to 2 columns on Tablet --- */
  .services-grid,
  .brand-grid,
  .pricing-grid,
  .offers-grid,
  .branches-grid,
  .why-features-grid,
  .categories-v2-grid,
  .products-v2-grid,
  .gallery-v2-grid,
  .testimonials-v2-grid,
  .team-grid,
  .values-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }

  .benefits-v2-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.2rem !important;
  }

  .process-timeline {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }

  /* --- Service Details Layout --- */
  .service-detail-layout,
  .service-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .service-sidebar {
    order: 2; /* Sidebar goes below content on smaller screens */
  }

  .service-main-content {
    order: 1;
  }

  /* --- Contact Page --- */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  /* --- Auth Pages (Login/Register/Forgot) --- */
  .auth-wrapper {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }

  .auth-visual-col {
    display: none !important;
  }

  .auth-form-col {
    padding: 3.5rem 1.5rem !important;
    max-width: 550px !important;
    margin: 0 auto !important;
    width: 100% !important;
  }

  /* --- Footer --- */
  .footer-top {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2.5rem 1.5rem !important;
  }

  .footer-widget-col:first-child {
    grid-column: 1 / -1;
  }

  /* --- Section Padding --- */
  .section {
    padding: 4rem 0 !important;
  }
}

/* ==========================================================================
   2. MOBILE BREAKPOINT (max-width: 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {

  /* --- Container & Spacing --- */
  .container {
    padding-left: 1.2rem !important;
    padding-right: 1.2rem !important;
  }

  .section {
    padding: 3rem 0 !important;
  }

  .section-title {
    font-size: 1.85rem !important;
    margin-bottom: 0.75rem !important;
  }

  .section-subtitle {
    font-size: 0.98rem !important;
    margin-bottom: 2rem !important;
  }

  /* --- Typography --- */
  .hero-title,
  .hero-v2-title,
  .page-title {
    font-size: 2.1rem !important;
    line-height: 1.2 !important;
  }

  .hero-subtitle,
  .hero-v2-subtitle,
  .page-subtitle {
    font-size: 1rem !important;
  }

  /* --- Buttons & CTAs --- */
  .hero-cta-group,
  .hero-v2-cta-group,
  .cta-banner-buttons,
  .closing-cta-btns {
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.85rem !important;
  }

  .hero-cta-group .btn,
  .hero-v2-cta-group .btn,
  .cta-banner-buttons .btn,
  .closing-cta-btns .btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* --- All Grids to Single Column on Mobile --- */
  .services-grid,
  .brand-grid,
  .pricing-grid,
  .offers-grid,
  .branches-grid,
  .why-features-grid,
  .categories-v2-grid,
  .products-v2-grid,
  .testimonials-v2-grid,
  .team-grid,
  .values-grid,
  .benefits-v2-grid,
  .process-timeline,
  .pvs-grid,
  .booking-form-grid,
  .alignment-grid,
  .calculator-card,
  .brand-story-v2-grid,
  .brand-story-highlights {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* --- Stats Strips --- */
  .stats-strip,
  .stats-strip.trust-stats {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 1.5rem 1rem !important;
    text-align: center !important;
  }

  .stat-box::after {
    display: none !important;
  }

  .stat-num {
    font-size: 2.2rem !important;
  }

  .hero-trust-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  /* --- Image Wrappers --- */
  .split-image-wrap,
  .brand-story-visual-wrap {
    height: auto !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
  }

  .brand-story-img-main {
    width: 100% !important;
    height: 250px !important;
  }

  .brand-story-img-sub {
    display: none !important;
  }

  .floating-stat-card {
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: 1rem !important;
    width: 100% !important;
  }

  /* --- Gallery V2 --- */
  .gallery-v2-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: 220px !important;
  }

  .gallery-item-v2.featured,
  .gallery-item-v2.wide,
  .gallery-item-v2.tall {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  /* --- Brand Filter Pills --- */
  .brand-filter-bar,
  .filter-tab-group {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding-bottom: 0.5rem !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important; /* Firefox */
  }

  .brand-filter-bar::-webkit-scrollbar,
  .filter-tab-group::-webkit-scrollbar {
    display: none !important; /* Chrome/Safari */
  }

  .filter-btn,
  .filter-tab {
    flex-shrink: 0 !important;
  }

  /* --- Tables Responsiveness --- */
  .table-responsive,
  .pricing-compare-wrapper,
  .service-specs-table-wrap {
    width: 100% !important;
    overflow-x: auto !important;
    display: block !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 1.5rem !important;
  }

  table {
    min-width: 550px !important; /* Force table to maintain structure and scroll smoothly */
  }

  /* --- Appointment & Calculator Forms --- */
  .time-slot-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .booking-card,
  .calculator-card,
  .tyre-finder-wrapper {
    padding: 1.5rem 1rem !important;
    border-radius: var(--radius-md) !important;
  }

  .step-indicator {
    overflow-x: auto !important;
    padding-bottom: 0.5rem !important;
    justify-content: flex-start !important;
  }

  .step-item {
    flex-shrink: 0 !important;
  }

  /* --- Footer --- */
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    gap: 1rem !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .footer-legal-links {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  /* --- Coming Soon & 404 Pages --- */
  .countdown-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  .error-code {
    font-size: 6rem !important;
  }

  /* --- Modals & Popups --- */
  .modal-content,
  .brand-detail-dialog {
    width: 92% !important;
    max-width: 100% !important;
    padding: 1.5rem 1.2rem !important;
    margin: 1rem auto !important;
  }
}

/* ==========================================================================
   3. SMALL MOBILE BREAKPOINT (max-width: 480px)
   ========================================================================== */
@media screen and (max-width: 480px) {

  /* --- Header Controls --- */
  .brand-logo {
    font-size: 1.2rem !important;
  }

  .brand-icon-wrap {
    width: 30px !important;
    height: 30px !important;
  }

  .theme-toggle,
  .direction-toggle {
    width: 34px !important;
    height: 34px !important;
  }

  /* --- Time Slots & Sub-grids --- */
  .time-slot-grid {
    grid-template-columns: 1fr !important;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .countdown-number {
    font-size: 1.8rem !important;
  }

  /* --- Hero --- */
  .hero-title,
  .hero-v2-title,
  .page-title {
    font-size: 1.8rem !important;
  }

  .cta-banner {
    padding: 2.5rem 1rem !important;
    border-radius: var(--radius-md) !important;
  }

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

  /* --- Auth Pages Padding --- */
  .auth-form-col {
    padding: 2.5rem 1rem !important;
  }

  .social-auth-group {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
}
.map-container {
  width: 100%;
  height: 380px;
  position: relative;
  overflow: hidden;
}

.map-container iframe {
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  inset: 0;
  border: 0;
  display: block;
}