/* ============================================================
   UNIQARE DRY CLEANER - RESPONSIVE STYLESHEET
   Flawless, Pixel-Perfect Layout for Phone, Tablet & Laptop
   Google Ads Landing Page Quality & Mobile Usability Compliant
   ============================================================ */

/* --- Global Base Constraints for Mobile & Touch --- */
html, body {
  overflow-x: hidden;
  width: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Ensure all form inputs have 16px font to prevent iOS Safari auto-zoom */
input, select, textarea {
  font-size: 16px !important;
}

/* ============================================================
   1. TABLETS & SMALL LAPTOPS (Max 1024px)
   iPad Pro, iPad Air, iPad Mini & 13" Laptops
   ============================================================ */
@media (max-width: 1024px) {
  .section-padding {
    padding: 4rem 0;
  }

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

  /* Tablet & Mobile Navigation Header & Drawer */
  .main-header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-color: #ffffff !important;
    z-index: 10005 !important;
  }

  body.nav-open .main-header {
    z-index: 10005 !important;
  }

  nav {
    display: contents;
  }

  .brand-logo {
    margin-right: auto;
  }

  .brand-logo-img {
    height: 42px;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
    border-radius: 8px;
    background: #f1f5f3;
    color: var(--primary);
    border: 1px solid rgba(21, 62, 45, 0.15);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }

  .menu-toggle:active {
    transform: scale(0.95);
    background: #e2e8f0;
  }

  /* Solid, crisp white drawer positioned at highest layer */
  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(105%);
    visibility: hidden;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff !important;
    background-color: #ffffff !important;
    flex-direction: column;
    align-items: stretch;
    padding: 5.5rem 1.5rem 2.5rem;
    box-shadow: -10px 0 35px rgba(15, 23, 42, 0.22);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
    z-index: 10006 !important;
    gap: 0.35rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu.open {
    transform: translateX(0) !important;
    visibility: visible !important;
  }

  .nav-menu li {
    width: 100%;
    list-style: none;
  }

  .nav-link {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a !important;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0.8rem 0.75rem;
    border-radius: 8px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
  }

  .nav-link:hover,
  .nav-link.active {
    color: #153e2d !important;
    background-color: #f0fdf4 !important;
    padding-left: 1rem;
    font-weight: 700;
    border-bottom-color: transparent;
  }

  .nav-menu li:last-child {
    margin-top: 1rem;
  }

  .nav-menu li:last-child .nav-link {
    background: #153e2d !important;
    color: #ffffff !important;
    border-radius: 50px;
    justify-content: center;
    padding: 0.85rem 1.25rem;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 14px rgba(21, 62, 45, 0.25);
  }

  .nav-menu li:last-child .nav-link:hover {
    background: #0d281d !important;
    color: #ffffff !important;
    padding-left: 1.25rem;
  }

  /* Backdrop: Layered under header/drawer, but above regular page & bottom bar */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10001;
    display: none;
  }

  .nav-backdrop.open {
    display: block;
  }

  /* Clean, clickable close button inside drawer */
  .nav-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: #f1f5f3;
    border: 1px solid rgba(21, 62, 45, 0.12);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 600;
    color: #153e2d;
    cursor: pointer;
    line-height: 1;
    z-index: 10010;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
  }

  .nav-close-btn:hover,
  .nav-close-btn:active {
    background: #e2e8f0;
    transform: scale(1.05);
  }

  /* Hero Section on Tablet */
  .hero-carousel-section {
    height: 500px;
  }

  .carousel-title {
    font-size: 2.35rem;
  }

  .carousel-desc {
    font-size: 1rem;
    max-width: 620px;
  }

  /* Responsive Grids on Tablet */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

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

  .process-grid::before {
    display: none;
  }

  .coverage-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .guarantees-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .workshop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .store-spotlight-box {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.25rem 1.75rem;
  }

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

  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

/* ============================================================
   2. TABLETS PORTRAIT & SMARTPHONES (Max 768px)
   Apple iPad (Portrait), Large Android Phones
   ============================================================ */
