/* Marketplace listing overlay — leverages Open Props CSS variables */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  font-family: var(--font-sans);
  background: var(--surface-1, #fafaf9);
  color: var(--gray-9, #1c1917);
  line-height: 1.55;
  margin: 0;
}
img, svg, table, pre { max-width: 100%; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Top bar — marketplace style */
.bar {
  background: var(--surface-2, #fff);
  border-bottom: 1px solid var(--gray-3, #e7e5e4);
  position: sticky; top: 0; z-index: 50;
}
.barrow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--gray-9); text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 6px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  display: inline-grid; place-items: center; color: #fff; font-size: 14px;
  box-shadow: var(--shadow-2, 0 2px 5px rgba(0,0,0,.08));
}
.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: var(--gray-7, #57534e); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--gray-9); }
.nav a.btn, .nav a.btn:hover { color: #fff; }
.btn {
  display: inline-block; padding: 9px 16px; border-radius: 999px;
  font-weight: 600; font-size: 14px; text-decoration: none; border: none;
  cursor: pointer;
}
.btn-primary { background: #1d4ed8; color: #fff; }
.btn-primary:hover { background: #1e40af; }
.btn-buy { background: #16a34a; color: #fff; padding: 14px 24px; font-size: 16px; }
.btn-buy:hover { background: #15803d; }
.btn-offer {
  background: var(--surface-1, #fafaf9); color: var(--gray-9);
  border: 2px solid var(--gray-4, #d6d3d1); padding: 12px 22px; font-size: 15px;
}
.btn-offer:hover { border-color: var(--gray-6, #78716c); }

/* Breadcrumb */
.crumb { font-size: 13px; color: var(--gray-6, #78716c); padding: 14px 0; }
.crumb a { color: var(--gray-7); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* Listing layout */
.listing {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 28px; margin-bottom: 32px;
}
@media (max-width: 820px) {
  .listing { grid-template-columns: 1fr; }
}

/* Product imagery */
.gallery {
  background: var(--surface-2, #fff);
  border: 1px solid var(--gray-3);
  border-radius: 12px; padding: 20px;
  box-shadow: var(--shadow-2, 0 2px 6px rgba(0,0,0,.05));
}
.product-svg { width: 100%; height: auto; display: block; border-radius: 8px; }
.thumbs { display: flex; gap: 8px; margin-top: 14px; }
.thumb {
  width: 64px; height: 64px; border: 2px solid var(--gray-3);
  border-radius: 6px; background: var(--surface-3, #f5f5f4);
  display: grid; place-items: center; font-size: 11px; color: var(--gray-7);
  cursor: pointer;
}
.thumb.active { border-color: #1d4ed8; }

/* Buy column */
.buybox {
  background: var(--surface-2, #fff);
  border: 1px solid var(--gray-3);
  border-radius: 12px; padding: 24px;
  box-shadow: var(--shadow-3, 0 4px 10px rgba(0,0,0,.07));
  position: sticky; top: 84px;
}
.title { font-size: 22px; margin: 0 0 10px; line-height: 1.3; }
.condition {
  display: inline-block; background: #dcfce7; color: #166534;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  margin-bottom: 12px;
}
.price-row { margin: 14px 0; }
.price { font-size: 32px; font-weight: 700; color: var(--gray-9); }
.price-from { font-size: 14px; color: var(--gray-6, #78716c); font-weight: 500; margin-right: 4px; vertical-align: middle; }
.price-sub { display: block; font-size: 13px; color: var(--gray-7, #57534e); margin-top: 4px; }
.was { text-decoration: line-through; color: var(--gray-6); font-size: 16px; margin-left: 10px; }
.discount { color: #16a34a; font-weight: 600; font-size: 14px; margin-left: 6px; }
.qty-tiers {
  background: var(--surface-3, #f5f5f4);
  border-radius: 8px; padding: 14px; margin: 14px 0;
  font-size: 14px;
}
.qty-tiers div { display: flex; justify-content: space-between; padding: 4px 0; }
.qty-tiers strong { color: var(--gray-9); }
.ctas { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* Seller card */
.seller {
  background: var(--surface-2, #fff);
  border: 1px solid var(--gray-3);
  border-radius: 12px; padding: 20px; margin-bottom: 22px;
}
.seller-head { display: flex; align-items: center; gap: 14px; }
.seller-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 18px;
}
.seller-meta { flex: 1; }
.seller-name { font-weight: 700; font-size: 16px; }
.seller-stats { color: var(--gray-7); font-size: 13px; margin-top: 2px; }
.verified {
  display: inline-flex; align-items: center; gap: 4px;
  color: #1d4ed8; font-size: 12px; font-weight: 600; margin-top: 4px;
}

/* Specs / fields */
.specs {
  background: var(--surface-2, #fff);
  border: 1px solid var(--gray-3);
  border-radius: 12px; padding: 24px; margin-bottom: 22px;
}
.specs h2 { font-size: 18px; margin: 0 0 14px; }
.specs table { width: 100%; border-collapse: collapse; }
.specs td { padding: 9px 0; font-size: 14px; border-bottom: 1px solid var(--gray-2, #f5f5f4); vertical-align: top; }
.specs td:first-child { color: var(--gray-7); width: 40%; }
.specs td:last-child { color: var(--gray-9); }
.specs tr:last-child td { border-bottom: none; }

/* Description */
.desc {
  background: var(--surface-2, #fff);
  border: 1px solid var(--gray-3);
  border-radius: 12px; padding: 28px; margin-bottom: 22px;
}
.desc h2 { font-size: 20px; margin: 0 0 14px; }
.desc p { margin: 0 0 14px; color: var(--gray-8, #292524); }
.desc h3 { font-size: 16px; margin: 22px 0 8px; color: var(--gray-9); }
.desc ul { margin: 8px 0 14px; padding-left: 22px; }
.desc li { margin-bottom: 6px; color: var(--gray-8); }

/* YouTube embed */
.video-embed {
  background: var(--surface-2, #fff);
  border: 1px solid var(--gray-3);
  border-radius: 12px; padding: 20px; margin-bottom: 22px;
  box-shadow: var(--shadow-2, 0 2px 6px rgba(0,0,0,.05));
}
.video-wrap {
  position: relative; width: 100%; padding-top: 56.25%;
  border-radius: 8px; overflow: hidden; background: #000;
}
.video-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* Cross-shop */
.cross {
  background: var(--surface-3, #f5f5f4);
  border-radius: 12px; padding: 20px; margin-bottom: 22px;
  font-size: 14px;
}
.cross h3 { margin: 0 0 10px; font-size: 15px; }
.cross a { color: #1d4ed8; text-decoration: none; }
.cross a:hover { text-decoration: underline; }
.cross p { margin: 6px 0; color: var(--gray-7); }

/* Footer */
footer {
  border-top: 1px solid var(--gray-3);
  padding: 24px 0; margin-top: 40px;
  color: var(--gray-6); font-size: 13px;
  text-align: center;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .barrow { flex-wrap: wrap; gap: 10px; }
  .nav { gap: 12px; font-size: 13px; }
  .title { font-size: 19px; }
  .price { font-size: 26px; }
  .buybox { position: static; padding: 18px; }
  .gallery { padding: 14px; }
}

/* Re-assert light in dark mode */
@media (prefers-color-scheme: dark) {
  body { background: #fafaf9; color: #1c1917; }
  .bar, .gallery, .buybox, .seller, .specs, .desc { background: #fff; color: #1c1917; }
  .qty-tiers, .cross, .thumb { background: #f5f5f4; color: #1c1917; }
  .btn-offer { background: #fafaf9; color: #1c1917; }
  .nav a { color: #57534e; }
  .specs td:first-child, .seller-stats, .crumb { color: #57534e; }
}
