/* Catalink shared styles. Warm Bazaar theme. Mobile first. Themes via [data-theme] on <html>. */

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

:root, [data-theme="light"] {
  --bg: #FBF6EC;
  --bg-soft: #F4EBD6;
  --card: #ffffff;
  --text: #2A1E17;
  --muted: #8A7A68;
  --line: #EADFC6;
  --accent: #8C1D2F;
  --accent-dark: #6E1424;
  --accent-soft: #F8E9EB;
  --gold: #C69A3F;
  --gold-soft: #F7EED7;
  --buy-btn: #2A1E17;
  --buy-btn-text: #FBF6EC;
  --red: #b3261e;
  --red-soft: #fbeae9;
  --shadow: 0 3px 14px rgba(120, 90, 40, 0.10);
  --radius: 16px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #17110C;
  --bg-soft: #231A12;
  --card: #251C14;
  --text: #F6EEE1;
  --muted: #A89880;
  --line: #3D2F21;
  --accent: #C45167;
  --accent-dark: #A03A4F;
  --accent-soft: #3A2229;
  --gold: #D4A94E;
  --gold-soft: #33291A;
  --buy-btn: #D4A94E;
  --buy-btn-text: #2A1E17;
  --red: #e0685f;
  --red-soft: #3a2320;
  --shadow: 0 3px 14px rgba(0, 0, 0, 0.45);
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.3px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 48px; }
.wrap-narrow { max-width: 440px; margin: 0 auto; padding: 0 16px 48px; }

/* ---------- header ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; max-width: 560px; margin: 0 auto;
}
.topbar > div:last-child { display: flex; gap: 8px; align-items: center; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.5px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.brand:active { opacity: 0.55; }

/* ---------- progress strip: Products -> Make it live -> Share ---------- */
.psteps { display: flex; gap: 6px; margin: 10px 0 4px; }
.pstep { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; }
.pdot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; }
.pstep.done { color: var(--text); }
.pstep.done .pdot { background: var(--accent); border-color: var(--accent); color: #FFF9F0; }
.pstep.done .pdot::after { content: "\2713"; }
.pstep.now { color: var(--text); border-color: var(--accent); }
.pstep.now .pdot { border-color: var(--accent); animation: pdotPulse 1.6s infinite; }
@keyframes pdotPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(140,29,47,.35); } 50% { box-shadow: 0 0 0 5px rgba(140,29,47,0); } }
.brand span { color: var(--accent); }
.topbar a.brand-home { border: none; padding: 0; border-radius: 0; font-size: 22px; font-weight: 800; }
.topbar a {
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 13px;
  border: 1.5px solid var(--text); border-radius: 999px; padding: 7px 15px;
}

