/* Mobile Optimization */

        /* Search Bar Integration Styles */
        @keyframes slideInFromBottom {
          from {
              transform: translateY(100%);
              opacity: 0;
          }
          to {
              transform: translateY(0);
              opacity: 1;
          }
      }
      
      @keyframes fadeIn {
          from {
              opacity: 0;
              transform: translateY(20px);
          }
          to {
              opacity: 1;
              transform: translateY(0);
          }
      }
      
      .animate-slide-in-bottom {
          animation: slideInFromBottom 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      }
      
      .animate-fade-in {
          animation: fadeIn 0.3s ease-out;
      }
      
      .service-item {
          animation: fadeIn 0.3s ease-out;
      }
      
      .search-container-active {
          transform: scale(0.96);
          box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
      }
      
      .dynamic-text {
          transition: opacity 0.3s ease-in-out;
      }

      /* Desktop Search Bar Positioning - 3cm from location bar */
      @media (min-width: 768px) {
          .desktop-search-container {
              width: 283.46px;
              position: absolute;
              left: calc(2cm + 280px + 3cm); /* Location bar position + width + 3cm gap */
              top: 50%;
              transform: translateY(-50%);
              z-index: 1000;
          }
          
          .desktop-overlay {
              display: flex;
              align-items: flex-start;
              justify-content: center;
              padding-top: 2rem;
              background: rgba(0, 0, 0, 0.5);
          }
          
          .desktop-overlay-content {
              width: 567px;
              max-height: calc(100vh - 4rem);
              background: white;
              border-radius: 1rem;
              box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
              overflow: hidden;
              display: flex;
              flex-direction: column;
          }
      }

      /* Mobile Search Bar Positioning - Below location button */
      @media (max-width: 767px) {
          .mobile-search-container {
              position: absolute;
              top: calc(1.5rem + 2.5rem + 0.5rem); /* Mobile location button top + height + gap */
              left: 1.5rem;
              right: 1.5rem;
              z-index: 25;
          }
          
          .mobile-search-container .search-container {
              width: 100%;
              margin: 0;
          }
      }

/* ADD this at the top of mobile.css */
@media (max-width: 768px) {
  #loginContainer {
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      width: 100vw !important;
      height: 100vh !important;
      padding: 0 !important;
      border-radius: 0 !important;
      background: rgba(0, 0, 0, 0.8) !important;
      backdrop-filter: blur(10px) !important;
      z-index: 9999 !important;
  }
  
  #loginContainer > div {
      position: absolute !important;
      top: 0 !important;
      left: 0 !important;
      width: 100% !important;
      height: 100% !important;
      max-width: none !important;
      border-radius: 0 !important;
      padding: 2rem !important;
      display: flex !important;
      flex-direction: column !important;
      justify-content: center !important;
      background: white !important;
  }
  
  /* Close button positioning for mobile */
  #loginContainer .absolute.right-4.top-4 {
      position: fixed !important;
      top:1cm !important;
      right: 2rem !important;
      z-index: 10000 !important;
  }
}
#searchOverlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: white !important;
  z-index: 9999 !important;
  overflow: hidden !important;
}

#searchOverlay .overflow-y-auto {
  overflow-y: auto !important;
  max-height: calc(100vh - 150px) !important;
}
/* Bottom Slide Modal Styles - Fixed z-index conflicts */
.modal-backdrop {
  transition: opacity 0.3s ease-in-out;
  opacity: 0;
  pointer-events: none;
  z-index: 9998;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  transform: translateY(100%);
  opacity: 0;
  background: white;
  border-radius: 18px 18px 0 0;
  height: 70vh;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  position: relative;
  z-index: 9999;
}

.modal-container.show {
  transform: translateY(0);
  opacity: 1;
}

