/* ===== Jankie Ankle — mock marketplace ===== */
:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --ink: #241a17;
  --ink-soft: #6b5d55;
  --line: #e8dfd3;
  --brand: #d6482b;
  --brand-ink: #a8351d;
  --accent: #1f6f6b;
  --gold: #e0a422;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(60, 40, 30, 0.10);
  --shadow-lg: 0 24px 60px rgba(60, 40, 30, 0.18);
  --maxw: 1140px;
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171310;
    --surface: #221c18;
    --ink: #f3ebe2;
    --ink-soft: #b2a396;
    --line: #33291f;
    --brand: #f2664a;
    --brand-ink: #f2664a;
    --accent: #4bb3ad;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}
:root[data-theme="dark"] {
  --bg: #171310; --surface: #221c18; --ink: #f3ebe2; --ink-soft: #b2a396;
  --line: #33291f; --brand: #f2664a; --brand-ink: #f2664a; --accent: #4bb3ad;
  --shadow: 0 10px 30px rgba(0,0,0,.4); --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.wrap { width: min(var(--maxw), 92%); margin-inline: auto; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 0; }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 900; font-size: 22px; }
.logo-img { display: block; height: 40px; width: auto; }
.logo-footer .logo-img { filter: brightness(0) invert(1); opacity: .95; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-img { filter: brightness(0) invert(1); } }
:root[data-theme="dark"] .logo-img { filter: brightness(0) invert(1); }
.nav { display: flex; gap: 22px; margin-left: auto; font-weight: 500; }
.nav a { color: var(--ink-soft); transition: color .15s; }
.nav a:hover { color: var(--brand); }
.cart-btn {
  position: relative; background: var(--ink); color: var(--bg);
  border: 0; border-radius: 999px; padding: 9px 16px; font-size: 15px;
  cursor: pointer; font-weight: 600;
}
.cart-count {
  position: absolute; top: -6px; right: -6px; background: var(--brand);
  color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 999px; display: grid; place-items: center; padding: 0 4px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block; border: 0; cursor: pointer; font-family: var(--font-body);
  font-weight: 700; font-size: 15px; padding: 13px 24px; border-radius: 999px;
  transition: transform .12s ease, box-shadow .12s ease; text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 40%, transparent); }
