/* ==========================================================================
   MarketFlow - storefront styles
   Dark surface, grid texture, lime accent.
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --bg-2: #0d0d0d;
  --panel: #111111;
  --panel-2: #171717;
  --line: #242424;
  --line-soft: #1b1b1b;
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --accent: #ccff00;
  --accent-ink: #0a0a0a;
  --danger: #ff5252;
  --ok: #3ddc84;
  --warn: #ffb020;
  --radius: 10px;
  --radius-lg: 16px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 96px 96px;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

.shell { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .76rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.75rem; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; gap: .75rem; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* ---------- Promo banner ---------- */
.banner {
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px 16px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 8, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); }
.brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(204, 255, 0, .55);
}
.nav-links { display: flex; gap: 22px; font-size: .92rem; }
.nav-links a { color: #d5d5d5; position: relative; padding: 4px 0; }
.nav-links a:hover, .nav-links a.is-active { color: #fff; }
.nav-links a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: var(--accent);
}
.nav-links .count {
  display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; font-size: .68rem; font-weight: 700; text-align: center;
}
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: .9rem; }
.link-quiet { color: #d5d5d5; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; }
.user-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
}
.nav-toggle {
  display: none; margin-left: auto;
  background: transparent; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; font-size: 1.1rem; padding: 4px 10px; cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: inherit; font-size: .95rem; font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #d9ff3d; color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: #3a3a3a; color: #fff; }
.btn-ghost:hover { border-color: #6a6a6a; color: #fff; }
.btn-dark { background: var(--panel-2); border-color: var(--line); color: #fff; }
.btn-dark:hover { border-color: #3d3d3d; color: #fff; }
.btn-danger { background: transparent; border-color: #572323; color: #ff8080; }
.btn-danger:hover { background: rgba(255, 82, 82, .1); color: #ff9b9b; }
.btn-sm { padding: 9px 16px; font-size: .85rem; }
.btn-block { width: 100%; }

/* Delivery people */
.courier-stats {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center;
  font-size: .8rem; color: var(--muted); margin-bottom: 14px;
}
.courier-stats strong { color: var(--text); font-weight: 600; }
.courier-filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #101010;
}
.courier-filters input[type="search"], .courier-filters select {
  background: #0b0b0b; border: 1px solid var(--line); border-radius: 9px;
  color: var(--text); padding: 9px 11px; font: inherit; font-size: .85rem; min-width: 180px;
}
.courier-filters input[type="search"]:focus, .courier-filters select:focus { outline: none; border-color: var(--accent); }
.check-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted);
}
.check-pill input { accent-color: var(--accent); }

.courier-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.courier-card {
  border: 1px solid var(--line); border-radius: 14px; background: #101010;
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s ease, transform .15s ease;
}
.courier-card:hover { border-color: rgba(204,255,0,.28); transform: translateY(-2px); }
.courier-card.is-available { border-left: 3px solid var(--accent); }
.courier-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.courier-avatar {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #1b1b1b; border: 1px solid var(--line);
  font-size: .85rem; font-weight: 700; letter-spacing: .02em; color: var(--accent);
}
.courier-avatar-lg { width: 62px; height: 62px; flex-basis: 62px; font-size: 1.05rem; border-radius: 16px; }
.courier-card h3 { margin: 0; font-size: .98rem; }
.courier-card h3 a { color: var(--text); text-decoration: none; }
.courier-card h3 a:hover { color: var(--accent); }
.courier-area { margin: 3px 0 0; font-size: .78rem; color: var(--muted); }
.courier-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .75rem; color: var(--muted);
}
.courier-actions { display: flex; gap: 8px; margin-top: auto; }
.presence.courier-state.is-busy { color: #f0b429; }
.presence.courier-state.is-busy .presence-dot { background: #f0b429; box-shadow: 0 0 0 3px rgba(240,180,41,.16); }

.courier-profile {
  border: 1px solid var(--line); border-radius: 16px; background: #101010;
  padding: 22px; margin-top: 14px;
}
.courier-profile-head { display: flex; gap: 16px; align-items: flex-start; }
.area-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.area-chip {
  font-size: .76rem; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: #151515; color: var(--muted);
}
.area-chip.is-main { border-color: rgba(204,255,0,.35); color: var(--text); background: rgba(204,255,0,.07); }
.courier-contact { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-soft); }

/* Delivery hero + map */
.courier-hero {
  border-bottom: 1px solid var(--line-soft);
  background: radial-gradient(900px 380px at 12% -10%, rgba(204,255,0,.07), transparent 60%), #0b0b0b;
}
.courier-hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 34px;
  align-items: center; padding: 46px 0 40px;
}
.courier-hero-copy h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 8px 0 12px; letter-spacing: -.02em; }
.courier-hero-copy .lead { max-width: 46ch; }
.courier-hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 22px; }
.courier-hero-stats div { display: flex; flex-direction: column; }
.courier-hero-stats strong { font-size: 1.45rem; letter-spacing: -.02em; }
.courier-hero-stats span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.courier-hero-map { min-width: 0; }

