/*
 * LimitedHub - Product detail page styles.
 *
 * Own stylesheet, same reasoning as marketplace/ and admin/. The shared
 * "chrome" below (tokens, reset, navbar, mobile menu, account popover,
 * auth modal, buttons, footer) is copied from css/style.css - if you
 * change one of those there, mirror the change here too. The
 * `.mp-product-*` "related products" card styles further down are copied
 * from marketplace/css/style.css for the same reason.
 */

:root {
  /* Tells the browser to render its OWN native UI (select dropdown popups,
     scrollbars, date pickers, etc.) using a dark palette instead of the
     OS/browser default light one - without this, a <select>'s closed box
     picks up our dark .auth-input/.sell-select/etc styling just fine, but
     the popup list of <option>s that appears on click is native browser
     chrome and ignored our CSS entirely, showing up as a jarring white
     dropdown on an otherwise all-dark page. */
  color-scheme: dark;
  --bg: #08080a;
  --border: #1e1e26;
  --border-soft: #16161c;
  --accent: #ff9d2e;
  --accent-dim: #7a4d1c;
  --text: #f4f2ee;
  --text-dim: #8c8b96;
  --text-faint: #55555f;
  --glass-bg: rgba(15, 15, 19, 0.55);
  --avatar-empty: #2b2b33;
  --avatar-empty-ring: #38383f;
  --danger: #ff6b5e;
  --ok: #34d399;
  --font-display: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- custom scrollbar ---------- */

html {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dim) var(--bg);
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background-color: var(--accent-dim);
  border: 3px solid var(--bg);
  border-radius: 999px;
  transition: background-color 0.2s var(--ease);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent);
}

::-webkit-scrollbar-corner {
  background: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.stage {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}

/* Grid pattern folded directly into .stage's own background instead of
   a separate .stage::before pseudo-element (that's what used to bleed
   through card backgrounds - see git history/DEPLOY notes). A box's own
   background always paints behind its own content, no matter what -
   there's no stacking-context/z-index class of bug possible here at
   all, which is strictly more robust than the earlier z-index:-1 patch.
   Known, accepted tradeoff: background-attachment: fixed can silently
   fall back to scroll behavior on some older mobile Safari versions -
   there the grid just scrolls with the page instead of staying pinned;
   harmless, and still strictly better than the bug this replaces. Same
   change mirrored into every page's own css/style.css copy - see
   build.js's header comment for why there's no single shared
   stylesheet. */

/* ---------- NAVBAR (glass) ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass-bg);
  /* blur radius cut from 22px to 12px - this bar sits sticky at the top
     of every page, so the browser re-computes this blur on every scroll
     frame the whole time you scroll; blur cost roughly scales with the
     radius squared, so this is a large, continuous saving in exchange for
     a barely-noticeable difference in how "frosted" it looks. Originally
     applied only to marketplace/author/css/style.css (Sept 2026) but
     never mirrored to the other copies of this shared chrome - every
     other page kept paying the full 22px cost on every scroll frame
     ever since, which is what made scrolling feel noticeably less smooth
     site-wide compared to that one page. */
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: 100%;
  padding: 0 clamp(24px, 5vw, 72px);
  height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

/* logo */

.logo {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  outline-offset: 6px;
  padding: 4px 0;
}

.logo:focus-visible {
  outline: 1px solid var(--accent);
}

.logo-mark {
  display: block;
  height: 22px;
  width: auto;
  flex: none;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
  filter: drop-shadow(0 0 0 rgba(255, 157, 46, 0));
}

.logo:hover .logo-mark {
  transform: translateY(-1px) scale(1.04);
  filter: drop-shadow(0 0 14px rgba(255, 157, 46, 0.35));
}

.logo:active .logo-mark {
  transform: translateY(0) scale(0.98);
}

/* center nav */

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.4vw, 20px);
  margin: 0;
  padding: 0;
  justify-self: center;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 9px 13px 11px;
  font-size: 0.81rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.25s var(--ease), letter-spacing 0.25s var(--ease);
}

.nav-link-label {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 5px;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  letter-spacing: 0.055em;
}

.nav-link:hover .nav-link-label,
.nav-link:focus-visible .nav-link-label {
  transform: translateY(-1px);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  opacity: 0.5;
  transform: scaleX(1);
}

.nav-link:focus-visible {
  outline: none;
}

.nav-link.is-active {
  color: var(--text);
  font-weight: 700;
}

.nav-link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

/* avatar + name */

.nav-right {
  justify-self: end;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* cart icon (shared across all pages) */

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  color: var(--text-dim);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.cart-btn:hover {
  background-color: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.cart-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* .cart-btn sets its own `display: flex` for layout (icon centering),
   which - being an ordinary author-stylesheet class rule - always wins
   over the browser's own `[hidden] { display: none }` default, since
   author rules beat UA rules regardless of selector specificity. Without
   this, any button/link carrying .cart-btn while also `hidden` (e.g. the
   notification bell before js/notifications.js decides whether to show
   it - see #notifBtn) renders anyway, as an empty circle, for every
   visitor including signed-out ones. */
.cart-btn[hidden] {
  display: none;
}

.cart-icon {
  width: 19px;
  height: 19px;
}

.cart-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--accent);
  color: #06070a;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}

.cart-badge[hidden] {
  display: none;
}

/* hamburger (mobile only) */

.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  transition: background-color 0.25s var(--ease);
}

.hamburger-btn:hover {
  background-color: rgba(255, 255, 255, 0.045);
}

.hamburger-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.hamburger-line {
  display: block;
  width: 19px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.hamburger-btn[aria-expanded='true'] .hamburger-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger-btn[aria-expanded='true'] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-btn[aria-expanded='true'] .hamburger-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* mobile dropdown menu */

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  /* same 22px -> 12px cut as .navbar above, same reason - mobile GPUs feel
     a large blur radius even more than desktop does. Missed in the first
     propagation pass since that one only matched the .navbar block; caught
     on the follow-up full-site re-check. */
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(24px, 5vw, 72px);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.28s var(--ease), opacity 0.2s var(--ease);
}

.mobile-menu.is-open {
  max-height: 320px;
  opacity: 1;
  padding-top: 6px;
  padding-bottom: 14px;
}

.mobile-link {
  padding: 14px 4px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-soft);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.mobile-link:last-child {
  border-bottom: none;
}

.mobile-link:hover {
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.04);
}

.mobile-link.is-active {
  color: var(--text);
  font-weight: 700;
}

.mobile-link:active {
  color: var(--accent);
}

.account-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 20px;
  transition: background-color 0.25s var(--ease);
}

.account-btn:hover {
  background-color: rgba(255, 255, 255, 0.045);
}