@media (max-width: 768px) {
  body {
    padding-bottom: 72px; /* Space for Mobile Sticky Bottom Action Bar */
  }

  .section-padding {
    padding: 3.25rem 0;
  }

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

  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }

  /* Header adjustments on mobile/tablet */
  .brand-logo {
    margin-right: 0.5rem;
  }

  .brand-logo-img {
    height: 38px;
    max-width: 150px;
  }

  .header-actions {
    gap: 0.5rem;
    margin-left: auto;
  }

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

  .header-actions .header-wa-btn span {
    display: none !important;
  }

  .header-actions .header-wa-btn {
    padding: 0.5rem 0.75rem;
    font-size: 1.15rem;
    border-radius: 8px;
  }

  /* Carousel */
  .hero-carousel-section {
    height: 490px;
  }

  .carousel-title {
    font-size: 1.95rem;
    line-height: 1.25;
  }

  .carousel-desc {
    font-size: 0.925rem;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .carousel-actions {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .carousel-btn {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }

  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }

  /* 1-Column Stacking for 768px */
  .coverage-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .workshop-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .guarantees-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

  /* Swipeable Rate Card Tabs */
  .rate-card-tabs {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding: 0.4rem 0.25rem 0.85rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 1.5rem;
  }

  .rate-card-tabs::-webkit-scrollbar {
    display: none;
  }

  .rate-tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
  }

  .rate-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }

  .rate-table th,
  .rate-table td {
    padding: 0.75rem 0.85rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .rate-table-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  /* Booking Form */
  .booking-wrapper {
    padding: 1.75rem 1.25rem;
  }

  .booking-form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-group.full-width,
  .booking-submit-row {
    grid-column: span 1;
  }

  .booking-submit-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .booking-submit-row .btn {
    width: 100%;
  }

  /* Floating WhatsApp Widget */
  .whatsapp-widget-container {
    bottom: 82px;
    right: 15px;
  }

  .whatsapp-chat-box {
    width: calc(100vw - 30px);
    right: -10px;
    bottom: 74px;
    max-height: 480px;
  }

  /* Cookie Banner on Mobile/Tablet */
  .cookie-banner {
    bottom: 74px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
  }

  .cookie-text {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .cookie-actions {
    width: auto;
    flex-shrink: 0;
  }

  .cookie-accept-btn {
    width: auto;
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
  }

  /* Sticky Bottom Action Bar */
  .mobile-bottom-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1.25fr;
    gap: 0.5rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    z-index: 1001;
    padding: 0.5rem 0.75rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  }

  .mobile-bottom-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.45rem 0.25rem;
    font-size: 0.725rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    text-decoration: none;
    min-height: 46px;
  }

  .mobile-bottom-btn i {
    font-size: 1.15rem;
  }

  .mobile-bottom-btn.call-btn {
    background-color: var(--primary-light);
    color: var(--primary);
  }

  .mobile-bottom-btn.whatsapp-btn {
    background-color: #dcf8c6;
    color: var(--whatsapp-dark);
  }

  .mobile-bottom-btn.book-btn {
    background: var(--primary);
    color: #ffffff;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  /* Policy Pages */
  .policy-box {
    padding: 2.25rem 1.5rem;
  }

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

/* ============================================================
   3. COMPACT SMARTPHONES (Max 480px)
   iPhone SE, iPhone 12/13/14/15 Mini, Galaxy A-series
   ============================================================ */
@media (max-width: 480px) {
  .hero-carousel-section {
    height: 460px;
  }

  .carousel-title {
    font-size: 1.65rem;
    line-height: 1.22;
  }

  .carousel-desc {
    font-size: 0.85rem;
    line-height: 1.45;
  }

  .carousel-actions {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: 0.5rem;
  }

  .carousel-actions .btn {
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    justify-content: center;
  }

  .carousel-btn {
    display: none; /* Hide arrow buttons on mobile to avoid finger clutter */
  }

  .brand-logo-img {
    height: 38px;
  }

  .header-call-btn {
    display: none; /* Call button is permanently at thumb reach in bottom bar */
  }

  .header-wa-btn span {
    display: none;
  }

  .header-wa-btn {
    padding: 0.5rem 0.75rem;
    font-size: 1.15rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-item {
    height: 220px;
  }

  .store-photo-card {
    height: 200px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

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

  .policy-box {
    padding: 1.75rem 1.25rem;
  }

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