/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  overflow-x: hidden; /* prevent any element blowing out the viewport */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Hide reCAPTCHA badge — disclosure text shown on contact form instead (Google ToS compliant) */
.grecaptcha-badge { visibility: hidden !important; }

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-hover); }

/* ── Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(0.10 0.01 55 / 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: var(--nav-height);
}

.site-nav .nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
}
.site-nav .nav-logo img { height: 32px; width: auto; display: block; }

.nav-search-wrap {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.nav-search-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.4;
  pointer-events: none;
}
.nav-search {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px 7px 36px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.nav-search::placeholder { color: var(--text-dim); }
.nav-search:focus { border-color: var(--orange); }

/* ── Page body ── */
.page-body { flex: 1; }

/* ── Feed container ── */
.feed-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* ── Feed banner (ad strip) ── */
.feed-banner-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.feed-banner {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 6.4 / 1;
  max-height: 125px;
}
.feed-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s;
}
.feed-banner:hover img { opacity: 0.9; }

/* ── Sponsor card ── */
.sponsor-card {
  background: var(--surface);
  border: 1px solid var(--msg-border, var(--border));
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.sponsor-card:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  color: var(--text);
}
.sponsor-card-header {
  padding: 8px 12px 0;
}
.sponsor-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
}
.sponsor-card-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  flex: 1;
}
.sponsor-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.sponsor-logo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--orange);
  flex-shrink: 0;
}
.sponsor-info { flex: 1; min-width: 0; }
.sponsor-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.sponsor-headline {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}
.sponsor-body {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.sponsor-card-footer {
  padding: 8px 12px 10px;
  border-top: 1px solid var(--border);
}
.sponsor-cta {
  font-size: 12px;
  color: var(--orange);
  font-weight: 500;
}

/* ── Filter tabs ── */
.filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.filter-tab {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 8px 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
  text-decoration: none;
  display: inline-block;
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

/* ── Posts grid ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* ── Post card ── */
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
}
.post-card:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  color: var(--text);
}

.post-card-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.post-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card-icon {
  font-size: 28px;
  opacity: 0.4;
}

.post-card-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.post-card-tags { display: flex; gap: 4px; flex-wrap: wrap; }

.post-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
}
.post-card-title.has-image {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.03em;
}
.post-card-snippet {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.post-card-meta {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.post-card-meta .comment-count {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--text-dim);
}

/* ── Avatar initials ── */
.avatar-initials {
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--orange);
  flex-shrink: 0;
}
.avatar-initials.sm { width: 20px; height: 20px; font-size: 9px; }
.avatar-initials.md { width: 30px; height: 30px; font-size: 11px; }
.avatar-initials.lg { width: 48px; height: 48px; font-size: 18px; }

/* ── Badge ── */
.dh-badge {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid;
}
.dh-badge.sm { font-size: 10px; padding: 1px 6px; }
.dh-badge-gear    { background: var(--attr-bg);       color: var(--attr-fg);       border-color: var(--attr-fg); }
.dh-badge-text    { background: var(--msg-bg);        color: var(--msg-fg);        border-color: var(--msg-border); }
.dh-badge-looking { background: var(--lf-bg);         color: var(--lf-fg);         border-color: var(--lf-fg); }
.dh-badge-muted   { background: transparent;          color: var(--text-muted);    border-color: var(--text-dim); }
.dh-badge-signed  { background: var(--signed-bg);     color: var(--signed-fg);     border-color: var(--signed-bg); }
.dh-badge-sale    { background: var(--status-sale-bg);  color: var(--status-fg);   border-color: var(--status-sale-bg); }
.dh-badge-trade   { background: var(--status-trade-bg); color: var(--status-fg);   border-color: var(--status-trade-bg); }
.dh-badge-sold    { background: var(--status-sold-bg);  color: #fff;               border-color: var(--status-sold-bg); }
.dh-badge-cond-new  { background: var(--cond-new-bg);  color: var(--cond-new-fg);  border-color: var(--cond-new-bg); }
.dh-badge-cond-used { background: var(--cond-used-bg); color: var(--cond-used-fg); border-color: var(--cond-used-bg); }
/* kept for back-compat — maps to sale/new */
.dh-badge-green   { background: var(--status-sale-bg); color: var(--status-fg); border-color: var(--status-sale-bg); }

/* ── Load More ── */
.btn-load-more {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 32px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-load-more:hover { border-color: var(--orange); color: var(--orange); }
.btn-load-more:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.empty-state a {
  color: var(--orange);
}

/* ── Detail page ── */
.detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
  overflow: hidden; /* contain any child that would escape */
}

.detail-back {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 0;
  transition: color 0.15s;
  text-decoration: none;
}
.detail-back:hover { color: var(--orange); }

.detail-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-banner-gap { margin-top: 20px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, 300px);
  gap: 32px;
  /* prevent children from blowing out the grid track */
  min-width: 0;
}
.detail-grid > * { min-width: 0; }