.account-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.avatar-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--avatar-empty-ring);
  background: var(--avatar-empty);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

.account-btn:hover .avatar-ring {
  border-color: var(--accent-dim);
  transform: scale(1.06);
}

.avatar-glyph {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-faint);
}

.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.avatar-ring[data-photo='1'] .avatar-glyph {
  display: none;
}

.avatar-ring[data-photo='1'] .avatar-photo {
  display: block;
}

.stage[data-auth='in'] .avatar-glyph {
  color: var(--accent);
  font-weight: 600;
}

.account-name {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  display: none;
  transition: color 0.25s var(--ease);
}

.account-btn:hover .account-name {
  color: var(--accent);
}

/* state: logged in */

.stage[data-auth='in'] .avatar-ring {
  border-color: var(--accent-dim);
  background: linear-gradient(145deg, rgba(255, 157, 46, 0.22) 0%, rgba(255, 157, 46, 0.03) 100%);
}

.stage[data-auth='in'] .account-name {
  display: inline;
}

/* popover */

.popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 248px;
  background: #101014;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
  padding: 18px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
}

.popover.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.popover-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px;
}

.popover-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.popover-body {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0 0 16px;
}

.popover-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.popover-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a2c1a 0%, #1c1610 100%);
  border: 1px solid var(--accent-dim);
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.popover-avatar-initial {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

.popover-avatar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.popover-avatar[data-photo='1'] .popover-avatar-initial {
  display: none;
}

.popover-avatar[data-photo='1'] .popover-avatar-photo {
  display: block;
}

.popover-user-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
}

.popover-user-email {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
}

.popover-btn {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.popover-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.popover-btn.primary {
  background: var(--accent);
  color: #1a1104;
  border: 1px solid var(--accent);
}

.popover-btn.primary:hover {
  background: #ffb257;
}

.popover-btn.ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  margin-top: 8px;
}

.popover-btn.ghost:hover {
  color: var(--text);
  border-color: var(--text-faint);
}

.popover-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}

.popover-link {
  display: block;
  padding: 8px 6px;
  font-size: 0.8rem;
  color: var(--text-dim);
  border-radius: 2px;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.popover-link[hidden] {
  display: none;
}

.popover-link:disabled {
  color: var(--text-faint);
  cursor: default;
  pointer-events: none;
}

.popover-link:hover {
  color: var(--text);
  background: var(--border-soft);
}

.popover-link.is-accent {
  color: var(--accent);
  font-weight: 600;
}

.popover-link.is-accent:hover {
  background: rgba(255, 157, 46, 0.1);
}

.popover-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
  border: none;
}

/* ---------- AUTH MODAL (login / register) ---------- */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 5, 4, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  /* visibility (not just opacity/pointer-events) matters here: this class
     is reused by every modal on the site, including the always-present
     sign-in modal's hCaptcha widget. A third-party iframe (hCaptcha's
     checkbox) can re-assert its own `pointer-events: auto` internally,
     which un-does an ancestor's `pointer-events: none` for that iframe
     specifically - opacity/pointer-events alone were not enough to stop
     the CLOSED sign-in modal's captcha from still being clickable through
     whatever modal was actually open on top of it (both share this exact
     class, position and z-index). `visibility: hidden` has no such
     escape hatch - a descendant cannot un-hide itself - so it closes that
     gap for every .auth-overlay on the site, not just this one page.
     Delayed via the transition below so the existing opacity fade-out
     still plays in full before the element actually stops being
     interactive/hit-testable. */
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), visibility 0s linear 0.22s;
}

.auth-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.22s var(--ease), visibility 0s linear 0s;
}

.auth-modal {
  width: 100%;
  max-width: 400px;
  background: #121216;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.75);
  padding: 30px 30px 28px;
  position: relative;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.3s var(--ease);
}

.auth-modal--tall {
  max-height: min(88vh, 720px);
  overflow-y: auto;
}

.auth-overlay.is-open .auth-modal {
  transform: translateY(0) scale(1);
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.auth-close:hover {
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.06);
}

/* brand row */

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 24px;
}

.auth-brand-logo {
  height: 30px;
  width: auto;
  display: block;
}

/* segmented pill switch */

.auth-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #1a1a20;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
}

.auth-switch-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: #f1efe8;
  border-radius: 9px;
  transform: translateX(0);
  transition: transform 0.32s var(--ease);
  will-change: transform;
}

.auth-modal[data-mode='signup'] .auth-switch-thumb {
  transform: translateX(100%);
}

.auth-switch-btn {
  position: relative;
  z-index: 1;
  padding: 13px 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-dim);
  transition: color 0.25s var(--ease);
}

.auth-switch-btn.is-active {
  color: #14141a;
}

.auth-switch-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* heading + copy */

.auth-panel {
  margin-top: 22px;
}

.auth-heading {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.18;
  margin: 0 0 8px;
  white-space: nowrap;
}

.auth-heading-accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 800;
}

.auth-subcopy {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0 0 22px;
}

/* form */

.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 12px 0 6px;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 6px;
}

.auth-label-row .auth-label {
  margin: 0;
}

.auth-forgot-link {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-faint);
  transition: color 0.2s var(--ease);
}

.auth-forgot-link:hover {
  color: var(--accent);
}

.auth-forgot-link:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  background: #18181e;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.88rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.auth-input::placeholder {
  color: var(--text-faint);
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 157, 46, 0.14);
}

/* Chrome/Edge/Safari autofill (a saved email/password, address or payment
   autofill) forcibly repaints an input's background AND text color with
   its own yellow/light-blue styling the moment it's autofilled - this
   completely ignores .auth-input's own `background`/`color` above, and a
   real `background-color` override on `:-webkit-autofill` gets ignored
   by the browser too (this is the "browser overrides our style" bug
   people notice on login/signup/checkout forms). The fix is the standard
   trick: an inset box-shadow big enough to cover the whole field is NOT
   one of the properties the browser locks, so painting our own dark
   color that way (instead of `background-color`) actually sticks, and
   `-webkit-text-fill-color` forces the text back to our own color too.
   The absurdly long `transition` delay defeats Chrome's own animation
   that reveals the yellow tint after a short delay. Applies everywhere
   .auth-input is used (login/signup, checkout, profile editing, "Start a
   Project", tutorials/add, etc.) since they all share this one class. */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #18181e inset;
  box-shadow: 0 0 0 1000px #18181e inset;
  transition: background-color 600000s 0s, color 600000s 0s;
}

/* Belt-and-suspenders for the <select> popup on top of `color-scheme: dark`
   above (root of the file) - explicit dark colors on every <option> site-
   wide, in case a browser only partially dark-themes the native dropdown. */