/* Close button styles - Different positioning for desktop and mobile */
.close-button {
z-index: 10000; /* Highest z-index for close button */
background-color: white;
border-radius: 50%;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
opacity: 0;
pointer-events: none;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile positioning (original - keeps working as before) */
@media (max-width: 768px) {
.close-button {
position: fixed;
transform: translateY(100vh);
bottom: calc(70vh + 10px);
right: 20px;
}

.close-button.show {
transform: translateY(0);
opacity: 1;
pointer-events: auto;
}
}

/* Desktop positioning - positioned relative to modal backdrop */
@media (min-width: 769px) {
.close-button {
position: fixed;
/* Keep horizontal position consistent during animation */
left: 50%;
margin-left: calc(12.9rem - 20px); /* Half of modal width (28rem/2) minus half button width */
bottom: calc(70vh + 10px);
transform: translateY(100vh);
opacity: 0;
pointer-events: none;
}

.close-button.show {
transform: translateY(0);
opacity: 1;
pointer-events: auto;
/* Horizontal position already set in base styles above */
}
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}


@media (max-width: 768px) {
  .top-heading {
    font-size: 1.25rem !important; /* 20px */
    line-height: 1.4 !important;
  }

  h2.text-2xl {
    font-size: 1.125rem !important; /* 18px */
    line-height: 1.4 !important;
  }
}

@media (max-width: 768px) {
  .hide-on-mobile {
    display: none !important;
  }
}



/* Service item styles */
.service-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.service-item:hover {
  background-color: #f9fafb;
}

.service-item:last-child {
  border-bottom: none;
}

.service-item img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  margin-right: 12px;
  object-fit: cover;
}

.service-item h3 {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  margin: 0;
}

/* Modal header drag indicator */
.drag-indicator {
  width: 40px;
  height: 4px;
  background-color: #d1d5db;
  border-radius: 2px;
  margin: 12px auto 8px auto;
}

/* Modal content area */
.modal-content-area {
  height: calc(70vh - 80px);
  display: flex;
  flex-direction: column;
}

.modal-service-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.no-scroll {
  overflow: hidden;
}

@media (max-width: 768px) {
  #location-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  
  .location-modal-container {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

.location-search-wrapper {
  flex: 0 0 auto;
}

#location-suggestions {
  flex: 1;
  width: 100% !important;
  max-height: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: none !important;
}

.location-suggestion-item {
  padding: 16px !important;
  border-bottom: 1px solid #f0f0f0 !important;
}

.location-suggestion-item:active {
  background-color: #f3f4f6 !important;
}
}

@media (max-width: 768px) {
.buttons {
  flex-direction: column;
}
.btn {
  width: 100%;
}
}

@media (max-width: 768px) {
.cards-container {
  grid-template-columns: repeat(2, 1fr);
}

.category-card img {
  height: 2.5cm;
}

.category-label {
  font-size: 0.95rem;
}
}

@media (max-width: 480px) {
.top-categories-section {
  padding-left: 0.5cm !important;
  padding-right: 0.5cm !important;
}

.cards-container {
  grid-template-columns: 1fr;
}

.category-card img {
  height: 2.4cm;
}

.category-label {
  font-size: 0.7rem;
}
}

