/* ========================================================
   ByteBazaar — Modern Neo-Brutalist Design System
   ======================================================== */

:root {
  --cream: #FFFDF8;
  --cream-soft: #FAF7EF;
  --cream-subtle: #F5EFE3;
  --ink: #1B1511;
  --ink-light: #3A322C;
  --muted: #5E554D;
  --muted-light: #B9AFA5;
  --border-dark: #1B1511;

  /* Accent Palette */
  --pink: #FF5CA8;
  --gold: #FFB91F;
  --green: #1FC37E;
  --green-soft: #DAF6E8;
  --cyan: #63C6FF;
  --purple: #B9A2FF;
  --orange: #FF6B3D;
  --blue: #2445F2;
  --blue-soft: #DCE2FF;
  --yellow-soft: #FFF0C7;

  /* Typography */
  --font-heading: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, monospace;
  --font-body: 'Figtree', ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Shadows */
  --shadow-sm: 4px 4px 0 var(--ink);
  --shadow-md: 6px 6px 0 var(--ink);
  --shadow-lg: 8px 8px 0 var(--ink);
  --shadow-xl: 10px 10px 0 var(--ink);
  --shadow-pink: 6px 6px 0 var(--pink);
  --shadow-gold: 6px 6px 0 var(--gold);

  /* Layout */
  --container: 1240px;
  --gutter: clamp(16px, 3vw, 24px);
  --section-y: clamp(56px, 8vw, 104px);
}

@media (min-width: 1600px) {
  :root {
    --container: 1400px;
    --gutter: 32px;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--cream);
  color: var(--ink);
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--blue);
}

img, svg {
  vertical-align: middle;
}

img {
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

/* ========================================================
   Neo-Brutalist Micro-interactions & Buttons
   ======================================================== */

.lift {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
}

@media (hover: hover) {
  .lift:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0 var(--ink) !important;
  }
}

@media (hover: hover) {
  .lift-pink:hover {
    box-shadow: 10px 10px 0 var(--pink) !important;
  }
}

@media (hover: hover) {
  .lift-gold:hover {
    box-shadow: 10px 10px 0 var(--gold) !important;
  }
}

.ul {
  position: relative;
}

.ul:hover {
  text-decoration: underline !important;
  text-decoration-thickness: 2.5px !important;
  text-underline-offset: 5px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 0 24px;
  min-height: 48px;
  cursor: pointer;
  text-decoration: none;
  background: var(--cream);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

@media (hover: hover) {
  .btn:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-lg);
    color: var(--ink);
  }
}

.btn:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}

@media (hover: hover) {
  .btn-primary:hover {
    background: var(--ink-light);
    color: var(--cream);
    box-shadow: var(--shadow-lg);
  }
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.btn-pink {
  background: var(--pink);
  color: var(--ink);
}

.btn-green {
  background: var(--green);
  color: var(--ink);
}

.btn-blue {
  background: var(--blue);
  color: var(--cream);
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--cream);
  color: var(--ink);
  white-space: nowrap;
}

/* ========================================================
   Awning Banner & Scallops
   ======================================================== */

.awning-strip {
  height: 22px;
  background: repeating-linear-gradient(90deg, var(--awning-color, var(--pink)) 0 44px, var(--cream) 44px 88px);
  border-bottom: 2.5px solid var(--ink);
  transition: background 0.4s ease;
}

.awning-scallop {
  height: 22px;
  background: 
    radial-gradient(circle at 22px 0, var(--awning-color, var(--pink)) 0 19px, var(--ink) 19px 21.5px, transparent 22px) 0 0 / 88px 22px repeat-x,
    radial-gradient(circle at 66px 0, var(--cream) 0 19px, var(--ink) 19px 21.5px, transparent 22px) 0 0 / 88px 22px repeat-x;
  border-bottom: none;
  transition: background 0.4s ease;
}

/* ========================================================
   Header & Navigation
   ======================================================== */

.site-header {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  position: relative;
  z-index: 50;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  color: var(--ink);
  text-decoration: none;
}

.site-logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 29px;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0 28px;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}

.site-nav a.active {
  padding: 8px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
}

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

/* Hamburger — only visible below the desktop breakpoint */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-toggle:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }

.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* ========================================================
   Hero Section & Search Bar
   ======================================================== */