select option {
  background: #18181e;
  color: var(--text);
}

.auth-textarea {
  min-height: 110px;
  resize: vertical;
  font-family: var(--font-display);
  line-height: 1.5;
}

.freelancer-guidelines {
  background: #18181e;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.freelancer-guidelines p {
  font-size: 0.84rem;
  color: var(--text-dim);
  margin: 0 0 10px;
}

.freelancer-guidelines-list {
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.freelancer-guidelines-note {
  font-size: 0.76rem;
  color: var(--text-faint);
  margin: 0 !important;
}

/* show/hide password */

.auth-password-wrap {
  position: relative;
}

.auth-password-wrap .auth-input {
  padding-right: 46px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--text-faint);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.auth-password-toggle:hover {
  color: var(--text-dim);
  background-color: rgba(255, 255, 255, 0.06);
}

.auth-password-toggle:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.auth-password-toggle.is-visible {
  color: var(--accent);
}

.icon-eye {
  display: block;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: url('/assets/icons/eye.svg') no-repeat center / contain;
  mask: url('/assets/icons/eye.svg') no-repeat center / contain;
}

.auth-password-toggle.is-visible .icon-eye {
  -webkit-mask-image: url('/assets/icons/eye-slash.svg');
  mask-image: url('/assets/icons/eye-slash.svg');
}

.auth-error {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--danger);
  background: rgba(255, 107, 94, 0.08);
  border: 1px solid rgba(255, 107, 94, 0.25);
  border-radius: 8px;
  padding: 9px 11px;
  margin-top: 12px;
}

.auth-success {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ok);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 8px;
  padding: 9px 11px;
  margin-top: 12px;
}

.auth-submit {
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: #1a1104;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 16px 32px -12px rgba(255, 157, 46, 0.5);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}

.auth-submit-arrow {
  transition: transform 0.2s var(--ease);
}

.auth-submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 20px 38px -12px rgba(255, 157, 46, 0.6);
}

.auth-submit:hover .auth-submit-arrow {
  transform: translateX(3px);
}

.auth-submit:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* google */

.auth-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0 16px;
}

.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #18181e;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.auth-google-btn:hover {
  background: #1e1e25;
  border-color: var(--text-faint);
}

.auth-google-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.google-icon {
  flex: none;
  display: block;
}

/* footer lines */

.auth-legal {
  margin: 14px 0 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-faint);
  text-align: center;
}

.auth-legal a {
  color: var(--text-dim);
  text-decoration: underline;
}

.auth-legal a:hover {
  color: var(--text);
}

.auth-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 2px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-faint);
  cursor: pointer;
}

.auth-consent-checkbox {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-consent-row a {
  color: var(--text-dim);
  text-decoration: underline;
}

.auth-consent-row a:hover {
  color: var(--text);
}

@media (max-width: 480px) {
  .auth-modal {
    padding: 24px 20px 24px;
    border-radius: 18px;
  }

  .auth-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- shared: wide modal + custom select dropdown ----------
   Added for the "Start a Project" modal (partials/project-inquiry-modal.html,
   see js/site-forms.js) - a full-width modifier and a from-scratch <select>
   re-skin, both promoted to shared chrome since the project inquiry modal
   is injected on every page. If you change one of these, mirror the
   change in every other page's own copy (same rule as the rest of this
   "shared chrome" block - see the comment at the top of this file). */

.auth-modal--wide {
  max-width: 600px;
}

/* A native <select>'s closed box happily takes .auth-input's dark
   styling, but its OPEN popup is OS/browser chrome - `color-scheme: dark`
   (root of this file) gets it part of the way, but the browser still
   paints its own blue highlight on the hovered/selected row and there is
   no CSS hook to change that. So any <select> that opts into this (see
   enhanceSelect() in js/site-forms.js) gets visually hidden via
   `.select-native` below - it stays in the DOM as the real source of
   truth for .value - and a fully custom trigger button + option list is
   layered on top instead, themed with our own accent color. */
.select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.select-wrap {
  position: relative;
}

.select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-value--placeholder {
  color: var(--text-faint);
}

.select-arrow {
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--text-dim);
  border-bottom: 1px solid var(--text-dim);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.select-wrap.is-open .select-arrow {
  transform: rotate(-135deg) translateY(1px);
  border-color: var(--accent);
}

.select-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  background: #18181e;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
}

.select-option {
  padding: 9px 10px;
  border-radius: 7px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}

.select-option:hover,
.select-option.is-active {
  background: rgba(255, 157, 46, 0.14);
}

.select-option[aria-selected='true'] {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- shared: "Start a Project" modal extras ----------
   Added back alongside the modal itself (partials/project-inquiry-modal.html,
   js/site-forms.js) when "Start a Project" reverted from its own page back
   to a popup. Mirrors the "success panel" pattern already used elsewhere
   (tutorials/add's .admin-gate, the old /start-project page's
   .sp-success-panel) but under its own class names since this modal is
   shared on every page and shouldn't depend on the admin-only .admin-gate
   styling. If you change one of these, mirror the change in every other
   page's own copy (same rule as the rest of this "shared chrome" block). */

/* .auth-form sets `display: flex`, which (being an author-stylesheet rule)
   otherwise wins over the browser's own `[hidden] { display: none }` -
   without this, `someForm.hidden = true` on anything carrying .auth-form
   silently does nothing. */
.auth-form[hidden] {
  display: none;
}

.project-success-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 180px;
  text-align: center;
  color: var(--text-dim);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 16px;
  background: rgba(52, 211, 153, 0.05);
  padding: 32px 24px;
}

.project-success-panel[hidden] {
  display: none;
}

.project-success-panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.project-success-panel-text {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  max-width: 420px;
}

.project-optional {
  text-transform: none;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0;
}

/* ---------- main content / hero ---------- */

.main-content {
  flex: 1;
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
  .nav-inner {
    grid-template-columns: auto 1fr;
  }
  .account-name {
    display: none !important;
  }
  .hamburger-btn {
    display: flex;
  }
  .popover {
    width: min(280px, calc(100vw - 48px));
  }
}

/* ---------- buttons (shared, copied from css/style.css) ---------- */

.hero-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 26px;
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), filter 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.hero-btn[hidden] {
  display: none;
}

.hero-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s var(--ease-premium);
  pointer-events: none;
}

.hero-btn:hover::before {
  left: 130%;
}

.hero-btn.primary {
  background: var(--accent);
  color: #1a1104;
  box-shadow: 0 20px 40px -18px rgba(255, 157, 46, 0.55);
}

.hero-btn.primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 24px 46px -16px rgba(255, 157, 46, 0.65);
}

