/* =======================================
   BookRelay — Styles v2
   Palette: Purple · Blue · White
   ======================================= */

:root {
  --purple-900: #3B1674;
  --purple-700: #5B2CAD;
  --purple-600: #6B2FB3;
  --purple-500: #8B5CF6;
  --purple-300: #C4B5FD;
  --purple-100: #EDE9FE;
  --purple-50:  #F5F3FF;

  --blue-900:   #1E3A8A;
  --blue-700:   #1E40AF;
  --blue-500:   #2563EB;
  --blue-300:   #93C5FD;
  --blue-100:   #DBEAFE;
  --blue-50:    #EFF6FF;

  --ink:        #14142B;
  --ink-soft:   #3E3E56;
  --muted:      #6F6F89;
  --line:       #E8E4F1;
  --paper:      #FAFAFC;
  --white:      #FFFFFF;

  --grad: linear-gradient(135deg, var(--purple-600) 0%, var(--blue-700) 100%);
  --grad-soft: linear-gradient(135deg, var(--purple-100) 0%, var(--blue-100) 100%);

  --shadow-sm: 0 1px 2px rgba(27, 24, 64, 0.04), 0 2px 8px rgba(27, 24, 64, 0.04);
  --shadow-md: 0 4px 16px rgba(27, 24, 64, 0.08), 0 2px 4px rgba(27, 24, 64, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(27, 24, 64, 0.18);
  --shadow-book: 0 30px 60px -20px rgba(27, 24, 64, 0.35), 0 14px 30px -15px rgba(91, 44, 173, 0.3);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 24px;

  --ff-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--ink); }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ==========================================
   ANNOUNCEMENT BAR
   ========================================== */
.announce {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding: 10px 0;
  font-size: 13px;
  letter-spacing: 0.03em;
}
.announce-track {
  display: flex;
  gap: 32px;
  white-space: nowrap;
  animation: slide 40s linear infinite;
  width: max-content;
}
.announce span { opacity: 0.85; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ==========================================
   HEADER
   ========================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250, 250, 252, 0.82);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  gap: 24px;
}
.logo { display: flex; align-items: center; }
.nav { display: flex; gap: 28px; font-size: 14.5px; font-weight: 500; }
.nav a { position: relative; color: var(--ink-soft); transition: color 0.2s; }
.nav a:hover { color: var(--purple-700); }
.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink);
  transition: background 0.2s;
}
.icon-btn:hover { background: var(--purple-50); color: var(--purple-700); }

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-weight: 500;
  font-size: 14px;
  transition: transform 0.15s, background 0.2s;
}
.cart-btn:hover { background: var(--purple-700); transform: translateY(-1px); }
.cart-count {
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  padding: 0 6px;
  display: grid; place-items: center;
}

.search-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: var(--white);
  border-top: 1px solid var(--line);
}
.search-panel.open { max-height: 80px; padding: 14px 0; }
.search-panel input {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 16px;
  background: var(--paper);
  outline: none;
  transition: border-color 0.2s;
}
.search-panel input:focus { border-color: var(--purple-500); }

/* ==========================================
   HERO — cinematic
   ========================================== */
.hero {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
  min-height: 88vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, #FAFAFC 0%, #F5F3FF 60%, #EFF6FF 100%);
}
.mesh {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  mix-blend-mode: multiply;
  will-change: transform;
}
.mesh-1 {
  width: 620px; height: 620px;
  background: radial-gradient(circle, #C4B5FD 0%, transparent 70%);
  top: -200px; left: -150px;
  animation: float1 18s ease-in-out infinite;
}
.mesh-2 {
  width: 540px; height: 540px;
  background: radial-gradient(circle, #93C5FD 0%, transparent 70%);
  top: 10%; right: -180px;
  animation: float2 22s ease-in-out infinite;
}
.mesh-3 {
  width: 440px; height: 440px;
  background: radial-gradient(circle, #DDD6FE 0%, transparent 70%);
  bottom: -140px; left: 30%;
  animation: float3 16s ease-in-out infinite;
}
@keyframes float1 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(60px, 30px) scale(1.1); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-40px, 50px) scale(1.08); }
}
@keyframes float3 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(50px, -40px) scale(1.12); }
}

.hero-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple-700);
  font-weight: 600;
  padding: 8px 14px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  border: 1px solid rgba(107, 47, 179, 0.15);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeDown 0.8s ease-out 0.1s forwards;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--purple-700);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107, 47, 179, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(107, 47, 179, 0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-family: var(--ff-display);
  font-size: clamp(52px, 8vw, 108px);
  line-height: 0.94;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 28px;
}
.ht-line { display: block; overflow: hidden; }
.ht-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: wordUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.ht-line:nth-child(1) .ht-word:nth-child(1) { animation-delay: 0.15s; }
.ht-line:nth-child(1) .ht-word:nth-child(2) { animation-delay: 0.25s; }
.ht-line:nth-child(2) em .ht-word:nth-child(1) { animation-delay: 0.4s; }
.ht-line:nth-child(2) em .ht-word:nth-child(2) { animation-delay: 0.5s; }
.ht-line:nth-child(2) em .ht-word:nth-child(3) { animation-delay: 0.6s; }
@keyframes wordUp {
  to { opacity: 1; transform: translateY(0); }
}
.hero-title em {
  font-style: normal;
  font-weight: 400;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.12em;
}

.hero-sub {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}
.btn-primary { background: var(--ink); color: var(--white); box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--purple-700); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-primary svg { transition: transform 0.25s; }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: var(--white); border-color: var(--ink); }

.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.3); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.6); }

.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.hero-badges {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 36px;
  border-top: 1px solid rgba(107, 47, 179, 0.12);
}
.hb {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.012em;
}
.hb-pre { font-size: 16px; color: var(--muted); font-weight: 400; margin-right: 2px; }
.hb em {
  font-family: var(--ff-body);
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hb-divider { width: 1px; height: 40px; background: rgba(107, 47, 179, 0.15); }

/* Hero visual — floating book covers with real images */
.hero-visual {
  position: relative;
  height: 560px;
}
.hero-stage {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1400px;
}
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.orb-1 {
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent);
  top: 50px; left: 80px;
}
.orb-2 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35), transparent);
  bottom: 80px; right: 60px;
}

.float-card {
  position: absolute;
  width: 200px;
  aspect-ratio: 2/3;
  border-radius: 4px 10px 10px 4px;
  overflow: hidden;
  box-shadow: var(--shadow-book);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s;
  transform-style: preserve-3d;
  background: var(--ink);
  will-change: transform;
}
.float-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 40%);
  z-index: 2;
  pointer-events: none;
}
.float-card::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(0,0,0,0.2);
  z-index: 2;
}
.float-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.float-card.img-fail { background: linear-gradient(135deg, #6B2FB3, #1E40AF); }
.float-card.img-fail img { display: none; }

.fc-pill {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.95);
  color: var(--purple-700);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  z-index: 3;
}
.pill-dark { background: var(--ink); color: var(--white); }

.fc-1 {
  top: 40px; left: 20px;
  transform: rotate(-8deg);
  z-index: 3;
  animation: floatBook1 6s ease-in-out infinite;
}
.fc-2 {
  top: 70px; right: 20px;
  transform: rotate(6deg);
  z-index: 4;
  width: 210px;
  animation: floatBook2 7s ease-in-out infinite;
}
.fc-3 {
  bottom: 60px; left: 60px;
  transform: rotate(-4deg);
  z-index: 5;
  width: 220px;
  animation: floatBook3 8s ease-in-out infinite;
}
.fc-4 {
  bottom: 40px; right: 40px;
  transform: rotate(10deg);
  z-index: 2;
  width: 190px;
  animation: floatBook4 6.5s ease-in-out infinite;
}
@keyframes floatBook1 {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(-8deg) translateY(-14px); }
}
@keyframes floatBook2 {
  0%, 100% { transform: rotate(6deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-16px); }
}
@keyframes floatBook3 {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(-12px); }
}
@keyframes floatBook4 {
  0%, 100% { transform: rotate(10deg) translateY(0); }
  50% { transform: rotate(10deg) translateY(-18px); }
}
.hero-stage:hover .fc-1 { transform: rotate(-12deg) translateY(-20px) translateX(-14px); }
.hero-stage:hover .fc-2 { transform: rotate(10deg) translateY(-24px) translateX(14px); }
.hero-stage:hover .fc-3 { transform: rotate(-7deg) translateY(-12px); }
.hero-stage:hover .fc-4 { transform: rotate(14deg) translateY(-24px) translateX(10px); }

.hero-scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 3;
  opacity: 0;
  animation: fadeIn 1s ease-out 1.2s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-line::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0; right: 0;
  height: 20px;
  background: var(--purple-700);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { top: -20px; }
  100% { top: 40px; }
}

/* ==========================================
   MARQUEE
   ========================================== */
.marquee-section {
  background: var(--ink);
  color: var(--paper);
  padding: 28px 0;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.marquee { overflow: hidden; }
.marquee-track {
  display: flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap;
  animation: marqueeMove 45s linear infinite;
  width: max-content;
  font-family: var(--ff-display);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.012em;
}
.marquee-track span { flex-shrink: 0; }
.marquee-track .italic { font-style: italic; color: var(--purple-300); font-weight: 400; }
.m-dot {
  color: var(--purple-500);
  font-size: 14px;
  opacity: 0.6;
}
@keyframes marqueeMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================
   SECTION HEADERS (reusable)
   ========================================== */
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple-700);
  font-weight: 600;
  margin-bottom: 14px;
}
.section-eyebrow.light { color: var(--purple-300); }
.section-head h2 {
  font-family: var(--ff-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--ink);
}
.section-head { margin-bottom: 48px; text-align: center; }
.rail-head, .blog-head, .how-head { text-align: left; }
.how-head { text-align: center; margin-bottom: 64px; }

