/* =========================================================
   Kharan Studio — Tebex webstore, v6 design
   Same look as kharanstudio.com. Loaded last, after shared.css
   and generic.css. Tebex's own logic (main.js) is untouched:
   this file only restyles it.
   Template classes are prefixed "k6-" so they never clash
   with Tebex's (.actions, .popup, .basket…).
   ========================================================= */

@font-face {
  font-family: "Marston";
  src: local("Marston"), url("https://kharanstudio.com/assets/fonts/Marston.otf") format("opentype");
  font-display: swap;
}

html:root {
  --ink: #0c0a0b;
  --ink-2: #141113;
  --ink-3: #1d191b;
  --paper: #f1ebe3;
  --muted: #a69c95;
  --muted-2: #6f6660;
  --line: rgba(241, 235, 227, .10);
  --line-2: rgba(241, 235, 227, .20);
  --accent: #c8202c;
  --accent-hi: #e1323e;
  --on-accent: #fff;
  --ok: #3ccf7a;

  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --brand: "Marston", var(--display);

  --wrap: min(100% - 40px, 1440px);
  --head: 60px;
  --r: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Tebex theme variables → v6 palette */
  --color-text: var(--paper);
  --color-text-darker: #e2d9cf;
  --color-text-secondary: var(--muted);
  --color-text-dark: var(--ink);
  --color-bg: var(--ink);
  --color-brighter-bg: var(--ink-2);
  --color-primary: var(--accent);
  --color-primary-hover: var(--accent-hi);
  --color-primary-text: var(--on-accent);
  --color-primary-text-hover: var(--on-accent);
  --color-secondary: var(--ink-3);
  --color-secondary-hover: #2a2427;
  --color-secondary-text: var(--paper);
  --color-secondary-text-hover: var(--paper);
  --color-tertiary: transparent;
  --color-tertiary-hover: var(--ink-3);
  --color-tertiary-text: var(--paper);
  --color-removed: var(--accent);
  --color-sale-banner-bg: var(--accent);
  --color-sale-banner-text: var(--on-accent);
  --btn-size: 44px;
  --tebex-legal-footer-background-color: var(--ink);
  --tebex-legal-footer-border-color: var(--line);
  --tebex-legal-footer-text-color: var(--muted-2);
  --bg-image: none;
  color-scheme: dark;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + 56px); background: var(--ink); }
html body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  background-image: none;
  color: var(--paper);
  font: 400 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body .site { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-height: calc(100vh - var(--tebex-footer-height)); max-width: none; padding: 0; margin: 0; background: none; font-size: 15px; }
body a { color: inherit; }
body :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body img { max-width: 100%; }
body button, body input, body select, body textarea { font-family: var(--body); }

.k6-wrap { width: var(--wrap); margin-inline: auto; }
.k6-narrow { max-width: 820px; }
.k6-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.k6-main { flex: 1; }

/* ---------- buttons ---------- */
.k6-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r);
  font: 600 14px/1 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.k6-btn svg { flex: none; }
.k6-btn--accent { background: var(--accent); color: var(--on-accent); }
.k6-btn--accent:hover { background: var(--accent-hi); color: var(--on-accent); }
.k6-btn--line { border-color: var(--line-2); background: transparent; color: var(--paper); }
.k6-btn--line:hover { border-color: var(--paper); }
.k6-btn--done { background: transparent; border-color: rgba(60, 207, 122, .45); color: var(--ok); }
.k6-btn--done:hover { border-color: var(--ok); }
.k6-btn--sm { height: 34px; padding: 0 12px; font-size: 13px; }
.k6-btn--icon { width: 44px; padding: 0; }
/* Tebex marks packages "not purchasable" while logged out; main.js then asks to log in, so keep the button usable */
body .k6-btn[disabled] { opacity: 1; pointer-events: auto; cursor: pointer; }
.k6-btn[hidden] { display: none; }

.k6-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex: none; }
.k6-dot--live { background: var(--ok); box-shadow: 0 0 0 3px rgba(60, 207, 122, .18); }

/* Tebex's own buttons (basket, forms, popups) in the v6 style */
body .btn-primary, body .btn-secondary, body .btn-tertiary, body .button, body input[type="submit"] {
  border-radius: var(--r); font-family: var(--body); font-weight: 600; font-size: 14px; letter-spacing: 0; text-transform: none;
}
body .btn-primary { background: var(--accent); color: var(--on-accent); }
body .btn-primary:hover, body .btn-primary:focus-visible { background: var(--accent-hi); color: var(--on-accent); }
body .btn-secondary { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); }
body .btn-secondary:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--paper); }