.hero-btn-arrow {
  transition: transform 0.2s var(--ease);
}

.hero-btn.primary:hover .hero-btn-arrow {
  transform: translateX(3px);
}

.hero-btn.outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.hero-btn.outline:hover {
  border-color: var(--text-faint);
  background: rgba(255, 255, 255, 0.03);
}

.hero-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- footer ---------- */

.footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #000000;
  border-top: 1px solid var(--border);
  padding: 40px clamp(24px, 5vw, 72px) 0;
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 48px;
  padding-bottom: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.footer-logo-mark {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.footer-logo-word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.footer-tagline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-faint);
  margin: 0;
  max-width: 300px;
}

.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-faint);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease-premium);
}

.footer-social-link:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-social-link svg {
  width: 14px;
  height: 14px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 150px));
  gap: 28px;
  justify-content: end;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 4px;
}

.footer-link {
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--text-faint);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease-premium);
}

.footer-link:hover {
  color: var(--text);
  transform: translateX(2px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.footer-copyright,
.footer-signature {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  margin: 0;
}

.footer-watermark {
  display: block;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: transparent;
  -webkit-text-stroke: 1px var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 90%);
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
  user-select: none;
  margin-top: 2px;
  padding-bottom: 14px;
  overflow: hidden;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-links {
    justify-content: start;
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    gap: 24px;
  }
  .footer-brand {
    max-width: 420px;
  }
}

@media (max-width: 560px) {
  .footer {
    padding-top: 36px;
  }
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}


/* ---------- related products: card (copied from marketplace/css/style.css) ---------- */

.mp-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0e0e12;
  overflow: hidden;
  color: var(--text);
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-premium), transform 0.5s var(--ease-premium), border-color 0.3s var(--ease);
}

/* The card is a plain div now (not the link itself) so the wishlist heart
   button can sit beside the link instead of nested inside it - a <button>
   inside an <a> is invalid HTML and flaky across browsers/screen readers.
   `display: contents` on the link means its children (thumb + body) still
   lay out exactly as if they were direct children of .mp-product-card, so
   none of the flex/grid rules below needed to change. */
.mp-product-card-link {
  display: contents;
  color: inherit;
  text-decoration: none;
}

.mp-product-wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 10, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}

.mp-product-wishlist-btn:hover {
  border-color: var(--accent-dim);
}

.mp-product-wishlist-btn:active {
  transform: scale(0.9);
}

.mp-product-wishlist-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.mp-product-heart-icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.mp-product-heart-icon.is-popping {
  animation: pdHeartPop 0.4s var(--ease-premium);
}

.mp-product-wishlist-btn.is-active {
  background: rgba(255, 157, 46, 0.18);
  border-color: var(--accent);
  color: var(--accent);
}

.mp-product-wishlist-btn.is-active .mp-product-heart-icon {
  fill: var(--accent);
}

.mp-product-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mp-product-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-4px);
}

.mp-product-card.is-visible:hover {
  transform: translateY(-4px);
}

.mp-product-thumb {
  position: relative;
  /* 1:1 - see marketplace/css/style.css's own .mp-product-thumb comment. */
  aspect-ratio: 1 / 1;
  background: linear-gradient(155deg, #1a1a20 0%, #0c0c10 62%);
  overflow: hidden;
}

.mp-product-thumb-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to top, black, transparent 70%);
  mask-image: linear-gradient(to top, black, transparent 70%);
  opacity: 0.6;
  transition: opacity 0.35s var(--ease);
}

.mp-product-card:hover .mp-product-thumb-grid {
  opacity: 1;
}

.mp-product-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
}

.mp-product-top-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.mp-product-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-product-price {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.mp-product-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-product-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--avatar-empty-ring);
  background: var(--avatar-empty);
}

.mp-product-avatar-glyph {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-faint);
}

.mp-product-avatar-photo {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mp-product-avatar[data-photo='1'] .mp-product-avatar-glyph {
  display: none;
}

.mp-product-avatar[data-photo='1'] .mp-product-avatar-photo {
  display: block;
}

.mp-product-author-name {
  font-size: 0.78rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mp-product-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* ---------- product detail page ---------- */

.pd-page {
  padding: 32px clamp(24px, 5vw, 72px) 90px;
  max-width: 1180px;
  margin: 0 auto;
}

.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 28px;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.pd-back:hover {
  color: var(--accent);
  transform: translateX(-2px);
}

/* gate: loading / not found */

.pd-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 360px;
  text-align: center;
  color: var(--text-dim);
}

.pd-gate[hidden] {
  display: none;
}

.pd-gate-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.pd-gate-text {
  font-size: 0.88rem;
  margin: 0;
  max-width: 380px;
}

/* reveal wrapper (preview + layout fade in together) */

.pd-content {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-premium), transform 0.6s var(--ease-premium);
}

.pd-content[hidden] {
  display: none;
}

.pd-content.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* top preview: hero image + thumbnails */

.pd-preview {
  max-width: 640px;
  margin: 0 auto 44px;
  perspective: 1200px;
}

.pd-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.pd-thumb {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: #16161c;
  background-size: cover;
  background-position: center;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.pd-thumb:hover {
  border-color: var(--accent-dim);
}

.pd-thumb.is-active {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.pd-thumb--video {
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-thumb-play {
  width: 20px;
  height: 20px;
  color: var(--text);
  opacity: 0.9;
}

.pd-thumb-play svg {
  width: 100%;
  height: 100%;
}

/* main layout: description (left) + info (right) */

.pd-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}

.pd-description-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pd-description-body {
  margin-top: 6px;
}

.pd-image {
  position: relative;
  /* 16:9 - matches the "Additional Renders" upload guidance on
     marketplace/sell (see the sell-hint next to #sellImagesList), so
     widescreen render output (e.g. car turntables) shows in full instead
     of getting cropped by a narrower box. The thumbnail stays 1:1 - see
     .mp-product-thumb above. */
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(155deg, #1a1a20 0%, #0c0c10 62%);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.25s var(--ease-premium), border-color 0.3s var(--ease);
  will-change: transform;
  cursor: zoom-in;
}

.pd-image:hover {
  border-color: var(--accent-dim);
}

.pd-image.is-video {
  cursor: default;
}

.pd-image-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  border: none; /* also used for the <iframe> case (YouTube/Vimeo/Drive embeds) - see renderMainSlide() */
}

.pd-image-counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(8, 8, 10, 0.72);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
  pointer-events: none;
}

.pd-image-zoom-hint {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(8, 8, 10, 0.72);
  border: 1px solid var(--border);
  color: var(--text-dim);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
  pointer-events: none;
}

.pd-image-zoom-hint svg {
  width: 15px;
  height: 15px;
}

.pd-image:hover .pd-image-zoom-hint,
.pd-image:focus-visible .pd-image-zoom-hint {
  opacity: 1;
}

.pd-image.is-video .pd-image-zoom-hint {
  display: none;
}

.pd-image-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(circle at 50% 55%, black, transparent 72%);
  mask-image: radial-gradient(circle at 50% 55%, black, transparent 72%);
  opacity: 0.7;
}

