/* ==========================================================================
   KAAM WALE BHAIYA (KWB) - RESPONSIVE & MOBILE-FIRST STYLES
   Matches Reference 3-Tab Bottom Navigation & Responsive Web Breakpoints
   ========================================================================== */

/* 3-Tab Mobile Bottom Navigation Bar (Home, Customer Rating & Reviews, My Orders) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 66px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  box-shadow: 0 -4px 20px rgba(13, 43, 91, 0.08);
  z-index: 1500;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  padding: 0 4px;
  gap: 3px;
  color: #64748B;
  font-size: 0.7rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  height: 100%;
  text-decoration: none;
  position: relative;
  transition: color var(--transition-fast);
  cursor: pointer;
}

.mobile-nav-item.active {
  color: #1D4ED8;
  font-weight: 800;
}

.mobile-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 54px;
  height: 3.5px;
  background: #1D4ED8;
  border-radius: 3px 3px 0 0;
}

.mobile-nav-icon {
  font-size: 1.3rem;
  line-height: 1;
}

/* Floating WhatsApp Button */
.floating-whatsapp-btn {
  position: fixed;
  bottom: 82px;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #25D366;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  z-index: 1400;
  transition: transform var(--transition-fast);
  text-decoration: none;
}

.floating-whatsapp-btn:hover {
  transform: scale(1.08);
}

