/* ============================================================
   sell-product.css  —  Swopsmart "Select a product" page
   (e.g. /sell/iphone). The step after choosing a series/brand:
   the user picks the exact model. Page-specific layout. The
   breadcrumb (.crumbs), shared search input, section-header
   system, .reveal animation, and trust section live in main.css.

   Same 6-up grid and 150px-capped photos as the series page,
   plus a "Cash in up to $X" payout line under each model name.
   ============================================================ */

/* ---- Section wrapper ---- */
.products {
  padding: var(--section-py) 20px;
  background: var(--bg);
}
.products-inner { max-width: 1440px; margin: 0 auto; }
@media (max-width: 640px) {
  .products { padding-left: 16px; padding-right: 16px; }
}

/* ---- Page head (centered title + search) ---- */
.products-head { text-align: center; margin-bottom: 48px; }
.products-head .section-title { max-width: 100%; margin-left: auto; margin-right: auto; }

/* ---- Product grid ---- */
.product-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px)  { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (max-width: 540px)  { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px)  { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 28px 20px 24px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start; text-align: center;
  /* explicit margins instead of flex gap: the 14px gap applied between
     EVERY child, inflating the name->price space */
  min-height: 240px; /* was 264 for the 150px image; img is capped at 120 now */
  box-shadow: 0 1px 2px rgba(14,42,34,0.03), 0 2px 8px rgba(14,42,34,0.03);
  transition: transform 0.3s ease, border-color 0.2s, box-shadow 0.25s;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--line);
  box-shadow: 0 4px 14px rgba(14,42,34,0.06);
}

/* Photo well — natural-size image capped at 150px, on the white card. */
.product-photo {
  flex: 1;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;   /* photo -> name spacing (was the flex gap) */
}
.product-photo img {
  height: auto;
  max-width: 120px;
  max-height: 120px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.product-card:hover .product-photo img { transform: scale(1.03); }

.product-name {
  font-size: 16px; font-weight: 600;
  letter-spacing: 0.01em; color: var(--forest);
  line-height: 1.35; text-wrap: balance;
}

/* Payout line — "Up to $X" with the amount bold (option A).
   margin-top:auto (bottom-pinned) created a large gap under short names;
   the price now sits directly beneath the name, photo absorbs the slack. */
.product-price {
  font-size: 14px; color: var(--ink-2);
  font-family: var(--font-mono);
  margin-top: 3px;       /* hugs the name */
}
.product-price strong { font-weight: 700; color: var(--forest); }

/* ---- Empty state ---- */
.no-results {
  text-align: center; padding: 60px 20px;
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
}
.no-results h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.no-results p { color: var(--ink-2); font-size: 14px; }