.pd-image-shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 40%), rgba(255, 255, 255, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.pd-image:hover .pd-image-shine {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .pd-image {
    transition: border-color 0.3s var(--ease);
    transform: none !important;
  }
}

/* info column */

.pd-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pd-category-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pd-category {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.pd-license-badge {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.pd-license-badge[data-license='commercial'] {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: rgba(255, 157, 46, 0.08);
}

.pd-license-badge[data-license='extended'] {
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}

.pd-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-rating-stars {
  display: flex;
  gap: 2px;
}

.pd-star {
  display: block;
  width: 15px;
  height: 15px;
  color: var(--text-faint);
}

.pd-star svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.pd-star.is-full {
  color: var(--accent);
}

.pd-rating-text {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.pd-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pd-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.1;
  margin: 0;
  color: var(--text);
}

.pd-copy-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  margin-top: 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.pd-copy-btn:hover {
  border-color: var(--text-faint);
  color: var(--text);
}

.pd-copy-btn.is-copied {
  border-color: var(--ok);
  color: var(--ok);
}

.pd-copy-icon {
  width: 14px;
  height: 14px;
  flex: none;
}

.pd-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0e0e12;
}

.pd-price {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

.pd-wishlist-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-dim);
  flex: none;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease), transform 0.15s var(--ease);
}

.pd-wishlist-btn:hover {
  border-color: var(--text-faint);
  color: var(--text);
}

.pd-wishlist-btn:active {
  transform: scale(0.92);
}

.pd-wishlist-btn.is-active {
  border-color: var(--accent-dim);
  color: var(--accent);
  background: rgba(255, 157, 46, 0.08);
}

.pd-wishlist-btn.is-active .pd-heart-icon {
  fill: var(--accent);
}

.pd-heart-icon {
  width: 19px;
  height: 19px;
}

.pd-heart-icon.is-popping {
  animation: pdHeartPop 0.4s var(--ease-premium);
}

@keyframes pdHeartPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.pd-buy-btn {
  width: 100%;
  justify-content: center;
}

.pd-buy-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pd-buy-btn:disabled:hover {
  transform: none;
}

.pd-buy-btn.is-in-cart {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.pd-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.pd-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.pd-stat-icon {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--text-faint);
}

.pd-stat-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
}

.pd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pd-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.pd-details-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.pd-details-list dt {
  display: inline;
  color: var(--text-faint);
}

.pd-details-row {
  display: flex;
  gap: 8px;
}

.pd-details-row[hidden] {
  display: none;
}

.pd-details-row dt {
  flex: none;
  width: 110px;
}

.pd-details-row dd {
  margin: 0;
  color: var(--text);
}

/* sections below the fold */

.pd-section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  margin: 0 0 18px;
  color: var(--text);
}

.pd-related {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-premium), transform 0.6s var(--ease-premium);
}

.pd-related[hidden] {
  display: none;
}

.pd-related.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pd-description-text {
  max-width: 720px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-dim);
  white-space: pre-line;
}

/* "What's Included" - reuses .pd-description-body for section spacing
   (see marketplace/product/index.html) so it lines up with "About this
   asset" above it; the list itself needs its own bullet treatment since
   there's no other bulleted list on this page to inherit from. */

.pd-includes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 720px;
}

.pd-includes-list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-dim);
}

.pd-includes-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}

.pd-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

@media (max-width: 900px) {
  .pd-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .pd-title-row {
    flex-direction: column;
  }
  .pd-copy-btn {
    align-self: flex-start;
  }
}

/* ---------- lightbox (image/video viewer), page-specific ---------- */

.pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 4, 6, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
}

.pd-lightbox.is-open {
  display: flex;
}

.pd-lightbox-stage {
  max-width: min(94vw, 1800px);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-lightbox-img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 10px;
  object-fit: contain;
}

.pd-lightbox-video {
  max-width: 88vw;
  max-height: 84vh;
  border-radius: 10px;
  background: #000;
}

/* Same element/class also used for the YouTube/Vimeo/Drive <iframe> case
   (see renderLightboxSlide()) - an <iframe> has no intrinsic size like
   <video> does, so it needs an explicit width/height to actually fill the
   max-width/max-height box above instead of defaulting to 300x150. */
iframe.pd-lightbox-video {
  width: 88vw;
  height: 84vh;
  border: none;
}

.pd-lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(20, 20, 24, 0.7);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.pd-lightbox-close:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.pd-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(20, 20, 24, 0.7);
  color: var(--text);
  font-size: 1.9rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.pd-lightbox-nav:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.pd-lightbox-nav[hidden] {
  display: none;
}

.pd-lightbox-prev {
  left: 20px;
}

.pd-lightbox-next {
  right: 20px;
}

.pd-lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(20, 20, 24, 0.7);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
}

.pd-lightbox-counter[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .pd-lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  .pd-lightbox-prev {
    left: 8px;
  }
  .pd-lightbox-next {
    right: 8px;
  }
  .pd-lightbox-close {
    top: 12px;
    right: 14px;
  }
}

/* ---------- seller mini-card (bottom of info column) ---------- */

.pd-seller-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0e0e12;
  margin-top: auto; /* pushes the card to the bottom of .pd-info, filling leftover space */
}

.pd-seller-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--avatar-empty-ring);
  background: var(--avatar-empty);
}

.pd-seller-avatar-glyph {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-faint);
}

.pd-seller-avatar-photo {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-seller-avatar[data-photo='1'] .pd-seller-avatar-glyph {
  display: none;
}

.pd-seller-avatar[data-photo='1'] .pd-seller-avatar-photo {
  display: block;
}

.pd-seller-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.pd-seller-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pd-seller-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-official-badge {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 157, 46, 0.14);
  border: 1px solid rgba(255, 157, 46, 0.4);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.pd-official-badge[hidden] {
  display: none;
}

.pd-seller-count {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.pd-seller-link {
  flex: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  transition: transform 0.2s var(--ease);
}

.pd-seller-link:hover {
  transform: translateX(2px);
}

/* ---------- reviews section ---------- */

.pd-reviews {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-premium), transform 0.6s var(--ease-premium);
}

.pd-reviews[hidden] {
  display: none;
}

.pd-reviews.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pd-reviews-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.pd-reviews-summary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-review-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 720px;
}

