/* Site A (Mkhold) — Helios dark plum. Sites B and C do not load this file.
   Class names follow the live catalog (search, sort, cabinet/ledger, price chart). */

:root {
  --bg-page: #0e0b0f;
  --bg-vignette-1: rgba(92, 36, 68, 0.38);
  --bg-vignette-2: rgba(58, 22, 48, 0.28);
  --bg-frame: #161217;
  --bg-card: rgba(26, 20, 24, 0.88);
  --bg-card-solid: #1a1418;
  --bg-elevated: #221c21;
  --bg-pill: rgba(58, 48, 56, 0.85);
  --bg-pill-active: #4a3d47;
  --bg-input: rgba(18, 14, 18, 0.65);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-card: rgba(232, 200, 214, 0.10);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #f3eef1;
  --text-secondary: #9a9096;
  --text-muted: #6e666c;
  --text-pink: #e8a6c8;

  --accent-start: #8a5a7a;
  --accent-end: #5a3a50;
  --accent-pink: #e8a6c8;
  --positive: #7ee08a;
  --positive-dim: rgba(126, 224, 138, 0.14);
  --negative: #e88989;

  --glow-pink: rgba(232, 166, 200, 0.34);
  --radius-frame: 24px;
  --radius-card: 18px;
  --radius-pill: 999px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --shadow-frame: 0 24px 80px rgba(0, 0, 0, 0.5);
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, p, ul { margin: 0; }
a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 40;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
}
.skip:focus { top: 12px; }

.page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px 18px;
  background:
    radial-gradient(ellipse 70% 55% at 18% 0%, var(--bg-vignette-1), transparent 62%),
    radial-gradient(ellipse 55% 45% at 92% 100%, var(--bg-vignette-2), transparent 58%),
    radial-gradient(ellipse 40% 30% at 70% 8%, rgba(120, 50, 90, 0.16), transparent 70%),
    var(--bg-page);
}

.frame {
  max-width: 1600px;
  margin: 0 auto;
  background: linear-gradient(180deg, #1a151a 0%, var(--bg-frame) 40%);
  border-radius: var(--radius-frame);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-frame);
  overflow: hidden;
  min-height: calc(100vh - 32px);
  min-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
}

.topbar, .site-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px 8px;
}

.brand, #brandTitle {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark, .mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: radial-gradient(circle at 35% 30%, rgba(243, 196, 220, 0.28), rgba(90, 58, 80, 0.25));
  box-shadow: 0 0 16px rgba(232, 166, 200, 0.2);
  flex: none;
}
.brand-mark svg, .mark svg { display: block; }

.title, .brand .title, #brandTitle .title {
  font-weight: 750;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.lede {
  padding: 0 22px 4px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.controls { padding: 12px 22px 0; }

.controls-row, .controls .row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search, label.search {
  flex: 1 1 240px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 42px;
  padding: 0 8px 0 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
}

.search .field, #q.field {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font-weight: 500;
}
#q::placeholder { color: var(--text-muted); }
.search-icon { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: rgba(12, 10, 13, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.segmented__btn {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.segmented__btn:hover { color: var(--text); }
.segmented__btn.is-active {
  color: var(--text);
  background: var(--bg-pill-active);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

#sort, #view {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.btn, #refresh.button, #refresh.btn, #backLink, #productLink, .open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  background: linear-gradient(90deg, #c27a9e, #8a5a7a 55%, #6a4460);
  box-shadow: 0 0 0 1px rgba(255, 210, 230, 0.14), 0 6px 20px rgba(232, 166, 200, 0.22);
  border: 0;
}
.btn:hover, .open:hover, #productLink:hover, #refresh:hover { filter: brightness(1.08); }

.open.info-link, #backLink, #refresh.button, #refresh.btn, .btn-ghost {
  background: var(--bg-pill);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
}
.meta b, #status, #count { color: var(--text-secondary); font-weight: 700; }
.status-ok, #status.status-ok { color: var(--positive); }
.status-error { color: var(--negative); }

.notice {
  margin: 12px 22px 0;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  background: rgba(26, 20, 24, 0.55);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
}

.workspace { flex: 1; padding: 14px 22px 8px; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 166, 200, 0.28);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28), 0 0 28px rgba(232, 166, 200, 0.08);
}
.card::after {
  content: "";
  position: absolute;
  left: 12%; right: 12%; bottom: -50%; height: 70%;
  background: radial-gradient(ellipse at center, var(--glow-pink), transparent 70%);
  pointer-events: none;
}
.card > img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  background: #1a1418;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.card-body {
  position: relative;
  z-index: 1;
  padding: 12px 14px 14px;
  display: grid;
  gap: 8px;
}

