/* ─── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Motion */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.4, 0, 1, 1);

  /* ── Medchain Brand Colors — Light Theme ── */

  /* Backgrounds */
  --color-bg:           #ffffff;
  --color-surface:      #f5f5ff;
  --color-surface-2:    #eeeeff;
  --color-surface-3:    #e4e4fc;
  --color-border:       rgba(59, 59, 245, 0.12);
  --color-border-hover: rgba(59, 59, 245, 0.3);
  --color-divider:      rgba(59, 59, 245, 0.08);

  /* Text */
  --color-text:         #0a0a2e;
  --color-text-muted:   #4b4b8a;
  --color-text-faint:   #9898c4;

  /* Brand Blue — exact logo color */
  --color-brand:        #3b3bf5;
  --color-brand-dark:   #2424c9;
  --color-brand-mid:    #5a5af7;
  --color-brand-light:  #e8e8fe;
  --color-cyan:         #3b3bf5;
  --color-cyan-bright:  #5a5af7;
  --color-accent:       #3b3bf5;
  --color-accent-dim:   rgba(59, 59, 245, 0.06);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(59,59,245,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(59,59,245,0.1),  0 2px 8px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 40px rgba(59,59,245,0.12), 0 4px 16px rgba(0,0,0,0.06);

  /* Glow */
  --glow-sm:  0 0 12px rgba(59, 59, 245, 0.15);
  --glow-md:  0 0 28px rgba(59, 59, 245, 0.2);
  --glow-lg:  0 0 60px rgba(59, 59, 245, 0.1);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2424c9 0%, #3b3bf5 60%, #5a5af7 100%);
  --gradient-text:    linear-gradient(135deg, #2424c9 0%, #3b3bf5 60%, #5a5af7 100%);

  /* Typography */
  --font-display: 'Outfit', 'DM Sans', sans-serif;
  --font-body:    'DM Sans', 'Outfit', sans-serif;

  /* Widths */
  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1200px;
}

/* ─── PAGE TRANSITIONS ──────────────────────────────────────── */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: fade-out-page 0.2s var(--ease-in); }
::view-transition-new(root) { animation: fade-in-page 0.35s var(--ease-out); }
@keyframes fade-out-page { to { opacity: 0; transform: scale(0.99); } }
@keyframes fade-in-page  { from { opacity: 0; transform: scale(1.005); } }

/* ─── GLOBAL BASE ───────────────────────────────────────────── */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* ─── CANVAS BACKGROUND ─────────────────────────────────────── */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─── PAGE WRAPPER ──────────────────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
}

/* ─── GRID OVERLAY ──────────────────────────────────────────── */
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(59,59,245,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,59,245,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 75%);
}

/* ─── HOMEPAGE ──────────────────────────────────────────────── */
.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  gap: var(--space-10);
  padding: var(--space-8);
}

.home-logo-wrap {
  animation: hero-enter 0.9s var(--ease-out) both;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

.logo-glow-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-glow-container::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse, rgba(59,59,245,0.07) 0%, rgba(59,59,245,0.03) 50%, transparent 75%);
  border-radius: 50%;
  animation: pulse-glow 4s ease-in-out infinite;
}

.logo-radial-bg {
  position: absolute;
  inset: -80px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(59,59,245,0.03) 60deg,
    transparent 120deg,
    rgba(59,59,245,0.03) 180deg,
    transparent 240deg,
    rgba(59,59,245,0.03) 300deg,
    transparent 360deg
  );
  border-radius: 50%;
  animation: slow-rotate 20s linear infinite;
}

/* Actual logo image */
.logo-wordmark {
  display: block;
  height: 51px;
  width: auto;
  position: relative;
  z-index: 1;
}

@keyframes hero-enter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.08); }
}

@keyframes slow-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.home-tagline {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0;
  animation: hero-enter 0.9s var(--ease-out) 0.3s both;
}

/* ─── NAV BUTTONS ───────────────────────────────────────────── */
.home-buttons {
  display: flex;
  gap: var(--space-5);
  animation: hero-enter 0.9s var(--ease-out) 0.5s both;
}

.btn-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-brand);
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(59, 59, 245, 0.3);
  background: rgba(59, 59, 245, 0.04);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition:
    color var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive),
    background var(--transition-interactive);
}

.btn-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59,59,245,0.06), rgba(90,90,247,0.1));
  opacity: 0;
  transition: opacity var(--transition-interactive);
}