.hero-box {
  background: var(--hero-bg, var(--gold));
  border-bottom: 2.5px solid var(--ink);
  transition: background 0.4s ease;
}

.hero-content {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(48px, 8vw, 96px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 56px);
}

@media (min-width: 1024px) {
  .hero-content {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

.hero-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-lead {
  margin: 0;
  max-width: 580px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
  font-weight: 500;
  text-wrap: pretty;
  color: var(--ink);
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(48px, 6vw, 92px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-wrap: balance;
  color: var(--ink);
}

.hero-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 640px;
  padding: 6px 8px 6px 20px;
  background: #FFFFFF;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-search-bar:focus-within {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}

.hero-search-bar input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  outline: none;
  text-overflow: ellipsis;
}

.hero-search-bar input::placeholder {
  text-overflow: ellipsis;
}

.hero-search-bar .btn {
  flex: none;
  min-height: 50px;
  padding: 0 26px;
}

/* Floating interactive cards */
.hero-cards-container {
  min-width: 0;
  position: relative;
  height: 640px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.tilt-card {
  position: absolute;
  width: 78%;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.card-1 {
  left: 0;
  top: 12px;
  z-index: 10;
  transform: rotate(-4deg);
}

.card-2 {
  right: 0;
  top: 210px;
  z-index: 20;
  transform: rotate(3.5deg);
}

.card-3 {
  left: 6%;
  top: 410px;
  z-index: 30;
  transform: rotate(-1.5deg);
}

@media (hover: hover) {
  .tilt-card:hover {
    z-index: 40 !important;
    transform: scale(1.04) rotate(0deg) !important;
    box-shadow: 14px 14px 0 var(--ink) !important;
  }
}

/* Spinning Verified Seal */
.spinning-badge-wrapper {
  position: absolute;
  right: -10px;
  top: -12px;
  width: 148px;
  height: 148px;
  z-index: 50;
  cursor: pointer;
}

.spinning-badge-bg {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--pink);
  border: 2.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.spin-slow {
  animation: badge-spin 22s linear infinite;
  transform-origin: center;
}

.spinning-badge-wrapper:hover .spin-slow {
  animation-duration: 6s;
}

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

.spinning-badge-center {
  position: absolute;
  left: 44px;
  top: 44px;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================================
   Dataset Cards Grid
   ======================================================== */

.dataset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 22px;
}

.dataset-card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--ink);
  text-decoration: none;
  border: 2.5px solid var(--ink);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
}

@media (hover: hover) {
  .dataset-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow-xl);
    color: var(--ink);
  }
}

.dataset-card-stripe {
  height: 16px;
  border-bottom: 2.5px solid var(--ink);
}

.dataset-card-body {
  flex: 1 1 auto;
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dataset-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ========================================================
   Interactive Modal for Dataset Preview & Inspection
   ======================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(27, 21, 17, 0.72);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: 16px 16px 0 var(--ink);
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.modal-backdrop.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 22px 28px;
  border-bottom: 2.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--gold);
}

.modal-close-btn {
  flex: none;
}

.modal-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.modal-tabs .btn {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.modal-overview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  background: var(--cream-soft);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding-top: 20px;
  border-top: 2.5px solid var(--ink);
}

.modal-actions-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-close-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 2.5px solid var(--ink);
  background: var(--cream);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 800;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}

@media (hover: hover) {
  .modal-close-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-md);
  }
}

/* Table previews inside modal */
.data-preview-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #FFFFFF;
  margin-top: 10px;
}

.data-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13.5px;
  text-align: left;
}

.data-preview-table th {
  background: var(--ink);
  color: var(--cream);
  padding: 10px 14px;
  font-weight: 500;
  white-space: nowrap;
}

.data-preview-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #E8E2D7;
  white-space: nowrap;
}

.data-preview-table tr:last-child td {
  border-bottom: none;
}

.data-preview-table tr:hover td {
  background: #FFF9E6;
}

/* Schema tables carry prose descriptions — let those wrap */
.data-preview-table.schema-table td:last-child {
  white-space: normal;
  min-width: 220px;
}

