/* Data Alchemy . alchemyV53.css
   Revert to V42 dark theme and hero .card. styling,
   plus post-V49 additions: sortable states, home CTA/stats, italic counts, etc. */

/* -------- Tokens (from V42) -------- */
:root{
  --bg:#0b1020;
  --card:#11172d;
  --fg:#e7edf7;
  --muted:#a9b3c7;
  --link:#ffd166;
  --link-hover:#ffe29a;
  --focus:#ffffff;
}

/* -------- Reset / Base -------- */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Inter,Arial,sans-serif;
  background:var(--bg); color:var(--fg);
  padding:2rem; line-height:1.45;
}
img{max-width:100%;height:auto;border:0;display:block}
a, .card a, .hero a{color:var(--link); text-decoration:underline; text-underline-offset:2px}
a:visited{color:var(--link)}
a:hover{color:var(--link-hover); text-decoration-thickness:2px}
a:focus{outline:2px dashed var(--focus); outline-offset:2px}
a.unstyled-link, a.unstyled-link:visited, a.unstyled-link:hover{ color:inherit !important; text-decoration:none !important; }

h1,h2,h3{margin:0 0 .5rem 0}

/* -------- Layout / Cards -------- */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(480px,1fr));gap:1rem;overflow:visible}
.card{
  background:var(--card); border:1px solid rgba(255,255,255,.08);
  border-radius:16px; padding:1rem;
  box-shadow:0 6px 20px rgba(0,0,0,.25); overflow:visible; position:relative;
}
.card img{max-width:100%;height:auto;border-radius:12px;margin:.5rem 0}
.section{margin:0 0 1.25rem 0}

.header{display:flex;align-items:flex-start;gap:1rem;margin-bottom:1rem;flex-wrap:wrap}
.header .title{font-size:1.6rem;font-weight:800}
.header .price{margin-left:auto;font-weight:700;color:#64f0b8}

/* -------- Footer -------- */
.footer{margin-top:1.5rem;color:var(--muted);font-size:.9rem;text-align:center}

/* -------- Hero (reverted to V42 style) -------- */
.mega-title{font-size:2.2rem;font-weight:900;margin:0}
.hero{
  background:var(--card); border:1px solid rgba(255,255,255,.08);
  border-radius:16px; padding:1rem 1rem 1.25rem; margin-bottom:1.25rem;
}
.hero .lead{ display:flex; gap:1rem; align-items:center; flex-wrap:wrap; }
.hero .lead img{ max-width:220px; border-radius:12px }

/* --- Home hero extras (added post-V49) --- */
.hero-home .tagline{ margin:.25rem 0 .5rem; color:var(--muted); font-size:1.1rem }
.cta-row{ margin-top:.25rem }
.cta-row .cta{
  display:inline-block; background:var(--link); color:#231b00;
  text-decoration:none; padding:.55rem .85rem; border-radius:10px; font-weight:700;
}
.cta-row .cta:hover{ background:var(--link-hover); color:#231b00; text-decoration:none }
.hero-home .stats{ margin-top:.5rem; color:var(--muted) }

/* -------- Galleries / Counts -------- */
.gallery{display:flex;flex-wrap:wrap;gap:.5rem;margin:.5rem 0; align-items:center}
.gallery a{white-space:nowrap}
.gallery .count{
  font-size:.9em; color:var(--muted); margin-left:.35rem;
  font-style:italic; /* requirement: italic & *not* a link */
  pointer-events:none;
}

/* -------- Zoom -------- */
.zoom-wrap{position:relative; display:inline-block}
.zoom-pop{
  display:none; position:absolute; left:100%; top:0; margin-left:10px;
  max-width:600px; max-height:80vh; border-radius:12px;
  box-shadow:0 14px 34px rgba(0,0,0,.5); z-index:1000; background:#000;
}
.zoom-wrap:hover .zoom-pop{ display:block }

/* -------- Facts -------- */
.facts2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-column-gap:1rem;grid-row-gap:.35rem;margin-top:.5rem}
.fact{display:flex;gap:.35rem}
.fact .k{color:var(--muted);min-width:120px;white-space:nowrap}
.fact .v{flex:1}

/* -------- Tables (sortable) -------- */
table.sortable{width:100%;border-collapse:collapse;border:1px solid rgba(255,255,255,.08); background:transparent}
table.sortable th, table.sortable td{
  border-bottom:1px solid rgba(255,255,255,.08); padding:.45rem .55rem; text-align:left; vertical-align:top
}
table.sortable th{
  background:rgba(255,255,255,.05); cursor:pointer; user-select:none; position:relative;
}
tbody tr:hover{ background:rgba(255,255,255,.03) }

/* indicator + states (post-V49 sorter) */
.sort-indicator{
  display:inline-block; width:0; height:0; margin-left:6px;
  border-left:5px solid transparent; border-right:5px solid transparent;
  border-top:6px solid var(--muted);
  transform:translateY(2px);
}
.sortable th.sorted-asc .sort-indicator{
  border-top-color:var(--link); transform:rotate(180deg) translateY(-2px);
}
.sortable th.sorted-desc .sort-indicator{
  border-top-color:var(--link);
}

/* Specific sections from V42 */
#allprice-wrap{margin-top:.75rem}
#allprice-table tbody tr:nth-child(3n+1){background:rgba(255,255,255,.03)}
#allprice-table tbody tr:nth-child(3n+2){background:rgba(255,255,255,.06)}
#allprice-table tbody tr:nth-child(3n+3){background:rgba(255,255,255,.09)}
#allprice-table .thumb{width:28px;height:auto;border-radius:4px}

#attrs-wrap{margin-top:.75rem}
#attrs-table tbody tr:nth-child(3n+1){background:rgba(255,255,255,.03)}
#attrs-table tbody tr:nth-child(3n+2){background:rgba(255,255,255,.06)}
#attrs-table tbody tr:nth-child(3n+3){background:rgba(255,255,255,.09)}
#attrs-table colgroup col.kcol{width:25%}
#attrs-table colgroup col.vcol{width:75%}

