/* ===== PLUGHUB FINDZ — deep purple + violet, mobile first ===== */
:root {
  --bg:          #0F0420;   /* deep purple-black */
  --bg-card:     #1A0938;   /* card / panel */
  --bg-soft:     #25104F;   /* input / button surface */
  --bg-line:     #3D1A6B;   /* hairlines */
  --fg:          #ffffff;
  --fg-dim:      #C9A8FF;   /* light violet for secondary text */
  --fg-mute:     #9881C5;
  --purple:      #8B2FFF;   /* primary brand */
  --purple-deep: #4A1080;
  --purple-soft: #B57BFF;
  --yellow:      #F5C037;   /* LINK + fav */
  --pink:        #FF1FCB;   /* accent */
  --radius:      14px;
  --shadow:      0 8px 24px rgba(139, 47, 255, .25);
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bot:    env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.5 -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; }

/* APP SHELL: body itself does NOT scroll. iOS Safari only transitions its
   address-toolbar on body scroll, so by moving the scroll into an inner
   container the toolbar stays put and position:fixed elements never move. */
html, body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
.app-shell {
  height: 100%;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 150px;     /* room for fixed footer */
  overscroll-behavior-y: contain;
}
body.legal .app-shell { padding-bottom: 60px; }
body.legal { overflow: auto; height: auto; }   /* legal pages don't use app-shell */
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, button { font-family: inherit; }

/* ----- top bar ----- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, #0F0420 0%, #0F0420 80%, rgba(15,4,32,.95) 100%);
  padding: calc(var(--safe-top) + 14px) 16px 12px;
  border-bottom: 1px solid var(--bg-line);
}
.brand-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; flex: 1; min-width: 0; }
.brand-tiktok {
  flex-shrink: 0;
  width: 38px; height: 38px;
  background: var(--bg-soft); border: 1px solid var(--bg-line);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--purple-soft);
  transition: transform .12s, background .15s, color .15s, border-color .15s;
}
.brand-tiktok svg { width: 20px; height: 20px; display: block; }
.brand-tiktok:hover, .brand-tiktok:focus-visible {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  outline: none;
}
.brand-tiktok:active { transform: scale(.94); }
.brand-mark {
  font-family: "Arial Black", Arial, sans-serif;
  font-weight: 900; letter-spacing: 2px;
  font-size: 28px; color: var(--purple-soft);
}
.brand-mark-findz { color: var(--yellow); }
.brand-sub {
  font-size: 10px; letter-spacing: 3px; color: var(--fg-mute); font-weight: 700;
}
.brand-credit {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px; font-weight: 500; color: var(--fg-dim);
  text-decoration: none;
  letter-spacing: 0.2px;
}
.brand-credit span {
  color: var(--yellow); font-weight: 700;
}
.brand-credit:hover span { text-decoration: underline; }

.searchwrap { display: flex; gap: 8px; margin-top: 12px; }
#search {
  flex: 1; min-width: 0;
  background: var(--bg-soft); border: 1px solid var(--bg-line); color: var(--fg);
  padding: 12px 14px; border-radius: var(--radius); outline: none;
  font-size: 15px;
}
#search::placeholder { color: var(--fg-mute); }
#search:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139,47,255,.22); }
.favtoggle {
  width: 46px; height: 46px; flex-shrink: 0;
  background: var(--bg-soft); border: 1px solid var(--bg-line); color: var(--fg-mute);
  border-radius: var(--radius); font-size: 20px;
  transition: all .15s;
}
.favtoggle[aria-pressed="true"] { color: var(--yellow); border-color: var(--yellow); background: rgba(245,192,55,.1); }

/* Currency picker */
.currency-btn {
  width: 46px; height: 46px; flex-shrink: 0;
  background: var(--bg-soft); border: 1px solid var(--bg-line); color: var(--yellow);
  border-radius: var(--radius);
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 16px; font-weight: 900;
  transition: all .15s;
}
.currency-btn:active { transform: scale(.96); }
.currency-btn[aria-expanded="true"] { background: var(--bg-line); border-color: var(--yellow); }