.pd-review-empty {
  font-size: 0.88rem;
  color: var(--text-dim);
  max-width: 720px;
}

.pd-review-empty[hidden] {
  display: none;
}

.pd-review {
  display: flex;
  gap: 14px;
}

.pd-review-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--avatar-empty-ring);
  background: var(--avatar-empty);
}

.pd-review-avatar-glyph {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}

.pd-review-avatar-photo {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-review-avatar[data-photo='1'] .pd-review-avatar-glyph {
  display: none;
}

.pd-review-avatar[data-photo='1'] .pd-review-avatar-photo {
  display: block;
}

.pd-review-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.pd-review-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pd-review-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}

.pd-review-date {
  font-size: 0.76rem;
  color: var(--text-faint);
}

.pd-review-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-dim);
  white-space: pre-line;
  margin: 2px 0 0;
}

/* review form / sign-in prompt / already-reviewed states */

.pd-review-form-wrap {
  margin-top: 32px;
  max-width: 480px;
}

.pd-review-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0e0e12;
}

.pd-review-form-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.pd-review-star-picker {
  display: flex;
  gap: 4px;
}

.pd-review-star-btn {
  width: 26px;
  height: 26px;
  color: var(--text-faint);
  transition: color 0.15s var(--ease), transform 0.15s var(--ease);
}

.pd-review-star-btn svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.pd-review-star-btn:hover {
  transform: scale(1.1);
}

.pd-review-star-btn.is-active {
  color: var(--accent);
}

.pd-review-textarea {
  width: 100%;
  min-height: 84px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
}

.pd-review-textarea:focus-visible {
  outline: 1px solid var(--accent-dim);
}

.pd-review-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin: 0;
}

.pd-review-error[hidden] {
  display: none;
}

.pd-review-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0e0e12;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.pd-review-already {
  padding: 14px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0e0e12;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---------- cookie consent banner (shared chrome, see
   partials/cookie-banner.html + js/cookie-consent.js - if you change one
   of those, mirror the change here too). ---------- */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  padding: 0 clamp(16px, 4vw, 32px) clamp(16px, 4vw, 32px);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s var(--ease-premium), opacity 0.3s var(--ease);
  pointer-events: none;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner-inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: #101014;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.65);
}

.cookie-banner-text {
  flex: 1 1 320px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
}

.cookie-banner-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-link:hover {
  color: var(--text);
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  flex-wrap: wrap;
}

.cookie-banner-btn {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 20px;
  border-radius: 999px;
  white-space: nowrap;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease), filter 0.2s var(--ease);
}

.cookie-banner-btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.cookie-banner-btn.ghost:hover {
  border-color: var(--text-faint);
  color: var(--text);
}

.cookie-banner-btn.primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #1a1104;
}

.cookie-banner-btn.primary:hover {
  filter: brightness(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    transition: none;
  }
}

@media (max-width: 640px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
  .cookie-banner-text {
    flex-basis: auto;
  }
  .cookie-banner-actions {
    justify-content: stretch;
  }
  .cookie-banner-btn {
    flex: 1 1 0;
    text-align: center;
  }
}

/* ---------- text selection highlight (site-wide) - restyled per team
   feedback (Discord: "Wyłączyć zaznaczanie tekstu (lub je uładnić, np.
   lekko pomarańczowe i cieńsze)") to a light, thin accent-orange
   highlight instead of the harsh browser default, rather than disabling
   selection outright - keeping text selectable matters for accessibility
   (copying, screen readers, translation tools), it just needed to look
   intentional instead of default. Same rule copied into every
   css/style.css on the site - see build.js's header comment for why
   there's no single shared stylesheet to add this to instead. ---------- */

::selection {
  background: rgba(255, 157, 46, 0.28);
  color: var(--text);
}

/* ---------- notification bell (js/notifications.js) - shown once
   signed in, a small red dot appears while there's at least one unread
   notification (a REAL one - see notifications_migration.sql - not a
   decorative reuse of some other count). The bell reuses .cart-btn/
   .cart-icon for identical sizing; the dropdown below it is the same
   visual language as .popover, just anchored to the bell itself (not the
   whole .nav-right) via .notif-wrap so it doesn't have to share
   .popover's own right:0 anchor. ---------- */

.notif-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff6b5e;
  border: 2px solid #06070a;
}

.notif-dot[hidden] {
  display: none;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 32px);
  max-height: 420px;
  overflow-y: auto;
  background: #101014;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
  padding: 14px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
  z-index: 40;
}

.notif-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.notif-panel-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.notif-mark-all-btn {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.2s var(--ease);
}

.notif-mark-all-btn:hover {
  opacity: 0.8;
}

.notif-mark-all-btn[hidden] {
  display: none;
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  transition: background-color 0.2s var(--ease);
}

.notif-item:hover {
  background-color: rgba(255, 255, 255, 0.045);
}

.notif-item.is-unread {
  background-color: rgba(255, 157, 46, 0.07);
}

.notif-item-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 3px;
}

.notif-item-body {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-dim);
  margin: 0 0 4px;
}

.notif-item-time {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-faint);
}

.notif-empty {
  font-size: 0.82rem;
  color: var(--text-faint);
  text-align: center;
  padding: 18px 6px;
  margin: 0;
}

.notif-empty[hidden] {
  display: none;
}

@media (max-width: 480px) {
  .notif-panel {
    width: calc(100vw - 32px);
    right: -8px;
  }
}

/* "Edit listing" shortcut for the author / LimitedHub team (see
   maybeShowEditLink() in js/main.js) */
.pd-edit-link {
  display: block;
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.pd-edit-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* crossed-out old price + discount badge (products.compare_at_price) */
.pd-price-old {
  margin-left: 12px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-faint);
  text-decoration-thickness: 1.5px;
}

.pd-price-off {
  margin-left: 10px;
  vertical-align: middle;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1a1104;
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 999px;
  position: relative;
  top: -3px;
}