.btn-nav:hover {
  border-color: rgba(59, 59, 245, 0.6);
  box-shadow: 0 0 20px rgba(59, 59, 245, 0.15), 0 4px 16px rgba(59, 59, 245, 0.1);
  transform: scale(1.03);
  color: var(--color-brand-dark);
}

.btn-nav:hover::before { opacity: 1; }
.btn-nav:active { transform: scale(1.01); }
.btn-nav span { position: relative; z-index: 1; }

/* ─── FILLED VARIANT (primary CTA) ─────────────────────────── */
.btn-nav-filled {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #ffffff;
}

.btn-nav-filled:hover {
  background: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
  color: #ffffff;
}

/* ─── NAV HEADER (inner pages) ──────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-8);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity var(--transition-interactive);
}

.nav-logo-link:hover { opacity: 0.75; }

.nav-logo-img {
  height: 24px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}

.nav-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 500;
  transition: color var(--transition-interactive);
}

.nav-links a:hover  { color: var(--color-brand); }
.nav-links a.active { color: var(--color-brand); font-weight: 600; }

.page-content {
  padding-top: 72px;
  min-height: 100dvh;
}

/* ─── SECTION TYPOGRAPHY ────────────────────────────────────── */
.section-eyebrow {
  font-size: var(--text-xs);
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-3);
}

/* ─── MARKETPLACE PAGE ──────────────────────────────────────── */
.marketplace-section {
  padding: clamp(var(--space-8), 6vw, var(--space-16)) var(--space-8);
  max-width: var(--content-wide);
  margin: 0 auto;
}

.marketplace-header {
  margin-bottom: var(--space-10);
}

.marketplace-filters {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.filter-chip {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    color var(--transition-interactive),
    border-color var(--transition-interactive),
    background var(--transition-interactive);
}

.filter-chip:hover {
  color: var(--color-brand);
  border-color: rgba(59, 59, 245, 0.35);
  background: var(--color-accent-dim);
}

.filter-chip.active {
  color: #fff;
  background: var(--color-brand);
  border-color: var(--color-brand);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-6);
}

.product-card-link {
  display: contents;
  text-decoration: none;
  color: inherit;
}

.product-card {
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive),
    border-color var(--transition-interactive);
  animation: fade-in-card 0.5s var(--ease-out) both;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 59, 245, 0.3);
  box-shadow: var(--shadow-lg);
}

.product-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
}

.product-img-visual {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 60%, rgba(59,59,245,0.06) 0%, transparent 70%);
}

.product-img-icon {
  opacity: 0.3;
  filter: drop-shadow(0 0 6px rgba(59,59,245,0.3));
}

.product-img-inner-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(59,59,245,0.04) 0%, transparent 70%);
}

.product-info {
  padding: var(--space-5);
}

.product-category {
  font-size: var(--text-xs);
  color: var(--color-brand);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.product-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.product-meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.product-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.status-dot.limited {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.product-action {
  font-size: var(--text-xs);
  color: var(--color-brand);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity var(--transition-interactive);
}

.product-card:hover .product-action { opacity: 1; }

@keyframes fade-in-card {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── SOLUTIONS PAGE ────────────────────────────────────────── */
.solutions-section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-8);
  max-width: var(--content-default);
  margin: 0 auto;
}

.solutions-hero {
  text-align: center;
  margin-bottom: var(--space-12);
}

.solutions-headline {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 300;
  line-height: 1.35;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.01em;
}

.solutions-sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* Search Bar */
.search-container {
  position: relative;
  margin-bottom: var(--space-10);
}

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

.search-icon {
  position: absolute;
  left: var(--space-5);
  color: var(--color-text-faint);
  pointer-events: none;
  z-index: 1;
  transition: color var(--transition-interactive);
}

.search-input {
  width: 100%;
  padding: var(--space-5) var(--space-6) var(--space-5) calc(var(--space-5) + 28px);
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(59, 59, 245, 0.2);
  background: #fff;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

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

.search-input:focus {
  border-color: rgba(59, 59, 245, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 59, 245, 0.08), var(--shadow-md);
}

.search-wrap:focus-within .search-icon {
  color: var(--color-brand);
}

.search-btn {
  position: absolute;
  right: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  background: var(--color-brand);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  transition:
    background var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

.search-btn:hover {
  background: var(--color-brand-dark);
  box-shadow: 0 4px 16px rgba(59, 59, 245, 0.3);
  transform: scale(1.02);
}

.search-suggestions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-4);
  justify-content: center;
}

.suggestion-pill {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  cursor: pointer;
  transition:
    color var(--transition-interactive),
    border-color var(--transition-interactive),
    background var(--transition-interactive);
}

.suggestion-pill:hover {
  color: var(--color-brand);
  border-color: rgba(59, 59, 245, 0.35);
  background: var(--color-accent-dim);
}

/* Results */
.results-container { display: none; }

.results-container.visible {
  display: block;
  animation: hero-enter 0.4s var(--ease-out) both;
}

.results-header {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.result-item {
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  transition:
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive);
  animation: fade-in-card 0.4s var(--ease-out) both;
}

.result-item:hover {
  border-color: rgba(59, 59, 245, 0.25);
  box-shadow: var(--shadow-md);
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-5);
  align-items: start;
}