.currency-menu {
  position: absolute;
  right: 16px;
  top: calc(var(--chips-top, 110px) - 8px);
  background: var(--bg-card);
  border: 1px solid var(--bg-line);
  border-radius: 10px;
  padding: 4px;
  z-index: 35;
  min-width: 140px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 2px;
}
.currency-menu[hidden] { display: none; }
.currency-menu button {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: 0; color: var(--fg);
  font-size: 13px; font-weight: 500; letter-spacing: 0.3px;
  padding: 9px 12px; border-radius: 6px;
  cursor: pointer; text-align: left;
}
.currency-menu button span {
  display: inline-flex; justify-content: center; align-items: center;
  width: 22px; height: 22px;
  background: var(--bg-soft); border-radius: 50%;
  color: var(--yellow); font-weight: 900;
}
.currency-menu button:hover,
.currency-menu button[aria-checked="true"] {
  background: var(--bg-soft);
}
.currency-menu button[aria-checked="true"] {
  color: var(--yellow);
}

/* ----- category chips ----- */
.chips {
  display: flex; gap: 8px; padding: 12px 16px;
  overflow-x: auto; scrollbar-width: none;
  background: var(--bg);
  position: sticky; top: var(--chips-top, 110px); z-index: 20;
  border-bottom: 1px solid var(--bg-line);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  background: var(--bg-soft); border: 1px solid var(--bg-line); color: var(--fg-dim);
  padding: 8px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: 1px;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.chip.is-active {
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  color: #fff; border-color: var(--purple);
  box-shadow: var(--shadow);
}
.chip .badge {
  font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: inherit;
  min-width: 18px; text-align: center;
}
.chip.is-active .badge { background: rgba(0,0,0,.22); }

/* ----- intro one-liner above the catalog ----- */
.intro {
  margin: 0;
  padding: 10px 16px;
  background: var(--bg);
  font-size: 12px;
  line-height: 1.4;
  color: var(--fg-dim);
  text-align: center;
  letter-spacing: 0.2px;
  border-bottom: 1px solid var(--bg-line);
}

/* ----- sort pills ----- */
.sorts {
  display: flex; gap: 6px; padding: 9px 16px 11px;
  background: var(--bg);
  border-bottom: 1px solid var(--bg-line);
  align-items: center;
  overflow-x: auto; scrollbar-width: none;
}
.sorts::-webkit-scrollbar { display: none; }
.sorts-label {
  font-size: 9px; letter-spacing: 2px; color: var(--fg-mute);
  font-weight: 800; flex-shrink: 0; margin-right: 4px;
}
.sort-btn {
  flex-shrink: 0;
  background: transparent; border: 1px solid var(--bg-line); color: var(--fg-mute);
  padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  transition: all .15s;
}
.sort-btn.is-active {
  background: rgba(245,192,55,.1);
  color: var(--yellow);
  border-color: var(--yellow);
}

/* ----- banner ----- */
.banner-warn {
  margin: 12px 16px; padding: 12px 14px;
  background: rgba(245,192,55,.08); border: 1px solid rgba(245,192,55,.3);
  border-radius: var(--radius); color: #FFE680; font-size: 13px;
  display: flex; gap: 6px; flex-direction: column;
}

/* ----- grid ----- */
main { padding: 14px 12px 24px; }
.grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 600px)  { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 900px)  { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(5, 1fr); } }