.map-shell {
  position: relative; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: #0e0e0e; min-height: 320px;
}
.map-shell .map-canvas { position: relative; width: 100%; height: 320px; overflow: hidden; background: #101418; }
.map-canvas.map-native { cursor: grab; }
.map-tiles, .map-pins, .map-card, .map-zoom, .map-credit { position: absolute; }
.map-tiles { inset: 0; }
.map-tile { position: absolute; width: 256px; height: 256px; display: block; user-select: none; pointer-events: none; }
.map-pins { inset: 0; }
.map-pin {
  position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column;
  align-items: center; gap: 2px; background: none; border: 0; padding: 0; cursor: pointer;
}
.map-pin-dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgba(204,255,0,.18), 0 2px 6px rgba(0,0,0,.5);
}
.map-pin-label {
  font-size: .68rem; font-weight: 600; color: #fff; background: rgba(0,0,0,.72);
  padding: 2px 6px; border-radius: 999px; white-space: nowrap;
}
.map-card {
  z-index: 4; width: 210px; padding: 10px 12px; border-radius: 10px; background: #0d0d0d;
  border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.5); font-size: .78rem; color: var(--text);
}
.map-card strong { display: block; margin-bottom: 2px; }
.map-card p { margin: 2px 0; color: var(--muted); }
.map-card a { color: var(--accent); }
.map-zoom { top: 8px; right: 8px; z-index: 3; display: flex; flex-direction: column; gap: 4px; }
.map-zoom button {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #141414;
  color: var(--text); font-size: 1rem; line-height: 1; cursor: pointer;
}
.map-zoom button:hover { border-color: var(--accent); color: var(--accent); }
.map-credit {
  right: 6px; bottom: 4px; z-index: 2; font-size: .62rem; color: #cfe0ef;
  background: rgba(0,0,0,.55); padding: 1px 5px; border-radius: 4px; text-decoration: none;
}
.map-links { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); background: #101010; }
.map-link {
  font-size: .72rem; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--text); text-decoration: none; background: #161616;
}
.map-link:hover { border-color: var(--accent); color: var(--accent); }
.map-hint { margin: 0; padding: 0 10px 8px; font-size: .7rem; color: var(--muted); }
.map-hint a { color: var(--accent); }
.map-links { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); background: #101010; }
.map-link {
  font-size: .74rem; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--text); text-decoration: none; background: #161616;
}
.map-link:hover { border-color: var(--accent); color: var(--accent); }
.map-hint { margin: 0; padding: 0 12px 10px; font-size: .7rem; color: var(--muted); }
.map-hint a { color: var(--accent); }
/* The live badge above the map: a quiet heartbeat, not a strobe. */
.map-shell { position: relative; }
.map-shell.is-live { min-height: 0; }
.map-live {
  display: flex; align-items: center; gap: 7px;
  margin: 0; padding: 7px 12px;
  font-size: .72rem; letter-spacing: .02em; text-transform: none;
  color: var(--muted); background: #101010; border-bottom: 1px solid var(--line);
}
.map-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #37d67a; box-shadow: 0 0 0 0 rgba(55, 214, 122, .6);
  animation: map-live-pulse 2.4s ease-out infinite;
  flex: 0 0 auto;
}
.map-live.is-stale { color: #e0a34a; }
.map-live.is-stale .map-live-dot { background: #e0a34a; animation-duration: 1.1s; }
@keyframes map-live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(55, 214, 122, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(55, 214, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(55, 214, 122, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .map-live-dot { animation: none; }
}
.map-empty[hidden] { display: none; }
.map-shell.no-points .map-canvas { opacity: .35; filter: grayscale(1); }
.map-empty {
  position: absolute; inset: auto 0 0 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(transparent, rgba(0,0,0,.82)); font-size: .76rem; color: var(--text);
  pointer-events: none;
}
.map-empty span { color: var(--muted); }
.map-shell.has-points .map-empty { display: none; }
.map-caption { margin: 8px 0 0; font-size: .7rem; color: var(--muted); }
.leaflet-container { background: #0e0e0e; font: inherit; }
.courier-filters-count { margin-left: auto; font-size: .74rem; color: var(--muted); }

/* Restyled directory cards */
.courier-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.courier-card {
  border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, #131313, #0f0f0f);
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.courier-card:hover { transform: translateY(-3px); border-color: rgba(204,255,0,.32); box-shadow: 0 16px 34px rgba(0,0,0,.45); }
.courier-card.is-available { border-left: 3px solid var(--accent); }
.courier-card .courier-avatar { border-radius: 14px; }
.courier-card .courier-actions .btn { flex: 1; text-align: center; }
.courier-footnote {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px;
  margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line-soft);
}
.courier-footnote strong { font-size: .82rem; display: block; margin-bottom: 6px; }
.courier-footnote p { margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.6; }

/* Driver panel stats */
.driver-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.driver-stat { border: 1px solid var(--line); border-radius: 14px; background: #101010; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.driver-stat .label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.driver-stat strong { font-size: .95rem; }

/* Admin tiles */
.admin-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0 0 18px; }
.admin-tile { border: 1px solid var(--line); border-radius: 14px; background: #101010; padding: 14px 16px; }
.admin-tile span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.admin-tile strong { font-size: 1.35rem; letter-spacing: -.02em; }
.admin-tile.is-warn strong { color: #f0b429; }

/* Chat attachments */
.chat-attach {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
  border: 1px solid var(--line); background: #131313; color: var(--muted);
  font-size: 1.15rem; line-height: 1; cursor: pointer;
}
.chat-attach:hover { border-color: var(--accent); color: var(--text); }
.chat-attach input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chat-attach-note { margin: 0 0 6px; font-size: .68rem; color: var(--muted); }
.chat-attach-hint { margin: 0; padding: 8px 12px 0; font-size: .72rem; color: var(--accent); }
.msg-file { margin: 6px 0 4px; }
.msg-file img { max-width: 220px; width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.msg-file audio { width: 240px; max-width: 100%; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 860px) {
  .courier-hero-grid { grid-template-columns: 1fr; gap: 22px; padding: 32px 0 26px; }
  .map-shell .map-canvas, .map-shell .map-frame { height: 240px; }
  .map-shell { min-height: 240px; }
}

/* Delivery: photos, verification, stars, payments */
.courier-photo { object-fit: cover; display: block; }
img.courier-avatar { border: 1px solid var(--line); background: #151515; }
.form-photo { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 8px; }
.courier-vehicle { width: 100%; max-width: 420px; border-radius: 12px; border: 1px solid var(--line); }

.courier-trust { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.badge-verify {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .68rem; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line);
}
.badge-verify svg { width: 11px; height: 11px; }
.badge-verify.is-verified { color: #101010; background: var(--accent); border-color: var(--accent); }
.badge-verify.is-new { color: var(--muted); background: #161616; }

.stars { display: inline-flex; align-items: center; gap: 1px; font-size: .78rem; line-height: 1; }
.star { color: #2a2a2a; }
.star.is-full { color: #f0b429; }
.star.is-half {
  color: transparent;
  background: linear-gradient(90deg, #f0b429 50%, #2a2a2a 50%);
  -webkit-background-clip: text; background-clip: text;
}
.stars-text { margin-left: 6px; font-size: .72rem; color: var(--muted); }
.stars-text strong { color: var(--text); }

.pay-links { display: flex; flex-wrap: wrap; gap: 10px; }
.pay-link {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #131313; text-decoration: none; color: var(--text); min-width: 130px;
  transition: border-color .15s ease, transform .15s ease;
}
.pay-link:hover { border-color: var(--accent); transform: translateY(-1px); }
.pay-link strong { font-size: .8rem; }
.pay-link span { font-size: .72rem; color: var(--muted); }

.rating-summary { display: flex; flex-direction: column; gap: 4px; }
.review-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.review-list li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #101010; }
.review-list p { margin: 6px 0 0; font-size: .84rem; color: var(--text); }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rate-form { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #101010; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-input label { font-size: 1.5rem; line-height: 1; color: #2a2a2a; cursor: pointer; transition: color .12s ease; }
.star-input label:hover, .star-input label:hover ~ label { color: #f0b429; }
.star-input input:checked ~ label { color: #f0b429; }
.star-input input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Delivery strip on the home page */
.courier-strip { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Chat with us (AI assistant) */
.ai-chat { position: fixed; right: 20px; bottom: 20px; z-index: 60; font-family: inherit; }
.ai-chat-bubble {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(204,255,0,.35);
  background: #141414; color: var(--text);
  font-size: .86rem; font-weight: 600; letter-spacing: .01em;
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.ai-chat-bubble:hover { transform: translateY(-2px); border-color: var(--accent); background: #191919; }
.ai-chat-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgba(204,255,0,.15);
  animation: ai-pulse 2.2s ease-in-out infinite;
}
@keyframes ai-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(204,255,0,.16); }
  50% { box-shadow: 0 0 0 7px rgba(204,255,0,.04); }
}
.ai-chat-panel {
  position: absolute; right: 0; bottom: 62px;
  width: min(360px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 120px));
  display: flex; flex-direction: column;
  background: #101010; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55); overflow: hidden;
}
.ai-chat-panel[hidden] { display: none; }
.ai-chat-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); background: #151515;
}
.ai-chat-head strong { display: block; font-size: .92rem; }
.ai-chat-sub { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; }
.ai-chat-close {
  border: 0; background: transparent; color: var(--muted); font-size: 1.3rem;
  line-height: 1; cursor: pointer; padding: 0 2px;
}
.ai-chat-close:hover { color: var(--text); }
.ai-chat-log {
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto; flex: 1; min-height: 160px;
}
.ai-msg {
  max-width: 88%; padding: 9px 12px; border-radius: 12px;
  font-size: .84rem; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word;
}
.ai-msg-bot { align-self: flex-start; background: #1c1c1c; border: 1px solid var(--line); color: var(--text); }
.ai-msg-user { align-self: flex-end; background: var(--accent); color: #101010; font-weight: 500; }
.ai-thinking { display: inline-flex; gap: 4px; align-items: center; }
.ai-thinking span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: ai-dot 1.1s infinite ease-in-out;
}
.ai-thinking span:nth-child(2) { animation-delay: .15s; }
.ai-thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ai-chat-form {
  display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #131313;
}
.ai-chat-form input {
  flex: 1; min-width: 0; background: #0b0b0b; border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 11px; color: var(--text); font: inherit; font-size: .84rem;
}
.ai-chat-form input:focus { outline: none; border-color: var(--accent); }
.ai-chat-note { margin: 0; padding: 0 14px 12px; font-size: .68rem; color: var(--muted); }

@media (max-width: 520px) {
  .ai-chat { right: 12px; bottom: 12px; }
  .ai-chat-bubble { padding: 11px 15px; }
  .ai-chat-panel { width: calc(100vw - 24px); }
}

/* Seller presence */
.presence {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; color: var(--muted); letter-spacing: .01em; white-space: nowrap;
}
.presence-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #6b6b6b; box-shadow: 0 0 0 3px rgba(107,107,107,.14);
}
.presence.is-online { color: #79e8a8; }
.presence.is-online .presence-dot {
  background: #3ddc84; box-shadow: 0 0 0 3px rgba(61,220,132,.18);
  animation: presence-pulse 2.4s ease-in-out infinite;
}
@keyframes presence-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(61,220,132,.18); }
  50% { box-shadow: 0 0 0 5px rgba(61,220,132,.08); }
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.offer-card .shop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Rich descriptions (sandboxed seller HTML) */
.rich-offer { margin: 0 0 18px; }
.rich-frame {
  width: 100%; min-height: 140px; border: 0; display: block;
  background: transparent; border-radius: 10px;
}
.rich-preview {
  width: 100%; height: 360px; border: 1px solid var(--line);
  border-radius: 10px; background: #0c0c0c; margin-top: 10px;
}

/* Offer packs */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plan-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; }
.plan-price { font-size: 1.7rem; font-weight: 600; margin: 6px 0 2px; letter-spacing: -.02em; }
.paypal-slot { min-height: 40px; }

/* PayPal buttons (brand colours, readable in both themes) */
.btn-paypal {
  background: #ffc439; border-color: #ffc439; color: #001c64; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-paypal:hover { background: #f0b429; border-color: #f0b429; color: #001c64; }
.btn-paypal:disabled { opacity: .55; cursor: not-allowed; }
.paypal-mark { font-style: italic; font-weight: 800; letter-spacing: -.02em; }
.paypal-already { margin-top: 12px; }
.paypal-already summary { cursor: pointer; font-size: .8rem; color: var(--muted); }
.paypal-already[open] summary { margin-bottom: 8px; }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-paypal {
  background: #ffc439; color: #111; font-weight: 700; width: 100%; padding: 14px 20px;
}
.btn-paypal span { font-weight: 500; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line-soft); }
.hero-grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: 56px; align-items: center; }
.eyebrow {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: #b9b9b9; font-weight: 600; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.035em; margin-bottom: 18px; }
.hero .lead { color: #c9c9c9; font-size: 1.05rem; max-width: 46ch; }

/* Search */
.searchbar {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 8px 8px 16px;
  margin-top: 26px;
  max-width: 560px;
}
.searchbar input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none;
  color: var(--text); font-family: inherit; font-size: .95rem;
  padding: 8px 0;
}
.searchbar input::placeholder { color: #7b7b7b; }

.hero-links { display: flex; gap: 18px; margin-top: 18px; font-size: .9rem; }
.hero-links a { color: #d8d8d8; border-bottom: 1px solid #444; padding-bottom: 2px; }
.hero-links a:hover { color: var(--accent); border-color: var(--accent); }

/* Feature card */
.feature-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px 24px;
}
.feature-row { display: flex; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.feature-row:last-of-type { border-bottom: 0; }
.feature-row .ico {
  flex: 0 0 38px; height: 38px; border-radius: 10px;
  background: rgba(204, 255, 0, .08);
  border: 1px solid rgba(204, 255, 0, .22);
  display: grid; place-items: center; color: var(--accent);
}
.feature-row .ico svg { width: 19px; height: 19px; }
.feature-row h3 { font-size: .98rem; margin-bottom: 4px; }
.feature-row p { margin: 0; color: var(--muted); font-size: .87rem; line-height: 1.45; }
.stat-strip {
  display: flex; align-items: baseline; gap: 14px;
  border-top: 1px solid var(--line-soft);
  padding: 20px 0;
}
.stat-strip .num {
  font-size: 2.6rem; font-weight: 700; color: var(--accent); line-height: 1; letter-spacing: -0.04em;
}
.stat-strip .label {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: #cfcfcf; font-weight: 600;
}

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.5rem; margin: 0; }
.section-head .count { font-size: .85rem; color: var(--muted); font-weight: 500; }
.section-head a { font-size: .88rem; color: #d0d0d0; border-bottom: 1px solid #3a3a3a; }
.section-head a:hover { color: var(--accent); border-color: var(--accent); }

/* Category chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip {
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel);
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  color: #cfcfcf; white-space: nowrap;
}
.chip:hover { border-color: #444; color: #fff; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Offer grid ---------- */
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.offer-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
}
.offer-card:hover { border-color: #3a3a3a; transform: translateY(-2px); }
.offer-thumb {
  position: relative; aspect-ratio: 4 / 3; background: var(--panel-2);
  display: grid; place-items: center; overflow: hidden;
}
.offer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.offer-thumb video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; background: #0b0b0b; }
.offer-thumb .play-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: rgba(0, 0, 0, .58); border: 1px solid rgba(255, 255, 255, .38);
  pointer-events: none; transition: background .15s ease, transform .15s ease;
}
.offer-thumb .play-badge svg { margin-left: 2px; }
.offer-card:hover .offer-thumb .play-badge { background: rgba(0, 0, 0, .74); transform: translate(-50%, -50%) scale(1.06); }
.offer-card-video .offer-body h3 { display: flex; align-items: center; gap: 6px; }
.offer-thumb .ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  color: #3f3f3f; font-size: 2rem; font-weight: 700; letter-spacing: -0.03em;
  background: repeating-linear-gradient(135deg, #131313, #131313 12px, #161616 12px, #161616 24px);
}
.offer-thumb .tag {
  position: absolute; left: 10px; top: 10px;
  background: rgba(0, 0, 0, .72); border: 1px solid #2f2f2f;
  color: #e8e8e8; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px; font-weight: 600;
}
.offer-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.offer-body .cat { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.offer-body h3 { font-size: 1rem; margin: 0; font-weight: 600; }
.offer-body .price { color: var(--accent); font-weight: 700; font-size: 1.05rem; margin-top: auto; }
.offer-body .shop { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: #4a4a4a; display: inline-block; }

/* ---------- Comments ---------- */
.comments {
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-soft);
}
.comments-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.comments-head h2 { font-size: 1.05rem; margin: 0; }
.comments-head .count { color: var(--muted); font-weight: 500; font-size: .9rem; }
.comments-head p { margin: 0; }

.comment-form {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.comment-form input[type="text"], .comment-form input:not([type]), .comment-form textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text); padding: 10px 12px; font: inherit;
}
.comment-form textarea { resize: vertical; min-height: 74px; line-height: 1.5; }
.comment-form input:focus, .comment-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.comment-name { max-width: 260px; }
.comment-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.comment-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.comment { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.comment:last-child { border-bottom: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-head strong { font-size: .92rem; }
.comment-avatar {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: .7rem; font-weight: 700; color: var(--muted); flex: 0 0 auto;
}
.comment-delete { margin: 0 0 0 auto; }
.comment-body { margin: 6px 0 0 32px; font-size: .93rem; line-height: 1.6; color: var(--text); }
.comment-body br + br { display: block; content: ""; margin-top: 6px; }
.link-button {
  background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer;
  font: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.link-button:hover { color: var(--danger); }

@media (max-width: 640px) {
  .comment-name { max-width: 100%; }
  .comment-body { margin-left: 0; }
}

/* ---------- Live room ---------- */
.room {
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-soft);
}
.room .comments-head { margin-bottom: 6px; }
.room-list {
  list-style: none; margin: 0 0 12px; padding: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 10px;
  max-height: 420px; overflow-y: auto; scroll-behavior: smooth;
}
.room-empty { padding: 6px 2px; }
.room-msg { display: flex; gap: 10px; align-items: flex-start; }
.room-msg.is-mine { flex-direction: row-reverse; }
.room-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: .72rem; font-weight: 700;
  color: var(--muted); background: var(--panel-2); border: 1px solid var(--line);
}
.room-bubble {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 12px; max-width: 78%; min-width: 0;
}
.room-msg.is-mine .room-bubble { background: rgba(204, 255, 0, .1); border-color: rgba(204, 255, 0, .35); }
.room-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.room-meta strong { font-size: .82rem; }
.room-delete { margin: 0; }
.room-body { margin: 3px 0 0; font-size: .93rem; line-height: 1.55; overflow-wrap: anywhere; }
.room-body br + br { display: block; content: ""; margin-top: 6px; }

.room-form {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px;
}
.room-form input[type="text"], .room-form input:not([type]) {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 9px 12px; font: inherit; min-width: 0;
}
.room-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.room-name { flex: 0 0 160px; max-width: 100%; }
.room-input { flex: 1 1 240px; }
.room-form button[type="submit"] { flex: 0 0 auto; }
.room-form button[disabled] { opacity: .6; cursor: progress; }
.room-attach {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 50%; color: var(--muted); cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2);
}
.room-attach:hover { color: var(--accent); border-color: var(--accent); }
.room-attach input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.room-chip {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 0; padding: 5px 10px;
  border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line);
  font-size: .72rem; color: var(--muted); width: fit-content; max-width: 100%;
}
.room-chip[hidden] { display: none; }
.room-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-hint { margin: 8px 0 0; line-height: 1.5; }

.room-media { margin-top: 8px; }
.room-media img {
  display: block; max-width: 100%; max-height: 260px; width: auto; border-radius: 10px;
  border: 1px solid var(--line); object-fit: cover;
}
.room-media video {
  display: block; max-width: 100%; max-height: 280px; border-radius: 10px;
  border: 1px solid var(--line); background: #000;
}
.room-media audio { width: 100%; max-width: 300px; height: 34px; }

.room-error { color: var(--danger); margin: 8px 0 0; }
.room-clear { margin: 10px 0 0; }

@media (max-width: 640px) {
  .room-name { flex: 1 1 100%; }
  .room-input { flex: 1 1 100%; }
  .room-form button[type="submit"] { flex: 1 1 100%; }
  .room-bubble { max-width: 88%; }
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.step .num { font-size: .8rem; font-weight: 700; letter-spacing: .14em; color: var(--accent); }
.step h3 { margin: 10px 0 6px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------- Empty state ---------- */
.empty {
  border: 1px dashed #2c2c2c; border-radius: var(--radius);
  padding: 46px 24px; text-align: center; background: rgba(255, 255, 255, .012);
}
.empty h3 { font-size: 1.15rem; margin-bottom: 8px; }
.empty p { color: var(--muted); margin-bottom: 18px; }

/* ---------- Alerts / badges ---------- */
.alert {
  border-radius: 8px; padding: 12px 16px; font-size: .9rem;
  margin: 18px 0; border: 1px solid;
}
.alert-success { background: rgba(61, 220, 132, .08); border-color: rgba(61, 220, 132, .3); color: #a8f0c6; }
.alert-error { background: rgba(255, 82, 82, .08); border-color: rgba(255, 82, 82, .3); color: #ffb3b3; }
.alert-info { background: rgba(204, 255, 0, .07); border-color: rgba(204, 255, 0, .25); color: #e8ff9c; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
  border: 1px solid transparent;
}
.badge-ok { background: rgba(61, 220, 132, .12); border-color: rgba(61, 220, 132, .35); color: #79e8a8; }
.badge-warn { background: rgba(255, 176, 32, .12); border-color: rgba(255, 176, 32, .35); color: #ffcb6b; }
.badge-bad { background: rgba(255, 82, 82, .12); border-color: rgba(255, 82, 82, .35); color: #ff8e8e; }
.badge-muted { background: #1b1b1b; border-color: #2e2e2e; color: #a5a5a5; }
.badge-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
/* Product-only offer fields must stay hidden even when a theme sets display:flex. */
[data-product-only].is-type-hidden { display: none !important; }
.field.full { grid-column: 1 / -1; }
label { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #c4c4c4; font-weight: 600; }
.hint { font-size: .76rem; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="url"], input[type="search"], input[type="file"], input[type="date"], select, textarea {
  width: 100%;
  background: #0c0c0c;
  border: 1px solid #2b2b2b;
  border-radius: 8px;
  color: var(--text);
  font-family: inherit; font-size: .94rem;
  padding: 11px 13px;
  outline: none;
  transition: border-color .15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 130px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.check-row:last-child { border-bottom: 0; }
.check-row label { text-transform: none; letter-spacing: 0; font-size: .9rem; color: #e2e2e2; font-weight: 500; }
.check-row .hint { display: block; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 0 0 18px; }
legend { padding: 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #c4c4c4; font-weight: 600; }
.form-note { font-size: .8rem; color: var(--muted); }

.auth-wrap { max-width: 460px; margin: 56px auto 80px; padding: 0 24px; }
.auth-wrap h1 { font-size: 1.9rem; margin-bottom: 6px; }
.auth-alt { text-align: center; font-size: .88rem; color: var(--muted); margin-top: 18px; }
.auth-alt a { color: var(--accent); }

/* ---------- Offer detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: start; padding: 40px 0 56px; }
.gallery-main {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--panel-2); aspect-ratio: 4 / 3; display: grid; place-items: center;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #0c0c0c; }
.gallery-main .ph { color: #3a3a3a; font-size: 3rem; font-weight: 700; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs button {
  width: 76px; height: 60px; border-radius: 8px; overflow: hidden; padding: 0;
  border: 1px solid var(--line); background: var(--panel-2); cursor: pointer;
}
.thumbs button.is-active { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.embed { position: relative; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #000; }
.embed iframe, .embed video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }

.buy-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.buy-box .price-lg { font-size: 2rem; font-weight: 700; color: var(--accent); letter-spacing: -0.03em; }
.buy-box .title-lg { font-size: 1.45rem; margin: 6px 0 10px; }
.buy-box .meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.delivery-list { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.delivery-list li { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: #d8d8d8; }
.delivery-list svg { color: var(--accent); flex: 0 0 auto; }
.seller-card {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-top: 18px;
  background: #0d0d0d;
}
.seller-card .avatar { width: 40px; height: 40px; font-size: .82rem; }
.seller-card h4 { margin: 0; font-size: .95rem; }
.seller-card p { margin: 0; font-size: .78rem; color: var(--muted); }
.detail-body { border-top: 1px solid var(--line-soft); padding-top: 28px; }
.detail-body h2 { font-size: 1.15rem; margin-bottom: 12px; }
.detail-body p { color: #d2d2d2; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 230px 1fr; gap: 32px; padding: 36px 0 72px; align-items: start; }
.side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; position: sticky; top: 84px; }
.side a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 7px; font-size: .9rem; color: #d2d2d2;
}
.side a:hover { background: var(--panel-2); color: #fff; }
.side a.is-active { background: rgba(204, 255, 0, .1); color: var(--accent); }
.side .side-title { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: #7e7e7e; padding: 12px 12px 6px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.dash-head h1 { font-size: 1.7rem; margin: 0; }
.dash-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .k { font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; color: #8e8e8e; font-weight: 600; }
.stat .v { font-size: 1.6rem; font-weight: 700; margin-top: 6px; letter-spacing: -0.03em; }
.stat .v.accent { color: var(--accent); }
.stat .v.v-word { font-size: 1.2rem; letter-spacing: -0.01em; padding-top: 6px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; overflow: hidden; }
.panel-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-head h2 { font-size: .95rem; margin: 0; letter-spacing: .01em; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th {
  text-align: left; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  color: #8d8d8d; font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: #0d0d0d; white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255, 255, 255, .015); }
.table .thumb-xs { width: 44px; height: 34px; border-radius: 5px; object-fit: cover; background: var(--panel-2); }
.row-actions { display: flex; gap: 10px; font-size: .82rem; }
.row-actions a { color: #cfcfcf; }
.row-actions a:hover { color: var(--accent); }
.row-actions .danger { color: #ff8e8e; }
.table-wrap { overflow-x: auto; }

/* ---------- Chat ---------- */
.chat-layout { display: grid; grid-template-columns: 300px 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); min-height: 560px; }
.threads { border-right: 1px solid var(--line); max-height: 640px; overflow-y: auto; }
.thread {
  display: block; padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
}
.thread:hover { background: var(--panel-2); }
.thread.is-active { background: rgba(204, 255, 0, .07); border-left: 2px solid var(--accent); }
.thread h4 { font-size: .88rem; margin: 0 0 3px; }
.thread p { margin: 0; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread .unread { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: .62rem; font-weight: 700; padding: 1px 6px; margin-left: 6px; }
.chat-main { display: flex; flex-direction: column; min-height: 560px; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.chat-head h3 { margin: 0; font-size: 1rem; }
.chat-head p { margin: 2px 0 0; font-size: .78rem; color: var(--muted); }
.chat-log { flex: 1; padding: 18px; overflow-y: auto; max-height: 460px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 12px; font-size: .9rem; line-height: 1.4; }
.msg .who { display: block; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: #8d8d8d; margin-bottom: 4px; }
.msg-mine { align-self: flex-end; background: rgba(204, 255, 0, .12); border: 1px solid rgba(204, 255, 0, .28); border-bottom-right-radius: 4px; }
.msg-theirs { align-self: flex-start; background: var(--panel-2); border: 1px solid #262626; border-bottom-left-radius: 4px; }
.msg-time { display: block; font-size: .64rem; color: #7e7e7e; margin-top: 4px; }
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.chat-who h3 { margin: 0 0 2px; }
.chat-who p { margin: 0; font-size: .78rem; color: var(--muted); }
.chat-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chat-call {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: #161616; color: var(--text); font-size: .74rem;
  font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s;
}
.chat-call:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- composer ---------- */
.chat-form { padding: 10px 12px 12px; border-top: 1px solid var(--line); background: #0d0d0d; }
.compose {
  display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 8px;
  border: 1px solid var(--line); border-radius: 999px; background: #141414;
  transition: border-color .15s;
}
.compose:focus-within { border-color: var(--accent); }
.compose-attach {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 50%; color: var(--muted); cursor: pointer; flex: none;
}
.compose-attach:hover { color: var(--accent); background: #1d1d1d; }
.compose-attach input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.compose-text {
  flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit;
  font-size: .87rem; padding: 6px 2px; outline: none;
}
.compose-text::placeholder { color: #6d6d6d; }
.compose-send {
  flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #0a0a0a; display: inline-flex; align-items: center; justify-content: center;
}
.compose-send:hover { filter: brightness(1.08); }
.compose-chip {
  display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 5px 10px;
  border-radius: 999px; background: #161616; border: 1px solid var(--line);
  font-size: .72rem; color: var(--muted); width: fit-content; max-width: 100%;
}
.compose-chip[hidden] { display: none; }
.compose-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-chip-drop {
  border: 0; background: none; color: var(--muted); font-size: 1rem; line-height: 1;
  cursor: pointer; padding: 0 2px;
}
.compose-chip-drop:hover { color: #ff6b6b; }
.compose-error { margin: 8px 2px 0; font-size: .72rem; color: #ff8f8f; }
.compose-error[hidden] { display: none; }

.msg-video {
  display: block; width: 100%; max-width: 320px; border-radius: 12px; background: #000;
}

/* ---------- video call ---------- */
.call-dock {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: min(320px, 82vw);
  background: #0b0b0b; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.6); overflow: hidden;
}
.call-dock[hidden] { display: none; }
.call-stage { position: relative; aspect-ratio: 4 / 3; background: #000; }
.call-remote { width: 100%; height: 100%; object-fit: cover; background: #000; }
.call-local {
  position: absolute; right: 8px; bottom: 8px; width: 30%; aspect-ratio: 3 / 4;
  object-fit: cover; border-radius: 10px; border: 2px solid #0b0b0b; background: #111;
}
.call-status {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px;
  font-size: .74rem; color: #ddd; background: linear-gradient(transparent, rgba(0,0,0,.75));
  text-align: center;
}
.call-bar { display: flex; gap: 8px; padding: 8px 10px; justify-content: center; }
.call-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid #5a1f1f; background: #7a1f1f; color: #fff; font-size: .74rem; font-weight: 600; cursor: pointer;
}
.call-btn-ghost { background: #161616; border-color: var(--line); color: var(--text); }
.call-btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.call-btn-ghost.is-off { background: #472c00; border-color: #7a4d00; color: #ffd48a; }
.call-incoming {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; background: rgba(6,6,6,.94); text-align: center; padding: 16px;
}
.call-incoming[hidden] { display: none; }
.call-incoming p { margin: 0; font-size: .9rem; color: var(--text); }
.call-incoming-actions { display: flex; gap: 8px; }
@media (max-width: 640px) {
  .call-dock { right: 8px; left: 8px; width: auto; bottom: 8px; }
}
.chat-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: #0d0d0d; }
.chat-form input { flex: 1; }
.chat-empty { flex: 1; display: grid; place-items: center; color: var(--muted); font-size: .9rem; padding: 40px; text-align: center; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 48px 0 30px; background: #080808; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer h4 { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: #8d8d8d; margin-bottom: 14px; }
.footer ul { display: grid; gap: 9px; font-size: .88rem; color: #cfcfcf; }
.footer-brand p { margin-top: 12px; font-size: .88rem; max-width: 34ch; }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .78rem; color: #9a9a9a;
}

/* ---------- Pager ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 28px; font-size: .88rem; }
.pager a { border: 1px solid var(--line); border-radius: 7px; padding: 7px 14px; }
.pager a:hover { border-color: #454545; color: #fff; }
.pager span { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .detail-grid { grid-template-columns: 1fr; gap: 26px; }
  .dash { grid-template-columns: 1fr; }
  .side { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .side a { padding: 8px 12px; }
  .side .side-title { display: none; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; }
  .threads { max-height: 240px; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .nav-inner { flex-wrap: wrap; gap: 12px; }
  .nav-toggle { display: block; }
  .nav-links, .nav-actions { display: none; width: 100%; }
  .nav.open .nav-links, .nav.open .nav-actions { display: flex; flex-wrap: wrap; }
  .nav-actions { margin-left: 0; }
  .user-name { display: none; }
  .hero { padding: 40px 0 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .offers { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .offer-body { padding: 12px; }
  .buy-box { padding: 18px; }
}

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-body { background-image: none; }
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.admin-side {
  background: #0b0b0b; border-right: 1px solid var(--line);
  padding: 24px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-side-label {
  font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  color: #7e7e7e; font-weight: 600; margin: 0 0 8px; padding: 0 12px;
}
.admin-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: 7px; font-size: .9rem; color: #d2d2d2;
}
.admin-link:hover { background: var(--panel-2); color: #fff; }
.admin-link.is-active { background: rgba(204, 255, 0, .1); color: var(--accent); }
.admin-main { padding: 28px 30px 70px; max-width: 1180px; width: 100%; }
.admin-main h1 { font-size: 1.6rem; }

.link-btn {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; font-size: .82rem; color: #cfcfcf; cursor: pointer;
}
.link-btn:hover { color: var(--accent); text-decoration: underline; }
.link-btn.danger { color: #ff8e8e; }
.paypal-form { margin: 0; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side {
    position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line);
    display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 14px;
  }
  .admin-side .brand { padding: 0 8px 0 0 !important; }
  .admin-side-label { display: none; }
  .admin-main { padding: 20px 16px 60px; }
}

/* ==========================================================================
   Affiliate program + share buttons
   ========================================================================== */
.share-block { margin-top: 16px; }
.share-label {
  display: block; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 8px;
}
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel-2); color: #cfcfcf; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.share-btn:hover { color: var(--accent); border-color: rgba(204, 255, 0, .5); background: #141414; }

.aff-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.aff-line a { color: #d8d8d8; text-decoration: underline; text-decoration-color: rgba(204, 255, 0, .4); }

.aff-panel {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px;
  align-items: center; margin: 26px 0 8px; padding: 22px;
  border: 1px solid rgba(204, 255, 0, .22); border-radius: 12px;
  background: linear-gradient(180deg, rgba(204, 255, 0, .06), rgba(204, 255, 0, .01));
}
.share-copy { display: flex; gap: 8px; margin-top: 10px; }
.share-copy input {
  flex: 1; min-width: 0; background: #0e0e0e; border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px; color: #ededed; font: inherit; font-size: .85rem;
}
.pay-note {
  border: 1px solid rgba(204, 255, 0, .28); background: rgba(204, 255, 0, .06);
  border-radius: 9px; padding: 12px 14px; margin-top: 10px; font-size: .9rem;
}
@media (max-width: 780px) {
  .aff-panel { grid-template-columns: 1fr; }
}

/* ---------- Stock, expiry, live video ---------- */
.tag-live {
  left: auto; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(204, 255, 0, .14); border-color: rgba(204, 255, 0, .5); color: #ccff00;
}
.tag-soldout {
  left: 10px; bottom: 10px; top: auto; right: auto;
  background: rgba(0, 0, 0, .8); border-color: #3a3a3a; color: #cfcfcf;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #6d6d6d; display: inline-block; flex: 0 0 auto;
}
.live-dot.is-live { background: #ff4d4d; box-shadow: 0 0 0 0 rgba(255, 77, 77, .7); animation: livePulse 1.8s infinite; }
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 77, .55); }
  70% { box-shadow: 0 0 0 9px rgba(255, 77, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}
.live-wrap {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 14px 16px 16px; margin-top: 18px;
}
.live-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.live-head a { margin-left: auto; color: var(--accent); }
.live-embed { margin-top: 0; }
.stock-line { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: .82rem; color: var(--muted); }
.stock-line strong { color: #e8e8e8; }
.qty-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; }
.qty-row input { width: 84px; }

/* Contact block on an offer page */
.contact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.contact-actions form { margin: 0; }
.contact-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.contact-note { margin: 8px 2px 0; font-size: .74rem; line-height: 1.5; }
@media (max-width: 420px) { .contact-actions { grid-template-columns: 1fr; } }

/* Guest chat banner */
.guest-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px; padding: 16px 18px; margin: 0 0 20px; border-radius: 16px;
  border: 1px solid rgba(34,197,94,.35); background: rgba(34,197,94,.07);
}
.guest-banner h3 { margin: 0 0 4px; font-size: 1rem; }
.guest-banner p { margin: 0; max-width: 52ch; font-size: .84rem; line-height: 1.55; color: var(--muted, #6b7280); }
.guest-name-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.guest-name-form input[type="text"] {
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line, #d7dbe3);
  font: inherit; font-size: .85rem; min-width: 150px;
}
@media (max-width: 560px) { .guest-banner { flex-direction: column; align-items: stretch; } }

/* ---------- Banner ads (banners.php) ---------- */
.banner-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.banner-tab {
  display: inline-flex; flex-direction: column; gap: 2px; padding: 9px 14px;
  border: 1px solid var(--line); border-radius: 10px; text-decoration: none;
  color: var(--text); font-size: .88rem; font-weight: 600; background: var(--panel);
}
.banner-tab span { font-size: .7rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.banner-tab:hover { border-color: #454545; }
.banner-tab.is-active { border-color: var(--accent); background: rgba(204, 255, 0, .07); color: #eaffb0; }
.banner-tab.is-active span { color: #b9d47a; }

.banner-list { display: flex; flex-direction: column; gap: 18px; margin-top: 14px; }
.banner-item {
  display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start;
  padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--panel);
}
.banner-preview {
  flex: 0 0 auto; border-radius: 10px; overflow: auto; background: var(--bg-2);
  border: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: center;
}
.banner-preview iframe { display: block; }
.banner-info { flex: 1 1 320px; min-width: 0; }
.banner-info h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.banner-info label { display: block; margin: 10px 0 5px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }

.code-row { display: flex; gap: 8px; align-items: flex-start; }
.code-row input, .code-row textarea {
  flex: 1 1 auto; min-width: 0; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .74rem; line-height: 1.45;
}
.code-row textarea { resize: vertical; }
.code-row .btn { flex: 0 0 auto; }

@media (max-width: 760px) {
  .banner-item { padding: 14px; }
  /* A 728px banner cannot shrink without being cut off, so the preview scrolls
     sideways instead of squeezing the advert out of shape. */
  .banner-preview { width: 100% !important; max-width: 100%; overflow-x: auto; justify-content: flex-start; }
  .banner-preview iframe { max-width: none; flex: 0 0 auto; }
}

/* Live inbox: the list on the left keeps itself current, and a pill appears when
   new lines land while you are reading further up a conversation. */
.thread.has-unread { background: rgba(204, 255, 0, .045); }
.thread.has-unread h4 { color: #fff; }
.chat-main { position: relative; }
.chat-jump {
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 6;
  border: 0;
  border-radius: 999px;
  padding: 8px 15px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .45);
}
.chat-jump:hover { filter: brightness(1.08); }
.chat-jump[hidden] { display: none; }

/* Post types: articles and videos are read and shared, not bought. */
.tag-kind { background: rgba(204, 255, 0, .16); color: var(--accent-ink); font-weight: 700; }
.post-kind { text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; color: var(--accent); }
.post-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.like-form { margin: 0; }
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.like-btn:hover { border-color: var(--accent); color: var(--accent); }
.like-btn svg { color: currentColor; }
.like-btn.is-liked { border-color: var(--accent); color: var(--accent); background: rgba(204, 255, 0, .08); }
.like-btn.is-liked svg { color: var(--accent); }
.like-count { font-variant-numeric: tabular-nums; opacity: .85; }

/* Dislikes sit beside likes and use the same shape. */
.like-btn.is-dislike.is-liked { border-color: var(--danger, #e5484d); color: var(--danger, #e5484d); background: rgba(229, 72, 77, .08); }
.like-form { display: inline-flex; gap: 8px; }

/* State and city pickers in the delivery hero. */
.courier-place-pick { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.courier-place-pick select { width:auto; min-width:150px; }
@media (max-width:560px) {
  .courier-place-pick { width:100%; }
  .courier-place-pick select { flex:1 1 45%; min-width:0; }
}

/* Delete a chat from the thread header. */
.chat-delete-form { display:inline-flex; margin:0; }
.chat-delete {
  display:inline-flex; align-items:center; gap:6px;
  background:none; border:1px solid var(--line-soft); border-radius:999px;
  color:var(--muted); font:inherit; font-size:.78rem; padding:6px 12px; cursor:pointer;
}
.chat-delete:hover, .chat-delete:focus-visible { color:#ff6b6b; border-color:#ff6b6b; }
@media (max-width:560px) {
  .chat-delete span { display:none; }
  .chat-delete { padding:6px 8px; }
}

/* ------------------------------------------------------------------
   Pictures posts: one card per photo, with its words underneath and
   its own reactions and comments. The editor uses the same shapes.
   ------------------------------------------------------------------ */
.pic-set { display: grid; gap: 22px; }

.pic-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow: hidden;
  scroll-margin-top: 90px;
}

.pic-card-img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  background: #060606;
}

.pic-card-caption { padding: 16px 18px 0; }
.pic-card-caption .tiny { display: block; margin-bottom: 4px; }
.pic-card-caption h3 { margin: 0 0 6px; font-size: 1.1rem; line-height: 1.3; }
.pic-card-caption p { margin: 0; color: var(--text); line-height: 1.6; font-size: .94rem; }
.pic-card-caption p + p { margin-top: 8px; }

.pic-card-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
  margin-top: 14px;
}
.pic-card-actions .like-form { margin: 0; }

.pic-comments { border-top: 1px solid var(--line-soft); }
.pic-comments-toggle {
  cursor: pointer;
  padding: 12px 18px;
  font-size: .86rem;
  color: var(--muted);
  list-style: none;
}
.pic-comments-toggle::-webkit-details-marker { display: none; }
.pic-comments-toggle::before { content: "▸ "; color: var(--accent); }
.pic-comments[open] .pic-comments-toggle::before { content: "▾ "; }
.pic-comments-toggle:hover { color: var(--text); }

.pic-comments .comment-form { margin: 0 18px 14px; }
.pic-comments .comment-list { padding: 0 18px 16px; margin: 0; }
.pic-comments > p { padding: 0 18px 16px; }

/* The uploader: five slots, each with a title and a description under it. */
.pic-slot {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  background: var(--panel-2);
}
.pic-slot:last-child { margin-bottom: 0; }
.pic-slot-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }

.pic-slot-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  font-size: .86rem;
  color: var(--muted);
}
.pic-slot-drop input[type="file"] { max-width: 100%; color: var(--muted); font-size: .82rem; }
.pic-slot-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pic-slot-preview {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #060606;
}

.pic-edit-list { display: grid; gap: 14px; margin-bottom: 18px; }
.pic-edit {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel-2);
}
.pic-edit img { width: 120px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.pic-edit-fields { display: grid; gap: 4px; }
.pic-edit-fields input[type="text"], .pic-edit-fields textarea { margin-bottom: 6px; }

@media (max-width: 640px) {
  .pic-edit { grid-template-columns: 1fr; }
  .pic-edit img { width: 100%; height: auto; max-height: 220px; }
  .pic-card-img { max-height: 70vh; }
}

/* ------------------------------------------------------------------
   Surveys: one question per shop, switched on or off by its owner.
------------------------------------------------------------------ */
.survey-list { display: grid; gap: 16px; }
.survey-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  padding: 18px 18px 16px;
}
.survey-card h3 { margin: 0 0 8px; font-size: 1.06rem; line-height: 1.35; }
.survey-choices { display: grid; gap: 8px; margin-bottom: 12px; }
.survey-choice {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  background: var(--bg-2);
  transition: border-color .15s ease, background .15s ease;
}
.survey-choice:hover { border-color: #3a3a3a; background: #141414; }
.survey-choice input { accent-color: var(--accent); width: 16px; height: 16px; flex: 0 0 auto; }
.survey-choice span { font-size: .95rem; }
.survey-choice:has(input:checked) { border-color: var(--accent); background: #171a0d; }

.survey-results { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.survey-bar-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.survey-label { font-size: .92rem; color: var(--text); }
.survey-bar { height: 7px; border-radius: 999px; background: #1e1e1e; overflow: hidden; }
.survey-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; min-width: 2px; }

/* A shop switch: a wide checkbox with its own explanation. */
.switch-box {
  display: flex; align-items: flex-start; gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 12px 14px;
  margin: 10px 0;
  cursor: pointer;
}
.switch-box input { accent-color: var(--accent); width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.switch-box strong { display: block; font-size: .95rem; margin-bottom: 2px; }
.switch-box .hint { display: block; }

/* Sale price: the old figure struck through, the new one in the accent. */
.price-sale { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-sale .price-now { color: var(--accent); font-weight: 700; }
.price-sale .price-was { color: var(--muted); text-decoration: line-through; font-size: .92em; }
.price-sale .price-left { font-size: .72rem; color: var(--muted); }
.price-lg.price-sale .price-now { font-size: 1.7rem; }
.sale-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .84rem; color: var(--muted); margin: 4px 0 0; }
.sale-line .badge-warn { background: #2a2110; color: var(--warn); border-color: #3b2f14; }

.promo-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.promo-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px dashed #3a3a3a; border-radius: 999px;
  padding: 6px 12px; background: var(--bg-2); font-size: .85rem;
}
.promo-chip strong { letter-spacing: .06em; color: var(--accent); font-size: .82rem; }
.promo-chip .link-btn { font-size: .78rem; }

/* Shop profile actions: follow, share and the follower count. */
.profile-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.profile-actions form { margin: 0; }
.follower-count { font-size: .88rem; color: var(--muted); }
.follower-count strong { color: var(--text); }

/* The promo code shelf on a shop page. */
.promo-panel .promo-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.promo-chip {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 8px 12px;
  font-size: .88rem;
}
.promo-chip strong { letter-spacing: .06em; color: var(--accent); }

/* Sale line under an offer price. */
.sale-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 0; font-size: .9rem; color: var(--muted); }
.badge-warn { background: rgba(255, 176, 32, .14); color: var(--warn); border: 1px solid rgba(255, 176, 32, .35); }

/* A switch row inside the shop settings form. */
.switch-row { display: grid; gap: 2px; }
.switch-row label { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.switch-row input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; }

/* ------------------------------------------------------------------
   Memberships: the lock, the join panel and the tier cards.
------------------------------------------------------------------ */
.tag-locked { background: rgba(255, 176, 32, .14); color: var(--warn); border: 1px solid rgba(255, 176, 32, .32); }

.lock-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  padding: 26px;
}
.lock-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 176, 32, .12); color: var(--warn);
  margin-bottom: 14px;
}
.lock-price { font-size: 1.5rem; font-weight: 700; color: var(--muted); margin: 0 0 18px; }
.lock-join { border-top: 1px solid var(--line-soft); padding-top: 16px; }

.member-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .member-grid { grid-template-columns: 1fr; } }
.member-tier {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 14px 16px;
}
.member-tier.is-mine { border-color: var(--accent); background: #171a0d; }
.member-price { font-size: 1.25rem; font-weight: 700; margin: 0 0 4px; }
.member-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.member-actions form { display: flex; align-items: center; gap: 8px; margin: 0; flex-wrap: wrap; }
.member-actions input[type="text"] { margin: 0; }

/* Membership packages and the member list a shop keeps. */
.pkg-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 14px;
  margin-bottom: 14px;
}
.pkg-form-new { border-style: dashed; }
.pkg-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.pkg-grid .field { margin-bottom: 0; }
.member-edit-row td { padding-top: 0; }
.member-edit-row details > summary { cursor: pointer; }
.member-edit-form { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
@media (max-width: 640px) { .pkg-grid { grid-template-columns: 1fr; } }

/* One-click member status picker in the member list. */
.state-form { display: inline-flex; align-items: center; gap: 6px; }
.state-form select { width: auto; min-width: 120px; padding: 5px 8px; font-size: .82rem; }

/* PayPal buttons on membership packages: sized for a card, not a checkout page. */
.pp-join { margin-top: 10px; }
.member-tier .btn-paypal,
.member-tier .paypal-form .btn-paypal { width: auto; padding: 9px 16px; font-size: .86rem; }
.pkg-paypal { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px;
  padding-top: 10px; border-top: 1px dashed var(--line-soft); }
.pkg-paypal .btn-paypal { width: auto; padding: 7px 12px; }

/* A PayPal button that asks the visitor to sign in first still looks tappable. */
.btn-paypal.is-locked { opacity: .92; }

/* Photo slots on the offer form: one line each, numbered, so five can be filled at once. */
.upload-slots { display: grid; gap: 8px; }
.upload-slot { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer;
  border: 1px dashed var(--line); border-radius: 10px; background: var(--panel-2, rgba(255,255,255,.02)); }
.upload-slot:hover { border-color: var(--accent, #6ee7b7); }
.upload-slot input[type=file] { margin-left: auto; max-width: 62%; font-size: .82rem; }
.upload-slot-num { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 50%; font-size: .78rem; font-weight: 600; color: var(--accent, #6ee7b7);
  border: 1px solid currentColor; }
.upload-slot-text { display: grid; gap: 2px; min-width: 0; }
.upload-slot-text strong { font-size: .88rem; font-weight: 600; }
.upload-slot .tiny.is-chosen { color: var(--accent, #6ee7b7); }
@media (max-width: 560px) {
  .upload-slot { flex-wrap: wrap; }
  .upload-slot input[type=file] { max-width: 100%; margin-left: 0; width: 100%; }
}

/* A members-only item the person can already open: a quiet tick, not a lock. */
.tag-included { color: var(--accent, #ccff00); border: 1px solid currentColor; background: transparent; }

/* ---------------------------------------------------------------
   Wish list
   --------------------------------------------------------------- */
.wish-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  font-size: 17px; line-height: 1;
  color: #fff; background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .28);
  transition: background .15s ease, transform .15s ease, color .15s ease;
}
.wish-btn:hover { background: rgba(0, 0, 0, .78); transform: scale(1.06); }
.wish-btn:focus-visible { outline: 2px solid var(--accent, #ccff00); outline-offset: 2px; }
.wish-btn.is-saved { color: #ff4d6d; border-color: rgba(255, 77, 109, .55); background: rgba(0, 0, 0, .62); }
.wish-item { display: flex; flex-direction: column; gap: 6px; }
.wish-remove { display: flex; justify-content: flex-end; }
.wish-remove .link-quiet { background: none; border: 0; padding: 2px 0; cursor: pointer; font-size: .78rem; }
.wish-save { margin-top: 10px; }
.wish-save .btn { display: inline-flex; align-items: center; gap: 7px; justify-content: center; }
.wish-save .btn.is-saved { color: #ff4d6d; border-color: rgba(255, 77, 109, .5); }

/* ---------------------------------------------------------------
   Several shops under one account
   --------------------------------------------------------------- */
.shop-box { padding: 0 0 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.shop-switch { display: grid; gap: 6px; }
.shop-switch select { width: 100%; font-size: .9rem; padding: 7px 9px; }
.shop-switch .link-quiet { justify-self: start; }
.shop-now { display: grid; gap: 2px; }
.shop-now strong { font-size: .95rem; }
.shop-now .link-quiet { justify-self: start; margin-top: 2px; }

/* ---------------------------------------------------------------
   Visit Our Store — rotating banners under the hero
   --------------------------------------------------------------- */
.store-banners { padding: 34px 0 26px; border-bottom: 1px solid var(--line-soft); }
.store-banners-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}
.store-banners-head h2 {
  font-size: 1.15rem; letter-spacing: -.01em; margin: 0;
  text-transform: uppercase; font-weight: 600;
}
.store-banners-dots { display: flex; gap: 7px; }
.store-banners-dots button {
  width: 9px; height: 9px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 0; background: #4a4a4a; transition: background .2s, transform .2s;
}
.store-banners-dots button.is-on { background: var(--accent); transform: scale(1.15); }
.store-banners-dots button:hover { background: var(--accent); }

.store-banners-frame {
  position: relative; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--line-soft); background: #141414;
  aspect-ratio: 1200 / 420;
}
.store-banner {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .55s ease, visibility .55s ease;
}
.store-banner.is-current { opacity: 1; visibility: visible; }
.store-banner img,
.store-banner-link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-banner-link { display: block; width: 100%; height: 100%; }
.store-banner-link:hover img { transform: scale(1.02); }
.store-banner img { transition: transform .6s ease; }

.store-banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; border: 0;
  background: rgba(12, 12, 12, .62); color: #fff; opacity: 0;
  transition: opacity .2s, background .2s;
}
.store-banner-arrow svg { width: 20px; height: 20px; }
.store-banner-arrow.prev { left: 12px; }
.store-banner-arrow.next { right: 12px; }
.store-banners-frame:hover .store-banner-arrow,
.store-banners-frame:focus-within .store-banner-arrow { opacity: 1; }
.store-banner-arrow:hover { background: var(--accent); color: #111; }

@media (max-width: 720px) {
  .store-banners-frame { aspect-ratio: 16 / 9; border-radius: 11px; }
  .store-banners-head h2 { font-size: 1rem; }
  .store-banner-arrow { opacity: 1; width: 32px; height: 32px; }
}

/* Settings screen: one block per banner slot. */
.banner-slot {
  border: 1px solid var(--line-soft); border-radius: 11px;
  padding: 13px 14px; margin-top: 14px; background: rgba(255,255,255,.015);
}
.banner-slot-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 11px;
}
.banner-slot-body { display: grid; grid-template-columns: 190px 1fr; gap: 15px; align-items: start; }
.banner-slot-thumb {
  display: grid; place-items: center; min-height: 62px; border-radius: 8px;
  border: 1px dashed var(--line); background: #101010; overflow: hidden;
}
.banner-slot-thumb img { width: 100%; height: auto; display: block; }
@media (max-width: 720px) {
  .banner-slot-body { grid-template-columns: 1fr; }
}

.offer-report-link { display:block; position:relative; z-index:2; margin:8px 14px 14px; font-size:.78rem; color:var(--muted); text-decoration:underline; cursor:pointer; }
.offer-report-link:hover { color:var(--accent); }