/* Mobile Footer Accordion Styles */
@media (max-width: 768px) {
.mobile-footer {
    display: block !important;
    background: #000;
    padding: 0;
}

.desktop-footer {
    display: none !important;
}

.accordion-section {
    border-bottom: 1px solid #333;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #000;
    color: white;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.accordion-header:hover {
    background: #1a1a1a;
}

.accordion-arrow {
    transition: transform 0.3s ease;
    color: white;
}

.accordion-arrow.rotated {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #000;
}

.accordion-content.active {
    max-height: 500px;
}

.accordion-links {
    padding: 0 24px 20px 24px;
}

.accordion-links a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 8px 0;
    font-size: 16px;
    transition: color 0.2s ease;
}

.accordion-links a:hover {
    color: white;
}

.mobile-footer-bottom {
    padding: 24px;
    text-align: center;
    border-top: 1px solid #333;
    background: #000;
}

.mobile-footer-brand {
    padding: 24px;
    text-align: center;
    background: #000;
}

.mobile-footer-brand h2 {
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.mobile-footer-brand p {
    color: white;
    margin-bottom: 16px;
}

.mobile-social-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.mobile-social-icons a {
    color: white;
    transition: color 0.2s ease;
}

.mobile-social-icons a:hover {
    color: white;
}
}

/* MOBILE HEADER MODIFICATIONS - FIXED POSITIONING */
@media (max-width: 768px) {
/* Remove the horizontal line in mobile view */
nav .absolute.left-0.right-0.bottom-0 {
  display: none !important;
}

/* Mobile header layout adjustments */
nav {
  height: auto !important;
  min-height: calc(1cm + 2rem) !important;
  padding: 0.5rem 1rem !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  position: relative !important;
}

/* Mobile location container - TOP LEFT with 1cm from top - NO TOUCH EFFECTS */
.mobile-location-container {
  position: absolute !important;
  left: 1rem !important;
  transform: none !important;
  z-index: 1003 !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: none !important;
}

#mobile-location-button {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: auto !important;
  background-color: transparent !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 1004 !important;
  touch-action: auto !important;
  -webkit-tap-highlight-color: transparent !important;
  transition: none !important;
  border: none !important;
}

#mobile-location-button:active,
#mobile-location-button:hover,
#mobile-location-button:focus {
  background-color: transparent !important;
  transform: none !important;
  opacity: 1 !important;
}

#mobile-location-text {
  max-width: 240px !important;
}

/* Mobile cart container - TOP RIGHT with 1cm from top - NO TOUCH EFFECTS */
.mobile-cart-container {
  position: absolute !important;
  right: 1rem !important;
  top: 1cm !important;
  transform: none !important;
  z-index: 1003 !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: none !important;
}

.mobile-cart-container button {
  -webkit-tap-highlight-color: transparent !important;
  touch-action: none !important;
  transition: none !important;
}

.mobile-cart-container button:active,
.mobile-cart-container button:hover,
.mobile-cart-container button:focus {
  background-color: white !important;
  transform: none !important;
  opacity: 1 !important;
}

/* Mobile header cart badge */
#mobile-header-cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1.5px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Hide brand name on mobile */
.text-\[1\.6rem\].font-semibold {
  display: none !important;
}

/* Hide desktop cart and user icons on mobile */
.user-icon,
nav .relative.inline-flex.items-center.justify-center {
  display: none !important;
}

/* Add bottom padding to content on mobile */
body {
  padding-bottom: 70px;
}

.mobile-content-padding {
  padding-bottom: 20px;
}
}

/* Mobile Only Display */
@media (max-width: 640px) {
.mobile-bottom-nav {
  display: block !important;
}
}

/* Updated Mobile Navigation Footer - Reduced Height & Compact Icons */
.mobile-bottom-nav {
display: none;
position: fixed;
bottom: 0;
left: 0;
right: 0;
width: 100vw;
background: #000;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-top: 0.5px solid rgba(0, 0, 0, 0.1);
box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
z-index: 1000;
padding: 0;
margin: 0;
}

.mobile-nav-container {
display: flex;
align-items: center;
justify-content: space-around;
width: 100%;
height: 56px; /* Reduced from 70px */
padding: 6px 12px;
padding-bottom: max(6px, env(safe-area-inset-bottom));
max-width: 100vw;
overflow: hidden;
}

.nav-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 1;
min-width: 0;
position: relative;
}

.nav-button {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: none;
border: none;
padding: 0;
cursor: pointer;
width: 100%;
-webkit-tap-highlight-color: transparent;
transition: all 0.2s ease;
}

.nav-icon {
width: 20px; /* Reduced from 24px */
height: 20px; /* Reduced from 24px */
margin-bottom: 3px; /* Reduced from 4px */
position: relative;
display: flex;
align-items: center;
justify-content: center;
}

.nav-icon svg {
width: 20px; /* Reduced from 24px */
height: 20px; /* Reduced from 24px */
stroke: #6b7280;
stroke-width: 2;
transition: all 0.2s ease;
}

.nav-label {
font-size: 9px; /* Reduced from 10px */
font-weight: 500;
color: #6b7280;
text-align: center;
line-height: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
transition: color 0.2s ease;
}

