:root {
  --brand: #2563eb;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --ok: #059669;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--brand); text-decoration: none; }
.topbar nav a { margin-left: 18px; color: var(--ink); }
.main { padding: 28px 0 60px; }
.footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: .9rem; background: var(--card); margin-top: 40px; }
.flash {
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  padding: 12px 16px; border-radius: var(--radius); margin: 18px 0;
}
.dev-link {
  background: #fefce8; border: 1px solid #fde68a; color: #854d0e;
  padding: 12px 16px; border-radius: var(--radius); margin: 12px 0; word-break: break-all;
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin: 16px 0; }
.product-card h3 { margin: 0 0 6px; }
.card-img { width: 100%; height: 160px; object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.product-gallery { margin: 12px 0; }
.hero-img { max-width: 100%; max-height: 360px; border-radius: var(--radius); display: block; }
.thumb-img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; margin: 6px 6px 0 0; }

/* Lemon Squeezy-style product page */
.ls-page { max-width: 720px; margin: 0 auto; }
.ls-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 28px; box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.ls-media { margin: -26px -28px 22px; border-radius: 14px 14px 0 0; overflow: hidden; background: var(--bg); }
.ls-main { width: 100%; max-height: 470px; object-fit: contain; display: block; background: var(--bg); }
.ls-thumbs { display: flex; gap: 8px; padding: 10px 14px; }
.ls-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.ls-thumb.active { border-color: var(--brand); }
.ls-title { font-size: 1.65rem; margin: 0 0 12px; line-height: 1.25; }
.ls-desc { margin-bottom: 18px; }
.ls-price-row {
  border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 14px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.ls-price { font-size: 1.45rem; font-weight: 700; color: var(--ink); }
.ls-per { font-size: .9rem; color: var(--muted); font-weight: 500; }
.ls-cta .ls-form { display: block; }
.ls-btn {
  display: block; width: 100%; background: var(--brand); color: #fff; border: 0;
  padding: 13px 18px; border-radius: 9px; font-size: 1.05rem; font-weight: 600;
  cursor: pointer; margin-top: 10px;
}
.ls-btn:hover { opacity: .92; text-decoration: none; }
.ls-secure { text-align: center; color: var(--muted); font-size: .8rem; margin: 14px 0 0; }
.ls-powered { text-align: center; color: var(--muted); font-size: .76rem; margin-top: 16px; }
.ls-includes { max-width: 720px; margin: 26px auto 0; }

/* Full-width product page */
.ls-wide { width: 95%; max-width: 1600px; margin: 0 auto; }
.ls-top { display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; align-items: start; margin-top: 6px; }
.ls-media-col .ls-media { margin: 0; border-radius: 12px; }
.ls-media-empty { min-height: 320px; }
.ls-buy {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 24px; position: sticky; top: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.07);
}
.ls-desc-wide { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 22px; }
.ls-desc-wide h2 { margin: 0 0 10px; }
.ls-related { margin-top: 40px; }
.ls-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.ls-related-card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; color: var(--ink);
}
.ls-related-card:hover { border-color: var(--brand); text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.ls-related-card img { width: 100%; height: 170px; object-fit: cover; border-radius: 8px; margin-bottom: 10px; background: var(--bg); }
.ls-rel-placeholder {
  width: 100%; height: 170px; border-radius: 8px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; font-weight: 800; color: var(--brand);
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
}
.ls-rel-name { font-weight: 600; font-size: .92rem; line-height: 1.3; }
.ls-rel-price { color: var(--brand); font-weight: 700; font-size: .88rem; margin-top: 6px; }
.group-cover { width: 100%; max-height: 340px; object-fit: cover; border-radius: 12px; margin-bottom: 18px; }
@media (max-width: 900px) {
  .ls-top { grid-template-columns: 1fr; }
  .ls-buy { position: static; }
}

/* Help / FAQ page */
.help-controls { display: flex; gap: 12px; margin: 18px 0 4px; flex-wrap: wrap; }
.help-controls input[type=search] { flex: 1; min-width: 240px; }
.help-controls select { width: auto; min-width: 180px; }
.help-list { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.help-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.help-item h3 { margin: 6px 0 8px; font-size: 1.05rem; }
.help-item p { margin: 0; }
.help-item .badge { margin-bottom: 6px; }
.price { font-weight: 700; color: var(--brand); }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600;
  background: #eef2ff; color: #4338ca;
}
.badge.ok { background: #ecfdf5; color: var(--ok); }
.badge.warn { background: #fffbeb; color: var(--warn); }
.badge.bad { background: #fef2f2; color: var(--bad); }
.btn {
  display: inline-block; background: var(--brand); color: #fff; border: 0;
  padding: 10px 18px; border-radius: 8px; font-size: .95rem; font-weight: 600; cursor: pointer;
}
.btn:hover { opacity: .9; text-decoration: none; }
.btn.secondary { background: #e5e7eb; color: var(--ink); }
.btn.danger { background: var(--bad); }
.btn.small { padding: 6px 12px; font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: #fff;
}
textarea { min-height: 110px; font-family: Consolas, monospace; font-size: .85rem; }
label { display: block; font-weight: 600; margin: 14px 0 5px; font-size: .9rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.hint { color: var(--muted); font-size: .82rem; margin-top: 4px; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: top; }
th { background: #f1f5f9; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 18px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat b { display: block; font-size: 1.6rem; color: var(--brand); }
.stat span { color: var(--muted); font-size: .85rem; }
.muted { color: var(--muted); }
.asset-list { list-style: none; padding: 0; margin: 12px 0; }
.asset-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 0; }
.admin-nav a { padding: 6px 12px; border-radius: 7px; color: var(--ink); font-size: .88rem; }
.admin-nav a:hover { background: #eef2ff; text-decoration: none; }
.admin-nav .active { background: var(--brand); color: #fff; }
.hero { padding: 36px 0 10px; }
.hero h1 { margin: 0 0 8px; }
.checklist label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.checklist input { width: auto; }