/* ---- review edit / delete ---- */
.pd-review-edited {
  font-size: 0.72rem;
  color: var(--text-faint);
  font-style: italic;
}
.pd-review-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.pd-review-action {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.pd-review-action:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--accent-dim);
}
.pd-review-action.is-danger { color: #ff8a8a; }
.pd-review-action.is-danger:hover:not(:disabled) { border-color: rgba(255, 110, 110, 0.6); }
.pd-review-action.is-solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}
.pd-review-action.is-danger.is-solid {
  background: #e05656;
  border-color: #e05656;
  color: #fff;
}
.pd-review-action:disabled { opacity: 0.6; cursor: default; }
.pd-review-confirm {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.pd-review-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.pd-review-body > [hidden] { display: none !important; }

.pd-buy-btn.is-owned {
  background: rgba(123, 224, 168, 0.12);
  border-color: rgba(123, 224, 168, 0.55);
  color: #9ff0c2;
}

/* ---- phones: thumbnails as one swipeable row, and the price / Add to
   Cart block right under the title instead of after the whole
   description ---- */
@media (max-width: 900px) {
  .pd-layout { gap: 18px; }
  .pd-description-col { display: contents; }
  .pd-category-row, .pd-title-row, .pd-rating { order: 0; }
  .pd-info { order: 1; }
  .pd-description-body { order: 2; }
}
@media (max-width: 720px) {
  .pd-thumbs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pd-thumbs::-webkit-scrollbar { display: none; }
  .pd-thumb { width: 58px; height: 58px; scroll-snap-align: start; }
}

/* ---- cards in "More from" / "You might also like" use the marketplace v2 card ---- */
.mp-product-price-row {
  display: flex;
  align-items: stretch;
  align-self: flex-start;
  margin-top: 6px;
  min-height: 34px;
}
.mp-product-price-row .mp-product-price {
  display: inline-flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 700;
}
.mp-product-discount {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  background: var(--accent);
  color: #14100a;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  border-radius: 6px 0 0 6px;
}
.mp-product-price-stack {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  padding: 3px 9px;
  background: rgba(255, 157, 46, 0.12);
  border-radius: 0 6px 6px 0;
  line-height: 1.05;
}
.mp-product-price-stack .mp-product-price-old {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
}
.mp-product-price-stack .mp-product-price {
  font-size: 0.88rem;
  color: var(--accent);
}

/* ---- product cards v2 (2026-10-31): category chip on the image, name +
   price on one row, creator + downloads + add-to-cart on the next ---- */
.mp2-card { border-radius: 18px; border-color: #1f1f24; background: #111114; }
.mp2-card .mp-product-thumb { aspect-ratio: 4 / 3; }
.mp2-cat {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  max-width: calc(100% - 64px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 5px 9px; border-radius: 999px;
  background: rgba(17, 17, 20, 0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #f2f1ee;
}
.mp2-card .mp-product-official-badge { top: auto; bottom: 12px; left: 12px; }
.mp2-card .mp-product-wishlist-btn { top: 12px; right: 12px; width: 34px; height: 34px; background: rgba(60, 60, 66, 0.72); }
.mp2-card .mp-product-body { gap: 10px; padding: 14px 14px 14px; }
.mp2-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.mp2-top .mp-product-name { min-width: 0; font-size: 1rem; font-weight: 700; line-height: 1.25; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp2-top .mp-product-price-row { flex: 0 0 auto; margin: 0; min-height: 38px; align-self: center; }
.mp2-top .mp-product-price-row:not(.is-discounted) .mp-product-price {
  height: 38px; padding: 0 12px; border-radius: 10px; background: #1c1c21; color: #f2f1ee; font-size: 1rem;
}
.mp2-top .mp-product-discount { border-radius: 10px 0 0 10px; font-size: 0.95rem; }
.mp2-top .mp-product-price-stack { border-radius: 0 10px 10px 0; background: #1c1c21; padding: 3px 11px; }
.mp2-card .mp-product-author { padding-right: 46px; min-height: 36px; }
.mp2-card .mp-product-avatar { width: 22px; height: 22px; }
.mp2-card .mp-product-author-name { font-size: 0.82rem; color: #a3a2ab; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp2-dl { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; flex: none; font-family: var(--font-mono); font-size: 0.74rem; color: #a3a2ab; }
.mp2-cart-btn {
  position: absolute; right: 14px; bottom: 14px; z-index: 2;
  width: 36px; height: 36px; border-radius: 10px; border: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #0b0b0d; cursor: pointer;
  transition: filter 0.2s var(--ease), transform 0.15s var(--ease), background-color 0.2s var(--ease);
}
.mp2-cart-btn:hover { filter: brightness(1.08); }
.mp2-cart-btn:active { transform: scale(0.94); }
.mp2-cart-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mp2-cart-btn.is-in-cart { background: #1c1c21; color: #7fd6a4; box-shadow: inset 0 0 0 1px rgba(127, 214, 164, 0.4); }
.mp2-cart-btn.is-pop { transform: scale(1.12); }
@media (max-width: 640px) {
  .mp2-card .mp-product-thumb { aspect-ratio: 1 / 1; }
  .mp2-top { flex-direction: column; align-items: flex-start; gap: 6px; }
  .mp2-top .mp-product-price-row { align-self: flex-start; min-height: 32px; }
  .mp2-top .mp-product-price-row:not(.is-discounted) .mp-product-price { height: 32px; font-size: 0.86rem; }
  .mp2-top .mp-product-name { font-size: 0.86rem; }
  .mp2-cat { font-size: 0.55rem; padding: 4px 7px; left: 8px; top: 8px; }
  .mp2-card .mp-product-author { padding-right: 38px; min-height: 30px; }
  .mp2-dl { font-size: 0.66rem; }
  .mp2-cart-btn { width: 30px; height: 30px; right: 10px; bottom: 12px; border-radius: 8px; }
  .mp2-cart-btn svg { width: 14px; height: 14px; }
}

/* ---- buy box price chip + perks (2026-10-31) ---- */
.pd2-price { display: inline-flex; align-items: stretch; height: 60px; border-radius: 14px; overflow: hidden; background: #1c1c21; font-family: var(--font-body, inherit); color: var(--text); }
.pd2-off { display: flex; align-items: center; padding: 0 16px; background: var(--accent); color: #0b0b0d; font-family: var(--font-mono); font-size: 1.3rem; font-weight: 800; }
.pd2-stack { display: flex; flex-direction: column; justify-content: center; padding: 0 18px; line-height: 1.05; }
.pd2-was { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-faint); }
.pd2-now { font-size: 1.7rem; font-weight: 800; color: #f2f1ee; }
.pd2-price.is-discounted .pd2-now { font-size: 1.45rem; }
.pd2-save { margin: -4px 0 0; font-family: var(--font-mono); font-size: 0.74rem; color: #7fd6a4; text-align: center; }
.pd2-perks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 0.84rem; color: var(--text-dim); }
.pd2-perks li { display: flex; gap: 8px; align-items: flex-start; }
.pd2-perks li::before { content: ''; flex: 0 0 auto; width: 14px; height: 14px; margin-top: 2px; border-radius: 50%; background: rgba(127, 214, 164, 0.15) url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237fd6a4' stroke-width='3'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 10px no-repeat; }
.pd-related-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pd-related-link { font-size: 0.86rem; color: var(--accent); text-decoration: none; }
.pd-related-link[hidden] { display: none; }
.pd-more + .pd-related { margin-top: 0; }
.pd-related-grid .mp2-top { flex-direction: column; align-items: flex-start; gap: 8px; }
.pd-related-grid .mp2-top .mp-product-price-row { align-self: flex-start; }

/* ---- product page v2 layout (2026-10-31): gallery left, sticky buy box
   right; description + reviews side by side below ---- */
.pd-page { max-width: 1360px; }
.pd2-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr); gap: 40px; align-items: start; margin-bottom: 48px; }
.pd2-top .pd-preview { max-width: none; margin: 0; min-width: 0; }
.pd2-top .pd-image { border-radius: 22px; }
.pd2-top .pd-thumbs { justify-content: flex-start; gap: 8px; }
.pd2-aside { position: sticky; top: 90px; gap: 16px; }
.pd2-head { display: flex; flex-direction: column; gap: 10px; }
.pd2-head .pd-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pd2-head .pd-title { font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.04; margin: 0; }
.pd2-head .pd-copy-btn { flex: 0 0 auto; border-radius: 999px; }
.pd2-aside .pd-price-row { border-radius: 20px; border-color: #232329; background: #121215; padding: 18px; }
.pd2-aside .pd-buy-btn { border-radius: 999px; height: 54px; font-family: var(--font-body, inherit); font-size: 1rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.pd2-aside .pd-stats { padding: 12px 14px; border-radius: 14px; border: 1px solid #1f1f24; background: #111114; justify-content: space-between; }
.pd2-aside .pd-details-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid #1f1f24; border-radius: 16px; overflow: hidden; margin: 0; }
.pd2-aside .pd-details-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-right: 1px solid #1f1f24; border-bottom: 1px solid #1f1f24; margin: 0; }
.pd2-aside .pd-details-row[hidden] { display: none; }
.pd2-aside .pd-details-row dt { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: #8f8e98; }
.pd2-aside .pd-details-row dd { margin: 0; font-size: 0.92rem; color: var(--text); }
.pd2-aside .pd-seller-card { border-radius: 16px; }
.pd2-bottom { grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr); gap: 40px; padding-top: 32px; border-top: 1px solid #1d1d22; }
.pd2-bottom .pd-reviews { margin: 0; padding: 0; border: 0; }
.pd2-bottom .pd-description-text { font-size: 1rem; line-height: 1.7; color: #c9c8c3; }
@media (max-width: 900px) {
  .pd2-top { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 32px; }
  .pd2-aside { position: static; }
  .pd2-bottom { grid-template-columns: minmax(0, 1fr); }
  .pd2-bottom .pd-description-col { display: flex; }
}

/* ---- v2.1: description + reviews moved under the gallery (left column) so
   the space next to the tall buy box isn't empty; thumbnails centred ---- */
.pd2-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.pd2-top .pd-thumbs { justify-content: center; gap: 10px; margin-top: 16px; padding: 12px; border: 1px solid #1d1d22; border-radius: 18px; background: #0f0f12; }
.pd2-top .pd-thumb { width: 72px; height: 72px; border-radius: 12px; }
.pd2-main .pd-description-col,
.pd2-main .pd-reviews { padding: 26px 28px; border: 1px solid #1f1f24; border-radius: 22px; background: linear-gradient(180deg, #121215, #0e0e11); margin: 0; }
.pd2-main .pd-description-col { gap: 22px; }
.pd2-main .pd-description-body { margin: 0; }
.pd2-main .pd-description-body + .pd-description-body { padding-top: 22px; border-top: 1px solid #1d1d22; }
.pd2-main .pd-section-title { font-size: 1.15rem; margin: 0 0 12px; }
.pd2-main .pd-description-text { font-size: 1rem; line-height: 1.75; color: #c9c8c3; white-space: pre-line; }
.pd2-main .pd-review-form-wrap > * { border-radius: 16px; }
@media (max-width: 900px) {
  .pd2-main { display: contents; }
  .pd2-top .pd-preview { order: 0; }
  .pd2-top .pd2-aside { order: 1; }
  .pd2-main .pd-description-col { order: 2; display: flex; }
  .pd2-main .pd-reviews { order: 3; }
  .pd2-main .pd-description-col, .pd2-main .pd-reviews { padding: 20px; }
}
@media (max-width: 720px) {
  .pd2-top .pd-thumbs { justify-content: flex-start; padding: 8px; }
  .pd2-top .pd-thumb { width: 58px; height: 58px; }
}
.pd2-main .pd-review-form-wrap, .pd2-main .pd-review-form { max-width: none; width: 100%; }

/* ---- buy box price v2.1: one clean line - big price, struck old price,
   small discount pill (no nested chip inside the box) ---- */
.pd2-aside .pd-price-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px; }
.pd2-aside .pd2-price { height: auto; background: none; border-radius: 0; overflow: visible; align-items: center; gap: 12px; flex-wrap: wrap; }
.pd2-aside .pd2-stack { flex-direction: row-reverse; align-items: baseline; gap: 10px; padding: 0; }
.pd2-aside .pd2-now,
.pd2-aside .pd2-price.is-discounted .pd2-now { font-size: 2.3rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; color: #f4f3ef; }
.pd2-aside .pd2-was { font-size: 1rem; color: #6f6e78; text-decoration-thickness: 1.5px; }
.pd2-aside .pd2-off { order: 2; padding: 5px 10px; border-radius: 999px; background: rgba(255, 159, 47, 0.14); border: 1px solid rgba(255, 159, 47, 0.45); color: var(--accent); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; }

/* owned / purchased: green glow instead of the orange one */
.pd-buy-btn.is-owned,
.pd-buy-btn.is-owned:hover { box-shadow: 0 10px 34px -10px rgba(123, 224, 168, 0.45), 0 0 0 1px rgba(123, 224, 168, 0.18) inset; }

/* cards in a row: author line + cart button always pinned to the bottom,
   so a 2-line title does not push one card's author lower than the rest */
.mp2-card { height: 100%; }
.mp2-card .mp-product-body { flex: 1 1 auto; }
.mp2-card .mp-product-author { margin-top: auto; }

/* stacked cards (name above price): always reserve 2 title lines so the
   prices line up across a row */
.pd-related-grid .mp2-top .mp-product-name { min-height: 2.5em; }
@media (max-width: 640px) { .mp2-top .mp-product-name { min-height: 2.5em; } }

/* no empty thumbnail strip when a listing has one photo */
.pd2-top .pd-thumbs:empty { display: none; }
