/* =============================================================================
   v2 homepage (Phase 1.2). Uses tokens/components from the design system only.
   ============================================================================= */

/* On the homepage the hero carries the search, so the header's mobile search row is hidden
   (no two search boxes on one screen). Bottom-nav "Search" focuses the hero search instead. */
.page-home .header-mobile-search { display: none; }

.section--tight { padding-block: var(--space-6); }
@media (min-width: 768px) { .section--tight { padding-block: var(--space-8); } }

/* ---------------------------------------------------------------- Hero */
.hero {
  /* purple-700 -> brand purple; worst case white text 7.54:1, lead text (#E6E5F6) 6.07:1 */
  background: linear-gradient(135deg, var(--purple-700) 0%, var(--purple-500) 100%);
  color: var(--white);
  padding-block: var(--space-6) var(--space-8);
}
@media (min-width: 768px) { .hero { padding-block: var(--space-12) var(--space-12); } }
.hero__inner { display: grid; gap: var(--space-3); }
.hero__title { color: var(--white); font-size: var(--text-2xl); max-width: 22ch; }
@media (min-width: 768px) { .hero__title { font-size: var(--text-3xl); } }
.hero__lead { color: #E6E5F6; max-width: 52ch; }
.hero__search { display: grid; gap: var(--space-2); margin-top: var(--space-2); max-width: 880px; }
.hero__search .searchbar { border-color: var(--white); box-shadow: var(--shadow-lg); min-height: 52px; }
.hero__search .searchbar__submit { background: var(--brand-secondary); color: var(--ink); }      /* orange + ink: 5.93:1 */
.hero__search .searchbar__submit:hover { background: var(--brand-accent); }
.hero__loc { justify-self: start; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.35); color: var(--white); min-height: var(--tap); }
.hero__loc .icon { color: var(--orange-300); }
.hero__loc:hover { background: rgba(255, 255, 255, 0.2); border-color: var(--white); color: var(--white); }
/* Phones (< 480px): two rows — category select (full width) on top, then a full-width keyword
   field + search button. Each row gets its own height: the bar's min-height must not be split
   across the wrapped rows (that made the text field only ~26px tall). */
@media (max-width: 479px) {
  .hero__search .searchbar { flex-wrap: wrap; align-content: flex-start; min-height: 0; }
  .hero__search .searchbar__cat {
    flex: 1 0 100%; max-width: none; min-height: 48px;
    border-right: 0; border-bottom: 1px solid var(--color-border);
  }
  .hero__search .searchbar__input { flex: 1 1 0; min-width: 0; min-height: 52px; padding: 0 var(--space-4); }
  .hero__search .searchbar__submit { min-height: 52px; min-width: 56px; }
  .hero__search .searchbar__submit .icon { width: 1.4rem; height: 1.4rem; }
}

/* ---------------------------------------------------------------- Fresh: load more */
.load-more { display: flex; justify-content: center; margin-top: var(--space-6); }
.load-more .btn { min-width: 12rem; }

/* ---------------------------------------------------------------- Spotlight rows */
/* Phones: horizontal scroll with snap; ≥768px: a 4-column grid (rows hold 4–8 ads) */
.spot-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 46%); gap: var(--space-3);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) var(--space-2);
  scrollbar-width: none;
}
.spot-row::-webkit-scrollbar { display: none; }
.spot-row__item { scroll-snap-align: start; min-width: 0; display: flex; }
.spot-row__item > .ad-card { width: 100%; }
@media (min-width: 768px) {
  .spot-row { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; margin-inline: 0; padding: 0; gap: var(--space-4); }
}

/* ---------------------------------------------------------------- Sell in 3 steps */
.sell-steps {
  display: grid; gap: var(--space-6); padding: var(--space-6);
  background: var(--orange-50); border: 1px solid var(--orange-100); border-radius: var(--radius-xl);
}
@media (min-width: 1024px) { .sell-steps { grid-template-columns: 1fr 1.6fr; align-items: center; padding: var(--space-10); } }
.sell-steps__intro { display: grid; gap: var(--space-3); justify-items: start; }
.sell-steps__list { list-style: none; padding: 0; display: grid; gap: var(--space-4); }
@media (min-width: 768px) { .sell-steps__list { grid-template-columns: repeat(3, 1fr); } }
.sell-steps__list li { position: relative; display: grid; gap: var(--space-2); align-content: start; padding: var(--space-4); background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--orange-100); }
.sell-steps__num { position: absolute; top: var(--space-3); right: var(--space-4); font-size: var(--text-xl); font-weight: var(--weight-semibold); color: var(--orange-200); line-height: 1; }
.sell-steps__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--orange-100); color: var(--orange-800); }

/* ---------------------------------------------------------------- Trust strip */