.result-col-label {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.result-item-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.result-item-code {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-family: monospace;
}

.result-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--space-6);
  color: var(--color-brand);
  opacity: 0.5;
}

.result-alt-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-brand);
  margin-bottom: var(--space-1);
}

.result-alt-code {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-family: monospace;
}

.result-explanation {
  grid-column: 1 / -1;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.result-explanation strong {
  color: var(--color-text);
  font-weight: 600;
}

.match-score {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: rgba(59, 59, 245, 0.06);
  border: 1px solid rgba(59, 59, 245, 0.15);
  font-size: var(--text-xs);
  color: var(--color-brand);
  font-family: var(--font-display);
  font-weight: 700;
  float: right;
  margin-left: var(--space-3);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--color-text-faint);
}

.empty-state-icon {
  margin: 0 auto var(--space-4);
  opacity: 0.4;
}

/* ─── FOOTER ────────────────────────────────────────────────── */
.site-footer {
  padding: var(--space-8);
  text-align: center;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-16);
}

.site-footer a {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color var(--transition-interactive);
}

.site-footer a:hover { color: var(--color-text-muted); }

/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .home-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 280px;
  }

  .btn-nav { justify-content: center; }

  .result-grid { grid-template-columns: 1fr; }
  .result-arrow { display: none; }
  .site-nav { padding: var(--space-4) var(--space-5); position: relative; }

  .nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid rgba(59,59,245,0.25);
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
    box-sizing: border-box;
  }
  .nav-hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.2s;
  }
  .nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; }
  .nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  #site-nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: var(--space-5);
    background: rgba(255,255,255,0.97);
    border: 1px solid rgba(59,59,245,0.15);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 200;
    min-width: 160px;
    overflow: hidden;
  }
  #site-nav-menu.open { display: block; }
  #site-nav-menu .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  #site-nav-menu .nav-links li { list-style: none; }
  #site-nav-menu .nav-links a {
    display: block;
    padding: 0.65rem 1.25rem;
    font-size: 0.88rem;
    color: rgba(20,20,60,0.8);
    text-decoration: none;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
  }
  #site-nav-menu .nav-links a:hover,
  #site-nav-menu .nav-links a.active { color: #3b3bf5; background: rgba(59,59,245,0.05); }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* ─── SOLD OUT STATUS DOT ─────────────────────────────────────── */
.status-dot.sold-out {
  background: rgba(220, 60, 60, 0.85);
  box-shadow: 0 0 0 3px rgba(220, 60, 60, 0.15);
}

/* ─── PRODUCT DETAIL PANEL (PDP MODAL) ───────────────────────── */
#pdp-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: var(--space-4);
}
#pdp-overlay.visible {
  opacity: 1;
}

.pdp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 30, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pdp-panel {
  position: relative;
  background: #fff;
  border-radius: var(--radius-2xl);
  border: 1.5px solid var(--color-border);
  box-shadow: 0 32px 80px rgba(59, 59, 245, 0.1), 0 8px 24px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
#pdp-overlay.visible .pdp-panel {
  transform: translateY(0) scale(1);
}

.pdp-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pdp-close:hover {
  background: #f0f0ff;
  color: var(--color-blue);
}

.pdp-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

@media (max-width: 640px) {
  .pdp-inner { grid-template-columns: 1fr; }
}

.pdp-images {
  border-right: 1.5px solid var(--color-border);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (max-width: 640px) {
  .pdp-images { border-right: none; border-bottom: 1.5px solid var(--color-border); padding: var(--space-6); }
}

.pdp-main-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #f5f6ff;
}

.pdp-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}

.pdp-thumbs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.pdp-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: opacity 0.15s, border-color 0.15s;
}
.pdp-thumb:hover { opacity: 0.9; }
.pdp-thumb.active {
  border-color: var(--color-blue);
  opacity: 1;
}