.detail-carousel {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--surface2);
}
.detail-carousel img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
}
.detail-carousel .carousel-control-prev,
.detail-carousel .carousel-control-next {
  width: 10%;
}

.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

.detail-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 40px;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
}

.detail-meta-table {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 0;
  margin-bottom: 20px;
  font-size: 13px;
}
.detail-meta-table .label { color: var(--text-muted); }
.detail-meta-table .value { color: var(--text); }

.looking-for-meta { margin-bottom: 12px; }
.lf-company { font-family: 'Bebas Neue', sans-serif; font-size: 26px; letter-spacing: 0.03em; color: var(--text); line-height: 1.1; }
.lf-rider { font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.lf-budget { font-size: 14px; margin-top: 8px; margin-bottom: 20px; }
.lf-budget strong { color: var(--text-muted); font-weight: 500; }
.lf-budget span { color: var(--orange); font-weight: 600; }

.post-card-snippet--lf { color: var(--text); }
.post-card-lf-info { display: flex; flex-direction: column; gap: 1px; margin-top: 6px; }
.post-card-lf-company { font-family: 'Bebas Neue', sans-serif; font-size: 15px; letter-spacing: 0.03em; color: var(--text); line-height: 1.2; }
.post-card-lf-rider { font-size: 11px; color: var(--text-muted); }

.detail-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 20px;
  white-space: pre-wrap;
}

.detail-posted-by {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  font-size: 13px;
}
.detail-posted-by img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.detail-posted-by .name { color: var(--orange); }
.detail-posted-by .date { color: var(--text-muted); }

.detail-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.detail-cta .hint { font-size: 12px; color: var(--text-muted); }
.btn-orange {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-block;
}
.btn-orange:hover { background: var(--orange-hover); color: #fff; }

/* ── Comments ── */
.comments-section h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.comment-item {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.comment-item img {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.comment-author { font-size: 12px; margin-bottom: 3px; }
.comment-author .name { color: var(--orange); font-weight: 500; }
.comment-author .date { color: var(--text-dim); }
.comment-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.comment-add-cta { font-size: 12px; color: var(--orange); }

/* ── eBay sidebar ── */
.ebay-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  position: sticky;
  top: calc(var(--nav-height) + 16px);
}
.ebay-sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.ebay-sidebar-header .label { color: var(--text-muted); font-weight: 500; }
.ebay-sidebar-header .ebay-logo { font-family: 'Bebas Neue', sans-serif; font-size: 16px; color: #e53238; letter-spacing: 0.05em; }
.ebay-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s;
}
.ebay-row:last-child { border-bottom: none; }
.ebay-row:hover { background: var(--surface2); color: var(--text); }
.ebay-row img {
  width: 36px; height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface2);
}
.ebay-row .ebay-title { font-size: 12px; color: var(--text); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ebay-row .ebay-price { font-size: 13px; color: var(--orange); font-weight: 600; margin-top: 2px; }

/* ── DeckHub Status popup ── */
.deck-status-btn { position: relative; }
.deck-status-popup {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  min-width: 200px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.deck-status-popup.open { display: block; }
.deck-status-popup-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.deck-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
}
.deck-status-row.active { background: var(--surface2); }
.deck-status-emoji { font-size: 20px; line-height: 1; flex-shrink: 0; }
.deck-status-name { font-size: 13px; font-weight: 500; color: var(--text); }
.deck-status-range { font-size: 11px; color: var(--text-muted); }

/* ── Profile ── */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.profile-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 4px;
  position: relative; /* anchor for the status popup */
}
.profile-meta { font-size: 13px; color: var(--text-muted); }
.profile-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.profile-links a { font-size: 12px; color: var(--text-muted); }
.profile-links a:hover { color: var(--orange); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
  font-size: 12px;
  color: var(--text-dim);
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--orange); }