.card {
  background: var(--bg-card); border: 1px solid var(--bg-line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .12s, border-color .12s, box-shadow .12s;
  position: relative;
}
.card:active { transform: scale(.98); }
.card:hover { border-color: var(--purple); box-shadow: var(--shadow); }

.card-img {
  aspect-ratio: 1 / 1; background: #fff;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img.no-img { color: #555; font-size: 11px; letter-spacing: 2px; }

.card-fav {
  position: absolute; top: 8px; right: 8px;
  width: 34px; height: 34px; border-radius: 999px;
  background: rgba(15,4,32,.65); border: 0; color: #fff;
  font-size: 18px; line-height: 1; padding: 0;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.card-fav[aria-pressed="true"] { color: var(--yellow); }

.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.card-cat {
  font-size: 9px; letter-spacing: 2px; color: var(--purple-soft); font-weight: 800;
}
.card-name {
  font-size: 13px; line-height: 1.25; font-weight: 700; color: var(--fg);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 32px;
}
.card-price {
  font-size: 15px; font-weight: 900; color: var(--yellow);
  margin-top: 2px;
}
.card-yuan {
  font-size: 11px; color: var(--fg-mute); margin-left: 4px; font-weight: 500;
}
.card-actions { display: flex; gap: 6px; margin-top: 6px; }
.card-buy {
  flex: 1; text-align: center;
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  color: #fff; font-weight: 900;
  padding: 8px; border-radius: 8px; font-size: 11px; letter-spacing: 1px;
}
.card-share {
  width: 36px; flex-shrink: 0;
  background: var(--bg-soft); border: 1px solid var(--bg-line); color: var(--fg);
  border-radius: 8px; font-size: 14px; padding: 0;
}

/* ----- empty ----- */
.empty {
  text-align: center; padding: 60px 24px; color: var(--fg-mute);
}

/* ----- footer ----- */
.footbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #0F0420;
  border-top: 1px solid var(--bg-line);
  padding: 10px 12px calc(10px + var(--safe-bot));
  display: flex; flex-direction: column; gap: 8px;
  /* Own GPU layer + hint to keep it parked there */
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Prevent text selection of CTA labels during scrolling */
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
.cta-superbuy { -webkit-user-select: none; user-select: none; }
.cta-superbuy {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #F5C037 0%, #E8A82C 100%);
  color: #1A0938 !important;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(245,192,55,.25);
  transition: transform .12s, box-shadow .12s;
}
.cta-superbuy:active { transform: scale(.98); }
.cta-superbuy-icon {
  font-size: 22px; line-height: 1; flex-shrink: 0;
}
.cta-superbuy-text {
  display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2;
}
.cta-superbuy-title {
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 13px; font-weight: 900; letter-spacing: 1.5px;
}
.cta-superbuy-sub {
  font-size: 11px; font-weight: 600; opacity: .8; margin-top: 2px;
}
.cta-superbuy-arrow {
  font-size: 18px; font-weight: 900; flex-shrink: 0;
}
.footbar-meta {
  display: flex; gap: 6px; justify-content: center; align-items: center;
  flex-wrap: wrap;
  font-size: 11px; color: var(--fg-mute); letter-spacing: 0.5px;
}
.footbar-meta .dot { opacity: .5; }
.powered-by {
  color: var(--fg-mute);
  transition: color .15s;
}
.powered-by span {
  color: #00D4FF;
  font-weight: 700;
}
.powered-by:hover { color: var(--fg); }
.powered-by:hover span { color: #00B8E6; }

/* Tutorial button — outlined card under the gold CTA */
.cta-tutorial {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--bg-line);
  border-radius: 10px;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  font: inherit;
  -webkit-user-select: none; user-select: none;
}
.cta-tutorial:active { background: var(--bg-soft); transform: scale(.99); }
.cta-tutorial-icon {
  width: 26px; height: 26px;
  background: var(--bg-soft); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--yellow); flex-shrink: 0;
}
.cta-tutorial-text {
  flex: 1; min-width: 0; line-height: 1.2;
  display: flex; flex-direction: column;
}
.cta-tutorial-title { font-size: 11px; font-weight: 700; color: var(--fg); }
.cta-tutorial-sub { font-size: 10px; color: var(--fg-mute); margin-top: 2px; }
.cta-tutorial-arrow { font-size: 16px; color: var(--fg-mute); flex-shrink: 0; }

/* Tutorial modal — embeds a YouTube iframe lazy-loaded on first open */
.tmodal[hidden] { display: none !important; }
.tmodal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
}
.tmodal-card {
  width: 100%; max-width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--bg-line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  max-height: 92vh;
  overflow-y: auto;
}
.tmodal-close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(15,4,32,.7); color: #fff; border: 0;
  font-size: 22px; line-height: 1; padding: 0;
  z-index: 2; cursor: pointer;
}
.tmodal-video {
  position: relative;
  padding-bottom: 56.25%;
  background: #000;
  height: 0;
}
.tmodal-video iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
.tmodal-meta { padding: 14px 18px 20px; }
.tmodal-cat { font-size: 10px; letter-spacing: 1.5px; color: var(--yellow); font-weight: 800; }
.tmodal-meta h2 { margin: 4px 0 8px; font-size: 18px; font-weight: 800; line-height: 1.25; color: #fff; }
.tmodal-meta p { margin: 0 0 14px; color: var(--fg-dim); font-size: 13px; line-height: 1.5; }
.tmodal-handle { color: var(--yellow); font-weight: 700; }
.tmodal-cta {
  display: block; text-align: center;
  background: var(--yellow); color: #1A0938;
  font-weight: 900; padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.5px;
  font-size: 13px;
}

/* ----- modal ----- */
.modal[hidden] { display: none !important; }
.modal {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0,0,0,.85);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px;
}
@media (min-width: 600px) { .modal { align-items: center; } }
.modal-card {
  background: var(--bg-card); border: 1px solid var(--bg-line);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow);
}
@media (min-width: 600px) { .modal-card { border-radius: var(--radius); } }
.modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px; border-radius: 999px;
  background: rgba(15,4,32,.65); border: 0; color: #fff;
  font-size: 22px; line-height: 1; padding: 0; z-index: 2;
}
.modal-img {
  aspect-ratio: 1 / 1; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.modal-img img { width: 100%; height: 100%; object-fit: contain; }
.modal-meta { padding: 18px 18px 24px; display: flex; flex-direction: column; gap: 10px; }
.modal-cat { font-size: 10px; letter-spacing: 2px; color: var(--purple-soft); font-weight: 800; }
.modal-meta h2 { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 800; }
.modal-price { font-size: 24px; font-weight: 900; color: var(--yellow); }
.modal-yuan { font-size: 14px; color: var(--fg-mute); font-weight: 500; margin-left: 6px; }
.modal-comment { color: var(--fg-dim); font-size: 13px; margin: 4px 0 8px; }
.modal-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.btn-buy {
  flex: 1; min-width: 140px; text-align: center;
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  color: #fff; font-weight: 900;
  padding: 14px; border-radius: 10px; letter-spacing: 1px;
  box-shadow: var(--shadow);
}
.btn-fav, .btn-share {
  background: var(--bg-soft); border: 1px solid var(--bg-line); color: var(--fg);
  padding: 14px 16px; border-radius: 10px; font-weight: 700;
}
.btn-fav[aria-pressed="true"] { color: var(--yellow); border-color: var(--yellow); }

/* ----- legal pages (privacy etc.) ----- */
body.legal { padding-bottom: 40px; }
.legal-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  color: var(--fg-dim);
  font-size: 15px; line-height: 1.65;
}
.legal-wrap h1 {
  color: var(--fg);
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 28px; letter-spacing: 1px;
  margin: 16px 0 6px;
}
.legal-wrap h2 {
  color: var(--purple-soft);
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 17px; letter-spacing: 1px;
  margin: 28px 0 8px;
}
.legal-wrap p { margin: 10px 0; }
.legal-wrap ul { margin: 10px 0; padding-left: 22px; }
.legal-wrap li { margin: 6px 0; }
.legal-wrap a { color: var(--purple-soft); text-decoration: underline; text-decoration-color: var(--bg-line); }
.legal-wrap a:hover { color: var(--yellow); text-decoration-color: var(--yellow); }
.legal-wrap code {
  background: var(--bg-card); border: 1px solid var(--bg-line);
  padding: 1px 6px; border-radius: 4px;
  font-size: 13px; color: var(--fg-dim);
}
.legal-wrap strong { color: var(--fg); font-weight: 700; }
.legal-date { color: var(--fg-mute); font-size: 13px; margin-top: 0 !important; }
.legal-back {
  display: inline-block;
  background: var(--bg-soft); border: 1px solid var(--bg-line);
  padding: 6px 12px; border-radius: 8px;
  font-size: 13px; color: var(--purple-soft) !important;
  text-decoration: none !important;
}
.legal-back:hover { background: var(--purple); color: #fff !important; border-color: var(--purple); }

/* ----- toast ----- */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  color: #fff;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 800; letter-spacing: 1px; font-size: 13px;
  z-index: 50; box-shadow: var(--shadow);
  animation: toastIn .15s ease-out;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ============================================================
   DYNAMIC HOMEPAGE — NEW badge, TRENDING NOW row, feed-meta
   ============================================================ */

/* Skeleton shimmer while card image loads — pure CSS, costs ~nothing */
.card-img.is-loading {
  background:
    linear-gradient(110deg, rgba(255,255,255,0) 30%, rgba(181,123,255,.18) 50%, rgba(255,255,255,0) 70%),
    linear-gradient(180deg, #2a1450, #1b0b35);
  background-size: 200% 100%, 100% 100%;
  background-position: -100% 0, 0 0;
  background-repeat: no-repeat, no-repeat;
  animation: skel-shimmer 1.3s ease-in-out infinite;
}
.card-img.is-loading img { opacity: 0; transition: opacity .25s; }
.card-img:not(.is-loading) img { opacity: 1; }
@keyframes skel-shimmer {
  0%   { background-position: -100% 0, 0 0; }
  100% { background-position:  100% 0, 0 0; }
}

/* ---- Yupoo sellers chip + section ---- */
.chip-sellers {
  background: linear-gradient(135deg, var(--purple), var(--purple-deep)) !important;
  color: var(--yellow) !important;
  border: 1px solid var(--yellow) !important;
  font-weight: 800;
}
.chip-sellers.is-active {
  background: linear-gradient(135deg, var(--yellow), #e0a420) !important;
  color: #1a0a00 !important;
  border-color: var(--yellow) !important;
}

.sellers-section {
  padding: 0 14px 20px;
}
.sellers-section[hidden] { display: none; }
.sellers-intro {
  padding: 10px 4px 14px;
}
.sellers-title {
  font-family: "Arial Black", sans-serif;
  font-size: 12px; letter-spacing: 2px;
  color: var(--yellow);
}
.sellers-sub {
  font-size: 10.5px; color: var(--fg-mute);
  margin-top: 4px; line-height: 1.45;
}

.sellers-list {
  display: flex; flex-direction: column;
  gap: 9px;
}

.seller-card {
  position: relative;
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--bg-line);
  border-radius: 12px;
  padding: 13px 14px;
  text-decoration: none; color: inherit;
  transition: border-color .12s, transform .08s;
  -webkit-tap-highlight-color: transparent;
}
.seller-card:hover { border-color: var(--purple-soft); }
.seller-card:active { transform: scale(.99); }
.seller-card-disabled { opacity: .55; cursor: default; }

.seller-card-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 5px; flex-wrap: wrap;
}
.seller-badge-v {
  background: rgba(245,192,55,.18);
  color: var(--yellow);
  font-size: 8.5px; letter-spacing: 1.2px;
  padding: 3px 7px; border-radius: 4px;
  font-weight: 700;
}
.seller-spec {
  font-size: 9px; letter-spacing: 1.3px;
  color: var(--purple-soft);
  font-weight: 700;
  text-transform: uppercase;
}
.seller-name {
  font-size: 15px; font-weight: 800;
  color: var(--fg);
  line-height: 1.25;
  margin-bottom: 3px;
}
.seller-tagline {
  font-size: 12px;
  color: var(--fg-dim);
  line-height: 1.4;
}
.seller-stats {
  font-size: 10.5px;
  color: var(--fg-mute);
  margin-top: 6px;
  letter-spacing: .3px;
}
.seller-view {
  position: absolute;
  top: 14px; right: 12px;
  background: var(--bg-soft);
  color: var(--purple-soft);
  border: 1px solid var(--bg-line);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 9.5px; letter-spacing: 1.2px; font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}
.seller-card:hover .seller-view {
  color: var(--yellow); border-color: var(--yellow);
}
/* Reserve space on the right so long names/taglines don't run under VIEW */
@media (min-width: 421px) {
  .seller-card { padding-right: 90px; }
}
@media (max-width: 420px) {
  .seller-view { position: static; display: inline-block; margin-top: 10px; }
}

/* ---- Report an issue (in item modal, sits below main actions) ---- */
.report-row {
  margin-top: 10px;
  text-align: right;
}
.report-toggle {
  background: transparent;
  color: var(--fg-mute);
  border: 0;
  font-family: inherit;
  font-size: 10.5px; letter-spacing: 1px;
  padding: 4px 0;
  cursor: pointer;
  text-transform: uppercase;
}
.report-toggle:hover { color: var(--fg-dim); }
.report-panel {
  margin-top: 6px;
  display: flex; flex-direction: column; gap: 4px;
  text-align: left;
}
/* Must override display:flex so the HTML hidden attribute actually hides it */
.report-panel[hidden] { display: none !important; }
.report-opt {
  background: var(--bg-soft);
  color: var(--fg-dim);
  border: 1px solid var(--bg-line);
  border-radius: 6px;
  padding: 9px 12px; min-height: 38px;
  font-family: inherit;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.report-opt:hover { border-color: var(--fg-mute); color: var(--fg); }
.report-opt:active { transform: scale(.98); }
.report-status {
  font-size: 11px; color: #5DCAA5;
  padding-top: 4px; min-height: 14px;
}

/* ---- Modal image gallery (main + admin-added extras) ---- */
.modal-img-wrap { position: relative; }
.modal-img-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 999px;
  background: rgba(15,4,32,.7); border: 0; color: #fff;
  font-size: 24px; line-height: 1; padding: 0;
  cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.modal-img-nav:hover { background: rgba(15,4,32,.9); }
.modal-img-nav:active { transform: translateY(-50%) scale(.95); }
.modal-img-prev { left: 10px; }
.modal-img-next { right: 10px; }
.modal-img-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
  z-index: 2;
}
.modal-img-dots[hidden] { display: none !important; }
.modal-img-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: background .14s, width .14s;
}
.modal-img-dot.is-active { background: var(--yellow); width: 22px; border-radius: 4px; }

