/* ================================================================
   3. FINAL 2026 PROFESSIONAL MARKETPLACE (UNIFIED)
   ================================================================ */

/* --- Layout & Shell --- */
.mp-shell {
  max-width: 1200px;
}

/* --- Centered Header & Search --- */
.mp-header {
  background: var(--glass-white);
  backdrop-filter: blur(var(--glass-blur));
  padding: 20px;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mp-headline h1 {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.04em;
}

.mp-headline p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.mp-search-canvas{
  width: 100%;
  display: flex;
  justify-content: center;
}

.search-glass {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  /* max-width: 600px; */
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 50px; /* 2026 pill search */
  padding: 0 24px;
  transition: all var(--transition-speed);
}

.search-glass:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.search-glass i { color: var(--text-muted); margin-right: 12px; }

.search-glass input {
  border: none;
  background: transparent;
  padding: 14px 0;
  width: 100%;
  outline: none;
  font-weight: 500;
}

/* --- Centered Filter Pins --- */
.mp-filter-bar {
  margin-bottom: 40px;
}

.pills-track {
  display: flex;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mp-pill {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 10px 22px;
  border-radius: 50px;
  color: var(--text-muted);
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
  white-space: nowrap;
}

.mp-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* --- The Symmetrical Grid --- */
.mp-listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

/* --- The Professional Card --- */
.asymmetric-card {
  background: #ffffff;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(0,0,0,0.04);
  overflow: hidden;
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.asymmetric-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.06);
  border-color: var(--primary);
}

/* --- Neutral Image Container (Fixed Color Clash) --- */
.ad-image-box {
  width: calc(100% - 32px);
  height: 200px;
  margin: 16px auto 0 auto;
  background: #f1f5f9; /* Neutral slate grounding */
  border-radius: var(--border-radius-md);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  /* transition: transform 0.6s ease; */
  z-index: 5;
}

/* --- Photo Count Glass Badge --- */
.ad-photo-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 800;
  z-index: 10;
}

/* --- Centered Placeholder --- */
.no-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  gap: 12px;
  z-index: 1;
}

.no-image-placeholder i { font-size: 2.5rem; opacity: 0.4; }
.no-image-placeholder span { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; }

/* --- Clean Typography Hierarchy --- */
.ad-floating-info {
  /* padding: 24px; */
  background: #ffffff;
    padding: 20px 24px;
}

.label-com {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.ad-item-title {
  color: #0f172a; /* Deep charcoal */
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
  /* min-height: 2.6em; */
  margin: 10px 0 10px 0; 
}

.ad-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.ad-item-price {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

/* --- Action Arrow Fix --- */
.action-arrow-circle {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.asymmetric-card:hover .action-arrow-circle {
  background: var(--primary);
  color: #ffffff;
  transform: translateX(4px);
}

/* --- Professional Pagination --- */
.mp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 50px 0;
}

.nav-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  transition: 0.3s;
}

.nav-btn:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
}

.page-count { font-weight: 800; color: #0f172a; font-size: 0.95rem; }

/* --- Responsive Breakpoints --- */
@media (max-width: 768px) {
  .mp-listing-grid { grid-template-columns: 1fr; }
  .mp-header { padding: 30px 15px; }
  .pills-track { justify-content: flex-start; padding: 10px 20px; }
}

/* ================================================================
   4. RESPONSIVE ADAPTATIONS (MOBILE & TABLET)
   ================================================================ */

/* --- Tablet & Small Laptops (under 1024px) --- */
@media (max-width: 1024px) {
  .mp-shell {
    margin: 20px auto;
    padding: 0 15px;
  }

  .mp-header {
    padding: 20px;
  }

  .mp-listing-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
}

/* --- Mobile Devices (under 768px) --- */
@media (max-width: 768px) {
  .mp-header {
    border-radius: var(--border-radius-md);
    margin-bottom: 20px;
  }

  .search-glass {
    max-width: 100%;
    /* Search bar takes full width on mobile */
  }

  .pills-track {
    justify-content: flex-start; /* Switch to left-align on mobile so user can scroll through them */
    overflow-x: auto;
    padding-left: 20px; /* Gives a nice "padding" effect when scrolling */
    scrollbar-width: none; /* Hides scrollbar on Firefox */
  }
  
  .pills-track::-webkit-scrollbar {
    display: none; /* Hides scrollbar on Chrome/Safari */
  }

  .mp-listing-grid {
    /* Forces 2 columns on most phones, or 1 column if items are too wide */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }

  .ad-image-box {
 width: calc(100% - 32px);
  height: 180px;
  margin: 16px auto 0 auto;
  border-radius: var(--border-radius-md);
  position: relative;
  overflow: hidden;
  background: #f1f5f9; /* Neutral fallback */
  border: 1px solid var(--border);
  }

  .ad-floating-info {
    padding: 16px;
    /* Less padding to save screen real estate */
  }

  .ad-item-title {
    font-size: 1rem;
    /* Scale down font slightly */
    min-height: auto;
    /* Allow titles to wrap naturally */
  }

  .ad-item-price {
    font-size: 1.2rem;
  }
}

/* --- Small Phones (under 480px) --- */
@media (max-width: 480px) {
  .mp-listing-grid {
    grid-template-columns: 1fr;
    /* Single column for small phones */
  }

  .pills-track {
    margin-bottom: 20px;
  }

  .mp-pill {
    padding: 10px 16px;
    font-size: 0.8rem;
  }

  .mp-pagination {
    gap: 10px;
  }

  .nav-btn {
    width: 36px;
    height: 36px;
  }
}

/* --- Utility: Prevents horizontal overflow on very small devices --- */
.mp-shell,
.mp-listing-grid,
.asymmetric-card {
  max-width: 100vw;
  box-sizing: border-box;
}