/* ── Content pages (Privacy, Help) ── */
.content-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.content-page-inner {
  max-width: 680px;
}
.content-page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 8px;
}
.content-page-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 36px;
}
.content-page-inner h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 32px 0 10px;
}
.content-page-inner p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0;
}
.content-page-inner strong { color: var(--text); }
.content-page-inner a { color: var(--orange); }
.content-page-inner a:hover { color: var(--orange-hover); }

/* ── Contact modal ── */
.contact-modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
}
.contact-modal-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.contact-modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.04em;
  margin: 0;
}
.contact-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  transition: color 0.15s;
}
.contact-modal-close:hover { color: var(--text); }
.contact-modal-body { padding: 20px; }
.contact-modal-intro { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.contact-field { margin-bottom: 14px; }
.contact-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}
.contact-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.contact-input:focus { border-color: var(--orange); }
.contact-textarea { resize: vertical; min-height: 100px; }
.contact-success-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 8px 8px;
}
.contact-success-icon {
  color: var(--lf-fg);
  margin-bottom: 12px;
}
.contact-success-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 8px;
}
.contact-success-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}
.contact-recaptcha-notice {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 10px;
  margin-bottom: 0;
}
.contact-recaptcha-notice a { color: var(--text-dim); }
.contact-error-msg {
  background: var(--danger-dim);
  border: 1px solid var(--danger);
  color: var(--danger-text);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* ── Not found ── */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}
.not-found h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 80px;
  color: var(--orange);
  letter-spacing: 0.04em;
  line-height: 1;
}
.not-found p { color: var(--text-muted); margin: 12px 0 24px; }

/* ── Download page ── */
.download-page {
  max-width: 560px;
  margin: 48px auto;
  padding: 0 20px;
  text-align: center;
}
.download-hero { margin-bottom: 36px; }
.download-logo { width: 80px; height: 80px; border-radius: 18px; margin-bottom: 16px; }
.download-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
  color: var(--orange);
}
.download-tagline { color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.download-badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.store-badge img { height: 48px; }
.download-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}
.download-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.download-feature-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.download-feature strong { display: block; margin-bottom: 4px; }
.download-feature p { margin: 0; font-size: 13px; color: var(--text-muted); }

/* ── Download button in nav ── */
.btn-download-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--orange);
  color: #fff;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-download-nav:hover { background: var(--orange-hover); color: #fff; }

/* ─────────────────────────────────────────
   Tablet + mobile — ≤ 900px
   Detail sidebar always moves below content
───────────────────────────────────────── */
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr !important; gap: 24px; width: 100%; }
  .detail-grid > * { width: 100%; min-width: 0; }
  .ebay-sidebar { position: static; width: 100%; } /* un-sticky when stacked */
  .detail-container { padding: 16px 12px; overflow: hidden; }
}

/* ─────────────────────────────────────────
   Tablet — 601px – 900px
───────────────────────────────────────── */
@media (min-width: 601px) and (max-width: 900px) {
  .site-nav { padding: 0 16px; }
  .feed-container { padding: 20px 16px; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { flex-wrap: wrap; gap: 12px; padding: 16px; }
}

/* ─────────────────────────────────────────
   Mobile — ≤ 600px
───────────────────────────────────────── */
@media (max-width: 600px) {

  /* Nav */
  .site-nav { padding: 0 12px; gap: 10px; }
  .btn-download-nav span { display: none; }
  .btn-download-nav { padding: 7px 10px; }
  .nav-search { font-size: 16px; } /* prevent iOS zoom on focus */

  /* Feed */
  .feed-container { padding: 16px 12px; }
  .posts-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Post cards: horizontal layout on phones */
  .post-card { flex-direction: row; align-items: stretch; }
  .post-card-img-wrap { width: 100px; aspect-ratio: unset; flex-shrink: 0; border-radius: 0; }
  .post-card-body { padding: 10px 12px 12px; }

  /* Filter tabs: horizontal scroll */
  .filter-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .filter-tab { flex-shrink: 0; }

  /* Detail page */
  .detail-container { padding: 16px 12px; }
  .detail-title { font-size: 26px; }
  .detail-carousel img { max-height: 300px; }
  .detail-meta-table { grid-template-columns: 90px 1fr; font-size: 13px; }
  .detail-posted-by { flex-wrap: wrap; gap: 6px; }
  .detail-cta { flex-direction: column; align-items: flex-start; gap: 10px; }
  .detail-cta .btn-orange { width: 100%; text-align: center; }

  /* Footer */
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 12px;
  }
  .site-footer > div { flex-wrap: wrap; gap: 10px 14px; }
}