.price-stack, .price-block { display: grid; gap: 3px; }
.discount-chip, #discountBadge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: rgba(232, 166, 200, 0.16);
  color: var(--text-pink);
  font-size: 11px;
  font-weight: 750;
}
.badge, #currentCost, .price-current {
  display: inline-flex;
  width: fit-content;
  color: var(--positive);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.price-original, #originalCost { color: var(--text-muted); font-size: 12.5px; }
.price-original s, #originalCost s { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.price-lowest, #lowestCost { color: var(--text-secondary); font-size: 12.5px; font-weight: 500; }

.card .text, p.text {
  margin: 0;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions .open { padding: 7px 12px; font-size: 12px; }
.item-id, #productIdCaption { color: var(--text-muted); font-size: 12px; font-weight: 600; }

.empty { padding: 40px 16px; text-align: center; color: var(--text-muted); }
.empty-title { margin: 0 0 6px; color: var(--text); font-size: 16px; }
.empty-body { margin: 0 0 14px; }

.ledger-wrap { overflow-x: auto; }
.ledger, #historySection table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ledger th, #historySection th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.ledger td, #historySection td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: middle;
}
.ledger tr[data-info-url] { cursor: pointer; }
.ledger tr:hover { background: rgba(255, 255, 255, 0.03); }
img.mini {
  width: 64px; height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.site-footer, .footer-note { color: var(--text-muted); font-size: 12px; font-weight: 500; }
.site-footer { padding: 8px 22px 18px; }
.site-footer .footer-note { margin: 0; }

.product-page .page-inner, .wrap.page {
  padding: 16px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status-line { color: var(--text-secondary); font-size: 13px; }
.hidden { display: none !important; }

.product-panel, #content, #historySection {
  position: relative;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
}
#content.card--glow::after {
  content: "";
  position: absolute;
  left: 18%; right: 18%; bottom: -55%; height: 90%;
  background: radial-gradient(ellipse at center, var(--glow-pink), transparent 70%);
  pointer-events: none;
}
.product-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.product-media {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #120e12;
  border: 1px solid rgba(255, 255, 255, 0.07);
}
#image { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-copy { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
#currentCost.lg, .price-current.lg { font-size: 32px; }
#text, .product-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  display: block;
  -webkit-line-clamp: unset;
  white-space: pre-line;
}
.extra, #extraInfoBlock {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  background: rgba(12, 10, 13, 0.4);
}
.extra-k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
#extraInfoText { margin-top: 4px; color: var(--text-secondary); white-space: pre-line; }
#productLink { align-self: flex-start; margin-top: 6px; padding: 11px 22px; }
#historyTitle {
  position: relative;
  z-index: 1;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .page { padding: 0; }
  .frame {
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    border: 0;
  }
  .topbar, .site-header, .controls, .workspace, .site-footer, .lede { padding-left: 14px; padding-right: 14px; }
  .notice { margin-left: 14px; margin-right: 14px; }
  .grid { grid-template-columns: 1fr; }
  .product-layout { grid-template-columns: 1fr; }
  .wrap.page, .product-page .page-inner { padding: 14px 14px 24px; }
  #currentCost.lg, .price-current.lg { font-size: 28px; }
}
@media (max-width: 420px) {
  .actions .open { flex: 1 1 auto; }
}
