/* CPvP Network Store
   Layout: centred 1140px column. Top row (website link, logo overlapping the header card,
   currency, Discord), header card, optional sale bar, then content + 300px stats sidebar.
   One accent (CPvP purple) on purple-tinted dark neutrals. Green only means "live / play / money".
   Look: blocky, like the logo. Small radii, hard 3px bottom edges instead of blurred shadows,
   and item pictures sit in sunken inventory slots. No glows, no floating. */
:root {
  /* neutrals, slightly tinted toward the accent */
  --bg: #121015;
  --bg-2: #0e0c11;
  --surface: #1b1820;
  --surface-2: #24202b;
  --surface-3: #2d2835;
  --line: #2f2a37;
  --line-2: #3d3647;
  --fg: #f4f1f8;
  --fg-2: #cbc4d4;
  --muted: #8f879b;

  /* accent */
  --accent: #a547f0;
  --accent-hi: #b968ff;
  --accent-lo: #7c2bc4;
  --accent-edge: #4f1882;
  --accent-ink: #e9d6ff;
  --accent-wash: #241a31;

  /* meaning */
  --green: #5fd13a;
  --green-edge: #2f7a17;
  --green-ink: #0b2104;
  --money: #7fe05a;
  --danger: #ff5f7e;
  --sale: #e0294d;
  --sale-2: #b0217a;

  --f: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 3px;
  --r: 4px;
  --r-lg: 6px;
  --edge-dark: #09080b;
  --shadow: 0 3px 0 var(--edge-dark);
  /* inventory slot: dark inner edge top-left, light bottom-right */
  --slot-bg: #110f14;
  --slot-hi: #2c2733;
  --slot-lo: #060508;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 15px/1.55 var(--f); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
code { font-size: .92em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.slot { background: var(--slot-bg); box-shadow: inset 3px 3px 0 var(--slot-lo), inset -3px -3px 0 var(--slot-hi); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }

.wrap {
  max-width: 1172px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.demo-ribbon {
  background: var(--accent-wash); color: var(--accent-ink); text-align: center; font-size: 12px;
  padding-block: 6px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Buttons: flat face with a short 3D edge, like the logo letters ---------- */
.btn {
  --edge: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border: 0; border-radius: var(--r);
  font: 600 14px/1 var(--f); color: #fff; text-decoration: none; cursor: pointer;
  box-shadow: 0 3px 0 var(--edge);
  transition: background-color .15s, transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-purple { --edge: var(--accent-edge); background: var(--accent); }
.btn-purple:hover { background: var(--accent-hi); }
.btn-green { --edge: var(--green-edge); background: var(--green); color: var(--green-ink); }
.btn-green:hover { background: #6fde49; }
.btn-dark { --edge: #0b0a0d; background: var(--surface-3); color: var(--fg); }
.btn-dark:hover { background: #363040; }
.btn-block { width: 100%; }

/* ---------- Top row ---------- */
.toprow { position: relative; display: flex; justify-content: space-between; align-items: center; height: 62px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); text-decoration: none; font-weight: 500; font-size: 14px; }
.back:hover { color: #fff; }
.logo { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); z-index: 5; width: 270px; display: block; }
.logo img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .35)); }
.toprow-right { display: flex; align-items: center; gap: 18px; }
.cur { display: flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
.cur button { border: 0; background: transparent; color: var(--muted); font: 600 12px/1 var(--f); padding: 7px 10px; border-radius: 2px; cursor: pointer; }
.cur button:hover { color: var(--fg); }
.cur button[aria-pressed="true"] { background: var(--surface-3); color: #fff; }
.top-link { font-weight: 500; font-size: 14px; text-decoration: none; color: var(--fg-2); }
.top-link:hover { color: #fff; }

/* ---------- Header card ---------- */
.hcard {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 22px; margin-top: 10px; box-shadow: var(--shadow);
}
/* server IP: the first thing a player needs, so it gets the left side of the header */
.ip {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0; border: 0; background: none;
  color: inherit; text-align: left; cursor: pointer; font-family: var(--f);
}
.ip-icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; color: var(--accent-hi); border-radius: var(--r-sm); }
.ip-text { display: grid; gap: 3px; min-width: 0; }
.ip-text b { font: 700 19px/1.1 var(--f); letter-spacing: -.01em; }
.ip-text small { font-size: 13px; color: var(--muted); font-weight: 500; }
.ip:hover .ip-icon { color: #fff; }
.ip:hover .ip-text small { color: var(--fg-2); }
.hcard-actions { margin-left: auto; display: flex; gap: 10px; }
.count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: rgba(0, 0, 0, .28); color: #fff; font-size: 11px; font-weight: 700;
}
#loginIcon { display: inline-flex; }
#loginIcon .avatar { width: 20px; height: 20px; border-radius: 4px; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; padding-block: 20px 72px; align-items: start; }
.layout.full { grid-template-columns: minmax(0, 1fr); }
.layout.full .sidebar { display: none; }
/* no stats yet: drop the empty sidebar column */
.layout:not(:has(.panel:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
.sidebar:not(:has(.panel:not([hidden]))) { display: none; }
.content { min-width: 0; display: grid; gap: 16px; align-content: start; }
.label { font: 700 19px/1.2 var(--f); margin: 10px 0 -4px; }
.intro { margin: 4px 0 0; max-width: 60ch; color: var(--fg-2); font-size: 16px; }
.cat-desc { margin: -6px 0 0; color: var(--fg-2); max-width: 60ch; }

/* ---------- Category cards ---------- */
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cat {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 128px; padding: 18px 18px 18px 24px; border-radius: var(--r-lg); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); box-shadow: var(--shadow);
  transition: background-color .15s;
}
.cat:hover { background: var(--surface-2); }
.cat h3 { font: 800 24px/1.1 var(--f); text-transform: uppercase; letter-spacing: .01em; }
.cat span { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--muted); font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; }
.cat span::after { content: "→"; color: var(--accent-hi); transition: transform .15s; }
.cat:hover span::after { transform: translateX(3px); }
.cat-img { flex: none; width: 92px; height: 92px; display: grid; place-items: center; border-radius: var(--r-sm); }
.cat-img img { max-width: 64px; max-height: 64px; object-fit: contain; image-rendering: pixelated; }
.cat-img svg { width: 62px; }

/* ---------- Breadcrumb ---------- */
.page-head { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.page-head .label { margin: 0; font-size: 22px; }
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 15px; }
.crumbs a { text-decoration: none; color: var(--fg-2); }
.crumbs a:hover { color: #fff; }

/* ---------- Product cards ---------- */
.prods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.prod {
  display: grid; grid-template-rows: auto 1fr; gap: 14px; padding: 12px 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.prod-media {
  height: 128px; display: grid; place-items: center; width: 100%; padding: 0; cursor: pointer;
  border: 0; border-radius: var(--r-sm); transition: background-color .15s;
}
.prod-media:hover { background: #16131a; }
.prod-media img { max-height: 80px; max-width: 70%; object-fit: contain; image-rendering: pixelated; }
.prod-media svg { width: 80px; }
.prod-body { display: grid; gap: 12px; padding: 0 4px; align-content: start; grid-template-rows: auto 1fr; }
.prod-body > .prod-price, .prod-body > .qty-slider { align-self: end; }
.prod-name { font: 700 17px/1.25 var(--f); }
.prod-price { font: 700 20px/1 var(--f); font-variant-numeric: tabular-nums; display: flex; gap: 4px 8px; align-items: baseline; flex-wrap: wrap; }
.prod-price s { color: var(--muted); font-size: 13px; font-weight: 400; }
.renew { flex-basis: 100%; font: 500 12px/1.3 var(--f); color: var(--muted); }
.prod-price .renew:first-of-type:last-child { flex-basis: auto; }
.prod-actions { display: flex; align-items: center; gap: 14px; padding-bottom: 3px; }
.prod-actions .btn { flex: 1; }
.prod-actions .link-btn { flex: none; }

/* perk lists: square pixel bullets */
.perks { margin: 0; padding: 0; list-style: none; display: grid; gap: 5px; font-size: 14px; color: var(--fg-2); }
.perks li { position: relative; padding-left: 16px; }
.perks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 6px; height: 6px; background: var(--accent-hi); }
.blurb { margin: 0; font-size: 14px; color: var(--fg-2); }
.link-btn.more { justify-self: start; margin-top: -6px; }

/* quantity slider */
.qty-slider { display: grid; gap: 4px; }
.ticks { position: relative; height: 16px; font-size: 11px; font-weight: 500; color: var(--muted); }
.ticks span { position: absolute; transform: translateX(-50%); }
.range { --p: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 0; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 0; background: linear-gradient(90deg, var(--accent) var(--p), var(--surface-3) var(--p)); }
.range::-moz-range-track { height: 4px; border-radius: 0; background: linear-gradient(90deg, var(--accent) var(--p), var(--surface-3) var(--p)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.range::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.qty-val { text-align: center; color: var(--fg-2); font-weight: 600; font-size: 12px; }

/* ---------- Featured package ---------- */
.feat {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 26px; padding: 14px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.feat-art { align-self: center; aspect-ratio: 1; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; border-radius: var(--r-sm); }
.feat-art:hover { background: #16131a; }
.feat-art img { max-width: 120px; max-height: 120px; image-rendering: pixelated; }
.feat-art svg { width: 120px; }
.feat-text { display: grid; gap: 14px; justify-items: start; align-content: center; min-width: 0; padding: 10px 12px 10px 0; }
.feat-tag { padding: 4px 7px 3px; border-radius: var(--r-sm); background: var(--accent-wash); color: var(--accent-ink); font: 600 12px/1 var(--f); }
.feat-name { font: 800 clamp(24px, 3vw, 32px)/1.08 var(--f); text-transform: uppercase; letter-spacing: -.005em; margin-top: -4px; }
.feat .perks { grid-template-columns: repeat(2, minmax(0, max-content)); column-gap: 32px; }
.feat-buy { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-top: 4px; padding-bottom: 3px; }
.feat-price { font: 700 26px/1 var(--f); display: flex; gap: 4px 10px; align-items: baseline; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.feat-price s { font-size: 15px; font-weight: 400; color: var(--muted); }
.feat-buy .btn { min-width: 200px; }

/* ---------- Sale bar (under the header card) ---------- */
.salebar {
  position: relative; margin-top: 14px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.salebar-inner {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px;
  padding: 22px 24px;
}
.sale-badge {
  padding: 12px 18px; border-radius: var(--r-sm); background: var(--accent); color: #fff;
  font: 800 26px/1 var(--f); letter-spacing: .01em; white-space: nowrap; box-shadow: 0 3px 0 var(--accent-edge, #4f1882);
}
.sale-title { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; }
.sale-title b { font: 800 clamp(22px, 2.6vw, 30px)/1.1 var(--f); text-transform: uppercase; letter-spacing: .01em; }
.sale-title small { color: var(--fg-2); font-size: 14px; }
/* countdown: one dark panel, big numbers, small labels */
.cd {
  display: flex; align-items: flex-start; gap: 18px; padding: 14px 22px 12px;
  background: var(--surface-2); border-radius: var(--r-sm);
}
.cd-unit { display: grid; justify-items: center; gap: 6px; min-width: 40px; }
.cd-unit b { display: block; font: 800 30px/1 var(--f); color: var(--fg); font-variant-numeric: tabular-nums; }
.cd-unit small { font: 700 10px/1 var(--f); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cd-tick { animation: cd-tick .35s ease-out; }
@keyframes cd-tick { from { transform: translateY(-4px); opacity: .3; } }
.cd-soon .cd-unit b { color: #ff8aa0; }


/* ---------- Boxes (login, cart) ---------- */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 44px 24px; box-shadow: var(--shadow); }
.login-box { display: grid; justify-items: center; gap: 18px; text-align: center; padding-block: 48px 44px; }
.login-box h2 { font: 800 26px/1.1 var(--f); }
.login-box > p { margin: -6px 0 6px; color: var(--fg-2); max-width: 46ch; }
.login-inner { width: min(560px, 100%); display: grid; gap: 14px; }
.editions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edition {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 56px;
  border-radius: var(--r); border: 1.5px solid var(--line); background: var(--bg-2); color: var(--fg-2);
  font: 600 15px/1 var(--f); cursor: pointer; transition: border-color .15s, color .15s;
}
.edition:hover { color: #fff; }
.edition[aria-pressed="true"] { border-color: var(--accent); color: #fff; background: var(--accent-wash); }
.login-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.input {
  height: 50px; width: 100%; min-width: 0; padding: 0 16px; border-radius: var(--r);
  border: 1.5px solid var(--line-2); background: var(--bg-2); color: #fff; font: 400 15px var(--f);
}
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--accent); }
.login-row .btn { min-height: 50px; padding: 0 26px; }
.form-error { margin: 0; color: var(--danger); font-size: 13px; }
.form-note { margin: 0; color: var(--muted); font-size: 13px; }
.form-note b { color: var(--fg); }
.logged { display: flex; align-items: center; gap: 14px; justify-content: center; text-align: left; }
.logged .avatar { width: 56px; height: 56px; border-radius: var(--r-sm); }
.logged small, .buyer small { display: block; color: var(--muted); font-size: 13px; }
.logged b { font-size: 20px; }
.logged-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; padding-bottom: 3px; }

.empty-box { display: grid; justify-items: center; gap: 14px; padding: 64px 24px; color: var(--fg-2); }

.cart { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.cart-items { display: grid; gap: 10px; }
.cart-line {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; box-shadow: var(--shadow);
}
.cart-thumb { width: 64px; height: 64px; border-radius: var(--r-sm); display: grid; place-items: center; }
.cart-thumb svg { width: 44px; }
.cart-thumb img { max-width: 48px; max-height: 48px; image-rendering: pixelated; }
.cart-name { font-weight: 600; }
.cart-meta { display: flex; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.cart-price { font-weight: 700; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.stepper button { width: 32px; height: 30px; border: 0; background: var(--surface-3); color: #fff; font-size: 16px; cursor: pointer; }
.stepper button:hover { background: var(--accent); }
.stepper span { min-width: 38px; text-align: center; font-weight: 600; font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: 500 13px var(--f); text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--danger); }

.summary { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; position: sticky; top: 16px; box-shadow: var(--shadow); }
.summary h3 { font-size: 16px; font-weight: 700; }
.code-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.code-form .input { height: 40px; font-size: 14px; }
.code-form .btn { min-height: 40px; padding: 0 14px; font-size: 13px; }
.buyer .link-btn { margin-left: auto; align-self: center; }
.summary .buyer small { text-align: left; font-size: 12px; }
.applied { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--money); }
.applied .link-btn { margin-left: auto; }
.totals { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; color: var(--muted); }
.totals .grand { color: #fff; font-weight: 700; font-size: 18px; }
.summary small { color: var(--muted); text-align: center; font-size: 12px; }

/* ---------- Sidebar ---------- */
.sidebar { display: grid; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
.panel-title { display: flex; align-items: center; gap: 8px; font: 600 14px/1 var(--f); color: var(--fg-2); margin-bottom: 16px; }
.panel-title svg { color: var(--accent-hi); }
.avatar {
  --h: 280; position: relative; flex: none; display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: var(--r-sm); overflow: hidden; background: hsl(var(--h) 35% 30%);
}
.avatar::before { content: attr(data-i); font: 700 14px/1 var(--f); color: hsl(var(--h) 80% 86%); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.top { display: flex; gap: 12px; align-items: center; }
.top .avatar { width: 40px; height: 40px; }
.top-name { font-size: 15px; font-weight: 600; }
.top-amount { font-size: 13px; color: var(--muted); }
.goal-name { font-weight: 600; font-size: 14px; margin: -4px 0 10px; }
.goal-bar { height: 10px; background: var(--slot-bg); box-shadow: inset 2px 2px 0 var(--slot-lo); overflow: hidden; }
.goal-bar span { display: block; height: 100%; background: var(--accent); box-shadow: inset 0 -3px 0 var(--accent-lo); }
.goal-nums { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.recent li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.recent b { font-weight: 500; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent em { margin-left: auto; font-style: normal; color: var(--money); font-weight: 600; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Modal ---------- */
dialog { color: var(--fg); }
dialog::backdrop { background: rgba(6, 4, 9, .78); }
.modal {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0;
  border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface);
  box-shadow: 0 4px 0 var(--edge-dark);
}
.modal-body { position: relative; display: grid; gap: 16px; padding: 24px; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: var(--r-sm); background: var(--surface-3); color: var(--fg-2); font-size: 20px; cursor: pointer; }
.modal-x:hover { color: #fff; }
.pkg-head { display: flex; gap: 16px; align-items: center; padding-right: 40px; }
.pkg-head .prod-media { width: 96px; height: 96px; flex: none; cursor: default; }
.pkg-head .prod-price { margin-top: 8px; }
.pkg-head .renew { flex-basis: auto; }
.pkg-head .prod-media svg { width: 64px; }
.pkg-head h2 { font: 700 21px/1.2 var(--f); }
.pkg-desc { color: var(--fg-2); max-height: 46vh; overflow: auto; }
.pkg-desc ul:not(.perks) { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.pkg-desc .perks { font-size: 15px; gap: 7px; }
.pkg-desc p:first-child { margin-top: 0; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-block: 40px 28px; }
@media (min-width: 761px) { .foot-cols:has(#footSocialCol[hidden]) { grid-template-columns: 1.4fr 1fr; } }
.foot-col h2 { font: 700 16px/1.2 var(--f); margin-bottom: 10px; }
.foot-col p { margin: 0 0 16px; color: var(--fg-2); font-size: 14px; max-width: 46ch; }
.ip-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 3px; }
.online {
  display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 14px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; color: var(--fg-2); font-variant-numeric: tabular-nums;
}
.online b { color: #fff; font-weight: 600; }
.online-dot { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.online-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green);
  opacity: 0; animation: ping 2.4s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
.socials { display: flex; gap: 10px; }
.socials a { width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surface-3); color: var(--fg); }
.socials a:hover { background: var(--accent); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 20px; font-size: 13px; color: var(--muted); }
.foot-bottom p { margin: 0; }
.foot-bottom b { color: var(--fg); font-weight: 600; }
.foot-links { display: flex; gap: 18px; }
.foot-links a { text-decoration: none; color: var(--fg-2); }
.foot-links a:hover { color: #fff; }
.foot-tebex { margin: 0; padding-block: 16px 32px; font-size: 12px; color: var(--muted); }

/* ---------- Misc ---------- */
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 40px 0; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.toasts { position: fixed; z-index: 100; display: grid; gap: 8px; width: min(340px, calc(100vw - 32px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.toast { padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2); border-left: 4px solid var(--accent); box-shadow: 0 3px 0 var(--edge-dark); font-size: 14px; animation: pop .2s ease-out; }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--danger); }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .prods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cart { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .toprow { height: auto; flex-wrap: wrap; padding-block: 12px 0; row-gap: 6px; }
  .logo { position: static; transform: none; order: 3; width: min(250px, 70%); margin: 4px auto -6px; }
  .hcard { padding: 16px; }
  .hcard-actions { margin-left: 0; width: 100%; }
  .ip { width: 100%; }
  .hcard-actions .btn { flex: 1; }
  .cats { grid-template-columns: minmax(0, 1fr); }
  .cat { min-height: 108px; padding: 16px 16px 16px 20px; }
  .cat h3 { font-size: 21px; }
  .cat-img { width: 76px; height: 76px; }
  .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 640px) {
  .feat { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 12px; }
  .feat-art { aspect-ratio: auto; height: 150px; }
  .feat-art img, .feat-art svg { width: 96px; max-height: 96px; }
  .feat-text { padding: 0 6px 6px; }
  .feat .perks { grid-template-columns: minmax(0, 1fr); }
  .feat-buy .btn { flex: 1; }
  .salebar-inner { grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; padding: 18px 16px; }
  .sale-badge { font-size: 18px; padding: 10px 12px; }
  .sale-title { justify-items: start; text-align: left; }
  .cd { grid-column: 1 / -1; justify-content: space-around; }
}
@media (max-width: 520px) {
  .prods { grid-template-columns: minmax(0, 1fr); }
  .login-row { grid-template-columns: minmax(0, 1fr); }
  .login-box h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Smooth item pictures: soft glow, drop shadow, slow float (no square boxes) ---------- */
@keyframes item-float { 50% { transform: translateY(-5px); } }
.cat-img, .feat-art, .prod-media, .cart-thumb {
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent 75%);
  box-shadow: none; border-radius: 50%;
}
.prod-media { border-radius: var(--r-lg); background: radial-gradient(50% 65% at 50% 50%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 80%); }
.prod-media:hover, .feat-art:hover { background-color: transparent; }
.feat-art { border-radius: var(--r-lg); background: radial-gradient(45% 45% at 50% 50%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 80%); }
.cat-img img, .cat-img svg, .feat-art img, .feat-art svg, .prod-media img, .prod-media svg, .cart-thumb img, .cart-thumb svg {
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .55));
  animation: item-float 6s ease-in-out infinite;
}
.cat-img img { max-width: 76px; max-height: 76px; }
.cart-thumb img, .cart-thumb svg { animation: none; }
.cats > :nth-child(even) .cat-img > *, .prods > :nth-child(3n + 2) .prod-media > * { animation-delay: -2s; }
.prods > :nth-child(3n + 3) .prod-media > * { animation-delay: -4s; }
.feat-art img, .feat-art svg, .prod-media img, .prod-media svg { transition: scale .2s; }
.feat-art:hover img, .feat-art:hover svg, .prod-media:hover img, .prod-media:hover svg { scale: 1.06; }

/* round copy-IP icon */
.ip-icon { border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-lo, #5b1897); }
.ip:hover .ip-icon { background: var(--accent-hi); }
@media (prefers-reduced-motion: reduce) {
  .cat-img > *, .feat-art > *, .prod-media > * { animation: none !important; }
}