.pdp-info {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.pdp-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
  margin: 0;
}

.pdp-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.pdp-price {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-blue);
  font-family: var(--font-display);
}

.pdp-price-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.pdp-description {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0;
}

.pdp-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.pdp-sold-out-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(200, 50, 50, 0.9);
  background: rgba(220, 60, 60, 0.08);
  border: 1px solid rgba(220, 60, 60, 0.2);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-3);
  width: fit-content;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: var(--text-xs);
}

.pdp-btn {
  width: 100%;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pdp-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.pdp-btn-primary {
  background: #3b3bf5 !important;
  color: #ffffff !important;
  border-color: #3b3bf5 !important;
}
.pdp-btn-primary:hover {
  background: #2a2ad4 !important;
  border-color: #2a2ad4 !important;
  opacity: 0.9;
}

/* ─── SUPPLIER CHIPS ──────────────────────────────────────────── */
.result-suppliers {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
}

.result-suppliers-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
}

.result-suppliers-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
}

.result-suppliers-regular {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.supplier-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.supplier-chip:hover {
  border-color: var(--color-blue);
  background: rgba(59, 59, 245, 0.04);
  box-shadow: 0 2px 8px rgba(59, 59, 245, 0.08);
}
.supplier-chip:hover .supplier-name {
  color: var(--color-blue);
}

.supplier-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.15s;
}

.supplier-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  padding-left: var(--space-1);
  border-left: 1px solid var(--color-border);
}

.supplier-chip svg {
  color: var(--color-text-faint);
  flex-shrink: 0;
}

/* ─── SPONSORED SUPPLIER CHIPS ───────────────────────────────── */
.supplier-chip--sponsored {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.03);
  padding: 0;
  overflow: hidden;
  align-items: stretch;
  gap: 0;
  width: auto;
  max-width: 300px;
}
.supplier-chip--sponsored:hover {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.06);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.1);
}

.supplier-img-wrap {
  width: 80px;
  min-height: 80px;
  flex-shrink: 0;
  background: #f5f6ff;
  border-right: 1px solid rgba(34, 197, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.supplier-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.supplier-chip-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: var(--space-3) var(--space-3);
  flex: 1;
}

.supplier-chip-top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.supplier-chip--sponsored .supplier-name {
  color: #15803d;
  font-weight: 600;
}

.supplier-link-icon {
  color: rgba(34, 197, 94, 0.5);
  flex-shrink: 0;
  margin-right: var(--space-3);
  align-self: center;
}

.supplier-sponsored-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #16a34a;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-full);
  padding: 1px 6px;
}

/* ─── PRODUCT CONTACT FORM ─────────────────────────────────────────────── */
.pdp-contact-block {
  margin-top: var(--space-2);
}

.pdp-contact-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.pdp-contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pdp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

@media (max-width: 480px) {
  .pdp-form-row {
    grid-template-columns: 1fr;
  }
}

.pdp-input {
  width: 100%;
  padding: var(--space-3) var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: #f8f9ff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.pdp-input:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(59, 59, 245, 0.08);
  background: #fff;
}

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

.pdp-textarea {
  resize: vertical;
  min-height: 80px;
  border-radius: var(--radius-md);
}

.pdp-submit-btn {
  width: 100%;
  margin-top: var(--space-1);
}

.pdp-contact-or {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
  margin-top: var(--space-1);
}

.pdp-email-link {
  color: var(--color-blue);
  text-decoration: none;
  font-weight: 500;
}

.pdp-email-link:hover {
  text-decoration: underline;
}

.pdp-form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ── Voting & Comments ──────────────────────────────────────────── */
.vote-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 0.5rem;
  background: rgba(255,255,255,0.02);
  border-radius: 0 0 12px 12px;
}

.vote-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vote-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}