/* Active/Highlighted button styles */
.nav-item.active .nav-icon svg {
stroke: white;
}

.nav-item.active .nav-label {
color: white;
}

/* Active/Hover States */
.nav-item:active .nav-icon svg,
.nav-button:active .nav-icon svg {
transform: scale(0.9);
stroke: #374151;
}

.nav-item:active .nav-label,
.nav-button:active .nav-label {
color: #374151;
}

/* Logged in user icon styling */
.nav-button.logged-in .nav-icon svg {
stroke: #6366f1;
}

.nav-button.logged-in .nav-label {
color: #6366f1;
}

/* Extra small screens */
@media (max-width: 375px) {
.mobile-nav-container {
height: 52px; /* Reduced from 65px */
padding: 4px 8px;
}

.nav-icon {
width: 18px; /* Reduced from 22px */
height: 18px; /* Reduced from 22px */
}

.nav-icon svg {
width: 18px; /* Reduced from 22px */
height: 18px; /* Reduced from 22px */
}

.nav-label {
font-size: 8px; /* Reduced from 9px */
}
}

/* Large mobile screens */
@media (min-width: 375px) and (max-width: 640px) {
.mobile-nav-container {
height: 60px; /* Reduced from 75px */
padding: 8px 16px;
}

.nav-icon {
width: 22px; /* Reduced from 26px */
height: 22px; /* Reduced from 26px */
margin-bottom: 4px; /* Reduced from 6px */
}

.nav-icon svg {
width: 22px; /* Reduced from 26px */
height: 22px; /* Reduced from 26px */
}

.nav-label {
font-size: 10px; /* Reduced from 11px */
}
}

/* Update body padding to match new footer height */
@media (max-width: 768px) {
body {
padding-bottom: 56px; /* Reduced from 70px */
}
}  

/* Extra small mobile devices (480px and below) */
@media (max-width: 480px) {

/* Stack category cards in single column on very small screens */
.cards-container {
  grid-template-columns: 1fr !important;
  grid-template-rows: repeat(8, 4cm) !important;
}

/* Reduce padding further on small screens */
.top-categories-section {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

.content-container {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}
}

/* ✅ MOBILE & DESKTOP IMAGE HANDLING */

/* MOBILE: show mobile image, hide desktop */
@media (max-width: 768px) {
  .mobile-main-image {
    display: block !important;
    width: 100%;
    margin-bottom: 1rem;
  }

  .mobile-main-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0.5rem;
  }

  .desktop-main-image {
    display: none !important;
  }
}

/* DESKTOP: show desktop image, hide mobile */
@media (min-width: 769px) {
  .mobile-main-image {
    display: none !important;
  }

  .desktop-main-image {
    display: block !important;
  }

  .desktop-main-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0.5rem;
  }
}
@media (max-width: 768px) {
  .category-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 auto !important;
  }
}

