/* The public wholesale pages (/wholesale, /wholesale/<slug>; server/src/api/wholesale_pages.cpp). Built on the
   guides' stylesheet (/shop/guide/guide.css): its colors, header, footer, buttons and FAQ. */

.wp { display: block; }
.wp-in { max-width: var(--wide); margin-inline: auto; padding-inline: 20px; }
.wp-narrow { max-width: var(--read); }
.wp h2 { font-size: clamp(22px, 3vw, 28px); line-height: 1.3; font-weight: 800; margin-block-end: 18px; }

/* ---- the top -------------------------------------------------------------------------------------------- */
.wp-hero { padding-block: 56px 40px; background: radial-gradient(1200px 420px at 50% -120px, var(--brand-soft), transparent 70%); }
.wp-hero h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.2; font-weight: 800; max-width: 22ch; margin-block: 12px 14px; letter-spacing: -0.01em; }
[dir="rtl"] .wp-hero h1 { letter-spacing: 0; line-height: 1.35; }
.wp-lead { max-width: 68ch; font-size: 18.5px; color: var(--ink-2); }
.wp-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 26px 30px; }
.wp-btns .gx-btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.wp-btns .gx-btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.wp-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 760px; }
.wp-stats li { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.wp-stats b { font-size: 26px; line-height: 1.2; color: var(--brand); font-variant-numeric: tabular-nums; }
.wp-stats span { font-size: 14px; color: var(--muted); }

/* ---- sections ------------------------------------------------------------------------------------------- */
.wp-sec { padding-block: 44px; }
.wp-sec.soft { background: var(--bg-soft); }
.wp-sec.flat { padding-block: 24px; }

/* the wholesalers */
.wp-stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.wp-store { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  color: var(--ink); text-decoration: none; transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s; }
.wp-store:hover { color: var(--ink); box-shadow: var(--shadow); border-color: transparent; transform: translateY(-1px); }
.wp-store-logo { width: 56px; height: 56px; flex: none; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--brand-soft);
  color: var(--brand); font-weight: 800; font-size: 24px; }
.wp-store-logo img { width: 100%; height: 100%; object-fit: cover; }
.wp-store-logo.lg { width: 84px; height: 84px; border-radius: 20px; font-size: 36px; }
.wp-store-b { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wp-store-n { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wp-store-n b { font-size: 17px; }
.wp-store-d { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wp-store-m { color: var(--muted); font-size: 13.5px; }

/* where a wholesaler ships from */
.wp-from { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.6; white-space: nowrap; }
.wp-from.wp-dz { background: var(--brand-soft); color: var(--brand-2); }
.wp-from.wp-cn { background: #fdeaea; color: #a52222; }

/* categories */
.wp-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.wp-cats li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 15px; }
.wp-cats i { color: var(--brand); }
.wp-cats b { color: var(--muted); font-weight: 600; font-size: 13.5px; }

/* products (no prices) */
.wp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.wp-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; color: var(--ink);
  text-decoration: none; transition: box-shadow 0.15s, border-color 0.15s; }
a.wp-card:hover { color: var(--ink); box-shadow: var(--shadow); border-color: transparent; }
.wp-card:target { outline: 3px solid rgb(11 122 75 / 0.45); outline-offset: 2px; }
.wp-card-img { aspect-ratio: 1 / 1; display: grid; place-items: center; background: var(--bg-soft); color: var(--muted); font-size: 36px; overflow: hidden; }
.wp-card-img img { width: 100%; height: 100%; object-fit: cover; }
.wp-card-b { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; font-size: 14px; line-height: 1.5; min-width: 0; }
.wp-card-t { font-weight: 700; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wp-moq { color: var(--ink-2); font-weight: 600; }
.wp-meta { color: var(--muted); font-size: 13px; }
.wp-lock { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; font-size: 13px; }
.wp-card-s { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 13px; padding-block-start: 4px;
  border-block-start: 1px solid var(--line); margin-block-start: 4px; }
.wp-card-s > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* how it works */
.wp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: wp; }
.wp-steps li { counter-increment: wp; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.wp-steps li::before { content: counter(wp); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 800; }
.wp-steps b { font-size: 16.5px; }
.wp-steps span { color: var(--ink-2); font-size: 15px; line-height: 1.6; }

/* one wholesaler */
.wp-crumbs { padding-block: 22px 8px; }
.wp-profile { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.wp-profile-b { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.wp-profile h1 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.25; font-weight: 800; }
.wp-profile-m { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14.5px; }
.wp-tagline { color: var(--ink-2); }
.wp-about { margin-block: 18px 0; max-width: var(--read); color: var(--ink-2); white-space: pre-line; }
.wp-more { margin-block-start: 16px; font-weight: 700; }
.wp-note { display: flex; gap: 12px; align-items: flex-start; margin-block: 8px 48px; padding: 16px 18px; border-radius: 14px; background: var(--accent-soft); color: var(--ink-2); }
.wp-note i { color: #9a6b00; margin-block-start: 5px; }

.wp-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 16px; text-align: center; color: var(--ink-2);
  border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; }
.wp-empty > i { font-size: 38px; color: var(--muted); }
.wp-empty h1 { font-size: 28px; }

@media (max-width: 900px) {
  .wp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wp-in { padding-inline: 16px; }
  .wp-hero { padding-block: 36px 28px; }
  .wp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wp-btns .gx-btn { flex: 1 1 100%; white-space: normal; }
  .wp-stores { grid-template-columns: 1fr; }
  .wp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wp-steps { grid-template-columns: 1fr; }
  .wp-profile .gx-btn { flex: 1 1 100%; }
}
