/* House of Paaro: presentation themes ("skins").
   Ivory is the default white luxury look. Pearl adds a fine white leather grain.
   Cognac, Indigo, Ebony and Oxblood are leather grounds with gold stitching.
   Skins only re-map the shared tokens from paaro.css, plus a few card/button rules. */

:root {
  --ground: #FFFFFF;          /* page ground behind the leather tile */
  --card-bg: #FFFFFF;         /* stitched card surface */
  --card-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 22px 50px -32px rgba(14,14,16,.35);
  --stitch: rgba(156, 122, 60, .48);
  --stage: radial-gradient(ellipse 62% 50% at 50% 42%, rgba(255,255,255,1), rgba(246,246,247,1) 70%);
  --badge-bg: #0E0E10;
  --badge-ink: #D6AC5C;
  --radius-card: 14px;
}

/* ---------- Pearl: white leather ---------- */
html[data-skin="pearl"] {
  --ground: #F4F2EE;
  --card-bg: rgba(255,255,255,.88);
  --stage: radial-gradient(ellipse 62% 50% at 50% 42%, rgba(255,255,255,.95), rgba(244,242,238,.6) 72%);
}

/* ---------- Dark leather skins ---------- */
html[data-skin="cognac"], html[data-skin="indigo"], html[data-skin="ebony"], html[data-skin="oxblood"] {
  --ink: #F3EADB;
  --graphite: #D3C5AE;
  --mist: #A89882;
  --line: rgba(214, 172, 92, .24);
  --porcelain: rgba(0, 0, 0, .26);
  --gold: #D6AC5C;
  --card-bg: rgba(14, 9, 6, .74);
  --card-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 28px 70px -30px rgba(0,0,0,.85);
  --stitch: rgba(214, 172, 92, .45);
  --stage: radial-gradient(ellipse 62% 50% at 50% 40%, rgba(255,226,180,.22), transparent 72%), rgba(10,7,5,.32);
  --badge-bg: rgba(10, 7, 5, .78);
  --badge-ink: #D6AC5C;
  color-scheme: dark;
}
/* Legibility on dark leather: brighter secondary text, one step heavier type, and a veil over the hide */
html[data-skin="cognac"], html[data-skin="indigo"], html[data-skin="ebony"], html[data-skin="oxblood"] {
  --ink: #FBF5EA;
  --graphite: #E8DCC8;
  --mist: #C9B89C;
}
html[data-skin="cognac"] body, html[data-skin="indigo"] body,
html[data-skin="ebony"] body, html[data-skin="oxblood"] body {
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
html[data-skin] .btn { text-shadow: none; }
html[data-skin="cognac"] .display, html[data-skin="indigo"] .display,
html[data-skin="ebony"] .display, html[data-skin="oxblood"] .display { font-weight: 400; }
html[data-skin="cognac"] #paaro-leather::after, html[data-skin="indigo"] #paaro-leather::after,
html[data-skin="ebony"] #paaro-leather::after, html[data-skin="oxblood"] #paaro-leather::after {
  content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .22);
}
html[data-skin="cognac"]  { --white: #2E180C; --ground: #5E3219; --indigo: #1E0F07; }
html[data-skin="indigo"]  { --white: #121733; --ground: #1D2450; --indigo: #0B0E22; }
html[data-skin="ebony"]   { --white: #120D0A; --ground: #1E1712; --indigo: #0A0705; }
html[data-skin="oxblood"] { --white: #260B0E; --ground: #4A1418; --indigo: #170507; }

/* Ground + leather tile (tile is generated by theme.js) */
html[data-skin] body { background-color: var(--ground); }
#paaro-leather {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-size: 256px 256px; background-repeat: repeat;
}
html:not([data-skin]) #paaro-leather { display: none; }
html[data-skin="cognac"] body::after, html[data-skin="indigo"] body::after,
html[data-skin="ebony"] body::after, html[data-skin="oxblood"] body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse at 50% 40%, transparent 35%, rgba(0,0,0,.45) 100%);
}

/* Buttons on dark leather: gold solid, cream outline */
html[data-skin="cognac"] .btn-solid, html[data-skin="indigo"] .btn-solid,
html[data-skin="ebony"] .btn-solid, html[data-skin="oxblood"] .btn-solid {
  background: var(--gold); border-color: var(--gold); color: #1A100A;
}
html[data-skin="cognac"] .btn-solid:hover, html[data-skin="indigo"] .btn-solid:hover,
html[data-skin="ebony"] .btn-solid:hover, html[data-skin="oxblood"] .btn-solid:hover { background: #E2BB6E; }

/* ---------- The stitched card (listings, panels) ---------- */
.paaro-card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  outline: 1.5px dashed var(--stitch);
  outline-offset: -9px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
/* Lit plinth for an item photo inside a card */
.paaro-stage {
  position: relative;
  background: var(--stage);
  border-radius: calc(var(--radius-card) - 4px);
  outline: 1.5px dashed var(--stitch);
  outline-offset: -9px;
  display: grid; place-items: center;
  overflow: hidden;
}
.paaro-stage img { filter: drop-shadow(0 26px 24px rgba(0,0,0,.28)); }
.paaro-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 10.5px/1 var(--f-sans); letter-spacing: .16em; text-transform: uppercase;
  background: var(--badge-bg); color: var(--badge-ink);
  padding: 8px 12px; border-radius: 999px;
}
.paaro-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--badge-ink); box-shadow: 0 0 0 3px rgba(214,172,92,.25); }
.paaro-lot { font: 400 11px/1 var(--f-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--mist); }
.paaro-pill {
  display: inline-block; font-size: 13px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--stitch); color: var(--ink); background: rgba(214,172,92,.08);
}

/* ---------- Theme dock ---------- */
.skin-dock {
  position: fixed; z-index: 90;
  left: max(16px, env(safe-area-inset-left, 0px));
  bottom: calc(var(--skin-dock-bottom, 16px) + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 999px;
  background: rgba(14,14,16,.82); color: #F3EADB;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.5);
  font: 500 10px/1 var(--f-sans); letter-spacing: .16em; text-transform: uppercase;
}
.skin-dock .skin-toggle { background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; padding: 4px 6px; cursor: pointer; }
.skin-dock .skin-list { display: flex; gap: 6px; }
.skin-dock[data-open="false"] .skin-list { display: none; }
.skin-dock .sw {
  width: 22px; height: 22px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid rgba(255,255,255,.25);
}
.skin-dock .sw[aria-pressed="true"] { border-color: #D6AC5C; box-shadow: 0 0 0 2px rgba(214,172,92,.35); }
.skin-dock .sw:focus-visible, .skin-dock .skin-toggle:focus-visible { outline: 1px solid #D6AC5C; outline-offset: 2px; }