/* ✅ MAIN SECTION STYLING */
@media (max-width: 768px) {
  .top-categories-section {
    display: block !important;
    margin-bottom: 2rem !important;
  }

  /* Category layout on mobile */
  .category-container {
    flex-direction: column !important;
    gap: 0.25cm !important;
  }

  .cards-container {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: repeat(4, 4cm) !important;
    gap: 0.30cm !important;
  }

  .category-card {
    width: 100% !important;
    height: 4cm !important;
  }

  /* UNHIDE: Most booked services container */
  .min-h-screen .content-container {
    display: block !important;
  }

  .min-h-screen:has(.content-container) {
    display: block !important;
  }

  /* UNHIDE: Appliance Service & Repair section */
  .min-h-screen.bg-\[white\].flex.flex-col {
    display: flex !important;
  }

  .min-h-screen:nth-of-type(2) {
    display: block !important;
  }

  .min-h-screen:nth-of-type(3) {
    display: block !important;
  }
  @media (max-width: 768px) {
    .mobile-break {
      display: block;
      height: 2rem; /* acts like <br>, can adjust to 2rem etc. */
    }
  }
  
/* Adjust spacing after unhiding sections */
body {
  padding-top: calc(1cm + 2rem) !important;
}

.slide-container {
  margin-top: 2rem !important;
  margin-bottom: 2rem !important;
}

/* Responsive adjustments for the unhidden sections */
.content-container {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* MOST BOOKED SERVICES - MOBILE OPTIMIZED 3.5cm x 3.5cm CARDS */
/* Hide JavaScript navigation buttons in mobile */
#prevButton,
#nextButton {
  display: none !important;
}

/* Override JavaScript-generated product container */
#productContainer,
.product-container {
  display: flex !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  gap: 0.75rem !important;
  padding: 0.5rem 0 !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  width: 100% !important;
  margin: 0 !important;
}

#productContainer::-webkit-scrollbar,
.product-container::-webkit-scrollbar {
  display: none !important;
}

/* Override JavaScript-generated product cards */
.product-card,
#productContainer > div,
.product-container > div {
  flex: 0 0 3.7cm !important;
  width: 3.7cm !important;
  height: 3.7cm !important;
  background: white !important;
  border-radius: 0.5rem !important;
  overflow: hidden !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  border: 1px solid #e5e7eb !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
}

.product-card:hover,
#productContainer > div:hover,
.product-container > div:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  border-color: #d1d5db !important;
}