/* Tablet Breakpoints */
@media (max-width: 1024px) {
  .desktop-nav-links {
    display: none;
  }

  .cab-vehicles-showcase-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 900px) {
  .hero-slide {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-slide-content {
    padding: 1.35rem 1.25rem;
  }

  .hero-slide-media {
    min-height: 170px;
    max-height: 200px;
  }

  .feature-hero-overlay {
    max-width: 75%;
    padding: 1.35rem;
  }

  .location-route-inputs {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .route-arrow-badge {
    margin: 0 auto;
    transform: rotate(90deg);
  }
}

/* Mobile Breakpoints (Phones <= 768px) */
@media (max-width: 768px) {
  .container {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .section {
    padding: 1.75rem 0;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  body {
    padding-bottom: 76px;
  }

  /* Compact App Header on Mobile (matches Reference Top Bar) */
  .site-header {
    height: auto;
    min-height: 62px;
  }

  .site-header-spacer {
    height: 62px;
  }

  .header-main {
    height: auto;
    min-height: 62px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    gap: 0.35rem;
  }

  .brand-avatar-badge {
    width: 36px;
    height: 36px;
  }

  .menu-bars-badge {
    display: none;
  }

  .brand-logo-lockup {
    min-width: 0;
    flex: 1;
  }

  .brand-wordmark-navy {
    font-size: 1.05rem;
  }

  .brand-wordmark-bhaiya {
    font-size: 1rem;
  }

  .brand-tagline-center {
    font-size: 0.6rem;
    white-space: nowrap;
    max-width: 100%;
  }

  .brand-tagline-center::before,
  .brand-tagline-center::after {
    width: 8px;
  }

  .header-actions {
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .header-icon-btn {
    width: 34px;
    height: 34px;
  }

  .app-search-box {
    padding: 0.5rem 0.65rem;
    gap: 0.45rem;
  }

  .hero-slide-content {
    padding: 1.2rem 1rem;
  }

  .hero-priority-ribbon {
    position: static;
    display: inline-block;
    margin-bottom: 0.55rem;
    font-size: 0.85rem;
    padding: 0.25rem 0.7rem;
    transform: rotate(-1.5deg);
  }

  .coverage-ribbon-content {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .coverage-cities-list {
    width: 100%;
  }

  .location-selector-btn,
  .lang-switcher,
  .cart-btn-indicator {
    display: none; /* Accessible in drawer, location strip & My Orders tab */
  }

  /* 3 Pillar Cards stay 3 columns or compact mobile cards just like screenshot 16.41.03 */
  .pillars-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
  }

  .pillar-card {
    padding: 0.65rem 0.45rem;
    min-height: 195px;
    min-width: 0;
    border-radius: var(--radius-md);
  }

  .pillar-visual {
    height: 70px;
    margin-bottom: 0.4rem;
  }

  .pillar-visual svg {
    max-height: 66px;
    width: 100%;
    height: auto;
  }

  .pillar-title {
    font-size: 0.8rem;
    overflow-wrap: break-word;
  }

  .pillar-subtitle {
    font-size: 0.65rem;
    margin-bottom: 0.45rem;
    overflow-wrap: break-word;
  }

  .pillar-rate-tag {
    display: none;
  }

  .pillar-arrow-btn {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    margin: 0 auto;
  }

  /* 4-column Trust Strip stays 4 columns cleanly on mobile */
  .trust-strip-card {
    padding: 0.75rem 0.2rem;
  }

  .trust-strip-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .trust-strip-label {
    font-size: 0.68rem;
  }

  /* 9 Home Appliances Grid -> 2 columns on mobile (reference 16.40.10) */
  .appliance-services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
  }

  .appliance-pastel-card {
    padding: 0.75rem;
    min-height: 155px;
  }

  .appliance-visual-stage {
    height: 70px;
    margin-bottom: 0.5rem;
  }

  .appliance-visual-stage img,
  .appliance-visual-stage svg {
    max-height: 66px;
  }

  .wrench-badge-circle {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
  }

  .appliance-card-title {
    font-size: 0.84rem;
  }

  /* Travel Cab 5 Cards -> Horizontal Scroll inside container */
  .cab-vehicles-showcase-grid {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.65rem;
    padding: 0.25rem 0 0.5rem 0;
    scrollbar-width: none;
  }

  .cab-vehicles-showcase-grid::-webkit-scrollbar {
    display: none;
  }

  .cab-pastel-card {
    min-width: 132px;
    flex-shrink: 0;
  }

  .cab-vehicle-card {
    flex-direction: column;
    align-items: stretch;
  }

  .cab-vehicle-price-col {
    text-align: left !important;
    width: 100%;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-subtle);
  }

  .cab-vehicle-price-col .flex {
    flex-wrap: wrap;
  }

  .feature-hero-banner {
    min-height: 165px;
  }

  .feature-hero-overlay {
    max-width: 100%;
    padding: 1.1rem;
  }

  .appliances-banner .feature-hero-gradient,
  .cabs-banner .feature-hero-gradient,
  .movers-banner .feature-hero-gradient {
    background: linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.82) 55%, rgba(255,255,255,0.4) 100%);
  }

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

  .packer-shifting-box,
  .cab-filter-card {
    padding: 1rem;
  }

  .packer-selected-table {
    display: block;
    overflow-x: auto;
  }

  /* Bottom Sheet Modals on Mobile */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-container {
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 92vh;
    animation: slideUpBottomSheet 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  @keyframes slideUpBottomSheet {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
  }

  .modal-header {
    padding: 1rem 1.15rem;
    position: sticky;
    top: 0;
    background: #FFFFFF;
    z-index: 10;
  }

  .modal-body {
    padding: 1.15rem;
  }

  .form-input, .form-select, .form-textarea {
    font-size: 1rem; /* Prevents iOS auto-zoom */
    padding: 0.8rem 0.9rem;
  }

  .cart-drawer {
    max-width: 100%;
  }

  .need-help-navy-banner {
    padding: 1.15rem;
  }

  .toast-container {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 5rem;
  }

  .toast {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  /* Subpages (Track, Support, Admin) Mobile Fixes */
  .support-form-grid {
    grid-template-columns: 1fr !important;
  }

  .support-pincode-row,
  .tracking-search-row {
    flex-wrap: wrap;
  }

  .support-pincode-row .form-input,
  .tracking-search-row .form-input {
    min-width: 0;
    width: 100%;
    flex: 1 1 200px;
  }

  .tracking-header-card {
    padding: 1.25rem;
    gap: 1rem;
  }

  .tracking-status-col {
    align-items: flex-start !important;
  }

  .tracking-stepper {
    padding: 1.35rem 1rem;
  }

  .assigned-bhaiya-card {
    flex-wrap: wrap;
    padding: 1.15rem;
  }

  .admin-header {
    padding: 0.9rem 1rem;
  }

  .admin-main {
    padding: 1rem;
    gap: 1.25rem;
  }
}

/* Narrow Phones (<= 480px) */
@media (max-width: 480px) {
  .brand-tagline-center::before,
  .brand-tagline-center::after {
    display: none;
  }

  .trust-strip-card {
    grid-template-columns: repeat(2, 1fr);
    padding: 0.5rem;
  }

  .trust-strip-item {
    border-right: none;
    padding: 0.55rem 0.35rem;
  }

  .trust-strip-item:nth-child(odd) {
    border-right: 1px solid #E2E8F0;
  }

  .trust-strip-item:nth-child(-n+2) {
    border-bottom: 1px solid #E2E8F0;
  }

  .appliance-slot-grid {
    grid-template-columns: 1fr !important;
  }

  .cart-item-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .cart-item-actions {
    justify-content: space-between;
  }
}