.btn-primary:hover { box-shadow: 0 12px 26px color-mix(in srgb, var(--brand) 50%, transparent); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ===== Hero ===== */
.hero { padding: 64px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .3px; margin: 0 0 12px; }
.hero h1 { font-size: clamp(44px, 7vw, 82px); font-weight: 900; letter-spacing: -1.5px; }
.hero h1 .hl { color: var(--brand); }
.lede { font-size: 19px; color: var(--ink-soft); max-width: 46ch; margin: 20px 0 28px; }
.lede em { color: var(--ink); font-style: italic; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.trust { list-style: none; display: flex; gap: 28px; padding: 0; margin: 34px 0 0; }
.trust li { color: var(--ink-soft); font-size: 14px; }
.trust strong { display: block; font-family: var(--font-display); font-size: 26px; color: var(--ink); }

.hero-art { position: relative; height: 420px; }
.polaroid {
  position: absolute; background: var(--surface); padding: 12px 12px 8px;
  border-radius: 8px; box-shadow: var(--shadow-lg); width: 190px; text-align: center;
  border: 1px solid var(--line);
}
.polaroid span { display: block; font-family: var(--font-display); font-weight: 600; font-size: 14px; margin-top: 8px; color: var(--ink-soft); }
.pola-img { height: 180px; border-radius: 4px; display: grid; place-items: center; font-size: 76px; }
.grad-a { background: linear-gradient(135deg, #ffd7a8, #ff9a76); }
.grad-b { background: linear-gradient(135deg, #a8e6e2, #5fb8d6); }
.grad-c { background: linear-gradient(135deg, #ffc4d6, #d68fb0); }
.p1 { top: 0; left: 8%; transform: rotate(-7deg); z-index: 3; }
.p2 { top: 40px; right: 0; transform: rotate(6deg); z-index: 2; }
.p3 { bottom: 0; left: 26%; transform: rotate(-2deg); z-index: 1; }

/* ===== Marquee ===== */
.marquee { overflow: hidden; background: var(--ink); color: var(--bg); padding: 12px 0; }
.marquee-track { display: inline-block; white-space: nowrap; font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: 1px; animation: scroll 22s linear infinite; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ===== Sections ===== */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 900; letter-spacing: -0.5px; }
.section-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; }

/* ===== Filters ===== */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line); background: transparent; color: var(--ink-soft);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px;
  transition: all .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ===== Product grid ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { height: 200px; display: grid; place-items: center; font-size: 88px; position: relative; }
.card-tag {
  position: absolute; top: 12px; left: 12px; background: var(--surface); color: var(--ink);
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; box-shadow: var(--shadow);
}
.card-hardware {
  position: absolute; top: 12px; right: 12px; background: var(--gold); color: #3a2a00;
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 19px; }
.card-seller { color: var(--ink-soft); font-size: 13px; }
.card-rating { color: var(--gold); font-size: 14px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.card-price { font-family: var(--font-display); font-weight: 900; font-size: 24px; }
.add-btn {
  background: var(--ink); color: var(--bg); border: 0; border-radius: 999px;
  padding: 9px 16px; font-weight: 700; cursor: pointer; font-size: 14px; transition: background .15s;
}
.add-btn:hover { background: var(--brand); }

/* ===== Steps ===== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px; }
.step { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step-num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  background: var(--brand); color: #fff; font-family: var(--font-display); font-weight: 900; font-size: 20px; margin-bottom: 16px;
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); margin: 0; }

/* ===== Sell ===== */
.sell-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.sell-copy h2 { margin-bottom: 16px; }
.sell-copy p { color: var(--ink-soft); font-size: 17px; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 900; }
.sell-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.sell-form h3 { font-size: 22px; margin-bottom: 18px; }
.sell-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.sell-form input, .sell-form textarea {
  width: 100%; margin-top: 6px; padding: 11px 13px; border: 1.5px solid var(--line);
  border-radius: 10px; font-family: inherit; font-size: 15px; background: var(--bg); color: var(--ink); resize: vertical;
}
.sell-form input:focus, .sell-form textarea:focus { outline: none; border-color: var(--brand); }
.form-note { color: var(--accent); font-weight: 600; margin: 12px 0 0; }

/* ===== FAQ ===== */
.faq { margin-top: 28px; max-width: 760px; display: grid; gap: 12px; }
.faq details {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px;
}
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; font-size: 17px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--brand); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--ink-soft); margin: 0 0 16px; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: var(--bg); padding: 48px 0 24px; margin-top: 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.site-footer .logo-text { color: var(--bg); }
.fine { color: color-mix(in srgb, var(--bg) 60%, transparent); font-size: 13px; max-width: 40ch; margin: 12px 0 0; }
.foot-nav { display: flex; flex-direction: column; gap: 10px; }
.foot-nav a { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.foot-nav a:hover { color: var(--brand); }
.copyright { text-align: center; color: color-mix(in srgb, var(--bg) 45%, transparent); font-size: 13px; margin: 34px 0 0; }

/* ===== Cart drawer ===== */
.drawer-overlay { position: fixed; inset: 0; background: rgba(20,12,8,.45); z-index: 60; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(400px, 90vw);
  background: var(--bg); z-index: 70; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s ease;
}
.cart-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 22px; }
.close-btn { background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--ink-soft); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty { color: var(--ink-soft); text-align: center; margin-top: 40px; }
.cart-item { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item-img { width: 54px; height: 54px; border-radius: 10px; display: grid; place-items: center; font-size: 30px; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title { font-weight: 700; font-size: 14px; }
.cart-item-price { color: var(--ink-soft); font-size: 13px; }
.cart-item-remove { background: none; border: 0; color: var(--brand); cursor: pointer; font-size: 13px; font-weight: 600; }
.drawer-foot { padding: 20px 24px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; font-size: 16px; }
.cart-total strong { font-family: var(--font-display); font-size: 26px; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { height: 340px; margin-top: 10px; }
  .nav { display: none; }
  .steps { grid-template-columns: 1fr; }
  .sell-inner { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .trust { gap: 18px; }
  .polaroid { width: 150px; }
  .pola-img { height: 140px; font-size: 58px; }
}