/* ========================================================
   Toast System
   ======================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 320px;
  max-width: 440px;
  font-weight: 600;
  animation: toast-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.toast-success {
  border-left: 10px solid var(--green);
}

.toast.toast-info {
  border-left: 10px solid var(--blue);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========================================================
   Layout Primitives
   ======================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
}

.section {
  padding: var(--section-y) var(--gutter);
}

.section-sm { --section-y: clamp(48px, 7vw, 84px); }

.section-band {
  border-top: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
}

.section-catalog {
  padding: clamp(32px, 5vw, 56px) var(--gutter) clamp(56px, 8vw, 96px);
}

.section-cta {
  padding: clamp(64px, 10vw, 120px) var(--gutter) clamp(56px, 9vw, 112px);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 16px);
  min-width: 0;
}

.stack-lg { --gap: clamp(32px, 5vw, 48px); }
.stack-xl { --gap: clamp(36px, 6vw, 56px); }

.stack-center {
  --gap: 28px;
  align-items: center;
  text-align: center;
}

/* Two-column section: stacks below 900px */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--split-gap, clamp(32px, 6vw, 64px));
}

.split-top {
  --split-gap: clamp(28px, 5vw, 48px);
  align-items: start;
}

@media (min-width: 900px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-wide { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}

/* Headings & copy */
.title-md,
.title-lg,
.title-xl {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  overflow-wrap: break-word;
}

.title-md { font-size: clamp(34px, 5vw, 64px); line-height: 1.02; letter-spacing: -0.035em; }
.title-lg { font-size: clamp(40px, 5vw, 76px); line-height: 0.96; letter-spacing: -0.04em; }
.title-xl { font-size: clamp(44px, 6vw, 92px); line-height: 0.94; letter-spacing: -0.045em; }

.lead {
  margin: 0;
  font-size: clamp(16px, 1.9vw, 19px);
  text-wrap: pretty;
}

/* Cards & panels */
.panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: var(--shadow-xl);
}

.panel-white { background: #FFFFFF; }

.card-xl {
  min-width: 0;
  background: #FFFFFF;
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 18px clamp(18px, 3vw, 28px);
  border-bottom: 2.5px solid var(--ink);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
}

/* Form controls (16px keeps iOS Safari from zooming on focus) */
.field {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.3;
}

select.field {
  padding: 0 12px;
  background: var(--cream);
  font-weight: 600;
  cursor: pointer;
}

textarea.field {
  min-height: 0;
  resize: vertical;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 15px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px;
}

/* Page scaffolding */
.page-hero {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(28px, 5vw, 40px) var(--gutter) clamp(40px, 6vw, 60px);
}

.page-hero-lg {
  padding-top: clamp(28px, 5vw, 48px);
  padding-bottom: clamp(48px, 7vw, 84px);
}

.page-main {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 36px);
  padding: clamp(20px, 4vw, 40px) var(--gutter) clamp(56px, 8vw, 96px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb #breadcrumb-title {
  overflow-wrap: anywhere;
}

/* ========================================================
   Home — Aisles, Ways, Inspection, Seller, Footer
   ======================================================== */

.aisle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.aisle-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  min-height: 220px;
  padding: 24px;
  border: 2.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}

.aisle-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aisle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--cream);
  border: 2.5px solid var(--ink);
}

.aisle-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(25px, 2.6vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.aisle-desc {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 500;
}

.way-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

@media (min-width: 1000px) {
  .way-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.way-card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.way-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 190px;
  padding: 0 16px;
  border-bottom: 2.5px solid var(--ink);
}

.way-chip {
  padding: 10px 14px;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.way-doc { width: 110px; }

.way-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 3vw, 28px);
}

.way-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 34px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.audit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px 12px;
  padding: 12px 0;
  border-top: 2px dashed #D9D2C9;
}

.audit-row > svg {
  flex: none;
  margin-top: 2px;
}

.audit-label {
  flex: 0 0 130px;
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.audit-text {
  flex: 1 1 160px;
  min-width: 0;
  font-size: 15px;
}

.cert-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
}

.price-wrap {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.price-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 400px;
  --tilt: 3deg;
  transform: rotate(var(--tilt));
  padding: clamp(20px, 3vw, 30px);
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 26px;
  box-shadow: var(--shadow-xl);
}

@media (hover: hover) {
  .price-card.lift:hover {
    transform: rotate(var(--tilt)) translate(-4px, -4px);
  }
}