/* ---------- promo (Tebex "sale banner" setting) ---------- */
.k6-promo.site-sale-banner, .k6-promo { width: 100%; max-width: none; border-radius: 0; margin: 0; padding: 0; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.k6-promo__in { width: var(--wrap); margin-inline: auto; min-height: 34px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px 0; }

/* ---------- header ---------- */
body .k6-top {
  position: sticky; top: 0; z-index: 900;
  width: 100%; max-width: none; margin: 0; padding: 0; height: auto; min-height: 0;
  background: rgba(12, 10, 11, .86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.k6-top.is-scrolled { border-bottom-color: var(--line); }
.k6-top__in { width: var(--wrap); margin-inline: auto; height: var(--head); display: flex; align-items: center; gap: 20px; }

.k6-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; color: var(--paper); }
.k6-brand img { width: 34px; height: 34px; object-fit: contain; }
.k6-brand__name { font-family: var(--brand); font-size: 19px; letter-spacing: .02em; line-height: 1; }

.k6-nav { display: flex; gap: 2px; margin-left: 8px; }
.k6-nav a { padding: 8px 10px; border-radius: var(--r); color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.k6-nav a:hover { color: var(--paper); background: var(--ink-2); }

.k6-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
body .k6-act {
  position: relative;
  height: 36px; width: auto; min-width: 0; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; margin: 0;
  border: 1px solid var(--line); border-radius: var(--r); background: transparent; box-shadow: none;
  color: var(--paper); font: 500 14px/1 var(--body); text-decoration: none; text-transform: none; white-space: nowrap; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
body .k6-act:hover { border-color: var(--line-2); background: transparent; color: var(--paper); }
.k6-act--account { max-width: 190px; }
.k6-act__label { display: grid; overflow: hidden; }
.k6-act__label > span { grid-area: 1 / 1; overflow: hidden; text-overflow: ellipsis; transition: opacity .15s; }
.k6-act__hover { opacity: 0; }
.k6-act--account.is-connected svg { color: var(--ok); }
.k6-act--account.is-connected:hover .k6-act__name { opacity: 0; }
.k6-act--account.is-connected:hover .k6-act__hover { opacity: 1; }
.k6-act__count {
  min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center;
  border-radius: 10px; background: var(--ink-3); color: var(--muted); font-size: 12px; font-weight: 700;
}
.k6-act__count.is-active { background: var(--accent); color: var(--on-accent); }
body .k6-act--site { background: var(--paper); color: var(--ink); border-color: var(--paper); font-weight: 600; }
body .k6-act--site:hover { background: #fff; color: var(--ink); border-color: #fff; }
.k6-burger { display: inline-flex; flex-direction: column; gap: 5px; }
.k6-burger span { display: block; width: 16px; height: 1.5px; background: currentColor; }

/* ---------- category drawer (Tebex navigation) ---------- */
body .site-navigation.k6-drawer {
  position: fixed; inset: 0; z-index: 950;
  display: block; width: auto; height: auto; margin: 0; padding: 0;
  background: rgba(0, 0, 0, .6); border: 0; overflow: hidden;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s, visibility 0s .25s;
}
body.show-navigation .site-navigation.k6-drawer { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .25s; }
body.show-navigation { overflow: hidden; }
.k6-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(380px, 100%); overflow-y: auto;
  display: flex; flex-direction: column;
  background: var(--ink); border-left: 1px solid var(--line);
  transform: translateX(16px); transition: transform .3s var(--ease);
}
body.show-navigation .k6-drawer__panel { transform: none; }
.k6-drawer__head { display: flex; align-items: center; justify-content: space-between; height: var(--head); padding: 0 12px 0 20px; border-bottom: 1px solid var(--line); flex: none; }
.k6-drawer__head strong { font: 800 22px/1 var(--display); text-transform: uppercase; }
body .site-navigation .k6-drawer__close {
  position: static;
  width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r); background: transparent; color: var(--paper); font-size: 0; cursor: pointer;
}
body .site-navigation .k6-drawer__close:hover { border-color: var(--line-2); }
body .site-navigation .k6-drawer__close::before, body .site-navigation .k6-drawer__close::after { display: none; }
body .site-navigation.k6-drawer .k6-drawer__list {
  position: static; inset: auto; translate: none !important; scale: none !important; opacity: 1 !important;
  list-style: none; margin: 0; padding: 8px 12px; display: block; background: none; line-height: 1.4; font-size: 15px;
}
body .site-navigation .k6-drawer__list > li { position: relative; width: auto; display: block; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
body .k6-drawer__list li::before, body .k6-drawer__list li::after { display: none; }
body .site-navigation .k6-drawer__link { display: block; padding: 12px 44px 12px 8px; color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: none; background: none; }
body .k6-drawer__link:hover, body .k6-drawer__link.is-active { color: var(--paper); }
.k6-drawer__link.is-active { box-shadow: inset 2px 0 0 var(--accent); }
body .site-navigation .k6-drawer__list > li > .k6-drawer__link::first-letter { text-transform: uppercase; }
body .site-navigation .k6-drawer__toggle {
  position: absolute; top: 6px; right: 0; width: 36px; height: 36px; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: var(--r); background: transparent; color: var(--muted); font-size: 0; cursor: pointer;
}
body .site-navigation .has-children .k6-drawer__toggle::before, body .site-navigation .has-children .k6-drawer__toggle::after { display: none; }
body .site-navigation .k6-drawer__toggle:hover { color: var(--paper); background: var(--ink-2); }
.k6-drawer__toggle svg { transition: transform .2s; }
body .k6-drawer__list .expanded > .k6-drawer__toggle svg { transform: rotate(180deg); }
body .site-navigation .k6-drawer__sub { list-style: none; margin: 0; padding: 0 0 10px 8px; display: none; }
body .k6-drawer__list .expanded > .k6-drawer__sub { display: block; }
body .site-navigation .k6-drawer__sub .k6-drawer__link { padding: 7px 8px; font-size: 14px; font-weight: 500; }
.k6-drawer__more { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 16px 20px 24px; border-top: 1px solid var(--line); }
.k6-drawer__more a { padding: 8px 0; color: var(--muted); font-size: 14px; text-decoration: none; }
.k6-drawer__more a:hover { color: var(--paper); }

/* ---------- hero ---------- */
.k6-hero {
  position: relative; overflow: hidden; isolation: isolate;
  width: var(--wrap); margin: 16px auto 0;
  min-height: clamp(430px, 60vh, 560px);
  border-radius: 8px; background: #1a0e0d;
  display: flex;
}
.k6-hero__bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center 35%; }
.k6-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(12, 10, 11, .94) 0%, rgba(12, 10, 11, .72) 42%, rgba(12, 10, 11, .18) 100%),
              linear-gradient(0deg, rgba(12, 10, 11, .7), transparent 40%);
}
.k6-hero__layout {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: end;
  gap: clamp(24px, 3vw, 52px); padding: clamp(24px, 4vw, 52px);
}
.k6-hero__game { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--muted); font-size: 14px; font-weight: 500; }
.k6-hero__title {
  margin: 0; color: var(--paper);
  font: 900 clamp(52px, 7.4vw, 116px)/.86 var(--display);
  text-transform: uppercase; letter-spacing: -.005em; text-wrap: balance;
}
.k6-hero__lead { margin: 18px 0 0; max-width: 52ch; color: #d8cfc6; font-size: 17px; line-height: 1.5; }
.k6-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.k6-hero__facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 28px 0 0; padding: 18px 0 0; list-style: none; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.k6-hero__facts li { margin: 0; padding: 0; }
.k6-hero__facts li::before { display: none; }
.k6-hero__facts b { color: var(--paper); font-weight: 600; }
.k6-hero__media { margin: 0; align-self: center; }
.k6-video { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000; border: 1px solid var(--line-2); box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }
.k6-video > div, .k6-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.k6-hero__now { display: flex; align-items: baseline; gap: 10px; min-width: 0; margin-top: 10px; font-size: 14px; }
.k6-hero__now span { flex: none; color: var(--muted); }
.k6-hero__now a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; text-decoration: none; }
.k6-hero__now a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- towns ---------- */
.k6-towns {
  width: var(--wrap); margin: 6px auto 0;
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px;
}
.k6-town {
  position: relative; isolation: isolate; overflow: hidden;
  height: 92px; padding: 0 12px 10px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 6px; background: var(--ink-3);
  color: var(--paper); text-align: left; text-decoration: none;
  transition: border-color .2s;
}
.k6-town img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .5s var(--ease), filter .3s; filter: saturate(.85) brightness(.85); }
.k6-town::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 10, 11, 0) 20%, rgba(12, 10, 11, .88) 100%); }
.k6-town:hover { border-color: var(--line-2); color: var(--paper); }
.k6-town:hover img { transform: scale(1.06); filter: saturate(1) brightness(.95); }
.k6-town[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.k6-town__name { font: 800 19px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.k6-town__n { margin-top: 3px; color: #cfc6bd; font-size: 12px; }
.k6-town__n:empty { display: none; }

/* ---------- store ---------- */
.k6-store { padding: 44px 0 64px; }
.k6-store__head { display: flex; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.k6-store__title { margin: 0; color: var(--paper); font: 800 clamp(32px, 3.4vw, 46px)/.95 var(--display); text-transform: uppercase; letter-spacing: 0; }
.k6-store__title span { color: var(--accent); }
.k6-store__status { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.k6-store__tools { margin-left: auto; display: flex; gap: 8px; }

.k6-search { position: relative; display: flex; align-items: center; margin: 0; }
.k6-search svg { position: absolute; left: 11px; color: var(--muted-2); pointer-events: none; }
body .k6-search input, body .k6-sort select {
  height: 38px; margin: 0; border: 1px solid var(--line); border-radius: var(--r); background-color: var(--ink-2);
  color: var(--paper); font: 400 14px var(--body); outline: none; box-shadow: none;
}
body .k6-search input { width: 240px; padding: 0 12px 0 34px; }
.k6-search input::placeholder { color: var(--muted-2); }
body .k6-sort select { padding: 0 32px 0 12px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a69c95' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
body .k6-search input:focus, body .k6-sort select:focus { border-color: var(--accent); }

.k6-cats {
  position: sticky; top: var(--head); z-index: 20;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -2px; padding: 8px 2px;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}
.k6-cats::-webkit-scrollbar { display: none; }
.k6-cat {
  flex: none; height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px;
  border: 0; border-radius: var(--r); background: transparent; color: var(--muted);
  font: 600 14px/1 var(--body); text-decoration: none; cursor: pointer;
}
.k6-cat:hover { color: var(--paper); background: var(--ink-2); }
.k6-cat__n { color: var(--muted-2); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.k6-cat[aria-selected="true"] { color: var(--paper); background: var(--ink-3); box-shadow: inset 0 -2px 0 var(--accent); }

.k6-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0 0; }
.k6-chip { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 15px; background: transparent; color: var(--muted); font: 500 13px/1 var(--body); cursor: pointer; }
.k6-chip span { color: var(--muted-2); margin-left: 2px; }
.k6-chip:hover { color: var(--paper); border-color: var(--line-2); }
.k6-chip[aria-pressed="true"] { color: var(--paper); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

.k6-grid {
  display: grid; gap: 14px; margin-top: 16px;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
}

/* card (home catalogue + category pages) */
body .k6-grid .k6-item, body .k6-item {
  text-align: left;
  display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0;
  border: 1px solid var(--line); border-radius: 6px; background: var(--ink-2); overflow: hidden; box-shadow: none;
}
.k6-item__media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--ink-3); overflow: hidden; }
.k6-item__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.k6-item:hover .k6-item__media img { transform: scale(1.035); }
.k6-item__ph { position: absolute; inset: 0; display: grid; place-items: center; font: 800 28px var(--display); color: var(--muted-2); }
.k6-item__countdown { position: absolute; left: 8px; top: 8px; padding: 4px 8px; border-radius: 3px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600; }
.k6-item__body { display: flex; flex-direction: column; flex: 1; padding: 12px 14px 14px; }
.k6-item__cat { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
body .k6-item__name { margin: 0; color: var(--paper); font: 600 15px/1.3 var(--body); text-transform: none; letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k6-item__name a { text-decoration: none; }
.k6-item__name a:hover { text-decoration: underline; text-underline-offset: 3px; }

.k6-item--ghost .k6-item__media { animation: k6pulse 1.4s ease-in-out infinite; }
.k6-item--ghost .k6-item__body span { display: block; height: 12px; margin: 4px 0 8px; border-radius: 2px; background: var(--ink-3); width: 40%; }
.k6-item--ghost .k6-item__body span + span { width: 80%; height: 16px; }
@keyframes k6pulse { 50% { opacity: .5; } }

.k6-empty { grid-column: 1 / -1; padding: 48px 20px; border: 1px dashed var(--line-2); border-radius: 6px; text-align: center; color: var(--muted); }
.k6-empty p { margin: 0 0 14px; }
.k6-empty__cta { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ---------- price + buy block (package-actions.twig) ---------- */
.k6-price { font: 800 22px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--paper); }
.k6-price.is-free { color: var(--ok); }
body .k6-buy {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin: 0; padding: 0; background: none; border: 0;
}
.k6-buy__price { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.k6-buy__was { color: var(--muted-2); font-size: 14px; }
.k6-buy__note { color: var(--muted); font-size: 13px; }
.k6-buy__cta { display: flex; align-items: center; gap: 6px; }
.k6-buy--compact { margin-top: auto; padding-top: 14px; }
.k6-buy--compact .k6-btn { height: 34px; padding: 0 12px; font-size: 13px; }
.k6-buy--compact .k6-btn--icon { width: 34px; padding: 0; }
body .store-product .k6-buy { overflow: visible; }

.k6-qty { display: inline-flex; align-items: stretch; height: 34px; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.k6-qty[hidden] { display: none; }
.k6-buy:not(.k6-buy--compact) .k6-qty { height: 44px; }
body .k6-qty__btn, body .k6-qty__label {
  display: grid; place-items: center; min-width: 32px; height: 100%; margin: 0; padding: 0 8px;
  border: 0; border-radius: 0; background: transparent; color: var(--paper); font: 600 14px/1 var(--body); cursor: pointer;
}
body .k6-qty__btn::before, body .k6-qty__btn::after { display: none; }
body .k6-qty__btn:hover { background: var(--ink-3); }
body .k6-qty__label { color: var(--ok); font-size: 13px; white-space: nowrap; }
body .k6-qty__input {
  width: 34px; height: 100%; margin: 0; padding: 0; border: 0; border-inline: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--paper); text-align: center; font: 600 14px var(--body); -moz-appearance: textfield; appearance: textfield;
}
.k6-qty__input::-webkit-outer-spin-button, .k6-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* order: label first, then − qty + */
.k6-qty__label { order: -1; border-right: 1px solid var(--line) !important; }

/* ---------- studio ---------- */
.k6-studio { padding: 56px 0 64px; border-top: 1px solid var(--line); background: var(--ink-2); }
.k6-studio__in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.k6-studio__title { margin: 0; color: var(--paper); font: 800 clamp(32px, 3.2vw, 46px)/.95 var(--display); text-transform: uppercase; text-wrap: balance; }
.k6-studio__copy > p { margin: 14px 0 0; color: var(--muted); max-width: 52ch; }
.k6-studio__yt { display: inline-block; margin-top: 18px; color: var(--paper); font-size: 14px; font-weight: 600; text-underline-offset: 3px; }
.k6-studio__yt:hover { color: var(--accent-hi); }
.k6-facts { margin: 0; border-top: 1px solid var(--line); }
.k6-facts div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.k6-facts dt { font-weight: 600; }
.k6-facts dd { margin: 0; color: var(--muted); }
.k6-facts dd a { color: var(--paper); text-underline-offset: 3px; white-space: nowrap; }
.k6-facts dd a:hover { color: var(--accent-hi); }
.k6-cms { padding: 32px 0 48px; }

/* ---------- inner pages (category, package, CMS) ---------- */
.k6-page { padding: 28px 0 64px; }
.k6-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.k6-back:hover { color: var(--paper); }
.k6-pagehead { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.k6-pagehead__row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px 24px; }
.k6-pagehead__title { margin: 0; color: var(--paper); font: 900 clamp(40px, 5vw, 72px)/.9 var(--display); text-transform: uppercase; letter-spacing: 0; }
.k6-pagehead__count { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.k6-pagehead__desc { margin-top: 14px; max-width: 75ch; color: var(--muted); }

/* package page + package popup share these */
:is(.k6-pkg, .store-product-popup-content) {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr); gap: 20px 32px; align-items: start;
}
body .k6-pkg { margin: 0; padding: 0; background: none; max-width: none; }
:is(.k6-pkg, .store-product-popup-content) .k6-pkg__media { min-width: 0; }
:is(.k6-pkg, .store-product-popup-content) .k6-pkg__media > .image { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--ink-3); }
.k6-pkg__ph { display: grid !important; place-items: center; font: 800 40px var(--display); color: var(--muted-2); }
:is(.k6-pkg, .store-product-popup-content) .k6-pkg__side { position: sticky; top: calc(var(--head) + 16px); display: flex; flex-direction: column; gap: 18px; }
body .k6-pkg__title { margin: 0; padding: 0; color: var(--paper); font: 900 clamp(34px, 3.6vw, 52px)/.92 var(--display); text-transform: uppercase; letter-spacing: 0; text-wrap: balance; }
.k6-pkg__countdown { display: inline-block; margin-top: 10px; padding: 4px 8px; border-radius: 3px; background: var(--accent); color: var(--on-accent); font: 600 12px/1.2 var(--body); vertical-align: middle; }
:is(.k6-pkg, .store-product-popup-content) .k6-buy {
  position: relative !important; bottom: auto; order: 0; margin: 0; padding: 16px 0;
  background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-block: 1px solid var(--line);
}
:is(.k6-pkg, .store-product-popup-content) .k6-buy .k6-price { font-size: 34px; }
:is(.k6-pkg, .store-product-popup-content) .k6-buy__cta { flex: 1 1 auto; justify-content: flex-end; }
:is(.k6-pkg, .store-product-popup-content) .k6-buy .add, :is(.k6-pkg, .store-product-popup-content) .k6-buy .subscribe { flex: 1 1 auto; max-width: 260px; }
.k6-pkg__trust { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.k6-pkg__trust li { position: relative; margin: 0; padding: 4px 0 4px 18px; }
.k6-pkg__trust li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
:is(.k6-pkg, .store-product-popup-content) .k6-pkg__descr { grid-column: 1; min-width: 0; margin: 0; padding-top: 4px; color: #d8cfc6; }

/* media slider (several images/videos on a package) */
body .media-slider { position: relative; margin: 0; border-radius: 6px; overflow: hidden; }
body .media-slider .slider { border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #000; }
body .media-slider .slider::part(container) { --swiper-theme-color: var(--paper); --swiper-navigation-size: 28px; }
body .media-slider .thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 0; padding: 0; list-style: none; }
body .media-slider .thumb { width: 84px; height: 54px; margin: 0; padding: 0; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); opacity: .55; cursor: pointer; background: var(--ink-3); }
body .media-slider .thumb.active, body .media-slider .thumb:hover { opacity: 1; border-color: var(--line-2); }
body .media-slider .thumb img { width: 100%; height: 100%; object-fit: cover; }
body .media-slider .open-lightbox { position: absolute; right: 8px; top: 8px; z-index: 2; height: 30px; padding: 0 10px; border: 0; border-radius: var(--r); background: rgba(12, 10, 11, .75); color: var(--paper); font: 600 12px/30px var(--body); }

/* rich text from Tebex (package descriptions, CMS pages, forms) */
body .text-content { color: #d8cfc6; font-size: 15px; line-height: 1.65; }
body .text-content :is(h1, h2, h3, h4) { color: var(--paper); font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: 0; line-height: 1; margin: 1.4em 0 .5em; }
body .text-content h1 { font-size: 44px; margin-top: 0; }
body .text-content h2 { font-size: 30px; }
body .text-content h3 { font-size: 22px; }
body .text-content h4 { font-size: 18px; }
body .text-content p { margin: 0 0 1em; }
body .text-content a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
body .text-content a:hover { color: var(--accent-hi); }
body .text-content img { height: auto; border-radius: 6px; }
body .text-content ul, body .text-content ol { padding-left: 1.2em; }
body .text-content li { margin: .2em 0; }
body .text-content hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
body .text-content iframe { max-width: 100%; border-radius: 6px; }
body .text-content code { padding: 1px 5px; border-radius: 3px; background: var(--ink-3); font-size: .92em; }
body .text-content table { border-collapse: collapse; }
body .text-content :is(td, th) { padding: 6px 10px; border: 1px solid var(--line); }

/* generic Tebex pages (options, login, quote, tiered) */
body .site-content {
  width: var(--wrap); max-width: none; margin: 0 auto; padding: 32px 0 64px; flex: 1;
  background: none;
}
body .site-content > main { margin: 0 auto; max-width: 640px; padding: 28px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; }
body .site-content > main.store-category-tiered { max-width: none; background: none; border: 0; padding: 0; }
body .product-title { color: var(--paper); font: 800 32px/1 var(--display); text-transform: uppercase; letter-spacing: 0; }
body .store-form .field { margin: 0 0 16px; }
body .store-form p { color: var(--muted); }
body input[type="text"], body input[type="number"], body input[type="email"], body input[type="password"], body select, body textarea {
  border-radius: var(--r); border: 1px solid var(--line); background-color: var(--ink); color: var(--paper); font-family: var(--body);
}
body .popup .store-form :is(input[type=text], input[type=password], input[type=email], input[type=number], select, textarea) { background: var(--ink); }
body :is(input, select, textarea):focus { border-color: var(--accent); outline: none; }

/* tiered categories */
body .store-products-tiered { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
body .store-product-tiered { padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--ink-2); }
body .store-product-tiered.subscribed { border-color: var(--accent); }

/* ---------- popups (package, login, options) ---------- */
body .popup { background-color: rgba(0, 0, 0, .62); scrollbar-color: var(--ink-3) transparent; }
body .popup.may-close { background-color: rgba(0, 0, 0, .4); }
body .popup-content {
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}
body .store-product-popup-content { max-width: 1080px; padding: 28px; }
body .store-product-popup-content .k6-pkg__side { top: 0; position: static; }
body .popup-close {
  top: 10px; right: 10px; z-index: 5; width: 36px; height: 36px; opacity: 1;
  border: 1px solid var(--line); border-radius: var(--r); background: rgba(12, 10, 11, .8);
}
body .popup-close::before { background-color: var(--paper); mask-size: 16px; }
body .popup-close:hover { background: var(--ink-2); border-color: var(--line-2); }
body .login-popup-content, body .product-options-popup .popup-content { padding: 28px; }

/* ---------- basket drawer ---------- */
body .basket-popup-content { background: var(--ink); border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: -30px 0 80px rgba(0, 0, 0, .5); }
body .basket .basket-header {
  padding: 0 64px 0 22px; height: var(--head); min-height: var(--head);
  background: var(--ink); border-bottom: 1px solid var(--line);
  font: 800 24px/1 var(--display); text-transform: uppercase;
}
body .basket .basket-title { font: inherit; text-transform: inherit; }
body .basket .basket-title::before { width: 22px; height: 22px; background-color: var(--muted); }
body .basket .basket-second-header { padding: 10px 22px; background: var(--ink-2); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
body .basket .basket-second-header .k6-price { font-size: 18px; }
body .basket .basket-items { gap: 8px; padding: 14px 16px; }
body .basket .basket-item { padding: 14px; gap: 10px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; }
body .basket .basket-item .title { font: 600 15px/1.3 var(--body); }
body .basket .basket-item .title a { text-decoration: none; }
body .basket .basket-item .title a:hover { text-decoration: underline; text-underline-offset: 3px; }
body .basket .basket-item .options { color: var(--muted); font-size: 13px; }
body .basket .basket-item .price { margin-top: 6px; color: var(--paper); }
body .basket .basket-item .price .k6-price { font-size: 20px; }
body .basket .basket-item .quantity-field { --btn-size: 32px; }
body .basket .basket-item .quantity { background: var(--ink); border: 1px solid var(--line); color: var(--paper); }
body .basket .basket-item .remove { --btn-size: 34px; --btn-icon-size: 18px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
body .basket .basket-item .remove:hover { box-shadow: inset 0 0 0 1px var(--accent); }
body .basket .basket-checkout { padding: 18px 22px 40px; border-top: 1px solid var(--line); background: var(--ink); }
body .basket .basket-checkout h3 { margin: 0 0 14px; color: var(--muted); font: 600 14px/1 var(--body); text-transform: none; align-items: center; }
body .basket .basket-checkout .total { color: var(--paper); }
body .basket .basket-checkout .total .k6-price { font-size: 32px; }
body .basket .basket-checkout .checkout { height: 48px; font-size: 15px; }
body .basket .basket-empty { color: var(--muted); font-size: 15px; padding: 40px 20px; }
body .basket-popup-content .popup-close { top: 12px; right: 14px; }

/* ---------- toasts ---------- */
body .toast { background: var(--ink-3); color: var(--paper); border: 1px solid var(--line-2); border-radius: 6px; font-size: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }
body .toast.toast-success { background: #10281a; border-color: #1f5a37; color: #c9f5da; }
body .toast.toast-error { background: #2a1214; border-color: #6b1f26; color: #ffd9dc; }
body .toast.toast-warning { background: #2a2310; border-color: #6b5a1f; color: #fff0c2; }

/* ---------- sidebar modules (if any are enabled) ---------- */
body .widget { background: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; }

/* ---------- footer ---------- */
body .k6-foot { margin: 0; padding: 28px 0 36px; border-top: 1px solid var(--line); background: var(--ink); color: var(--paper); }
.k6-foot__in { display: grid; grid-template-columns: auto 1fr; gap: 16px 32px; align-items: center; }
.k6-brand--foot img { width: 28px; height: 28px; }
.k6-brand--foot .k6-brand__name { font-size: 16px; }
.k6-foot__nav { display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: flex-end; }
.k6-foot__nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.k6-foot__nav a:hover { color: var(--paper); }
body .k6-foot__pay { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
body .k6-foot__pay li { display: grid; place-items: center; width: 46px; height: 30px; margin: 0; padding: 4px 6px; border-radius: 4px; background: #f1ebe3; }
body .k6-foot__pay li::before { display: none; }
body .k6-foot__pay img { max-width: 100%; max-height: 100%; object-fit: contain; }
body .k6-foot__legal { grid-column: 1 / -1; margin: 6px 0 0; padding: 0; color: var(--muted-2); font-size: 12px; max-width: 110ch; text-align: left; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .k6-act--site { display: none !important; }
  .k6-towns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .k6-nav { display: none; }
  .k6-act__menuLabel { display: none; }
  .k6-studio__in { grid-template-columns: 1fr; }
  .k6-hero__layout { grid-template-columns: 1fr; align-items: start; }
  .k6-hero__media { max-width: 720px; }
  :is(.k6-pkg, .store-product-popup-content) { grid-template-columns: 1fr; }
  :is(.k6-pkg, .store-product-popup-content) .k6-pkg__side { position: static; }
  :is(.k6-pkg, .store-product-popup-content) .k6-pkg__descr { grid-column: auto; }
  /* keep the buy bar reachable while reading on phones/tablets */
  :is(.k6-pkg, .store-product-popup-content) .k6-buy {
    position: sticky !important; bottom: 0; z-index: 3;
    margin: 0 -16px; padding: 12px 16px;
    background: rgba(12, 10, 11, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
}
@media (max-width: 760px) {
  html:root { --wrap: min(100% - 24px, 1440px); }
  .k6-top__in { gap: 10px; }
  .k6-brand__name { display: none; }
  .k6-act--account .k6-act__label { display: none; }
  body .k6-act { padding: 0 10px; }

  .k6-hero { margin-top: 12px; min-height: 0; }
  .k6-hero::before { background: linear-gradient(0deg, rgba(12, 10, 11, .96) 20%, rgba(12, 10, 11, .45) 100%); }
  .k6-hero__lead { font-size: 16px; }
  .k6-hero__facts { gap: 6px 18px; }

  .k6-towns {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    width: 100%; padding: 0 12px; gap: 6px; scroll-padding-inline: 12px;
  }
  .k6-towns::-webkit-scrollbar { display: none; }
  .k6-town { flex: 0 0 138px; height: 80px; scroll-snap-align: start; }
  .k6-town__name { font-size: 17px; }

  .k6-store { padding-top: 32px; }
  .k6-store__tools { margin-left: 0; width: 100%; }
  .k6-search { flex: 1; }
  body .k6-search input { width: 100%; }
  .k6-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .k6-item__body { padding: 10px; }
  body .k6-item__name { font-size: 14px; }
  .k6-item .k6-price { font-size: 19px; }
  .k6-buy--compact .k6-buy__cta { width: 100%; }
  .k6-buy--compact .k6-buy__cta .add, .k6-buy--compact .k6-buy__cta .subscribe, .k6-buy--compact .k6-buy__cta .open-basket-cta, .k6-buy--compact .k6-qty { flex: 1; }
  .k6-buy--compact .k6-btn span { overflow: hidden; text-overflow: ellipsis; }
  .k6-facts div { grid-template-columns: 1fr; gap: 2px; }
  .k6-foot__in { grid-template-columns: 1fr; }
  .k6-foot__nav { justify-content: flex-start; }
  body .store-product-popup-content { padding: 20px 16px; }
  body .site-content > main { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; scroll-behavior: auto !important; }
}

/* buttons inside rich text (login popup, CMS) keep the button look */
body .text-content a:is(.btn-primary, .btn-secondary, .k6-btn) { text-decoration: none; }
body .text-content a.btn-primary, body .text-content a.btn-primary:hover { color: var(--on-accent); }
body .login-popup-content h2, body .store-text h2 { margin-top: 0; }