/* Override JavaScript-generated card content */
.product-card .flex,
.product-card > div,
#productContainer > div .flex,
#productContainer > div > div,
.product-container > div .flex,
.product-container > div > div {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Override JavaScript-generated image containers */
.product-card .bg-gray-50,
#productContainer .bg-gray-50,
.product-container .bg-gray-50 {
  width: 100% !important;
  height: 70% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0.5rem 0.5rem 0 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

/* Override JavaScript-generated images */
.product-card img,
#productContainer img,
.product-container img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 0 !important;
}

/* Override JavaScript-generated text */
.product-card h3,
#productContainer h3,
.product-container h3 {
  width: 100% !important;
  height: 30% !important;
  margin: 0 !important;
  padding: 0.25rem !important;
  font-size: 0.7rem !important;
  font-weight: 500 !important;
  color: #374151 !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Force override any inline styles from JavaScript */
.product-card[style],
#productContainer > div[style],
.product-container > div[style] {
  flex: 0 0 3.7cm !important;
  width: 3.7cm !important;
  height: 3.7cm !important;
}

/* Adjust the Appliance Service & Repair section for mobile */
.min-h-screen.bg-\[white\] .grid.grid-cols-5 {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 1rem !important;
}

.card-hover-animation {
  width: 100% !important;
  height: auto !important;
}
}

/* Extra small mobile devices (480px and below) */
@media (max-width: 480px) {
/* Adjust grid for very small screens */
.min-h-screen.bg-\[white\] .grid.grid-cols-5 {
  grid-template-columns: repeat(1, 1fr) !important;
}
}

@media (max-width: 768px) {
.top-categories-section {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  margin-top: 1rem !important;
}



.category-container {
  flex-direction: column !important;
  gap: 0.5rem !important;
}

.cards-container {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  grid-template-rows: repeat(3, auto) !important;
  column-gap: 0.5rem !important;
  row-gap: 0.5cm !important;
}

.category-card {
  width: 2.5cm !important;
  height: auto !important;
  margin: 0 auto !important;
  border-radius: 0.5rem !important;
  overflow: hidden !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  background-color: transparent !important;
  border: 1px solid transparent !important;
  transition: transform 0.3s ease, box-shadow 0.2s ease;
}

.category-card img {
  width: 100% !important;
  height: 1.9cm !important;
  object-fit: cover !important;
  border-radius: 0.5rem 0.5rem 0 0 !important;
}

.category-card::before,
.category-card::after {
  content: none !important;
  display: none !important;
  background: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.category-card:hover {
  transform: translateY(-2px) !important;
  border: 1px solid #ccc !important;
  box-shadow: 0 0 0 2px #ccc !important;
}
}

@media (max-width: 768px) {
.top-category-heading {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
}

/* Only apply max-width in desktop view */
@media (min-width: 768px) {
.desktop-width {
  max-width: 28rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
}

/* Desktop - Hide mobile nav */
@media (min-width: 641px) {
.mobile-bottom-nav {
  display: none !important;
}

/* Show desktop icons */
.user-icon,
nav .relative.inline-flex.items-center.justify-center {
  display: flex !important;
}
}

/* Override all existing mobile styles with highest specificity */
@media screen and (max-width: 768px) {
/* Force override existing nav height */
nav.fixed.top-0.left-0.w-full {
  height: 60px !important;
  min-height: 60px !important;
  padding: 8px 16px !important;
}

/* Completely override mobile location container positioning */
.mobile-location-container,
div.mobile-location-container,
.block.sm\:hidden.mobile-location-container {
  position: fixed !important;
  left: 1rem !important;
  top: 1cm !important;
  transform: none !important;
  z-index: 9999 !important;
  background: transparent !important;
}

/* Completely override mobile cart container positioning */
.mobile-cart-container,
div.mobile-cart-container,
.block.sm\:hidden.mobile-cart-container {
  position: fixed !important;
  right: 1rem !important;
  top: 1cm !important;
  transform: none !important;
  z-index: 9999 !important;
  background: transparent !important;
}

/* Adjust body padding for new header height */
body {
  padding-top: 80px !important;
}

/* Hide desktop elements on mobile */
.hidden.sm\:block,
.hidden.sm\:flex {
  display: none !important;
}

/* Ensure mobile elements are visible */
.block.sm\:hidden {
  display: block !important;
}
}

/* Mobile location container and cart container transition */
.mobile-location-container,
.mobile-cart-container {
transition: opacity 0.3s ease-in-out;
opacity: 1;
}

/* Mobile Appliance Service & Repair Section Only */
@media (max-width: 768px) {
    .appliance-section-mobile {
        padding: 1rem !important;
        margin: 0 !important;
    }
    
    .appliance-section-mobile h1 {
        font-size: 1.2rem !important;
        font-weight: bold;
        margin-bottom: 0 !important;
        text-align: left !important;
        flex: 1 !important;
    }
    
    .appliance-section-mobile .flex.justify-between {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .appliance-section-mobile button {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.825rem !important;
        border-radius: 0.25rem !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    
    .appliance-scroll-container {
        display: flex !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 0.75rem !important;
        padding: 0.5rem 0 !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    .appliance-scroll-container::-webkit-scrollbar {
        display: none !important;
    }
    
    .appliance-card-mobile {
        flex: 0 0 3.9cm !important;
        width: 3.9cm !important;
        height: 4.5cm !important;
        background: white !important;
        border-radius: 0.5rem !important;
        overflow: hidden !important;
        cursor: pointer !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
        border: 1px solid #e5e7eb !important;
        position: relative !important;
    }
    
    .appliance-card-mobile:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
        border-color: #d1d5db !important;
    }
    
    .appliance-card-mobile .card-image-container {
        width: 100% !important;
        height: 100% !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    .appliance-card-mobile .card-image-container img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }
    
    .appliance-desktop-grid {
        display: none !important;
    }
    
    .appliance-mobile-container {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .appliance-mobile-container {
        display: none !important;
    }
    
    .appliance-desktop-grid {
        display: grid !important;
    }
    
    .appliance-section-mobile {
        padding: 0 6cm !important;
    }
}

/* Responsive Mobile Banner Container */
@media (max-width: 768px) {
.mx-auto.px-\[6cm\].py-8 {
  display: block !important;
  padding: 1rem !important;
  margin: 1rem auto !important;
  max-width: 100% !important;
}

.mx-auto.px-\[6cm\].py-8 a {
  display: block !important;
}

.mx-auto.px-\[6cm\].py-8 .relative {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important; /* Maintain square shape */
  margin: 0 auto !important;
  overflow: hidden !important;
  border-radius: 8px !important;
}

.mx-auto.px-\[6cm\].py-8 img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
}

/* Mobile Screen Lock and Zoom Disable - Interactive Elements Preserved */
@media (max-width: 768px) {
/* Prevent horizontal overflow only */
html {
overflow-x: hidden !important;
width: 100% !important;
}

body {
overflow-x: hidden !important;
width: 100% !important;
overscroll-behavior-x: none !important;
}

/* Disable zoom gestures only - preserve touch interactions */
html, body {
-ms-touch-action: manipulation !important;
touch-action: manipulation !important;
}

/* Allow all touch interactions for interactive elements */
button, a, input, select, textarea, [role="button"], .nav-button, .accordion-header {
touch-action: manipulation !important;
-webkit-touch-callout: default !important;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
pointer-events: auto !important;
}

/* Allow scrolling for scrollable containers */
.appliance-scroll-container, 
.services-list, 
#location-suggestions,
.accordion-content,
#productContainer,
.product-container {
touch-action: pan-x pan-y !important;
-webkit-overflow-scrolling: touch !important;
overflow: auto !important;
}

/* Prevent zoom on input focus without breaking functionality */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="password"],
textarea,
select {
font-size: 16px !important;
}

/* Prevent elastic scrolling on main body only */
body {
overscroll-behavior-y: contain !important;
}

/* Ensure interactive elements remain clickable */
.category-card,
.appliance-card-mobile,
.product-card,
#productContainer > div,
.product-container > div {
pointer-events: auto !important;
touch-action: manipulation !important;
}

/* Prevent double-tap zoom but allow single taps */
* {
-webkit-touch-callout: none !important;
-webkit-tap-highlight-color: transparent !important;
}

/* Re-enable tap highlights for interactive elements */
button, a, input, select, textarea, [role="button"] {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1) !important;
}
}

/* Viewport lock without breaking scrolling */
@media (max-width: 768px) {
/* Ensure no horizontal overflow */
* {
max-width: 100vw !important;
box-sizing: border-box !important;
}

/* Prevent horizontal scrolling but allow vertical */
html, body {
overflow-x: hidden !important;
overflow-y: auto !important;
}
}

/* Hide Interior Design Collection slideshow container in mobile view - Specific targeting */
@media (max-width: 768px) {
/* Target the slideshow section by its unique content */
.flex.items-center.justify-center.p-4:has(.relative.w-\[33\.2cm\].bg-gray-100) {
  display: none !important;
}

/* More specific fallback - target by the Interior Design Collection text */
.flex.items-center.justify-center.p-4 .relative.w-\[33\.2cm\] {
  display: none !important;
}

/* Most specific - target the container that has the "Interior Design Collection" text */
.relative.w-\[33\.2cm\].bg-gray-100.overflow-hidden {
  display: none !important;
}
}

/* Mobile cart badge positioning - move the single badge to mobile footer */
@media (max-width: 768px) {
  /* When the badge is moved to mobile footer, position it correctly */
  .mobile-bottom-nav .nav-item:nth-child(3) .nav-icon #cart-badge {
      position: absolute !important;
      top: -10px !important;
      right: -8px !important;
      background: #ef4444 !important;
      color: white !important;
      font-size: 10px !important;
      font-weight: 600 !important;
      border-radius: 50% !important;
      width: 14px !important;
      height: 14px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      line-height: 1 !important;
      border: 1.5px solid white !important;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
      z-index: 10 !important;
  }
  
  .mobile-bottom-nav .nav-item:nth-child(3) .nav-icon #cart-badge.hidden {
      display: none !important;
  }
  
  /* Ensure the nav-icon can hold the positioned badge */
  .mobile-bottom-nav .nav-item:nth-child(3) .nav-icon {
      position: relative !important;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.3s ease-out;
}

.service-item {
  transition: all 0.2s ease;
}

.service-item:hover {
  transform: translateX(4px);
}

.service-item:active {
  transform: scale(0.98);
}

.services-list {
  -webkit-overflow-scrolling: touch;
}

.services-list::-webkit-scrollbar {
  width: 2px;
}

.services-list::-webkit-scrollbar-track {
  background: transparent;
}

.services-list::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  border-radius: 1px;
}