.footer-main {
  padding: 0 var(--gutter) 40px;
  background: var(--ink);
  color: var(--cream);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 6vw, 56px);
  padding-top: clamp(40px, 6vw, 56px);
  border-top: 1.5px solid var(--ink-light);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px 56px;
}

.footer-brand {
  flex: 1 1 280px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-cols {
  flex: 2 1 560px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 32px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-col-title {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-light);
}

.footer-col a {
  padding: 4px 0;
  color: var(--cream);
  font-size: 15px;
}

.footer-wordmark {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(48px, 15vw, 300px);
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: var(--gold);
  white-space: nowrap;
  user-select: none;
  opacity: 0.9;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  color: var(--muted-light);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* Compact footer used on inner pages */
.footer-bar {
  padding: clamp(36px, 5vw, 48px) var(--gutter) 36px;
  background: var(--ink);
  color: var(--cream);
}

.footer-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  font-family: var(--font-mono);
  font-size: 13.5px;
}

.footer-bar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-bar-links a {
  padding: 4px 0;
  color: var(--cream);
}

/* ========================================================
   Browse — Search, Chips, Filters
   ======================================================== */

.chips-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chip {
  flex: none;
  min-height: 42px;
  padding: 0 18px;
  font-size: 15px;
}

.category-chip.active,
.category-chip.active:hover {
  background: var(--ink);
  color: var(--cream);
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 4vw, 40px);
}

.catalog-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.filter-toggle {
  display: none;
  width: 100%;
  min-height: 46px;
  justify-content: space-between;
}

.filter-sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.facet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  font-size: 15px;
  cursor: pointer;
}

/* ========================================================
   Dataset detail & Seller tools
   ======================================================== */

.detail-price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(26px, 6vw, 36px);
  line-height: 1.1;
  color: var(--ink);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 14px;
  border-top: 2px dashed var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
}

.detail-actions .btn {
  min-height: 52px;
  padding: 0 24px;
  font-size: 16.5px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: clamp(20px, 3vw, 32px);
}

.kv-grid {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px 14px;
  font-size: 15px;
}

.slider-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 12px;
  font-weight: 700;
  font-size: 15px;
}

.payout-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 22px;
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  background: var(--yellow-soft);
}

@keyframes drawer-fade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================================
   Responsive — large desktop
   ======================================================== */

/* Small laptops / iPad landscape: tighten the header so it fits one row */
@media (min-width: 1024px) and (max-width: 1239px) {
  .site-header { gap: 16px 18px; }
  .site-nav { gap: 0 18px; font-size: 15px; }
  .site-actions .btn { padding: 0 18px; }
  .theme-btn-label { display: none; }
}

/* ========================================================
   Responsive — tablet & below (hamburger nav, stacked hero)
   ======================================================== */

@media (max-width: 1023px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 12px;
    padding-block: 12px;
  }

  .nav-toggle { display: inline-flex; }

  .site-nav,
  .site-actions {
    display: none;
    grid-column: 1 / -1;
  }

  .site-header.nav-open .site-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 12px;
    font-size: 18px;
    animation: drawer-fade 0.25s ease;
  }

  .site-nav a {
    padding: 14px 4px;
    border-bottom: 2px dashed rgba(27, 21, 17, 0.28);
  }

  .site-nav a:last-child { border-bottom: 0; }

  .site-nav a.active {
    margin: 4px 0;
    padding: 12px 16px;
    border-radius: 16px;
  }

  .site-header.nav-open .site-actions {
    display: flex;
    flex-wrap: wrap;
    padding: 16px 0 8px;
  }

  .site-actions .btn { flex: 1 1 160px; }

  .spinning-badge-wrapper { display: none; }

  /* Hero cards: three-up row */
  .hero-cards-container {
    height: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .tilt-card {
    position: relative;
    width: auto;
  }

  .card-1,
  .card-2,
  .card-3 {
    left: auto;
    right: auto;
    top: auto;
    transform: none;
  }
}

