@media (max-width: 768px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Specific Header Rules */
.mobile-only-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1030;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.mobile-search-wrapper {
  transition: border-color 0.2s ease;
}

.mobile-search-wrapper:focus-within {
  border-color: #0d6efd !important;
  background-color: #fff !important;
}

.mobile-input-fix::placeholder {
  color: #8c92ac;
  font-size: 13px;
}

/* Fix the Advanced Filters dropdown overlay structure on Mobile Screens */
@media (max-width: 767.98px) {
  .advanced-filters {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 24px 24px 0 0 !important;
    z-index: 1100;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    display: block !important;
    visibility: hidden;
    padding: 20px !important;
  }
  
  .advanced-filters.show {
    transform: translateY(0);
    visibility: visible;
  }
}

/* ========================================================================= */
/* 📱 MOBILE CATEGORY BUTTON LIMITER                                         */
/* ========================================================================= */
@media (max-width: 767.98px) {
  
  /* Target the capsule items inside the mobile slider track container */
  .mobile-scroll-track .listing-type-card,
  .mobile-scroll-track .btn,
  .mobile-scroll-track a,
  .mobile-scroll-track div[class*="col-"] {
    /* Hide all category items by default on mobile */
    display: none !important;
  }

  /* Force only the first 3 matching child elements to display */
  .mobile-scroll-track div[class*="col-"]:nth-child(1),
  .mobile-scroll-track div[class*="col-"]:nth-child(2),
  .mobile-scroll-track div[class*="col-"]:nth-child(3),
  .mobile-scroll-track a:nth-child(1),
  .mobile-scroll-track a:nth-child(2),
  .mobile-scroll-track a:nth-child(3) {
    display: block !important;
    flex: 0 0 auto !important;
    width: auto !important;
  }
  
  /* If your layout uses a raw flex wrapper inside the partial */
  .mobile-scroll-track .d-flex {
    display: flex !important;
    justify-content: center !important; /* Center aligns the 3 remaining buttons nicely */
    flex-wrap: nowrap !important;
    width: 100% !important;
  }
}

.mobile-categories .home-categories{
  margin-top:-41px !important;
}