/* ---------- buttons / inputs ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer;
  background: var(--accent); color: #FFF9F0; font-weight: 700; font-size: 16px;
  font-family: var(--font-body);
  padding: 15px 22px; border-radius: 999px; text-decoration: none;
  text-align: center; width: 100%;
  box-shadow: 0 6px 18px rgba(140, 29, 47, 0.25);
}
.btn:active { background: var(--accent-dark); }
.btn-secondary { background: var(--bg-soft); color: var(--text); box-shadow: none; border: 1.5px solid var(--line); }
.btn-danger { background: var(--red-soft); color: var(--red); box-shadow: none; }
.btn-small { width: auto; padding: 10px 18px; font-size: 14px; box-shadow: none; }
.linklike { background: none; border: none; padding: 0; color: var(--accent); font-size: 14px; text-decoration: underline; cursor: pointer; font-family: inherit; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-hero { width: auto; padding: 15px 36px; }

.field { margin: 14px 0; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
input[type="text"], input[type="tel"], input[type="number"], textarea, select {
  width: 100%; padding: 13px 16px; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--card); color: var(--text); font-family: var(--font-body);
}
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin: 12px 0;
}
.notice {
  background: var(--gold-soft); border: 1px solid var(--gold);
  border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; font-size: 14px;
}
.error { color: var(--red); font-size: 14px; margin: 8px 0; min-height: 20px; }

/* ---------- landing ---------- */
.hero { text-align: center; padding: 44px 0 8px; }
.kicker {
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.hero h1 { font-size: 36px; line-height: 1.12; margin: 0 0 14px; font-weight: 800; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { color: var(--muted); font-size: 16.5px; margin: 0 0 24px; line-height: 1.6; }
.price-line { font-size: 13px !important; margin-top: 14px !important; }
.steps { margin: 28px 0; }
.step { display: flex; gap: 14px; align-items: flex-start; margin: 18px 0; }
.step-num {
  flex: 0 0 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #FFF9F0; font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(140, 29, 47, 0.25);
}
.step h3 { margin: 2px 0 4px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.pricing { display: grid; gap: 14px; margin: 20px 0; }
.price-card { border: 2px solid var(--line); }
.price-card.featured { border-color: var(--accent); background: linear-gradient(180deg, var(--card), var(--gold-soft)); }
.price-card h3 { margin: 0 0 4px; font-size: 20px; }
.price { font-family: var(--font-display); font-size: 34px; font-weight: 800; margin: 6px 0; }
.price small { font-size: 14px; font-weight: 400; color: var(--muted); font-family: var(--font-body); }
.price-card ul { margin: 10px 0 18px; padding-left: 20px; color: var(--muted); font-size: 15px; }
.price-card li { margin: 5px 0; }
.faq h3 { font-size: 17px; margin: 20px 0 4px; }
.faq p { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.section-title { font-size: 26px; margin: 40px 0 8px; font-weight: 800; }

/* ---------- app ---------- */
.linkbar { display: flex; gap: 8px; margin: 10px 0; }
.linkbar input { flex: 1; font-size: 13px; }
.count { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.product-row { display: flex; gap: 12px; align-items: center; }
.product-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; flex: 0 0 64px; background: var(--bg-soft); }
.product-row .info { flex: 1; min-width: 0; }
.product-row .info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-display); font-size: 16px; }
.product-row .info span { color: var(--muted); font-size: 14px; }
.toggle {
  border: none; cursor: pointer; font-weight: 700; font-size: 14px; font-family: var(--font-body);
  padding: 10px 16px; border-radius: 999px; white-space: nowrap;
}
.toggle.on { background: var(--accent-soft); color: var(--accent); }
.toggle.off { background: var(--red-soft); color: var(--red); }
.fab {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  width: auto; padding: 16px 32px; border-radius: 999px; font-size: 17px;
  box-shadow: 0 8px 24px rgba(140, 29, 47, 0.35); z-index: 10;
}
.choice-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 14px 0; }
.choice {
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--card);
  padding: 16px 6px; text-align: center; cursor: pointer; font-weight: 700; font-size: 14px;
}
.choice small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 4px; }
.choice.selected { border-color: var(--accent); background: var(--accent-soft); }
.theme-preview { height: 74px; border-radius: 8px; margin-bottom: 8px; border: 1px solid var(--line); }
.theme-preview.dark { background: linear-gradient(180deg, #251C14 60%, #17110C); }
.theme-preview.light { background: linear-gradient(180deg, #ffffff 60%, #FBF6EC); }
.photo-pick {
  width: 100%; aspect-ratio: 1; border: 2px dashed var(--gold); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--muted); font-weight: 600; overflow: hidden; background: var(--bg-soft);
}
.photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.icon-btn { background: none; border: none; font-size: 22px; cursor: pointer; padding: 6px; color: var(--text); }

/* ---------- public catalog ---------- */
.shop-head { text-align: center; padding: 30px 0 6px; }
.shop-head h1 { margin: 0 0 4px; font-size: 28px; font-weight: 800; }
.shop-head p { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.searchbar { margin: 16px 0; }
.searchbar input { border-radius: 999px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 30px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pcard .ph { position: relative; aspect-ratio: 1; background: var(--bg-soft); }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sold-badge {
  position: absolute; top: 8px; left: 8px; background: #2A1E17; color: #F5E9D0;
  font-size: 11px; font-weight: 800; letter-spacing: 1px; padding: 5px 11px; border-radius: 999px;
}
.pcard .body { padding: 10px 12px 13px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pcard .body b { font-family: var(--font-display); font-size: 15px; line-height: 1.3; }
.pcard .price { font-weight: 800; font-size: 15px; color: var(--accent); }
.pcard .details { font-size: 12px; color: var(--muted); line-height: 1.4; }
.pcard .btn { margin-top: 8px; padding: 11px 8px; font-size: 14px; background: var(--buy-btn); color: var(--buy-btn-text); box-shadow: none; }
.pcard.sold .ph img { filter: grayscale(0.7); opacity: 0.75; }
.powered { text-align: center; color: var(--muted); font-size: 13px; padding: 18px 0 30px; }
.powered a { color: var(--accent); font-weight: 700; text-decoration: none; }

/* ---------- buyer FAQ ("Good to know") ---------- */
.faqsec { margin: 6px 0 10px; }
.faqsec h2 { font-size: 22px; margin: 0 0 6px; }
.faq-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 16px; margin: 8px 0;
}
.faq-item b { display: block; font-size: 15px; }
.faq-item p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* ---------- seller FAQ editor (settings) ---------- */
.faq-row {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; margin: 10px 0; position: relative;
}
.faq-row .faq-a { margin-top: 8px; min-height: 58px; }
.faq-del { position: absolute; top: 2px; right: 6px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }

.hidden { display: none !important; }
.center { text-align: center; }
.mt { margin-top: 18px; }
.row2 { display: flex; gap: 8px; }
.row2 > * { flex: 1; }

/* ---------- landing: before/after demo ---------- */
.demo-wrap { margin: 6px 0 4px; text-align: center; }
.ba-pills { display: inline-flex; gap: 4px; margin-bottom: 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.ba-pill { border: 0; background: transparent; color: var(--muted); font: 700 13px var(--font-body); padding: 8px 24px; border-radius: 999px; cursor: pointer; transition: background 0.25s, color 0.25s; }
.ba-pill.on { background: var(--accent); color: #fff; }
.demo-phone {
  width: 272px; height: 548px; margin: 0 auto;
  border-radius: 40px; border: 9px solid #2A1E17;
  background: var(--bg); overflow: hidden; position: relative;
  box-shadow: 0 18px 44px rgba(90, 60, 20, 0.22);
  text-align: left;
}
.demo-screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); opacity: 0; transform: translateX(26px); transition: opacity 0.45s ease, transform 0.45s ease; pointer-events: none; }
.demo-screen.on { opacity: 1; transform: none; pointer-events: auto; }
.demo-shophead { text-align: center; padding: 14px 0 2px; }
.demo-shophead b { font-family: var(--font-display); font-size: 17px; display: block; }
.demo-shophead span { font-size: 9px; letter-spacing: 2px; color: var(--muted); font-weight: 700; }
.demo-phone .grid { margin: 8px; }
.demo-phone .pcard .body { padding: 7px 8px 9px; }
.demo-phone .pcard .body b { font-size: 11.5px; }
.demo-phone .pcard .price { font-size: 12px; }
.demo-phone .pcard .details { display: none; }
.demo-phone .pcard .btn { font-size: 10.5px; padding: 8px 4px; margin-top: 6px; }
#baCatalog .pcard:nth-child(2) .ph img { object-position: 75% 25%; }
.ba-tap {
  position: absolute; left: 25%; top: 48%; width: 52px; height: 52px;
  border-radius: 50%; border: 3px solid var(--accent);
  transform: translate(-50%, -50%); pointer-events: none; z-index: 5;
  opacity: 0;
}
.ba-tap.on { animation: baTapPulse 1.1s ease-out infinite; }
@keyframes baTapPulse {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.55); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}
.ba-bridge { background: var(--bg); align-items: center; justify-content: center; text-align: center; padding: 0 26px; }
.ba-bridge-big { font-family: var(--font-display); font-weight: 800; font-size: 27px; line-height: 1.3; color: var(--accent); }
.ba-bridge-small { margin-top: 10px; font-size: 15px; font-weight: 600; color: var(--muted); }
.demo-chathead { background: #075E54; color: #fff; padding: 12px 10px; display: flex; gap: 10px; align-items: center; }
.demo-chathead .back { font-size: 22px; line-height: 1; }
.demo-chathead b { font-size: 13px; display: block; font-family: var(--font-body); }
.demo-chathead small { font-size: 10.5px; opacity: 0.85; }
.demo-chatbody { flex: 1; background: #ECE5DD; padding: 10px 6px; display: flex; flex-direction: column; overflow: hidden; }
.demo-bubble { max-width: 80%; padding: 7px 9px; border-radius: 9px; font-size: 11.5px; line-height: 1.45; margin: 4px 6px; box-shadow: 0 1px 1px rgba(0,0,0,0.15); opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease; }
.demo-bubble.show { opacity: 1; transform: none; }
.demo-out { align-self: flex-end; background: #DCF8C6; border-top-right-radius: 2px; }
.demo-in { align-self: flex-start; background: #ffffff; border-top-left-radius: 2px; }
.demo-photos { display: flex; gap: 5px; margin: 4px 6px; align-self: flex-start; opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease; }
.demo-photos.show { opacity: 1; transform: none; }
.demo-photos span { width: 58px; height: 58px; border-radius: 8px; background-image: url("/img/niche-shoes.jpg"); background-size: cover; box-shadow: 0 1px 1px rgba(0,0,0,0.15); }
.demo-photos .p2 { background-position: 25% 15%; }
.demo-photos .p3 { background-position: 60% 40%; }
.demo-photos .p4 { background-position: 80% 20%; }
.demo-photos .p5 { background-position: 15% 70%; }
.demo-photos .p6 { background-position: 45% 80%; }
.demo-photos .p7 { background-position: 90% 60%; }
.demo-chatinput { background: #F0F0F0; color: #999; font-size: 12px; padding: 11px 12px; }
.ba-progress { height: 10px; max-width: 272px; margin: 14px auto 6px; background: var(--line); border-radius: 999px; cursor: pointer; touch-action: none; }
.ba-progress-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 999px; }
.ba-timer { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.demo-caption { margin: 12px auto 0; max-width: 340px; color: var(--muted); font-size: 14.5px; line-height: 1.5; min-height: 66px; }

/* ---------- landing: niche carousel ---------- */
.niche-wrap { max-width: 360px; margin: 6px auto 0; }
.niche-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none; border-radius: var(--radius);
}
.niche-track::-webkit-scrollbar { display: none; }
.niche-slide { flex: 0 0 100%; scroll-snap-align: center; padding: 4px; box-sizing: border-box; }
.niche-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); text-align: left;
}
.niche-ph { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.niche-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.niche-tag {
  position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.55); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 20px; letter-spacing: 0.4px;
}
.niche-body { padding: 12px 14px 14px; }
.niche-body > b { font-family: var(--font-display); font-size: 17px; display: block; }
.niche-body > small { color: var(--muted); font-size: 12px; }
.niche-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.niche-row .nname { font-size: 13.5px; }
.niche-row .nprice { font-weight: 800; font-size: 13.5px; margin-left: 6px; white-space: nowrap; }
.niche-row .nleft { display: flex; align-items: baseline; min-width: 0; }
.niche-btn {
  background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 8px 12px; border-radius: 10px; white-space: nowrap; flex-shrink: 0;
}
.niche-cap { text-align: center; color: var(--muted); font-size: 14px; line-height: 1.55; margin: 12px auto 0; max-width: 320px; }
.niche-cap b { color: var(--text); }
.niche-dots { display: flex; gap: 8px; justify-content: center; margin: 14px 0 4px; }
.ndot { width: 8px; height: 8px; border-radius: 50%; border: 0; background: var(--line); padding: 0; cursor: pointer; transition: transform 0.2s, background 0.2s; }
.ndot.on { background: var(--accent); transform: scale(1.3); }