.vote-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.18s;
}
.vote-btn:hover { background: rgba(59,59,245,0.12); border-color: rgba(59,59,245,0.3); color: rgba(255,255,255,0.85); }
.vote-btn.active { background: rgba(59,59,245,0.18); border-color: rgba(59,59,245,0.5); color: #3b3bf5; font-weight: 600; }
.vote-up.active { color: #4ade80; border-color: rgba(74,222,128,0.4); background: rgba(74,222,128,0.08); }
.vote-down.active { color: #f87171; border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.08); }

.vote-feedback-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: rgba(255,255,255,0.45);
  font-size: 0.78rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.03em;
}
.vote-feedback-btn:hover { border-color: rgba(59,59,245,0.35); color: rgba(255,255,255,0.8); }

.vote-comments-panel {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  animation: hero-enter 0.25s ease both;
}

.vote-comments-list {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.vote-comment-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.6rem 0.85rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
}

.vote-comment-author {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(59,59,245,0.85);
  letter-spacing: 0.04em;
}

.vote-comment-text {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

.vote-comment-time {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  margin-top: 2px;
}

.vote-no-comments {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  font-style: italic;
  margin: 0;
}

.vote-comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vote-comment-name,
.vote-comment-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.83rem;
  color: rgba(255,255,255,0.85);
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
}
.vote-comment-name:focus,
.vote-comment-input:focus { border-color: rgba(59,59,245,0.5); }
.vote-comment-name::placeholder,
.vote-comment-input::placeholder { color: rgba(255,255,255,0.3); }

.vote-comment-submit {
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  background: #3b3bf5 !important;
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: opacity 0.2s;
}
.vote-comment-submit:hover { opacity: 0.85; }

/* ── SB 1152 Marketplace ─────────────────────────────────────────── */
.sb-hero {
  background: linear-gradient(135deg, rgba(30,35,90,0.82) 0%, rgba(10,14,40,0.88) 100%);
  border: 1px solid rgba(59,59,245,0.3);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(4px);
}

.sb-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59,59,245,0.15);
  border: 1px solid rgba(59,59,245,0.35);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7b7bf8;
  margin-bottom: 1rem;
}

.sb-title {
  font-family: var(--font-body);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

.sb-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.92);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 0 1.5rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.sb-why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.sb-why-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.sb-why-icon {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
  display: block;
}

.sb-why-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.sb-why-text {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.55;
}

/* ── Vote bar light-mode fix (result cards are white) ──────────── */
.vote-bar {
  background: rgba(59,59,245,0.03) !important;
  border-top: 1px solid rgba(59,59,245,0.1) !important;
}
.vote-label {
  color: rgba(30,30,80,0.55) !important;
}
.vote-btn {
  background: rgba(59,59,245,0.05) !important;
  border: 1px solid rgba(59,59,245,0.15) !important;
  color: rgba(30,30,80,0.6) !important;
}
.vote-btn:hover {
  background: rgba(59,59,245,0.12) !important;
  border-color: rgba(59,59,245,0.35) !important;
  color: #3b3bf5 !important;
}
.vote-up.active {
  background: rgba(34,197,94,0.1) !important;
  border-color: rgba(34,197,94,0.4) !important;
  color: #15803d !important;
}
.vote-down.active {
  background: rgba(239,68,68,0.08) !important;
  border-color: rgba(239,68,68,0.35) !important;
  color: #dc2626 !important;
}
.vote-feedback-btn {
  border: 1px solid rgba(59,59,245,0.15) !important;
  color: rgba(30,30,80,0.55) !important;
}
.vote-feedback-btn:hover {
  border-color: rgba(59,59,245,0.4) !important;
  color: #3b3bf5 !important;
}
.vote-comments-panel {
  border-top: 1px solid rgba(59,59,245,0.08) !important;
}
.vote-comment-item {
  background: rgba(59,59,245,0.03) !important;
  border: 1px solid rgba(59,59,245,0.1) !important;
}
.vote-comment-author { color: #3b3bf5 !important; }
.vote-comment-text { color: rgba(20,20,60,0.75) !important; }
.vote-comment-time { color: rgba(20,20,60,0.4) !important; }
.vote-no-comments { color: rgba(20,20,60,0.45) !important; }
.vote-comment-name,
.vote-comment-input {
  background: rgba(59,59,245,0.03) !important;
  border: 1px solid rgba(59,59,245,0.15) !important;
  color: rgba(20,20,60,0.85) !important;
}
.vote-comment-name::placeholder,
.vote-comment-input::placeholder { color: rgba(20,20,60,0.35) !important; }

/* ── Vote bar layout fix — break out of card padding ───────────── */
.result-item {
  padding-bottom: 0 !important;
}
.vote-bar {
  margin: 1rem -1.5rem 0 -1.5rem !important;
  padding: 0.7rem 1.5rem !important;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl) !important;
}
.vote-comments-panel {
  margin: 0 -1.5rem !important;
  padding: 1rem 1.5rem 1.25rem !important;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl) !important;
}

/* ── Hamburger hidden on desktop, shown on mobile ───────────── */
.nav-hamburger { display: none; }
@media (max-width: 640px) {
  .nav-hamburger { display: flex !important; }
}