/* ---- Admin: "Manage Images" panel inside item modal ---- */
.img-admin-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--bg-line);
}
.img-admin-toggle {
  background: transparent;
  color: var(--purple-soft);
  border: 1px dashed var(--purple-soft);
  border-radius: 6px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 10px; letter-spacing: 1.2px; font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
}
.img-admin-toggle:hover { background: rgba(181,123,255,.06); }
.img-admin-body {
  margin-top: 10px;
}
.img-admin-list {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 8px;
}
.img-admin-row {
  display: grid; grid-template-columns: 40px 1fr 32px;
  gap: 8px; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--bg-line);
  border-radius: 6px; padding: 6px 8px;
}
.img-admin-row img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; background: #fff; }
.img-admin-url {
  font-size: 11px; color: var(--fg-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.img-admin-del {
  width: 32px; height: 32px; border-radius: 6px;
  background: rgba(226,75,74,.1); color: #F09595;
  border: 1px solid rgba(226,75,74,.3);
  font-size: 16px; line-height: 1; padding: 0;
  cursor: pointer;
}
.img-admin-del:hover { background: rgba(226,75,74,.2); }
.img-admin-empty { font-size: 11px; color: var(--fg-mute); padding: 8px 4px; }
.img-admin-form {
  display: grid; grid-template-columns: 1fr 64px; gap: 6px;
}
.img-admin-form input {
  background: var(--bg-soft); border: 1px solid var(--bg-line); border-radius: 6px;
  color: var(--fg); font-size: 12px; padding: 8px 10px;
  font-family: inherit; outline: none;
  -webkit-appearance: none; appearance: none;
}
.img-admin-form input:focus { border-color: var(--purple-soft); }
.img-admin-form button {
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  color: #fff; border: 0; border-radius: 6px;
  font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  cursor: pointer; text-transform: uppercase;
}
.img-admin-form button:active { transform: scale(.97); }
.img-admin-status {
  font-size: 10.5px; color: var(--fg-mute);
  margin-top: 6px; min-height: 14px;
}

/* ---- Multi-agent buy panel inside item modal ---- */
.agent-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--bg-line);
}
.agent-label {
  font-size: 10px; letter-spacing: 2px;
  color: var(--fg-mute); font-weight: 700;
  margin-bottom: 8px;
}
.agent-row {
  display: grid; grid-template-columns: 1fr;
  gap: 6px;
}
.agent-cell {
  /* iOS HIG requires 44x44 min tap targets — buttons sized accordingly */
  display: grid; grid-template-columns: 1fr 44px;
  gap: 4px;
}
.agent-btn {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 44px;
  padding: 11px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--bg-line);
  border-radius: 8px;
  color: var(--fg);
  font-family: inherit;
  font-size: 12.5px; font-weight: 700; letter-spacing: .5px;
  cursor: pointer;
  transition: border-color .12s, background .12s, transform .08s;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.agent-btn:hover { border-color: var(--purple-soft); background: var(--bg-card); }