/* ==========================================
   CATEGORIES SHOWCASE
   ========================================== */
.cats-showcase { padding: 100px 0 40px; }
.cats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s, border-color 0.35s;
  cursor: pointer;
}
.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--purple-300);
}
.cc-visual {
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.cc-1 { background: linear-gradient(135deg, #EDE9FE, #F5F3FF); }
.cc-2 { background: linear-gradient(135deg, #DBEAFE, #EFF6FF); }
.cc-3 { background: linear-gradient(135deg, #F5F3FF, #DBEAFE); }
.cc-4 { background: linear-gradient(135deg, #FDF4FF, #FEF3C7); }

.cc-stack {
  position: relative;
  width: 160px;
  height: 140px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.cat-card:hover .cc-stack { transform: scale(1.05); }
.cc-stack img {
  position: absolute;
  width: 100px;
  height: 140px;
  object-fit: cover;
  border-radius: 3px 6px 6px 3px;
  box-shadow: var(--shadow-book);
}
.cc-stack img:nth-child(1) { left: 0; transform: rotate(-8deg); z-index: 1; }
.cc-stack img:nth-child(2) { right: 0; transform: rotate(6deg); z-index: 2; }
.cat-card:hover .cc-stack img:nth-child(1) { transform: rotate(-14deg) translateX(-6px); }
.cat-card:hover .cc-stack img:nth-child(2) { transform: rotate(12deg) translateX(6px); }

.cc-notes-viz {
  position: relative;
  width: 160px;
  height: 140px;
}
.note-page {
  position: absolute;
  width: 100px;
  height: 140px;
  background: var(--white);
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  background-image: repeating-linear-gradient(180deg, transparent 0 14px, rgba(107,47,179,0.12) 14px 15px);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.note-page::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40%;
  height: 3px;
  background: var(--purple-500);
  border-radius: 2px;
}
.note-page::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 12px;
  width: 60%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  opacity: 0.4;
}
.np-1 { left: 0; top: 0; transform: rotate(-6deg); z-index: 1; }
.np-2 { left: 30px; top: 0; transform: rotate(2deg); z-index: 2; }
.np-3 { right: 0; top: 0; transform: rotate(8deg); z-index: 3; }
.cat-card:hover .np-1 { transform: rotate(-12deg) translateX(-4px); }
.cat-card:hover .np-3 { transform: rotate(14deg) translateX(4px); }

.cc-mat-viz { position: relative; width: 180px; height: 140px; }
.mat-book {
  position: absolute;
  left: 0; top: 10px;
  width: 110px;
  height: 140px;
  background: linear-gradient(135deg, var(--purple-700), var(--blue-700));
  border-radius: 4px 10px 10px 4px;
  box-shadow: var(--shadow-book);
  transform: rotate(-6deg);
  transition: transform 0.5s;
}
.mat-book::before {
  content: 'MCAT';
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--ff-display);
  font-weight: 600;
  color: white;
  letter-spacing: 0.1em;
  font-size: 14px;
}
.mat-book::after {
  content: 'Complete Prep';
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.mat-sheet {
  position: absolute;
  right: 0; top: 0;
  width: 80px;
  height: 110px;
  background: var(--white);
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  transform: rotate(10deg);
  background-image: repeating-linear-gradient(180deg, transparent 0 10px, rgba(107,47,179,0.15) 10px 11px);
  transition: transform 0.5s;
}
.mat-pen {
  position: absolute;
  right: 20px; bottom: 10px;
  width: 90px;
  height: 10px;
  background: linear-gradient(90deg, #1A1A2E 0%, #1A1A2E 70%, var(--purple-600) 70%);
  border-radius: 2px;
  transform: rotate(-20deg);
  box-shadow: var(--shadow-sm);
}
.cat-card:hover .mat-book { transform: rotate(-12deg) translateX(-4px); }
.cat-card:hover .mat-sheet { transform: rotate(16deg) translateX(6px); }

.cc-meta { padding: 24px 24px 28px; }
.cc-count {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-700);
  font-weight: 600;
  margin-bottom: 10px;
  padding: 4px 10px;
  background: var(--purple-50);
  border-radius: 999px;
}
.cc-meta h3 {
  font-family: var(--ff-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.cc-meta p { color: var(--muted); font-size: 14px; margin-bottom: 14px; line-height: 1.5; }
.cc-arrow { font-size: 13px; font-weight: 600; color: var(--ink); transition: transform 0.25s; display: inline-block; }
.cat-card:hover .cc-arrow { transform: translateX(4px); color: var(--purple-700); }

/* ==========================================
   SPOTLIGHT / BOOK OF WEEK
   ========================================== */
.spotlight {
  background: linear-gradient(135deg, #14142B 0%, #2D1B69 60%, #1E40AF 100%);
  color: var(--paper);
  padding: 120px 0;
  overflow: hidden;
  position: relative;
}
.spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.3) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(37, 99, 235, 0.3) 0%, transparent 40%);
  pointer-events: none;
}
.spotlight::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
}
.spotlight-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
.spot-title {
  font-family: var(--ff-display);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--paper);
  margin-bottom: 24px;
}
.spot-title em {
  font-style: normal;
  font-weight: 400;
  background: linear-gradient(135deg, #C4B5FD, #93C5FD);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.spot-sub {
  font-size: 17px;
  color: rgba(250,250,252,0.75);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 520px;
}
.spot-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.spot-price {
  font-family: var(--ff-display);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--paper);
}
.spot-price + .price-old {
  font-size: 18px;
  color: rgba(250,250,252,0.5);
  text-decoration: line-through;
}
.spot-save {
  background: var(--purple-500);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.spot-cta { display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.spot-reviews {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(250,250,252,0.65);
  font-size: 14px;
}
.stars { color: #FDE68A; letter-spacing: 0.15em; font-size: 15px; }

.spot-right { position: relative; display: flex; justify-content: center; }
.spot-book {
  width: 320px;
  max-width: 85%;
  aspect-ratio: 2/3;
  border-radius: 4px 14px 14px 4px;
  overflow: hidden;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.6), 0 20px 40px -15px rgba(107,47,179,0.5);
  transform: rotate(-4deg) perspective(1000px) rotateY(-8deg);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.spot-book::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0; bottom: 0;
  width: 2px;
  background: rgba(0,0,0,0.25);
  z-index: 2;
}
.spot-book img { width: 100%; height: 100%; object-fit: cover; }
.spot-right:hover .spot-book { transform: rotate(0deg) perspective(1000px) rotateY(-4deg) translateY(-10px); }

/* ==========================================
   BESTSELLERS RAIL
   ========================================== */
.rail-section { padding: 100px 0; }
.rail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.rail-controls { display: flex; gap: 10px; }
.rail-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  display: grid; place-items: center;
  transition: all 0.2s;
}
.rail-btn:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

.rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 12px;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
}
.rail::-webkit-scrollbar { display: none; }
.rail-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
}

/* ==========================================
   CATEGORY CHIPS
   ========================================== */
.cats { padding: 40px 0 8px; background: var(--paper); }
.cats-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cat-chip {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: all 0.2s;
}
.cat-chip:hover { border-color: var(--purple-500); color: var(--purple-700); }
.cat-chip.active { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ==========================================
   SHOP GRID
   ========================================== */
.shop { padding: 32px 0 96px; }
.shop-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}
.shop-head h2 {
  font-family: var(--ff-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.012em;
}
.shop-meta { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 14px; }
.shop-meta select {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  outline: none;
}

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

.card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover { transform: translateY(-4px); }

.card-cover {
  aspect-ratio: 2/3;
  border-radius: 4px 10px 10px 4px;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-book);
  background: linear-gradient(135deg, var(--purple-700), var(--blue-700));
}
.card-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 40%);
  z-index: 2;
  pointer-events: none;
}
.card-cover::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(0,0,0,0.2);
  z-index: 2;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover .card-cover img { transform: scale(1.05); }

/* Note-style covers for local study material */
.card-cover.note-cover {
  background: var(--paper);
  background-image:
    repeating-linear-gradient(180deg, transparent 0 16px, rgba(107,47,179,0.15) 16px 17px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 24px;
  color: var(--ink);
}
.card-cover.note-cover::before {
  background: linear-gradient(135deg, rgba(107,47,179,0.08), transparent 50%);
}
.note-title {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin-bottom: 8px;
  color: var(--ink);
}
.note-sub { font-size: 12px; font-style: italic; color: var(--purple-700); }
.note-stamp {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 56px;
  height: 56px;
  border: 2px solid var(--purple-600);
  color: var(--purple-600);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--ff-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  line-height: 1.1;
  transform: rotate(-12deg);
  opacity: 0.7;
}

/* Textbook-style covers for Pakistani board books */
.card-cover.board-cover {
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  color: var(--ink);
}
.board-cover.pjb { background: linear-gradient(175deg, #FDE68A 0%, #FCD34D 100%); }
.board-cover.sdb { background: linear-gradient(175deg, #A7F3D0 0%, #6EE7B7 100%); }
.board-cover.fdb { background: linear-gradient(175deg, #BFDBFE 0%, #93C5FD 100%); }
.board-cover .board-name {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 8px;
}
.board-cover .board-seal {
  width: 48px;
  height: 48px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  font-family: var(--ff-display);
  font-size: 8px;
  font-weight: 600;
  opacity: 0.8;
  text-align: center;
  line-height: 1.1;
  padding: 4px;
}
.board-cover .board-title {
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.012em;
  margin-top: auto;
}
.board-cover .board-grade {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  letter-spacing: 0.05em;
  opacity: 0.7;
  text-transform: uppercase;
}

.card-tag {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  border-radius: 4px;
  backdrop-filter: blur(6px);
  font-weight: 700;
  z-index: 3;
}
.card-tag.tag-dark { background: var(--ink); color: var(--white); }
.card-tag.tag-sale { background: var(--purple-600); color: white; }

.card-quick {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s;
  z-index: 3;
}
.card:hover .card-quick { opacity: 1; transform: translateY(0); }

.card-info { padding: 0 4px; }
.card-cat {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-700);
  font-weight: 600;
  margin-bottom: 6px;
}
.card-title {
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.card-author { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.price {
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.price-old {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: 400;
}
.add-btn {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.add-btn:hover { background: var(--purple-700); }
.add-btn.added { background: var(--purple-600); }

/* ==========================================
   HOW IT WORKS
   ========================================== */
.how {
  padding: 120px 0;
  background: var(--white);
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
.how-grid::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 16%;
  right: 16%;
  height: 1px;
  background-image: linear-gradient(90deg, var(--purple-300) 50%, transparent 50%);
  background-size: 10px 1px;
  z-index: 0;
}
.how-step {
  background: var(--paper);
  padding: 40px 32px;
  border-radius: 20px;
  position: relative;
  border: 1px solid var(--line);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.how-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-300);
}
.step-num {
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--purple-700);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.step-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--grad-soft);
  display: grid; place-items: center;
  font-size: 30px;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}
.how-step h3 {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.how-step p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }

/* ==========================================
   STATS
   ========================================== */
.stats-section {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 50%, rgba(139, 92, 246, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 90% 50%, rgba(37, 99, 235, 0.2) 0%, transparent 40%);
}
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  position: relative;
  z-index: 2;
}
.stat { text-align: center; }
.stat-num {
  font-family: var(--ff-display);
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #FFFFFF 0%, #C4B5FD 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.stat-plus {
  font-family: var(--ff-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  color: var(--purple-300);
  margin-left: 2px;
  vertical-align: top;
}
.stat-label {
  display: block;
  font-size: 13px;
  color: rgba(250,250,252,0.6);
  margin-top: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ==========================================
   TESTIMONIALS
   ========================================== */
.testimonials { padding: 120px 0; }
.test-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.test-card {
  background: var(--white);
  border-radius: 20px;
  padding: 32px 28px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}
.test-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.test-stars {
  color: #F59E0B;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.test-quote {
  font-family: var(--ff-display);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 24px;
  flex: 1;
  font-style: normal;
  letter-spacing: -0.01em;
}
.test-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.test-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.av-1 { background: linear-gradient(135deg, #6B2FB3, #B71CED); }
.av-2 { background: linear-gradient(135deg, #1E40AF, #2563EB); }
.av-3 { background: linear-gradient(135deg, #5B2CAD, #1E3A8A); }
.av-4 { background: linear-gradient(135deg, #2563EB, #8B5CF6); }
.test-author strong { display: block; font-size: 14px; font-weight: 600; }
.test-author span { display: block; font-size: 12px; color: var(--muted); }

/* ==========================================
   BLOG PREVIEW
   ========================================== */
.blog-preview { padding: 100px 0; background: var(--white); }
.blog-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 48px; gap: 20px; flex-wrap: wrap; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.blog-visual {
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
}
.bv-1 { background: linear-gradient(135deg, #3B1674 0%, #1E40AF 100%); }
.bv-2 { background: linear-gradient(135deg, #6B2FB3 0%, #8B5CF6 100%); }
.bv-3 { background: linear-gradient(135deg, #1E3A8A 0%, #6B2FB3 100%); }
.blog-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(255,255,255,0.18), transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-blend-mode: overlay;
  opacity: 0.5;
}
.blog-tag {
  position: absolute;
  top: 16px; left: 16px;
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 2;
}
.blog-body { padding: 24px 24px 28px; }
.blog-meta {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-bottom: 10px;
  display: block;
}
.blog-body h3 {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.blog-body p { color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ==========================================
   FAQ
   ========================================== */
.faq { padding: 120px 0; background: var(--paper); }
.faq-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}
.faq-left h2 {
  font-family: var(--ff-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin-bottom: 20px;
}
.faq-left p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.faq-left strong { color: var(--purple-700); font-weight: 600; }

.faq-right { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.faq-item[open] {
  border-color: var(--purple-300);
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  padding: 20px 24px;
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 24px;
  color: var(--purple-700);
  font-weight: 300;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-ans {
  padding: 0 24px 22px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}
.faq-ans strong { color: var(--purple-700); font-weight: 600; }

/* ==========================================
   CTA SECTION
   ========================================== */
.cta-section {
  padding: 80px 24px;
}
.cta-inner {
  background: linear-gradient(135deg, #14142B 0%, #2D1B69 50%, #1E40AF 100%);
  border-radius: 32px;
  padding: 80px 64px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}
.cta-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 90% 20%, rgba(37, 99, 235, 0.4) 0%, transparent 50%);
}
.cta-content { position: relative; z-index: 2; color: var(--paper); }
.cta-content h2 {
  font-family: var(--ff-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--paper);
  margin-bottom: 16px;
}
.cta-content h2 em {
  font-style: normal;
  font-weight: 400;
  background: linear-gradient(135deg, #C4B5FD, #93C5FD);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cta-content p {
  font-size: 16px;
  color: rgba(250,250,252,0.75);
  margin-bottom: 28px;
  max-width: 460px;
}
.cta-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  flex-wrap: wrap;
}
.cta-form input {
  flex: 1;
  min-width: 220px;
  padding: 16px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: var(--paper);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  backdrop-filter: blur(8px);
}
.cta-form input::placeholder { color: rgba(250,250,252,0.4); }
.cta-form input:focus { border-color: var(--purple-300); background: rgba(255,255,255,0.12); }
.cta-form button {
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}
.cta-form button:hover { background: var(--purple-100); transform: translateY(-1px); }

.cta-decor {
  position: relative;
  height: 280px;
  z-index: 2;
}
.cta-book {
  position: absolute;
  width: 130px;
  aspect-ratio: 2/3;
  border-radius: 3px 8px 8px 3px;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
  overflow: hidden;
}
.cta-book img { width: 100%; height: 100%; object-fit: cover; }
.cta-book::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 40%);
  z-index: 2;
}
.cb-1 { top: 30px; right: 180px; transform: rotate(-10deg); z-index: 1; }
.cb-2 { top: 10px; right: 60px; transform: rotate(8deg); z-index: 3; }
.cb-3 { top: 110px; right: 120px; transform: rotate(-4deg); z-index: 2; }

/* ==========================================
   FOOTER
   ========================================== */
.footer { background: var(--ink); color: var(--paper); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 56px;
  padding: 80px 24px 56px;
}
.foot-brand p {
  margin-top: 16px;
  color: rgba(250,250,252,0.6);
  max-width: 280px;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.socials { display: flex; gap: 10px; }
.socials a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: grid; place-items: center;
  color: var(--paper);
  transition: all 0.2s;
}
.socials a:hover { background: var(--purple-600); transform: translateY(-2px); }

.foot-col h4 {
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 18px;
  color: var(--paper);
  letter-spacing: -0.01em;
}
.foot-col a {
  display: block;
  color: rgba(250,250,252,0.6);
  font-size: 14px;
  line-height: 2;
  transition: color 0.2s;
}
.foot-col a:hover { color: var(--purple-300); }

.foot-base {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 22px 0;
}
.foot-base .container {
  display: flex;
  justify-content: space-between;
  color: rgba(250,250,252,0.5);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================
   CART DRAWER
   ========================================== */
.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 440px;
  max-width: 100vw;
  height: 100vh;
  background: var(--paper);
  z-index: 110;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,0.2);
}
.cart-drawer.open { transform: translateX(0); }
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
}
.cart-head h3 {
  font-family: var(--ff-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.cart-items { flex: 1; overflow-y: auto; padding: 12px 28px; }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.cart-empty-icon { font-size: 48px; margin-bottom: 16px; }
.cart-item {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cart-item-cover {
  aspect-ratio: 2/3;
  border-radius: 3px 6px 6px 3px;
  overflow: hidden;
  background: var(--ink);
}
.cart-item-cover img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-cover.placeholder {
  background: linear-gradient(135deg, var(--purple-700), var(--blue-700));
  color: var(--white);
  display: grid;
  place-items: center;
  font-family: var(--ff-display);
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  padding: 4px;
  line-height: 1.1;
}
.ci-info { min-width: 0; }
.ci-title {
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.2;
}
.ci-cat { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.ci-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
}
.ci-qty button { width: 24px; height: 24px; border-radius: 50%; font-size: 14px; color: var(--ink-soft); }
.ci-qty button:hover { background: var(--purple-50); color: var(--purple-700); }
.ci-qty span { font-weight: 600; min-width: 20px; text-align: center; font-size: 13px; }
.ci-right { text-align: right; }
.ci-price { font-family: var(--ff-display); font-weight: 600; font-size: 15px; }
.ci-remove {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.03em;
}
.ci-remove:hover { color: #DC2626; }

.cart-foot { padding: 24px 28px; border-top: 1px solid var(--line); background: var(--white); }
.cart-totals .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}
.cart-totals .row.small { font-size: 13px; color: var(--muted); }
.cart-totals .row.total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  margin: 12px 0 20px;
}
.cart-totals .row.total strong {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 600;
}
.cart-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

/* ==========================================
   OVERLAY & MODALS
   ========================================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 43, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  background: rgba(20, 20, 43, 0.6);
  backdrop-filter: blur(6px);
  transition: opacity 0.3s;
}
.modal.open { opacity: 1; pointer-events: auto; }

.modal-card {
  background: var(--paper);
  border-radius: 20px;
  max-width: 980px;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(0.96);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal.open .modal-card { transform: scale(1); }
.small-card { max-width: 460px; }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--white);
  font-size: 16px;
  color: var(--ink);
  z-index: 3;
  transition: background 0.2s;
}
.modal-close:hover { background: var(--purple-50); }
.modal-body { display: grid; grid-template-columns: 1.3fr 1fr; max-height: 92vh; min-height: 0; }
.checkout-left { padding: 40px; overflow-y: auto; min-height: 0; max-height: 92vh; }
.checkout-left h3 {
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin-bottom: 6px;
}
.muted { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

.co-form { display: flex; flex-direction: column; gap: 16px; }
.co-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}
.co-form input, .co-form select, .co-form textarea {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
  background: var(--white);
  font-size: 14.5px;
  color: var(--ink);
}
.co-form input:focus, .co-form select:focus, .co-form textarea:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px var(--purple-100);
}
.co-form textarea { resize: vertical; font-family: inherit; }

.pay { border: none; display: flex; flex-direction: column; gap: 8px; }
.pay legend { font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-bottom: 4px; }
.pay-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--white);
}
.pay-opt:has(input:checked) { border-color: var(--purple-500); background: var(--purple-50); }
.pay-opt input { margin: 0; accent-color: var(--purple-700); }
.pay-opt span { display: flex; flex-direction: column; }
.pay-opt strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.pay-opt em { font-size: 12px; color: var(--muted); font-style: normal; }

.checkout-right {
  background: var(--ink);
  color: var(--paper);
  padding: 40px;
  overflow-y: auto;
}
.checkout-right h4 {
  font-family: var(--ff-display);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 24px;
}
.co-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.co-item { display: flex; justify-content: space-between; font-size: 14px; gap: 8px; }
.co-item-name { color: rgba(250,250,252,0.85); }
.co-item-qty { color: rgba(250,250,252,0.5); font-size: 12px; }
.co-item-price { font-family: var(--ff-display); font-weight: 500; white-space: nowrap; }

.co-totals { padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.15); }
.co-totals .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  color: rgba(250,250,252,0.75);
}
.co-totals .row.small { font-size: 13px; }
.co-totals .row.total {
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 16px;
  color: var(--paper);
  margin-top: 8px;
}
.co-totals .row.total strong { font-family: var(--ff-display); font-size: 22px; font-weight: 600; }

.confirm-body { padding: 48px 40px; text-align: center; }
.confirm-check {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--grad);
  color: var(--white);
  font-size: 32px;
  display: grid; place-items: center;
  margin: 0 auto 24px;
  font-weight: 700;
}
.confirm-body h3 {
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: -0.012em;
}
.confirm-body p { margin-bottom: 8px; color: var(--ink-soft); }
.confirm-body .btn { margin-top: 24px; }

.qv-body {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
  padding: 40px;
  align-items: start;
}
.qv-cover {
  aspect-ratio: 2/3;
  border-radius: 6px 14px 14px 6px;
  box-shadow: var(--shadow-book);
  position: relative;
  overflow: hidden;
  max-width: 320px;
  width: 100%;
}
.qv-cover::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 40%);
  z-index: 2;
}
.qv-cover::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 0; bottom: 0;
  width: 1.5px;
  background: rgba(0,0,0,0.2);
  z-index: 2;
}
.qv-cover img { width: 100%; height: 100%; object-fit: cover; }
.qv-info h2 {
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin-bottom: 8px;
  line-height: 1.1;
}
.qv-info .qv-cat {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-700);
  font-weight: 600;
  margin-bottom: 12px;
}
.qv-info .qv-author { color: var(--muted); margin-bottom: 20px; }
.qv-info .qv-desc { font-size: 15px; color: var(--ink-soft); line-height: 1.65; margin-bottom: 24px; }
.qv-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.qv-price { font-family: var(--ff-display); font-size: 28px; font-weight: 600; }
.qv-cta { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================
   SCROLL REVEAL
   ========================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.reveal.in { opacity: 1; transform: translateY(0); }

.card { animation: fadeCardUp 0.5s ease-out backwards; }
@keyframes fadeCardUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .test-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 48px 24px; }
  .spotlight-inner { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .spot-cta, .spot-reviews, .spot-price-row { justify-content: center; }
  .spot-sub { margin-left: auto; margin-right: auto; }
  .spot-right { order: -1; }
  .blog-grid { grid-template-columns: 1fr; }
  .faq-inner { grid-template-columns: 1fr; gap: 40px; }
  .how-grid { grid-template-columns: 1fr; gap: 16px; }
  .how-grid::before { display: none; }
  .cta-inner { grid-template-columns: 1fr; padding: 56px 40px; }
  .cta-decor { display: none; }
}

@media (max-width: 960px) {
  .nav { display: none; }
  .hero { min-height: auto; padding: 56px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { height: 440px; order: -1; }
  .hero-title { font-size: clamp(44px, 12vw, 72px); }
  .marquee-track { font-size: 32px; gap: 28px; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); gap: 40px; padding: 56px 24px 40px; }
  .modal-body { grid-template-columns: 1fr; }
  .checkout-right { order: -1; padding: 28px; }
  .checkout-left { padding: 28px; }
  .qv-body { grid-template-columns: 1fr; padding: 28px; }
  .qv-cover { max-width: 240px; margin: 0 auto; }
}

@media (max-width: 640px) {
  .announce { font-size: 12px; }
  .hero { padding: 40px 0 64px; }
  .hero-visual { height: 400px; }
  .hero-badges { gap: 16px; flex-wrap: wrap; }
  .hb { font-size: 26px; }
  .hb-divider { display: none; }
  .hb em { font-size: 11px; margin-left: 6px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .card-info { padding: 0 2px; }
  .card-title { font-size: 14px; }
  .card-cat { font-size: 10px; }
  .price { font-size: 17px; }
  .add-btn { padding: 7px 12px; font-size: 12px; }
  .cats-grid { grid-template-columns: 1fr; }
  .test-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .cart-btn span:not(.cart-count) { display: none; }
  .container { padding: 0 18px; }
  .cta-inner { padding: 48px 28px; border-radius: 24px; }
  .cta-content h2 { font-size: 34px; }
  .cta-form input, .cta-form button { padding: 14px 18px; }
  .spotlight { padding: 80px 0; }
  .spot-title { font-size: 40px; }
  .testimonials, .how, .rail-section, .faq, .blog-preview, .cats-showcase { padding: 72px 0; }
  .float-card { width: 160px !important; }
  .fc-1 { left: 0; }
  .fc-2 { right: 0; }
  .fc-3 { left: 30px; }
  .fc-4 { right: 30px; }
  .marquee-track { font-size: 26px; }
  .cart-drawer { width: 100vw; }
}

/* ===========================================================
   ===  v3 ADDITIONS: Sell · Community · Admin · Messages  ===
   =========================================================== */

/* ============ NAV "Sell" badge ============ */
.nav-sell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 14px;
  border-radius: 999px;
  background: var(--grad);
  color: var(--white) !important;
  font-weight: 600;
  margin-left: 4px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px -4px rgba(107, 47, 179, 0.45);
}
.nav-sell:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -4px rgba(107, 47, 179, 0.6); }
.nav-sell::after { display: none; }
.nav-sell-tag {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

/* ============ USER MENU ============ */
.user-wrap { position: relative; }
.user-btn { position: relative; }
.user-btn.has-pending::after {
  content: '';
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #DC2626;
  border: 2px solid var(--paper);
}

.user-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 95;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.user-menu:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.user-menu[hidden] { display: block !important; }

.um-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.um-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--grad);
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--ff-display);
}
.um-head strong { display: block; font-size: 14px; font-weight: 600; }
.um-head span { font-size: 12px; color: var(--muted); }

.um-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
}
.um-link:hover { background: var(--purple-50); color: var(--purple-700); }
.um-count {
  background: var(--purple-50);
  color: var(--purple-700);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}
.um-count.um-pending { background: #FEF3C7; color: #92400E; }
.um-count:empty, .um-count[data-empty="true"] { display: none; }

.um-divider { height: 1px; background: var(--line); margin: 8px 8px; }
.um-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 8px;
}
.um-toggle:hover { background: var(--purple-50); }
.um-toggle input { accent-color: var(--purple-700); cursor: pointer; }

/* ============ COMMUNITY LISTINGS ============ */
.community { padding: 32px 0 96px; background: var(--paper); }
.community-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  text-align: left;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.community-grid { gap: 28px 20px; }

.community-empty {
  text-align: center;
  padding: 80px 24px;
  background: var(--white);
  border-radius: 24px;
  border: 1px dashed var(--line);
}
.ce-icon { font-size: 48px; margin-bottom: 16px; }
.community-empty h3 {
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin-bottom: 10px;
}
.community-empty p { color: var(--muted); margin-bottom: 24px; max-width: 420px; margin-left: auto; margin-right: auto; }

/* Community card additions */
.card.community-card .card-cover { background: linear-gradient(135deg, #5B2CAD, #1E40AF); }
.community-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(255,255,255,0.95);
  color: var(--purple-700);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 4px;
}
.community-badge::before { content: '✓'; color: var(--purple-700); font-size: 10px; }
.condition-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.cond-near-mint { background: #D1FAE5; color: #065F46; }
.cond-good { background: #DBEAFE; color: #1E40AF; }
.cond-acceptable { background: #FEF3C7; color: #92400E; }

.card-seller {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.card-seller-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--grad);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-family: var(--ff-display);
}

.card-actions {
  display: flex;
  gap: 6px;
}
.msg-btn {
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.msg-btn:hover { background: var(--purple-50); border-color: var(--purple-500); color: var(--purple-700); }

/* ============ SELL SECTION ============ */
.sell-section {
  padding: 120px 0;
  background: linear-gradient(180deg, var(--paper) 0%, var(--purple-50) 100%);
  position: relative;
  overflow: hidden;
}
.sell-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 100% 70%, rgba(37, 99, 235, 0.06) 0%, transparent 40%);
  pointer-events: none;
}

.sell-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: start;
  position: relative;
  z-index: 2;
}

.sell-info h2 {
  font-family: var(--ff-display);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 14px 0 20px;
}
.sell-info h2 em {
  font-style: normal;
  font-weight: 400;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sell-lead {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 460px;
}

.sell-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}
.sell-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.ss-num {
  font-family: var(--ff-display);
  font-weight: 600;
  color: var(--purple-700);
  font-size: 14px;
  letter-spacing: 0.1em;
  width: 44px;
  flex-shrink: 0;
  padding-top: 4px;
}
.sell-step h4 {
  font-family: var(--ff-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.sell-step p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; }

.sell-trust {
  display: flex;
  gap: 24px;
  padding: 24px 28px;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--line);
}
.st-item { flex: 1; }
.st-item strong {
  display: block;
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--purple-700);
  letter-spacing: -0.012em;
  line-height: 1;
  margin-bottom: 4px;
}
.st-item span { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }

/* ============ LISTING FORM ============ */
.sell-form-wrap {
  position: sticky;
  top: 100px;
}
.listing-form {
  background: var(--white);
  border-radius: 24px;
  padding: 36px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
.listing-form h3 {
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin-bottom: 24px;
}
.lf-group { margin-bottom: 18px; }
.lf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.lf-row .lf-group { margin-bottom: 0; }
.lf-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.lf-hint { font-weight: 400; color: var(--muted); margin-left: 4px; }
.lf-required { color: var(--purple-700); font-weight: 700; }
.lf-group input[type=text],
.lf-group input[type=number],
.lf-group select,
.lf-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  color: var(--ink);
}
.lf-group input:focus,
.lf-group select:focus,
.lf-group textarea:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px var(--purple-100);
  background: var(--white);
}
.lf-group textarea { resize: vertical; }

.isbn-row { display: flex; gap: 8px; }
.isbn-row input { flex: 1; }
.isbn-row button {
  padding: 12px 18px;
  background: var(--ink);
  color: var(--white);
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.2s;
}
.isbn-row button:hover { background: var(--purple-700); }
.isbn-status {
  margin-top: 8px;
  font-size: 13px;
  min-height: 18px;
}
.isbn-status.ok { color: #047857; }
.isbn-status.fail { color: #B91C1C; }
.isbn-status.loading { color: var(--muted); }

.video-upload {
  border: 1.5px dashed var(--purple-300);
  border-radius: 12px;
  padding: 24px;
  background: var(--purple-50);
  transition: border-color 0.2s, background 0.2s;
}
.video-upload.has-file { border-style: solid; border-color: var(--purple-500); background: var(--white); padding: 16px; }
.vu-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.vu-icon { font-size: 32px; margin-bottom: 4px; }
.vu-empty strong { font-size: 15px; font-weight: 600; }
.vu-empty span { font-size: 12.5px; color: var(--muted); max-width: 320px; line-height: 1.5; }
.vu-empty button {
  margin-top: 10px;
  padding: 9px 18px;
  background: var(--ink);
  color: var(--white);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.vu-empty button:hover { background: var(--purple-700); }

.vu-filled {
  display: flex;
  align-items: center;
  gap: 14px;
}
.vu-thumb {
  width: 56px; height: 56px;
  border-radius: 8px;
  background: var(--grad);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.vu-meta { flex: 1; min-width: 0; }
.vu-meta strong { display: block; font-size: 14px; font-weight: 600; word-break: break-all; }
.vu-meta span { font-size: 12px; color: var(--muted); }
.vu-remove { color: #B91C1C; font-size: 12px; font-weight: 600; }
.vu-remove:hover { text-decoration: underline; }

.lf-note { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.lf-foot { font-size: 12px; color: var(--muted); margin-top: 14px; text-align: center; }

/* ============ MY LISTINGS MODAL ============ */
.ml-body { padding: 36px 40px; max-height: 92vh; overflow-y: auto; }
.ml-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.ml-head h3 {
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin-bottom: 4px;
}
.ml-tabs { display: flex; gap: 4px; padding: 4px; background: var(--paper); border-radius: 999px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.ml-tabs::-webkit-scrollbar { display: none; }
.ml-tab {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}
.ml-tab:hover { color: var(--ink); }
.ml-tab.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.ml-tab span {
  background: rgba(0,0,0,0.06);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
}
.ml-tab.active span { background: var(--purple-100); color: var(--purple-700); }

.ml-list { display: flex; flex-direction: column; gap: 12px; }
.ml-empty { text-align: center; padding: 60px 20px; color: var(--muted); background: var(--paper); border-radius: 16px; }
.ml-empty-icon { font-size: 48px; margin-bottom: 12px; }
.ml-empty h4 { font-family: var(--ff-display); font-size: 22px; font-weight: 500; margin-bottom: 8px; color: var(--ink); }

.ml-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 18px;
  padding: 18px;
  background: var(--paper);
  border-radius: 14px;
  border: 1px solid var(--line);
  align-items: center;
  transition: border-color 0.2s;
}
.ml-item:hover { border-color: var(--purple-300); }
.ml-thumb {
  width: 56px; height: 78px;
  border-radius: 4px 8px 8px 4px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: var(--ff-display);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 6px;
  line-height: 1.1;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.ml-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ml-info { min-width: 0; }
.ml-info-title {
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.ml-info-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ml-info-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ml-info-price {
  font-family: var(--ff-display);
  font-weight: 600;
  color: var(--ink);
}
.ml-info-reason {
  margin-top: 6px;
  padding: 8px 12px;
  background: #FEF2F2;
  color: #991B1B;
  font-size: 12.5px;
  border-radius: 8px;
  border-left: 3px solid #DC2626;
}

.ml-status {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-pending { background: #FEF3C7; color: #92400E; }
.status-approved { background: #D1FAE5; color: #065F46; }
.status-rejected { background: #FEE2E2; color: #991B1B; }

/* ============ ADMIN PANEL ============ */
.admin-card { max-width: 1100px; }
.admin-body { padding: 36px 40px; max-height: 92vh; overflow-y: auto; }
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.admin-tag {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.admin-head h3 {
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin-bottom: 4px;
}
.admin-stats { display: flex; gap: 24px; }
.as-item { text-align: center; min-width: 70px; }
.as-item strong {
  display: block;
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1;
}
.as-item span { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }

.admin-tabs { display: flex; gap: 4px; padding: 4px; background: var(--paper); border-radius: 999px; margin-bottom: 24px; width: fit-content; }
.ad-tab {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s;
}
.ad-tab:hover { color: var(--ink); }
.ad-tab.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }

.admin-list { display: flex; flex-direction: column; gap: 16px; }
.admin-card-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  padding: 20px;
  background: var(--paper);
  border-radius: 16px;
  border: 1px solid var(--line);
}
.admin-card-item.expanded { background: var(--white); border-color: var(--purple-300); box-shadow: var(--shadow-md); }
.ad-thumb {
  width: 80px; height: 110px;
  border-radius: 4px 10px 10px 4px;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: var(--ff-display);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 8px;
  line-height: 1.15;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; }

.ad-info { min-width: 0; }
.ad-info-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.ad-info-title {
  font-family: var(--ff-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.ad-info-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.ad-info-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ad-info-meta strong { color: var(--ink); font-weight: 600; }
.ad-desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 12px;
  background: var(--white);
  padding: 12px 14px;
  border-radius: 8px;
  border-left: 3px solid var(--purple-300);
}
.ad-video {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 0;
}
.ad-video-icon {
  width: 22px; height: 22px;
  border-radius: 4px;
  background: var(--purple-500);
  display: grid;
  place-items: center;
  font-size: 10px;
}

.ad-actions { display: flex; flex-direction: column; gap: 8px; align-self: flex-start; }
.ad-actions button {
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.2s;
}
.ad-approve { background: #059669; color: white; }
.ad-approve:hover { background: #047857; transform: translateY(-1px); }
.ad-reject { background: var(--white); color: #DC2626; border: 1px solid #FCA5A5; }
.ad-reject:hover { background: #FEE2E2; }

.ad-reject-form {
  margin-top: 14px;
  padding: 14px;
  background: #FEF2F2;
  border-radius: 10px;
  border: 1px solid #FCA5A5;
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.ad-reject-form textarea {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
  background: var(--white);
}
.ad-reject-form button {
  padding: 9px 16px;
  background: #DC2626;
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.ad-reject-form button.ad-cancel { background: var(--white); color: var(--ink); border: 1px solid var(--line); }

.admin-card-item .ad-info-meta .reason-text { color: #B91C1C; font-style: italic; }

/* ============ MESSAGING ============ */
.msg-card { max-width: 900px; padding: 0; overflow: hidden; }
.msg-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 600px;
  max-height: 92vh;
}
.msg-side {
  border-right: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.msg-side-head {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line);
}
.msg-side-head h3 {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.msg-threads { flex: 1; overflow-y: auto; padding: 8px 0; }
.msg-thread {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.15s;
  align-items: center;
  border-left: 3px solid transparent;
}
.msg-thread:hover { background: var(--white); }
.msg-thread.active { background: var(--white); border-left-color: var(--purple-700); }
.mt-avatar {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--grad);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.mt-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.mt-info { flex: 1; min-width: 0; }
.mt-name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-preview { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.mt-time { font-size: 10px; color: var(--muted); margin-left: 6px; flex-shrink: 0; }

.msg-empty-threads { padding: 40px 24px; text-align: center; color: var(--muted); font-size: 13px; }

.msg-main { display: flex; flex-direction: column; min-width: 0; background: var(--white); }
.msg-main-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}
.msg-main-head .mt-avatar { width: 40px; height: 40px; }
.msg-main-head-info strong {
  display: block;
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 2px;
}
.msg-main-head-info span { font-size: 12px; color: var(--muted); }
.msg-empty-text { color: var(--muted); font-size: 14px; }

.msg-stream {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--paper);
}
.msg-empty-state { margin: auto; text-align: center; color: var(--muted); padding: 40px 24px; }
.mes-icon { font-size: 40px; margin-bottom: 12px; }

.msg-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
  position: relative;
}
.msg-bubble.from-buyer {
  align-self: flex-end;
  background: var(--grad);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.msg-bubble.from-seller {
  align-self: flex-start;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.msg-time {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  padding: 0 4px;
}
.msg-bubble.from-buyer + .msg-time { align-self: flex-end; }

.msg-quick {
  display: flex;
  gap: 8px;
  padding: 12px 24px 0;
  background: var(--white);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.msg-quick button {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-soft);
  font-weight: 500;
  transition: all 0.2s;
}
.msg-quick button:hover { background: var(--purple-50); border-color: var(--purple-300); color: var(--purple-700); }

.msg-input {
  display: flex;
  gap: 10px;
  padding: 16px 24px 20px;
  background: var(--white);
}
.msg-input input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.msg-input input:focus:not(:disabled) { border-color: var(--purple-500); background: var(--white); }
.msg-input input:disabled { opacity: 0.5; cursor: not-allowed; }
.msg-input button {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.15s;
}
.msg-input button:not(:disabled):hover { background: var(--purple-700); transform: translateY(-1px); }
.msg-input button:disabled { opacity: 0.3; cursor: not-allowed; }

.typing-indicator {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.typing-indicator span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: typingDot 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ============ CHECKOUT FULFILLMENT ============ */
.fulfill {
  border: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0;
}
.fulfill legend {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
  padding: 0;
}
.fulfill-opt {
  display: block;
  cursor: pointer;
}
.fulfill-opt input { display: none; }
.fulfill-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  transition: all 0.2s;
}
.fulfill-opt:has(input:checked) .fulfill-card,
.fulfill-opt input:checked + .fulfill-card {
  border-color: var(--purple-500);
  background: var(--purple-50);
}
.fulfill-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--grad-soft);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.fulfill-text strong { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.fulfill-text em { font-style: normal; font-size: 12.5px; color: var(--muted); }

.delivery-fields, .cafe-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeUpFields 0.3s ease;
}
.delivery-fields[hidden], .cafe-fields[hidden] { display: none; }
@keyframes fadeUpFields {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.cafe-note {
  font-size: 12.5px;
  color: var(--purple-700);
  background: var(--purple-50);
  padding: 10px 14px;
  border-radius: 10px;
  line-height: 1.5;
}

/* ============ TOAST ============ */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--white);
  padding: 14px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 400px;
}
.toast.success { background: linear-gradient(135deg, #059669, #047857); }
.toast.error { background: linear-gradient(135deg, #DC2626, #B91C1C); }
.toast-icon { font-size: 16px; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(20px); }
}
.toast.out { animation: toastOut 0.3s ease forwards; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .sell-grid { grid-template-columns: 1fr; gap: 40px; }
  .sell-form-wrap { position: static; }
  .msg-body { grid-template-columns: 240px 1fr; }
}
@media (max-width: 720px) {
  .nav-sell { display: none; }
  .user-menu { width: calc(100vw - 40px); right: -8px; }
  .ml-body, .admin-body { padding: 24px 20px; }
  .ml-head h3, .admin-head h3 { font-size: 24px; }
  .ml-item, .admin-card-item { grid-template-columns: 50px 1fr; gap: 14px; }
  .ml-status { grid-column: 2; justify-self: start; }
  .admin-card-item { grid-template-columns: 1fr; }
  .ad-thumb { width: 60px; height: 80px; }
  .ad-actions { flex-direction: row; justify-self: stretch; }
  .ad-actions button { flex: 1; }
  .listing-form { padding: 24px 20px; }
  .lf-row { grid-template-columns: 1fr; gap: 16px; }
  .msg-body { grid-template-columns: 1fr; height: 80vh; }
  .msg-side { display: none; }
  .msg-side.mobile-active { display: flex; }
  .sell-section { padding: 80px 0; }
  .sell-trust { flex-wrap: wrap; gap: 16px 20px; }
  .st-item { flex: 0 0 calc(50% - 10px); }
  .admin-stats { gap: 14px; }
}

/* Confirmation fulfillment card */
.confirm-fulfill {
  margin: 18px 0 22px;
  text-align: left;
}
.cf-block {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  background: var(--paper);
  border-radius: 12px;
  border: 1px solid var(--line);
  align-items: flex-start;
}
.cf-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--grad-soft);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.cf-block strong {
  display: block;
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--ink);
}
.cf-block span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.cf-time {
  margin-top: 6px;
  font-weight: 500;
  color: var(--ink-soft) !important;
}

/* Quick view variants used by community listings */
.qv-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.qv-cta .btn { flex: 1; min-width: 160px; }
.btn.btn-ghost.large { padding: 13px 22px; }

/* Ensure [hidden] always wins over display:flex/grid rules above.
   The user-menu animates with opacity so it keeps its custom rule. */
[hidden] { display: none !important; }
.user-menu[hidden] { display: block !important; }

/* Replacement for italic <em> emphasis in headings — gradient color, no italic */
.ht-line.accent .ht-word,
.accent-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}
.spot-sub {
  display: block;
  font-size: 0.55em;
  font-weight: 500;
  letter-spacing: -0.005em;
  background: linear-gradient(135deg, #C4B5FD, #93C5FD);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 8px;
}

/* Sans-serif headings benefit from slightly heavier weights at display sizes */
h1, h2, h3, h4 { font-weight: 600; }
.hero-title, .spot-title, .sell-info h2, .cta-content h2, .ml-head h3, .admin-head h3 {
  font-weight: 700;
}

/* Slight tightening on display sizes for sans */
.hero-title { letter-spacing: -0.03em; }

/* ===== Order tracking modal ===== */
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions .btn { padding: 12px 22px; }

.track-body { padding: 36px 36px 32px; }
.track-head { text-align: center; margin-bottom: 28px; }
.track-id {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--purple-700);
  background: var(--purple-50);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.track-head h3 {
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.track-head p { font-size: 13.5px; color: var(--muted); }

.track-steps { list-style: none; padding: 0; margin: 0 0 20px; position: relative; }
.track-steps::before {
  content: '';
  position: absolute;
  left: 13px; top: 14px; bottom: 14px;
  width: 2px;
  background: var(--line);
  z-index: 0;
}
.track-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 0;
  position: relative;
  z-index: 1;
}
.ts-bullet {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
  transition: all 0.3s;
}
.track-step.done .ts-bullet { background: var(--grad); border-color: transparent; }
.track-step.pending .ts-bullet { color: transparent; }
.ts-text strong { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.ts-text span { font-size: 12.5px; color: var(--muted); }
.track-step.pending .ts-text strong { color: var(--ink-soft); }
.track-foot { padding-top: 20px; border-top: 1px solid var(--line); text-align: center; }

/* ===== Seller pickup note ===== */
.cf-seller-note {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: var(--purple-50);
  color: var(--purple-700);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
}

/* ===== Resubmit ===== */
.ml-resubmit {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  background: var(--white);
  color: var(--purple-700);
  border: 1px solid var(--purple-300);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}
.ml-resubmit:hover { background: var(--purple-700); color: var(--white); border-color: transparent; }

.resubmit-note {
  margin-bottom: 18px;
  padding: 14px 16px;
  background: var(--purple-50);
  border-left: 3px solid var(--purple-700);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.5;
}
.resubmit-note strong { color: var(--purple-700); }
.resubmit-note span { display: block; color: var(--muted); margin-top: 4px; font-size: 12.5px; }

/* ===========================================================
   ===  SELL PAGE (sell.html) — dedicated layout            ===
   =========================================================== */

/* Active nav state on sell page */
.nav-sell.active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 14px;
  border-radius: 999px;
  background: var(--grad);
  color: var(--white);
  font-weight: 600;
  margin-left: 4px;
  font-size: 14px;
  cursor: default;
}

.sell-hero {
  padding: 100px 0 60px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--purple-50) 100%);
  position: relative;
  overflow: hidden;
}
.sell-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 100% 70%, rgba(37, 99, 235, 0.06) 0%, transparent 40%);
  pointer-events: none;
}
.sell-hero .container { position: relative; z-index: 2; max-width: 880px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 28px;
  transition: color 0.2s, gap 0.2s;
}
.back-link:hover { color: var(--purple-700); gap: 10px; }

.sell-hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: 20px;
  color: var(--ink);
}
.sell-hero-sub {
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 640px;
  margin-bottom: 42px;
}
.sell-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 28px 32px;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.sell-hero-stats > div { display: flex; flex-direction: column; }
.sell-hero-stats strong {
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--purple-700);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}
.sell-hero-stats span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 600;
}

.sell-page-section {
  padding: 80px 0 120px;
  background: var(--paper);
}
.sell-page-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: start;
}

.sell-aside {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sell-steps-card, .sell-rules-card {
  background: var(--white);
  border-radius: 16px;
  padding: 28px 30px;
  border: 1px solid var(--line);
}
.sell-steps-card h3 {
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  color: var(--ink);
}
.sell-steps-card .sell-steps { gap: 18px; }
.sell-steps-card .sell-step h4 { font-size: 16px; }
.sell-steps-card .sell-step p { font-size: 13.5px; }

.sell-rules-card h4 {
  font-family: var(--ff-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 12px;
}
.sell-rules-card h4:not(:first-of-type) { margin-top: 22px; }
.sell-rules { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sell-rules li {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  padding-left: 22px;
  position: relative;
}
.sell-rules li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0;
  color: #059669;
  font-weight: 700;
}
.sell-rules.muted-list li::before { content: '×'; color: #DC2626; font-size: 16px; line-height: 1; top: 2px; }

.sell-form-area .listing-form {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
.sell-form-area .listing-form h3 {
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

@media (max-width: 1024px) {
  .sell-page-grid { grid-template-columns: 1fr; gap: 32px; }
  .sell-aside { position: static; }
  .sell-hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .sell-hero { padding: 64px 0 40px; }
  .sell-page-section { padding: 48px 0 80px; }
  .sell-form-area .listing-form { padding: 24px 20px; }
  .sell-hero-stats { padding: 20px 24px; gap: 16px; }
  .sell-hero-stats strong { font-size: 22px; }
}

/* ===========================================================
   ===  ADMIN PAGE (admin.html)                             ===
   =========================================================== */
body.admin-page { background: #0F1117; color: var(--ink); font-family: var(--ff-body); }

.admin-bar {
  background: #0A0C12;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px 32px;
}
.admin-brand { display: flex; align-items: center; gap: 12px; }
.ab-logo { display: inline-flex; }
.admin-tag-pill {
  background: linear-gradient(135deg, #6B2FB3, #1E40AF);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
}

.admin-nav {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.ad-nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
  border: 0;
  cursor: pointer;
}
.ad-nav-link:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.06); }
.ad-nav-link.active { background: rgba(255,255,255,0.08); color: var(--white); }
.ad-nav-link span {
  background: rgba(107, 47, 179, 0.3);
  color: #E0CCFF;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}
.ad-nav-link.active span { background: var(--purple-500); color: var(--white); }

.ab-back {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.15s;
}
.ab-back:hover { background: rgba(255,255,255,0.06); color: var(--white); }

.admin-main {
  background: #F5F6F8;
  min-height: calc(100vh - 65px);
}
.admin-view { display: none; padding: 48px 0 80px; }
.admin-view.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.admin-main .container { max-width: 1400px; padding: 0 32px; }

.adv-head { margin-bottom: 32px; }
.adv-head h1 {
  font-family: var(--ff-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
  color: var(--ink);
}
.adv-head .muted { font-size: 14px; }

/* Stat grid (overview) */
.adv-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.adv-stat {
  background: var(--white);
  padding: 22px 24px;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s;
}
.adv-stat[data-link] { cursor: pointer; }
.adv-stat[data-link]:hover { border-color: var(--purple-300); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.adv-stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.adv-stat-num {
  font-family: var(--ff-display);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
}
.adv-stat-meta { font-size: 12.5px; color: var(--muted); }

/* Two-column row of panels */
.adv-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.adv-panel {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 24px 26px;
}
.adv-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.adv-panel-head h3 {
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.adv-link {
  font-size: 13px;
  color: var(--purple-700);
  font-weight: 600;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.adv-link:hover { text-decoration: underline; }
.adv-list-condensed { display: flex; flex-direction: column; gap: 12px; }
.adv-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.adv-mini-row > div:first-child { min-width: 0; flex: 1; }
.adv-mini-row strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.adv-mini-row span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.adv-empty-mini { color: var(--muted); font-size: 13px; padding: 8px 0; }
.status-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-pill.scheduled { background: #FEF3C7; color: #92400E; }
.status-pill.packed { background: #DBEAFE; color: #1E40AF; }
.status-pill.out_for_delivery { background: #E0E7FF; color: #4338CA; }
.status-pill.delivered { background: #D1FAE5; color: #065F46; }
.status-pill.cancelled { background: #FEE2E2; color: #991B1B; }

/* Listing review tabs */
.adv-tabs {
  display: flex;
  gap: 4px;
  background: var(--white);
  padding: 4px;
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 24px;
  border: 1px solid var(--line);
}
.adv-tab {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
}
.adv-tab:hover { color: var(--ink); }
.adv-tab.active { background: var(--ink); color: var(--white); }
.adv-tab span {
  background: rgba(0,0,0,0.06);
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.adv-tab.active span { background: rgba(255,255,255,0.16); color: var(--white); }

/* Listing cards (admin) */
.adv-list { display: flex; flex-direction: column; gap: 14px; }
.adv-card {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 22px;
  padding: 22px;
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--line);
}
.adv-card-thumb {
  width: 90px; height: 124px;
  border-radius: 4px 10px 10px 4px;
  background: var(--grad);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.adv-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-fallback {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: var(--ff-display);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 6px;
  line-height: 1.15;
}
.adv-card-body { min-width: 0; }
.adv-card-body header { margin-bottom: 12px; }
.adv-card-body h4 {
  font-family: var(--ff-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin-bottom: 8px;
}
.adv-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  color: var(--muted);
}
.adv-card-meta strong { color: var(--ink); font-weight: 600; }
.adv-card-desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 12px;
  background: var(--paper);
  padding: 12px 14px;
  border-radius: 8px;
}
.adv-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  border: 0;
  cursor: pointer;
  transition: background 0.2s;
}
.adv-video-btn:hover { background: var(--purple-700); }
.adv-video-btn span {
  width: 22px; height: 22px;
  border-radius: 4px;
  background: var(--purple-500);
  display: grid;
  place-items: center;
  font-size: 9px;
}
.adv-card-reason {
  margin-top: 10px;
  padding: 10px 14px;
  background: #FEF2F2;
  color: #991B1B;
  font-size: 13px;
  border-radius: 8px;
  border-left: 3px solid #DC2626;
}
.adv-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: flex-start;
}
.btn-approve, .btn-reject {
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  border: 0;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-approve { background: #059669; color: white; }
.btn-approve:hover { background: #047857; transform: translateY(-1px); }
.btn-reject { background: white; color: #DC2626; border: 1px solid #FCA5A5; }
.btn-reject:hover { background: #FEE2E2; }
.btn-danger { background: #DC2626; color: white; }
.btn-danger:hover { background: #B91C1C; }

/* Empty state */
.adv-empty {
  text-align: center;
  padding: 80px 24px;
  background: var(--white);
  border-radius: 14px;
  border: 1px dashed var(--line);
}
.adv-empty-icon { font-size: 44px; margin-bottom: 14px; }
.adv-empty h3 {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.adv-empty p { color: var(--muted); font-size: 14px; }

/* Orders table */
.adv-table-wrap {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.adv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.adv-table thead { background: var(--paper); }
.adv-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.adv-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.adv-table tbody tr:hover { background: var(--paper); }
.adv-table tbody tr:last-child td { border-bottom: 0; }
.adv-table strong { display: block; font-weight: 600; color: var(--ink); }
.adv-table .td-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.adv-table .td-items { color: var(--ink-soft); max-width: 200px; }
.adv-table code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--purple-700);
  background: var(--purple-50);
  padding: 3px 8px;
  border-radius: 6px;
}
.payment-pill {
  display: inline-block;
  padding: 3px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}
.order-status-select {
  padding: 6px 28px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--ink);
}

/* Messages — admin view */
.adv-msg-grid { display: flex; flex-direction: column; gap: 16px; }
.adv-msg-thread {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.adv-msg-head {
  padding: 18px 22px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.adv-msg-head strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.adv-msg-stream {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
}

/* Database (spreadsheet) */
.db-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.db-actions .btn { padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.db-actions label.btn { display: inline-flex; align-items: center; }

.db-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.db-tab {
  padding: 8px 16px;
  border-radius: 8px 8px 0 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 0;
  cursor: pointer;
}
.db-tab.active { background: var(--white); color: var(--ink); font-weight: 700; }

.db-meta {
  background: var(--white);
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  font-size: 12px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  gap: 8px;
  align-items: center;
}
.db-meta strong { color: var(--ink); }
.db-meta code {
  background: var(--paper);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.db-table-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  overflow: auto;
  max-height: 600px;
}
.db-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.db-table thead { position: sticky; top: 0; background: #FAFAFC; z-index: 2; }
.db-table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  color: var(--ink);
  border-bottom: 2px solid var(--line);
  border-right: 1px solid var(--line);
  background: #F5F6F8;
  white-space: nowrap;
}
.db-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #EFEFF3;
  border-right: 1px solid #EFEFF3;
  color: var(--ink-soft);
  vertical-align: top;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-table tbody tr:hover { background: #FAFAFC; }
.db-null { color: #C0C0C7; font-style: italic; }
.db-array, .db-object { color: var(--purple-700); font-weight: 600; }
.db-trunc { color: var(--muted); }
.db-empty-cell { text-align: center; color: var(--muted); padding: 40px !important; }

/* Reject reason modal styling on admin */
.reject-body { padding: 32px; }
.reject-body h3 {
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.015em;
}
.reject-body p.muted { font-size: 13.5px; margin-bottom: 18px; }
.reject-body textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
  background: var(--paper);
  outline: none;
}
.reject-body textarea:focus { border-color: var(--purple-500); background: var(--white); box-shadow: 0 0 0 3px var(--purple-100); }
.reject-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.reject-actions .btn { padding: 10px 20px; }

@media (max-width: 1024px) {
  .adv-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .adv-row { grid-template-columns: 1fr; }
  .admin-bar-inner { grid-template-columns: 1fr; gap: 12px; }
  .admin-nav { overflow-x: auto; justify-content: flex-start; }
  .admin-bar-actions { display: none; }
}
@media (max-width: 720px) {
  .admin-main .container, .admin-bar-inner { padding-left: 16px; padding-right: 16px; }
  .adv-card { grid-template-columns: 60px 1fr; }
  .adv-card-thumb { width: 60px; height: 84px; }
  .adv-card-actions { grid-column: 1 / -1; flex-direction: row; }
  .adv-card-actions button { flex: 1; }
  .adv-table { font-size: 11px; }
  .adv-table th, .adv-table td { padding: 10px 8px; }
}

/* Inquiry preview on My Listings cards */
.ml-info-inquiry {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ml-info-inquiry-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-700);
  background: var(--purple-50);
  padding: 4px 10px;
  border-radius: 6px;
}
.ml-view-thread {
  font-size: 12px;
  color: var(--purple-700);
  font-weight: 600;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.ml-view-thread:hover { text-decoration: underline; }

/* ===========================================================
   ===  v3.2: Cover upload · Instagram · Escrow            ===
   =========================================================== */

/* === Cover photo upload === */
.cover-upload {
  border: 1.5px dashed var(--purple-300);
  border-radius: 12px;
  padding: 24px;
  background: var(--purple-50);
  transition: border-color 0.2s, background 0.2s;
}
.cover-upload.has-file { border-style: solid; border-color: var(--purple-500); background: var(--white); padding: 12px; }
.cu-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.cu-icon { font-size: 28px; margin-bottom: 4px; }
.cu-empty strong { font-size: 15px; font-weight: 600; }
.cu-empty span { font-size: 12.5px; color: var(--muted); max-width: 320px; line-height: 1.5; }
.cu-empty button {
  margin-top: 10px;
  padding: 9px 18px;
  background: var(--ink);
  color: var(--white);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.cu-empty button:hover { background: var(--purple-700); }
.cu-filled { display: flex; align-items: center; gap: 14px; }
.cu-filled img { width: 80px; height: 110px; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow-sm); }
.cu-remove {
  flex: 1;
  padding: 9px 14px;
  background: transparent;
  color: var(--purple-700);
  border: 1px solid var(--purple-300);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.cu-remove:hover { background: var(--purple-50); }

/* === Instagram strip === */
.ig-strip {
  padding: 80px 0;
  background: var(--paper);
}
.ig-strip-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: center;
  background: linear-gradient(135deg, #6B2FB3 0%, #1E40AF 50%, #DC2743 100%);
  border-radius: 28px;
  padding: 64px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.ig-strip-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%);
  pointer-events: none;
}
.ig-text { position: relative; z-index: 2; }
.ig-handle {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.15);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
  font-family: var(--ff-display);
}
.ig-text h3 {
  font-family: var(--ff-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 12px;
}
.ig-text p {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 28px;
  line-height: 1.55;
  max-width: 380px;
}
.ig-text .btn-primary {
  background: var(--white);
  color: var(--ink);
  padding: 14px 28px;
  font-weight: 600;
}
.ig-text .btn-primary:hover { background: var(--ink); color: var(--white); }

.ig-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  position: relative;
  z-index: 2;
}
.ig-tile {
  aspect-ratio: 1;
  background: rgba(255,255,255,0.12);
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 36px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  transition: transform 0.3s;
}
.ig-tile:hover { transform: scale(1.04); background: rgba(255,255,255,0.2); }
.ig-tile-1 { background: rgba(255,255,255,0.18); }
.ig-tile-3 { background: rgba(255,255,255,0.22); }
.ig-tile-5 { background: rgba(255,255,255,0.16); }

@media (max-width: 1024px) {
  .ig-strip-inner { grid-template-columns: 1fr; gap: 32px; padding: 48px; text-align: center; }
  .ig-text p { margin-left: auto; margin-right: auto; }
  .ig-tiles { max-width: 360px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .ig-strip { padding: 48px 0; }
  .ig-strip-inner { padding: 36px 28px; border-radius: 20px; }
  .ig-tile { font-size: 28px; }
}

/* === Confirmation: escrow notice === */
.cf-escrow {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #ECFDF5, #F0FDF4);
  border: 1px solid #A7F3D0;
  border-radius: 12px;
  align-items: flex-start;
}
.cf-escrow-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #059669;
  color: white;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}
.cf-escrow strong {
  display: block;
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 600;
  color: #065F46;
  margin-bottom: 3px;
}
.cf-escrow span {
  display: block;
  font-size: 13px;
  color: #047857;
  line-height: 1.5;
}

/* === Escrow ledger pills === */
.escrow-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.escrow-held { background: #FEF3C7; color: #92400E; }
.escrow-released { background: #D1FAE5; color: #065F46; }
.escrow-refunded { background: #FEE2E2; color: #991B1B; }

.es-release, .es-refund {
  padding: 7px 14px !important;
  font-size: 11.5px !important;
}
.es-release { background: #059669 !important; }
.es-refund { background: white !important; color: #DC2626 !important; border: 1px solid #FCA5A5 !important; }

/* Escrow on My Listings (seller view) */
.ml-escrow-line {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
}
.ml-escrow-line strong { color: var(--ink); font-weight: 600; }

/* ===========================================================
   ===  AUTH PAGES (login, signup)                          ===
   =========================================================== */
body.auth-page { background: var(--paper); color: var(--ink); font-family: var(--ff-body); margin: 0; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Left side — gradient pitch */
.auth-side {
  background: linear-gradient(135deg, #6B2FB3 0%, #1E40AF 100%);
  padding: 60px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-side::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 100%, rgba(255,255,255,0.10) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.auth-side > * { position: relative; z-index: 2; }
.auth-logo { display: inline-block; margin-bottom: 56px; }
.auth-side h1 {
  font-family: var(--ff-display);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.auth-side > p {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  line-height: 1.55;
  margin-bottom: 48px;
  max-width: 420px;
}
.auth-features {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.auth-feat {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  max-width: 420px;
}
.auth-feat > span {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.auth-feat strong {
  display: block;
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.auth-feat span:last-child {
  font-size: 13.5px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}

/* Right side — form */
.auth-card-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--paper);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: 20px;
  padding: 48px 44px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  position: relative;
}
.auth-back { margin-bottom: 24px; }
.auth-back a {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.15s;
}
.auth-back a:hover { color: var(--purple-700); }

.auth-card h2 {
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.auth-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.auth-form .lf-group { margin-bottom: 16px; }
.auth-form .lf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.auth-form .lf-row .lf-group { margin-bottom: 0; }
.auth-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.auth-form input[type=text],
.auth-form input[type=email],
.auth-form input[type=password],
.auth-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
  color: var(--ink);
}
.auth-form input:focus, .auth-form select:focus {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px var(--purple-100);
  background: var(--white);
}
.lf-hint { font-weight: 400; color: var(--muted); margin-left: 4px; font-size: 12px; }

.auth-error {
  background: #FEF2F2;
  color: #991B1B;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  border-left: 3px solid #DC2626;
  margin-bottom: 14px;
}

.btn-full {
  width: 100%;
  padding: 13px;
  font-size: 14.5px;
  font-weight: 600;
  margin-top: 8px;
}

.auth-fineprint {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  margin-top: 14px;
  line-height: 1.5;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--muted);
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-divider span { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}
.auth-switch a { color: var(--purple-700); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* Demo creds */
.auth-demo-creds {
  margin-top: 28px;
  padding: 14px 16px;
  background: var(--paper);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.auth-demo-creds summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  list-style: none;
  user-select: none;
}
.auth-demo-creds summary::-webkit-details-marker { display: none; }
.auth-demo-creds[open] summary { margin-bottom: 12px; }
.adc-list { display: flex; flex-direction: column; gap: 8px; }
.adc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--line);
}
.adc-item strong { display: block; font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.adc-item code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--purple-700);
  background: var(--purple-50);
  padding: 2px 6px;
  border-radius: 4px;
}
.adc-item button {
  padding: 5px 12px;
  background: var(--ink);
  color: var(--white);
  border: 0;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.adc-item button:hover { background: var(--purple-700); }
.adc-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

@media (max-width: 1024px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { padding: 40px; min-height: 320px; justify-content: flex-start; }
  .auth-side h1 { font-size: 32px; }
  .auth-features { display: none; }
  .auth-card-wrap { padding: 24px; }
  .auth-card { padding: 32px 28px; }
}

/* ===========================================================
   ===  Login wall (when feature requires auth)             ===
   =========================================================== */
.login-wall {
  max-width: 540px;
  margin: 80px auto;
  padding: 56px 48px;
  background: var(--white);
  border-radius: 24px;
  border: 1px solid var(--line);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.login-wall-icon { font-size: 48px; margin-bottom: 16px; }
.login-wall h2 {
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.login-wall p {
  color: var(--ink-soft);
  margin-bottom: 28px;
  font-size: 15px;
  line-height: 1.55;
}
.login-wall-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ===========================================================
   ===  Header: signed-in user state                        ===
   =========================================================== */
.signin-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s;
}
.signin-link:hover { background: var(--purple-700); transform: translateY(-1px); }

.user-btn-loggedin {
  background: var(--grad);
  color: var(--white);
  border: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--ff-display);
  transition: all 0.2s;
  position: relative;
}
.user-btn-loggedin:hover { transform: scale(1.05); box-shadow: 0 4px 14px -4px rgba(107, 47, 179, 0.45); }
.user-btn-loggedin.is-admin::after {
  content: '🛡';
  position: absolute;
  bottom: -4px; right: -4px;
  background: var(--ink);
  color: var(--white);
  width: 18px; height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  border: 2px solid var(--paper);
}

.um-signout {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #DC2626;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.um-signout:hover { background: #FEF2F2; }

/* Admin top-bar user section */
.admin-bar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}
.admin-bar-user-name { font-size: 13px; font-weight: 500; }
.admin-bar-user-name span { display: block; font-size: 11px; color: rgba(255,255,255,0.5); }

/* ==== Admin top-bar layout fixes (signed-in state) ==== */
/* The admin-bar-actions column needs to be flex so the user block + 'View site' link sit on one row */
.admin-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

/* Tighter avatar for the top bar (the global .user-btn-loggedin is 38px which is too big here) */
.admin-bar-user .user-btn-loggedin {
  width: 32px;
  height: 32px;
  font-size: 12px;
  cursor: default;
}
.admin-bar-user .user-btn-loggedin.is-admin::after {
  width: 14px; height: 14px;
  font-size: 8px;
  bottom: -3px; right: -3px;
  border-width: 1.5px;
  border-color: #0A0C12;
}
.admin-bar-user-name {
  line-height: 1.25;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-bar-user-name span {
  margin-top: 1px;
}

/* Sign-out button matches "View site" pill */
#adminSignOut.ab-back {
  margin-left: 4px;
}

/* Keep admin actions visible on mobile so admins can sign out from any screen size */
@media (max-width: 1024px) {
  .admin-bar-actions { display: flex; justify-content: flex-end; }
  .admin-bar-user-name { display: none; }  /* save space — avatar + sign out is enough */
}
@media (max-width: 720px) {
  .admin-bar-inner { padding: 14px 16px; }
  .ab-back { padding: 6px 12px; font-size: 12px; }
}