@media (max-width: 999px) {
  .aisle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Filters collapse into a drawer; hero cards become a swipeable carousel */
@media (max-width: 899px) {
  .hero-cards-container {
    display: flex;
    gap: 14px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 8px var(--gutter) 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .hero-cards-container::-webkit-scrollbar { display: none; }

  .tilt-card {
    flex: 0 0 86%;
    max-width: 320px;
    scroll-snap-align: center;
    box-shadow: var(--shadow-md) !important;
  }

  .tilt-card:hover {
    transform: none !important;
    box-shadow: var(--shadow-md) !important;
  }

  .catalog-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .filter-toggle { display: flex; }

  .filter-sidebar {
    display: none;
    padding: 20px;
    border: 2.5px solid var(--ink);
    border-radius: 20px;
    background: var(--cream-soft);
  }

  .filter-sidebar.mobile-open {
    display: flex;
    animation: drawer-fade 0.25s ease;
  }

  .catalog-main { margin-top: 12px; }
}

/* ========================================================
   Responsive — mobile
   ======================================================== */

@media (max-width: 767px) {
  body { font-size: 16px; }

  .site-logo { gap: 10px; }
  .site-logo img { width: 40px; height: 40px; }
  .site-logo-text { font-size: 25px; }

  /* Hero */
  .hero-left { gap: 18px; }

  .hero-title {
    font-size: clamp(36px, 10.5vw, 52px);
    line-height: 0.98;
  }

  .hero-search-bar {
    gap: 8px;
    padding: 4px 4px 4px 14px;
  }

  .hero-search-bar input { font-size: 16px; }

  .hero-search-bar .btn {
    min-height: 44px;
    padding: 0 18px;
    font-size: 15px;
  }

  /* Category chips: single swipeable row */
  .chips-bar {
    flex-wrap: nowrap;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .chips-bar::-webkit-scrollbar { display: none; }

  /* Panels & cards: lighter shadows, tighter radii */
  .panel,
  .card-xl,
  .way-card {
    border-radius: 22px;
    box-shadow: var(--shadow-md);
  }

  .price-card {
    --tilt: 1.5deg;
    box-shadow: var(--shadow-md);
  }

  .dataset-card { border-radius: 18px; }

  /* Aisles: compact two-up tiles instead of one long column */
  .aisle-grid { gap: 12px; }

  .aisle-card {
    gap: 20px;
    min-height: 168px;
    padding: 16px;
    border-radius: 20px;
  }

  .aisle-icon { width: 42px; height: 42px; }
  .aisle-icon svg { width: 20px; height: 20px; }
  .aisle-top > svg { width: 20px; height: 20px; }
  .aisle-title { font-size: 20px; }
  .aisle-desc { font-size: 13px; line-height: 1.35; }

  .audit-label { flex: 1 1 calc(100% - 40px); }
  .audit-text { flex-basis: 100%; padding-left: 34px; }

  /* Touch-friendly facets */
  .facet-row { min-height: 44px; }

  /* Detail page actions: full-width stack */
  .detail-actions .btn { flex: 1 1 100%; }
  .detail-meta { flex-direction: column; gap: 8px; }

  /* Modal: near full-screen sheet */
  .modal-backdrop { padding: 12px; }

  .modal-card {
    max-width: 100%;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 20px;
    border-width: 2.5px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .modal-header { padding: 14px 16px; }
  .modal-body { gap: 18px; padding: 18px 16px 22px; }
  .modal-overview { padding: 14px; }
  .modal-actions-btns { width: 100%; }
  .modal-actions-btns .btn { flex: 1 1 100%; }

  /* Toasts span the width */
  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    min-width: 0;
    max-width: 100%;
    padding: 14px 16px;
  }

  .footer-col a,
  .footer-bar-links a { padding: 8px 0; }
}

@media (max-width: 520px) {
  .title-lg { font-size: clamp(32px, 9.5vw, 40px); }
  .title-xl { font-size: clamp(34px, 10.5vw, 44px); }

  .kv-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .kv-grid > span { margin-bottom: 10px; }
}

@media (max-width: 480px) {
  .btn {
    min-height: 46px;
    font-size: 15px;
  }

  .btn svg { flex: none; }

  .dataset-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .way-art { gap: 8px; padding: 0 12px; }
  .way-chip { padding: 8px 9px; font-size: 11px; }
  .way-art > svg { flex: none; width: 16px; height: 16px; }
  .way-lock { width: 56px !important; height: 56px !important; }
  .way-lock svg { width: 26px; height: 26px; }
  .way-doc { width: 88px; }
}

@media (max-width: 359px) {
  .site-logo-text { font-size: 22px; }
  .aisle-title { font-size: 17px; }
}

/* ========================================================
   Accessibility — reduced motion
   ======================================================== */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