.agent-btn:active { transform: scale(.98); }
.agent-name { color: var(--fg); }
.agent-arrow { color: var(--purple-soft); font-size: 16px; line-height: 1; flex-shrink: 0; margin-left: 8px; }

.agent-copy {
  display: flex; align-items: center; justify-content: center;
  width: 44px; min-height: 44px;
  background: var(--bg-soft);
  border: 1px solid var(--bg-line);
  border-radius: 8px;
  color: var(--fg-mute);
  cursor: pointer; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.agent-copy:hover { color: var(--yellow); border-color: var(--yellow); }
.agent-copy:active { transform: scale(.94); }

.agent-btn.is-loading, .agent-copy.is-loading {
  opacity: .55; pointer-events: none;
}
.agent-btn.is-loading .agent-arrow { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* "JUST ADDED" corner chip on product cards — subtle, non-intrusive */
.card-new {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: rgba(15, 4, 32, .72);
  color: var(--purple-soft);
  font-size: 8.5px; letter-spacing: 1.2px; font-weight: 700;
  padding: 3px 6px; border-radius: 4px;
  border: 1px solid rgba(181, 123, 255, .25);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
  text-transform: uppercase;
}

/* TRENDING NOW horizontal row above the grid */
.trending {
  margin: 6px 12px 14px;
  padding: 12px 12px 14px;
  background: linear-gradient(180deg, rgba(181,123,255,.08), rgba(245,192,55,.04));
  border: 1px solid var(--bg-line);
  border-radius: 14px;
}
.trending[hidden] { display: none; }
.trending-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 0 2px 10px;
}
.trending-title {
  font-family: "Arial Black", sans-serif;
  font-size: 12px; letter-spacing: 2px;
  color: var(--yellow);
  display: inline-flex; align-items: center; gap: 8px;
}
.trending-flame {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #ff5e3a; box-shadow: 0 0 10px #ff5e3a;
  animation: flamePulse 1.6s ease-in-out infinite;
}
@keyframes flamePulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .55; transform: scale(1.25); }
}
.trending-sub {
  font-size: 10px; letter-spacing: 1.5px;
  color: var(--fg-mute); text-transform: uppercase;
}
.trending-row {
  display: flex; gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2px;
  scrollbar-width: none;
}
.trending-row::-webkit-scrollbar { display: none; }
.trending-card {
  flex: 0 0 130px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--bg-line);
  border-radius: 10px;
  padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer; text-align: left;
  font: inherit; color: inherit;
  position: relative;
  transition: transform .12s, border-color .12s;
}
.trending-card:active { transform: scale(.97); }
.trending-card:hover  { border-color: var(--yellow); }
.trending-rank {
  position: absolute; top: -6px; left: -6px;
  background: var(--yellow); color: #1a0a00;
  font-family: "Arial Black", sans-serif;
  font-size: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.trending-img {
  aspect-ratio: 1 / 1; background: #fff;
  border-radius: 6px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.trending-img img { width: 100%; height: 100%; object-fit: cover; }
.trending-noimg { color: #555; font-size: 9px; letter-spacing: 1.5px; }
.trending-name {
  font-size: 11px; line-height: 1.25; font-weight: 700; color: var(--fg);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 28px;
}
.trending-price {
  font-size: 12px; font-weight: 900; color: var(--yellow);
}

/* "247 items · updated 3 min ago" subtitle above grid */
.feed-meta {
  font-size: 11px; letter-spacing: 1px;
  color: var(--fg-mute);
  text-transform: uppercase;
  padding: 0 14px 8px;
}

