/* ==========================================================================
   PLS Scripts: Tebex webstore template
   Dark, hairline-bordered UI. One accent colour, no gradients.
   ========================================================================== */

:root {
  /* Accent (overridable from the template config) */
  --color-primary: #2ee88f;
  --color-primary-hover: #63f0ae;
  --color-primary-text: #03140b;
  --color-primary-text-hover: var(--color-primary-text);
  /* Read by main.js and passed to Tebex checkout */
  --color-secondary: #1a1e23;

  --color-sale-banner-bg: color-mix(in srgb, var(--color-primary) 10%, #0a0b0d);
  --color-sale-banner-text: var(--color-primary);

  /* Surfaces */
  --bg: #0a0b0d;
  --bg-inset: #0d0f12;
  --bg-raised: #111316;
  --bg-raised-2: #16191d;
  --line: #1d2126;
  --line-strong: #2a2f36;
  --line-hover: #3a4149;

  /* Text */
  --text: #f1f3f5;
  --text-2: #a3aab2;
  --text-3: #6d747d;

  /* Accent helpers */
  --accent: var(--color-primary);
  --accent-hover: var(--color-primary-hover);
  --accent-ink: var(--color-primary-text);
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 34%, transparent);

  --danger: #ff5d6c;
  --warning: #ffb547;
  --info: #7ea6ff;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --container: 1240px;
  --gutter: 24px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Tebex legal footer (injected by Tebex below the template) */
  --tebex-footer-height: 35px;
  --tebex-legal-footer-max-width: min(var(--container), calc(100vw - (var(--gutter) * 2)));
  --tebex-legal-footer-background-color: var(--bg);
  --tebex-legal-footer-border-color: var(--line);
  --tebex-legal-footer-text-color: var(--text-3);
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --header-h: 60px;
  }
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--line-strong) var(--bg);
  scrollbar-width: thin;
}

html.no-scroll {
  overflow: hidden;
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

svg {
  flex: none;
}

button svg,
a svg {
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
  text-align: inherit;
}

ul,
ol {
  list-style: none;
}

strong,
b {
  font-weight: 600;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden]:not(.popup):not(.toast) {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 3000;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + (var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  max-width: calc(860px + (var(--gutter) * 2));
}

.site {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--tebex-footer-height));
}

.site-main {
  flex: 1;
}

.muted {
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   Buttons, chips, badges, inputs
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-lg {
  height: 48px;
  padding: 0 20px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 40px;
  padding: 0;
}

.btn-icon.btn-sm {
  width: 34px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--color-primary-text-hover);
}

.btn-secondary {
  background: var(--bg-raised-2);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-secondary:hover {
  background: #1b1f24;
  border-color: var(--line-hover);
}

.btn-ghost {
  color: var(--text-2);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.btn-in-basket {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

.btn-in-basket:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Links keep working while "disabled" (Tebex marks packages unpurchasable for
   logged-out visitors; clicking then opens the login popup). Only dim them
   when Tebex gives an actual reason. */
.btn:disabled,
.btn[aria-disabled="true"],
.product-actions[title]:not([title=""]) a.btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.btn-label {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip-platform {
  background: var(--bg-raised-2);
  color: var(--text);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-row:empty {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-sale {
  background: var(--accent);
  color: var(--accent-ink);
}

.badge-source,
.badge-timer {
  background: rgba(10, 11, 13, 0.78);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
  backdrop-filter: blur(6px);
}

.badge-timer {
  border-color: color-mix(in srgb, var(--warning) 35%, transparent);
  color: var(--warning);
}

.badge-escrow {
  background: var(--bg-raised-2);
  border-color: var(--line-strong);
  color: var(--text-2);
}

input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  height: auto;
  min-height: 110px;
  padding: 10px 12px;
  resize: vertical;
}

select {
  appearance: none;
  padding-right: 34px;
  cursor: pointer;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-3);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input[type="search"]::-webkit-search-cancel-button {
  filter: grayscale(1) brightness(1.6);
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@media (max-width: 640px) {
  input[type="text"],
  input[type="search"],
  input[type="number"],
  input[type="email"],
  select,
  textarea {
    font-size: 16px; /* prevent iOS zoom on focus */
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

/* Loading states ---------------------------------------------------------- */

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

.actions {
  position: relative;
}

.actions.updating,
.basket-popup-content.updating {
  pointer-events: none;
}

.actions.updating > * {
  opacity: 0.35;
}

.actions.updating::after,
.basket-popup-content.updating::after,
.popup-loading .popup-content::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 22px;
  height: 22px;
  margin: auto;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.basket-popup-content.updating > * {
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Money
   -------------------------------------------------------------------------- */

.money {
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.money-currency {
  color: var(--text-3);
  font-size: 0.75em;
  font-weight: 500;
}

.money-free {
  color: var(--accent);
}

.money-old {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.85em;
  text-decoration-thickness: 1px;
}

.price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.price-note {
  color: var(--text-2);
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Header & navigation
   -------------------------------------------------------------------------- */

.sale-banner {
  border-bottom: 1px solid var(--line);
  background: var(--color-sale-banner-bg);
  color: var(--color-sale-banner-text);
  font-size: 13px;
  font-weight: 500;
}

.sale-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding-block: 8px;
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

/* The blur lives on a pseudo-element: a backdrop-filter on the header itself
   would trap the fixed-position mobile drawer inside the header box. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 11, 13, 0.8);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  transition: background-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header.is-scrolled::before {
  background: rgba(10, 11, 13, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.brand img {
  width: auto;
  height: 38px;
  object-fit: contain;
}

.brand-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.toggle-navigation {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px 0 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.user-chip:hover {
  border-color: var(--line-hover);
  color: var(--text);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.user-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-logout {
  color: var(--text-3);
  transition: color 0.15s ease;
}

.user-chip:hover .user-logout {
  color: var(--danger);
}

.basket-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--accent-ink);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

/* Desktop navigation */
.site-navigation {
  --fade-duration: 220ms;
}

.navigation-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover,
.nav-item.is-active > .nav-link,
.has-mega.expanded > .nav-link {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-link .icon {
  color: var(--text-3);
  transition: rotate 0.2s var(--ease);
}

.has-mega {
  position: relative;
}

.mega {
  position: absolute;
  top: 100%;
  left: -12px;
  z-index: 70;
  padding-top: 14px;
  opacity: 0;
  visibility: hidden;
  translate: 0 6px;
  transition: opacity 0.18s ease, translate 0.18s var(--ease), visibility 0.18s;
}

.mega-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 8px;
  width: 560px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-raised);
  box-shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.75);
}

.mega-inner:has(.mega-grid > li:nth-child(7)) {
  width: 680px;
}

.mega-inner:not(:has(.mega-aside)) {
  grid-template-columns: minmax(0, 1fr);
  width: 340px;
}

.mega-inner:not(:has(.mega-aside)):has(.mega-grid > li:nth-child(7)) {
  width: 500px;
}

.mega-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  align-content: start;
}

/* Two columns only once the list gets long */
.mega-grid:has(> li:nth-child(7)) {
  grid-template-columns: 1fr 1fr;
}

.mega-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  color: var(--text-2);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.mega-link:hover,
.mega-link.is-active {
  background: var(--bg-raised-2);
  color: var(--text);
}

.mega-link > .icon {
  margin-left: auto;
  color: var(--accent);
  opacity: 0;
  translate: -4px 0;
  transition: opacity 0.15s ease, translate 0.15s var(--ease);
}

.mega-link:hover > .icon {
  opacity: 1;
  translate: 0 0;
}

.mega-thumb {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  color: var(--accent);
  transition: border-color 0.15s ease;
}

.mega-link:hover .mega-thumb,
.mega-link.is-active .mega-thumb {
  border-color: var(--accent-line);
}

.mega-thumb .category-art {
  width: 24px;
  height: 24px;
  stroke-width: 3.4;
}

.mega-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mega-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.mega-sub {
  display: grid;
  gap: 2px;
  padding: 2px 0 6px 60px;
  font-size: 13px;
}

.mega-sub a {
  color: var(--text-3);
}

.mega-sub a:hover,
.mega-sub a.is-active {
  color: var(--text);
}

.mega-aside {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-inset);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
  transition: border-color 0.15s ease;
}

.mega-aside:hover {
  border-color: var(--line-strong);
}

.mega-aside strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.mega-aside-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
}

.mega-aside-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--accent);
  font-weight: 500;
}

.menu-head,
.menu-foot {
  display: none;
}

@media (min-width: 1024px) {
  .menu {
    display: contents;
  }

  .has-mega:hover > .mega,
  .has-mega:focus-within > .mega,
  .has-mega.expanded > .mega {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
  }

  .has-mega:hover > .nav-link .icon,
  .has-mega.expanded > .nav-link .icon {
    rotate: 180deg;
  }
}

/* Mobile navigation drawer */
@media (max-width: 1023px) {
  .header-inner {
    gap: 8px;
  }

  .toggle-navigation {
    display: inline-flex;
    margin-left: -10px;
  }

  .header-discord {
    display: none;
  }

  .site-navigation {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(5, 6, 8, 0.66);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--fade-duration) ease, visibility var(--fade-duration);
  }

  body.show-navigation .site-navigation {
    opacity: 1;
    visibility: visible;
  }

  .menu {
    position: absolute;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: min(88vw, 360px);
    padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
    overflow: hidden auto;
    border-right: 1px solid var(--line);
    background: var(--bg-raised);
    translate: -100% 0;
    transition: translate 0.28s var(--ease);
  }

  body.show-navigation .menu {
    translate: 0 0;
  }

  .site-navigation.touching .menu {
    transition: none;
  }

  .menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    margin-bottom: 12px;
  }

  .menu-head .brand img {
    height: 32px;
  }

  .navigation-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    width: 100%;
    height: 46px;
    font-size: 15px;
  }

  .has-mega > .nav-link {
    height: auto;
    margin-top: 14px;
    padding-bottom: 8px;
    background: none !important;
    color: var(--text-3) !important;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
  }

  .has-mega > .nav-link .icon {
    display: none;
  }

  .mega {
    position: static;
    padding: 0 0 14px;
    opacity: 1;
    visibility: visible;
    translate: none;
  }

  .mega-inner {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .mega-grid {
    grid-template-columns: 1fr;
  }

  .mega-link {
    padding: 6px;
  }

  .mega-thumb {
    width: 36px;
    height: 36px;
  }

  .mega-aside {
    display: none;
  }

  .menu-foot {
    display: grid;
    gap: 8px;
    margin-top: auto;
    padding-top: 20px;
  }
}

@media (max-width: 640px) {
  .brand img {
    height: 32px;
  }

  .header-basket-label,
  .user-name,
  .log-in span {
    display: none;
  }

  .header-basket,
  .log-in {
    padding: 0 10px;
  }
}

/* --------------------------------------------------------------------------
   Sections & page headers
   -------------------------------------------------------------------------- */

.section {
  padding: 64px 0 0;
}

.section-last {
  padding-bottom: 72px;
}

.page-index .section:last-child {
  padding-bottom: 72px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title {
  margin-top: 10px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.035em;
}

.page {
  padding: 28px 0 80px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
}

.breadcrumbs a {
  transition: color 0.15s ease;
}

.breadcrumbs a:hover {
  color: var(--text);
}

.breadcrumbs [aria-current] {
  max-width: 48ch;
  overflow: hidden;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumbs .sep {
  color: var(--line-hover);
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.page-head-main {
  min-width: 0;
}

.page-title {
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.page-lead {
  max-width: 72ch;
  margin-top: 14px;
}

.count-chip {
  flex: none;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.count-chip strong {
  color: var(--text);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 72px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--text-3);
  text-align: center;
}

.empty-state h2 {
  margin-top: 6px;
  font-size: 18px;
}

.empty-state p {
  max-width: 44ch;
  margin-bottom: 10px;
  color: var(--text-2);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Home
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 80px 0 72px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0.12;
  filter: grayscale(0.5);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 64px;
  align-items: center;
}

.hero-title {
  max-width: 11ch;
  margin: 20px 0 22px;
  font-size: clamp(44px, 6.4vw, 84px);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.hero-accent {
  color: var(--accent);
}

.hero-text {
  max-width: 50ch;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.hero-frameworks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.hero-frameworks-label {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature:nth-child(2n) {
  border-right: 0;
}

.feature:nth-child(n + 3) {
  border-bottom: 0;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--bg-inset);
  color: var(--accent);
}

.feature strong {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.feature > span:last-child {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

/* Exactly five categories: one full row on desktop */
.category-grid:has(> .category-tile:nth-child(5):last-child) {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.category-grid:has(> .category-tile:nth-child(5):last-child) .category-media {
  aspect-ratio: 6 / 5;
}

@media (max-width: 1023px) {
  /* 3 + 2 layout that still fills both rows */
  .category-grid:has(> .category-tile:nth-child(5):last-child) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .category-grid:has(> .category-tile:nth-child(5):last-child) > .category-tile {
    grid-column: span 2;
  }

  .category-grid:has(> .category-tile:nth-child(5):last-child) > .category-tile:nth-child(n + 4) {
    grid-column: span 3;
  }

  .category-grid:has(> .category-tile:nth-child(5):last-child) > .category-tile:nth-child(n + 4) .category-media {
    aspect-ratio: 16 / 9;
  }
}

.category-tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  transition: border-color 0.2s ease, transform 0.25s var(--ease);
}

.category-tile:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.category-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-raised);
}

/* Built-in category illustrations */
.category-visual {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--accent);
}

.category-visual::before,
.category-visual::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  translate: -50% -50%;
  transition: scale 0.6s var(--ease), border-color 0.3s ease;
}

.category-visual::before {
  height: 74%;
  background: var(--bg-inset);
}

.category-visual::after {
  height: 94%;
  border-style: dashed;
}

.category-tile:hover .category-visual::before {
  border-color: var(--accent-line);
  scale: 1.05;
}

.category-tile:hover .category-visual::after {
  scale: 0.96;
}

.category-art {
  position: relative;
  z-index: 1;
  width: auto;
  height: 44%;
  stroke-width: 1.7;
  transition: translate 0.4s var(--ease);
}

.category-tile:hover .category-art {
  translate: 0 -3px;
}

.category-kicker {
  position: absolute;
  top: 12px;
  left: 13px;
  z-index: 2;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-flag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--accent-line);
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-head-title {
  display: flex;
  align-items: center;
  gap: 18px;
}

.page-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--bg-raised);
  color: var(--accent);
}

.page-icon .category-art {
  width: 38px;
  height: 38px;
  stroke-width: 2.6;
}

@media (max-width: 640px) {
  .page-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
  }

  .page-icon .category-art {
    width: 30px;
    height: 30px;
  }
}

.category-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.5s var(--ease);
}

.category-tile:hover .category-media img {
  scale: 1.05;
}

.category-fallback {
  color: var(--text-3);
}

.category-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.category-name .icon {
  color: var(--text-3);
  transition: color 0.2s ease, translate 0.2s var(--ease);
}

.category-tile:hover .category-name .icon {
  color: var(--accent);
  translate: 3px 0;
}

.about {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.cta-band {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 36px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: var(--accent-ink);
}

.cta-band-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--accent-ink);
  color: var(--accent);
}

.cta-band-copy {
  flex: 1;
}

.cta-band h2 {
  color: inherit;
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.03em;
}

.cta-band p {
  margin-top: 4px;
  opacity: 0.78;
}

.cta-band .btn-primary {
  background: var(--accent-ink);
  color: var(--text);
}

.cta-band .btn-primary:hover {
  background: #000;
}

/* --------------------------------------------------------------------------
   Modules (Tebex sidebar widgets, shown as a grid)
   -------------------------------------------------------------------------- */

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.widget-featured {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.widget-featured .product-card {
  flex: 1;
}

.widget-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.widget-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

.widget:not(.widget-featured) {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.widget-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 15px;
}

.widget-content {
  display: grid;
  gap: 12px;
  color: var(--text-2);
  font-size: 14px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-raised-2);
}

.progress-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.goal-image {
  border-radius: var(--radius-sm);
}

.purchases {
  display: grid;
  gap: 12px;
}

.purchase,
.donor {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-raised-2);
}

.username {
  color: var(--text);
  font-size: 14px;
}

.purchase p,
.purchase time {
  font-size: 12.5px;
  color: var(--text-3);
}

.status {
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.status-online {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-offline {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}

.server-address {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
}

.inline-form {
  display: flex;
  gap: 8px;
}

.alert {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.alert-danger {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
}

.alert-warning {
  background: color-mix(in srgb, var(--warning) 10%, transparent);
  color: var(--warning);
}

.alert-success {
  background: var(--accent-soft);
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Catalogue
   -------------------------------------------------------------------------- */

.catalog-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-field,
.select-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field {
  flex: 1;
  max-width: 380px;
}

.search-field .icon {
  position: absolute;
  left: 13px;
  color: var(--text-3);
  pointer-events: none;
}

.search-field input {
  height: 40px;
  padding-left: 38px;
  background: var(--bg-raised);
}

.select-field select {
  height: 40px;
  min-width: 190px;
  background: var(--bg-raised);
}

.select-field .icon {
  position: absolute;
  right: 12px;
  color: var(--text-3);
  pointer-events: none;
}

.catalog-empty {
  padding: 48px 0;
  color: var(--text-2);
  text-align: center;
}

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

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  transition: border-color 0.2s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
}

.product-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 22px 44px -28px rgba(0, 0, 0, 0.9);
}

.product-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-inset);
}

.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.6s var(--ease);
}

.product-card:hover .product-card-media img {
  scale: 1.045;
}

.media-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-3);
}

.product-card-flags {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-card-media > .badge-timer {
  position: absolute;
  bottom: 10px;
  left: 10px;
}

.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.product-card-title {
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

/* Whole card is clickable; actions sit above the overlay link */
.product-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.product-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.product-card-foot .money {
  font-size: 17px;
}

.product-card-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-actions.is-compact {
  display: flex;
  gap: 6px;
}

.product-actions.is-compact .btn-icon {
  width: 36px;
  height: 36px;
}

/* --------------------------------------------------------------------------
   Product page
   -------------------------------------------------------------------------- */

.page-product {
  padding-top: 24px;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  align-items: start;
}

.product-main {
  display: flex;
  flex-direction: column;
  gap: 44px;
  min-width: 0;
}

.product-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-inset);
}

.product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-cover-empty {
  display: grid;
  place-items: center;
  color: var(--text-3);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.product-description {
  font-size: 15.5px;
}

.product-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 1024px) and (min-height: 720px) {
  .product-aside {
    position: sticky;
    top: calc(var(--header-h) + 20px);
  }
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: -28px;
}

.info-grid > .side-card:only-child .check-list,
.info-grid > .side-card:first-child:has(+ [hidden]) .check-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
}

.buy-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.buy-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.buy-badges:empty {
  display: none;
}

.buy-badges .badge-source {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  backdrop-filter: none;
}

.product-title {
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.sale-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warning) 7%, transparent);
  color: var(--warning);
  font-size: 13px;
}

.sale-timer strong {
  margin-left: auto;
  font-family: var(--font-mono);
}

.buy-price {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.buy-price .money {
  font-size: 34px;
  letter-spacing: -0.04em;
}

.buy-price .money-old {
  font-size: 16px;
}

.product-actions.is-full,
.buy-buttons {
  display: grid;
  gap: 8px;
}

.quantity-field {
  display: flex;
  align-items: center;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}

.quantity-field .adjust {
  width: 44px;
  height: 100%;
  font-family: var(--font-mono);
  font-size: 18px;
  text-align: center;
  transition: background-color 0.15s ease;
}

.quantity-field .adjust:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.quantity-field .adjust[disabled] {
  opacity: 0.35;
  pointer-events: none;
}

.quantity-field input.quantity {
  width: 44px;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.quantity-field .open-basket {
  height: 100%;
  margin-left: auto;
  padding: 0 16px;
  border-left: 1px solid var(--accent-line);
  font-size: 14px;
  font-weight: 500;
}

.buy-notes {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13px;
}

.buy-notes li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.buy-notes .icon {
  color: var(--accent);
}

.side-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.side-title {
  margin-bottom: 14px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.check-list {
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.check-list .icon {
  margin-top: 3px;
  color: var(--accent);
}

.link-list {
  display: grid;
  gap: 6px;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.resource-link:hover {
  border-color: var(--line-strong);
  background: var(--bg-raised-2);
}

.resource-link .icon:first-child {
  color: var(--accent);
}

.resource-link .icon:last-child {
  margin-left: auto;
  color: var(--text-3);
}

.resource-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.resource-text small {
  overflow: hidden;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-card {
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.15s ease;
}

.support-card:hover {
  border-color: var(--line-strong);
}

.support-card > .icon {
  color: var(--text-3);
}

.support-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--bg-inset);
}

.support-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.45;
}

.support-text strong {
  color: var(--text);
  font-size: 14px;
}

/* Gallery */
.media-slider {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slider-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-inset);
}

.media-slider .slider {
  display: block;
  aspect-ratio: 16 / 9;
  --swiper-navigation-size: 40px;
  --swiper-navigation-color: #fff;
  --swiper-navigation-sides-offset: 12px;
}

.slider::part(button-prev),
.slider::part(button-next) {
  width: 40px;
  height: 40px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(10, 11, 13, 0.7);
  backdrop-filter: blur(8px);
  transition: background-color 0.15s ease;
}

.slider::part(button-prev):hover,
.slider::part(button-next):hover {
  background: rgba(10, 11, 13, 0.92);
}

.slider::part(wrapper) {
  align-items: center;
}

.media-slider .slide {
  display: grid;
  place-items: center;
  height: 100%;
}

.media-slider .slide-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-video {
  position: relative;
  background: #000 var(--preview-image) center / cover no-repeat;
}

.slide-frame {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.slide-frame:not(.iframe-loaded) {
  visibility: hidden;
  opacity: 0;
}

.open-lightbox {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: rgba(10, 11, 13, 0.7);
  color: #fff;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.slider-frame:hover .open-lightbox,
.open-lightbox:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .open-lightbox {
    opacity: 1;
  }
}

.thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.thumbs::-webkit-scrollbar {
  display: none;
}

.thumb {
  flex: 0 0 auto;
  width: 112px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.thumb:hover {
  opacity: 0.85;
}

.thumb.active {
  border-color: var(--accent);
  opacity: 1;
}

.thumb img,
.thumb-youtube {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-youtube {
  position: relative;
}

.thumb-youtube img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-youtube::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  margin: auto;
  background: #fff;
  clip-path: polygon(25% 15%, 25% 85%, 85% 50%);
}

/* Video preview (built by main.js from links in the description) */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #000;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.video-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.video-poster:hover img {
  opacity: 0.95;
}

.video-play {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform 0.2s var(--ease);
}

.video-poster:hover .video-play {
  transform: scale(1.06);
}

/* Mobile buy bar */
.buy-bar {
  display: none;
}

/* --------------------------------------------------------------------------
   Rich text (descriptions written in the Tebex editor)
   -------------------------------------------------------------------------- */

.text-content {
  color: var(--text-2);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.text-content p,
.text-content ul,
.text-content ol,
.text-content table,
.text-content pre,
.text-content blockquote {
  margin-bottom: 1em;
}

.text-content > :last-child,
.text-content p:last-child {
  margin-bottom: 0;
}

.text-content h1,
.text-content h2,
.text-content h3,
.text-content h4,
.text-content h5,
.text-content h6 {
  margin: 1.7em 0 0.6em;
  line-height: 1.25;
}

.text-content > h1:first-child,
.text-content > h2:first-child,
.text-content > h3:first-child,
.text-content > h4:first-child,
.text-content > div:first-child h3:first-child {
  margin-top: 0;
}

.text-content h1 {
  font-size: 26px;
}

.text-content h2 {
  font-size: 22px;
}

.text-content h3 {
  font-size: 19px;
}

.text-content h4,
.text-content h5,
.text-content h6 {
  font-size: 16px;
}

.text-content a:not(.btn):not(.tc-card-link):not(.tc-button) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.text-content a:not(.btn):not(.tc-card-link):not(.tc-button):hover {
  color: var(--accent-hover);
}

.text-content strong,
.text-content b {
  color: var(--text);
}

.text-content ul,
.text-content ol {
  padding-left: 1.3em;
}

.text-content ul {
  list-style: disc;
}

.text-content ol {
  list-style: decimal;
}

.text-content li {
  margin: 0.35em 0;
  padding-left: 0.2em;
}

.text-content li::marker {
  color: var(--accent);
}

.text-content img {
  display: inline-block;
  height: auto;
  border-radius: var(--radius-sm);
  vertical-align: middle;
}

.text-content table {
  width: 100%;
  border-collapse: collapse;
}

.text-content td,
.text-content th {
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.text-content hr {
  height: 1px;
  margin: 2em 0;
  border: 0;
  background: var(--line);
}

.text-content code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg-raised-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.text-content pre {
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-inset);
}

.text-content pre code {
  padding: 0;
  border: 0;
  background: none;
}

.text-content blockquote {
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  color: var(--text);
}

.text-content iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 10px;
}

/* Content blocks usable in Tebex page/description editors */
.text-content .tc-lead {
  max-width: 62ch;
  margin-bottom: 1.5em;
  color: var(--text);
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.text-content .tc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin: 1.25em 0 2.2em;
}

.text-content .tc-item,
.text-content .tc-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-inset);
}

.text-content .tc-item h4,
.text-content .tc-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.text-content .tc-item h4::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin-bottom: 14px;
  border-radius: 2px;
  background: var(--accent);
}

.text-content .tc-item p,
.text-content .tc-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.text-content .tc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.25s var(--ease);
}

.text-content .tc-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.text-content a.tc-card-link {
  margin-top: auto;
  padding-top: 16px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

/* Makes the whole card clickable */
.text-content a.tc-card-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.text-content .tc-card-link::after {
  content: " \2197";
}

.text-content a.tc-button {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.text-content a.tc-button:hover {
  background: var(--accent-hover);
}

.text-content .tc-signature {
  margin-top: 1.8em;
  color: var(--text-2);
}

.text-content .tc-signature strong {
  color: var(--text);
}

.about-body > .tc-lead:first-child,
.prose-card > .tc-lead:first-child {
  margin-top: 0;
}

.prose-card {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding: 56px 0 28px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  max-width: 36ch;
  margin: 16px 0 20px;
  color: var(--text-2);
  font-size: 14px;
}

.footer-title {
  margin-bottom: 16px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--text-2);
  font-size: 14px;
  text-align: left;
}

.footer-copy-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
}

.footer-copy:hover .footer-copy-value {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.copyright {
  max-width: 72ch;
  color: var(--text-3);
  font-size: 12.5px;
}

.we-accept {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.we-accept li {
  display: grid;
  place-items: center;
  height: 26px;
  padding: 0 8px;
  border-radius: 5px;
  background: #eef0f2;
}

.we-accept img {
  width: auto;
  height: 14px;
}

/* --------------------------------------------------------------------------
   Popups (basket drawer, login, options, gift, lightbox)
   -------------------------------------------------------------------------- */

.popup {
  --fade-duration: 300ms;
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden auto;
  background: rgba(5, 6, 8, 0.72);
  backdrop-filter: blur(3px);
  opacity: 1;
  scrollbar-width: thin;
  transition: opacity var(--fade-duration) ease, display var(--fade-duration) allow-discrete;
}

@starting-style {
  .popup {
    opacity: 0;
  }
}

.popup[hidden] {
  display: none;
  opacity: 0;
}

.popup.may-close {
  background: rgba(5, 6, 8, 0.4);
}

.popup.drawer {
  user-select: none;
}

.popup-scroll-cont {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 24px;
  overscroll-behavior: none;
}

.popup-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.75);
  translate: 0 0;
  transition: translate var(--fade-duration) var(--ease), opacity var(--fade-duration) ease;
}

@starting-style {
  .popup-content {
    opacity: 0;
    translate: 0 16px;
  }
}

.popup[hidden] .popup-content {
  opacity: 0;
  translate: 0 16px;
}

.popup.touching .popup-content {
  transition: opacity var(--fade-duration) ease;
}

.popup-loading .popup-content {
  min-height: 200px;
}

.popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: transparent;
  font-size: 0;
  transition: background-color 0.15s ease;
}

.popup-close::before,
.toast-close::before {
  content: "";
  width: 16px;
  height: 16px;
  background: var(--text-2);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.popup-close:hover {
  background: rgba(255, 255, 255, 0.06);
}

.popup-close:hover::before {
  background: var(--text);
}

/* Shared popup content */
.popup-content h2,
.store-product-options .product-title {
  margin: 0 44px 16px 0;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.popup-content .actions {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.popup-content .actions .btn-primary:not(.btn-lg) {
  height: 46px;
}

.gift-form-popup .popup-content input {
  margin-top: 4px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field-label,
.field > p {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-suffix {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 13px;
}

.link-text {
  padding: 6px;
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-text:hover {
  color: var(--text);
}

.product-options-popup .popup-content {
  max-width: 500px;
}

/* Login */
.login-popup {
  z-index: 1002;
}

.login-popup-content,
.login-card {
  max-width: 420px;
  text-align: center;
}

.login-card {
  margin: 40px auto;
  padding: 36px 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.login-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 4px auto 18px;
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.login-popup-content h2,
.login-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.login-text {
  margin: 0 auto 22px;
  max-width: 34ch;
  color: var(--text-2);
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 10px;
}

/* Basket drawer */
.basket-popup .popup-scroll-cont {
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
}

.basket-popup-content {
  display: flex;
  flex-direction: column;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  border-width: 0 0 0 1px;
  border-radius: 0;
  opacity: 1;
}

@starting-style {
  .basket-popup-content {
    opacity: 1;
    translate: 100% 0;
  }
}

.basket-popup[hidden] .basket-popup-content {
  opacity: 1;
  translate: 100% 0;
}

/* Logged-out visitors get the login form instead of a basket */
.basket-popup-content:not(:has(.basket-header)):not(:has(.basket-empty)) {
  justify-content: center;
  padding: 56px 32px;
  text-align: center;
}

.basket {
  display: flex;
  flex-direction: column;
}

.basket-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 0 64px 0 24px;
  border-bottom: 1px solid var(--line);
}

.basket-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.basket-title .icon {
  color: var(--accent);
}

.basket-user {
  max-width: 140px;
  overflow: hidden;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basket-second-header {
  display: flex;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.basket-second-header .money {
  color: var(--text-2);
  font-size: 12px;
}

.basket-content {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
}

.basket-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.basket-item .info {
  min-width: 0;
}

.basket-item .title {
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.basket-item .title a:hover {
  color: var(--accent);
}

.basket-item .trial {
  margin-top: 4px;
  color: var(--accent);
  font-size: 12px;
}

.basket-item .options {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 6px;
  color: var(--text-3);
  font-size: 12.5px;
}

.basket-item .options:empty {
  display: none;
}

.basket-item .price {
  margin-top: 10px;
}

.basket-item .money {
  font-size: 15px;
}

.basket-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.basket-item .quantity-field {
  height: 32px;
  border-color: var(--line-strong);
  background: var(--bg-inset);
  color: var(--text);
}

.basket-item .quantity-field .adjust {
  width: 30px;
  color: var(--text-2);
  font-size: 15px;
}

.basket-item .quantity-field input.quantity {
  width: 32px;
  font-size: 13px;
}

.basket-item .remove {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.basket-item .remove:hover {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
}

.basket-checkout {
  display: grid;
  gap: 14px;
  padding: 20px 24px calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.basket-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--text-2);
}

.basket-total-row .money {
  font-size: 24px;
}

.basket-note {
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.basket-empty-state,
.basket-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: auto;
  padding: 64px 24px;
  color: var(--text-2);
  font-size: 14px;
  text-align: center;
}

.basket-empty-state .icon {
  margin-bottom: 6px;
  color: var(--text-3);
}

.basket-empty-state strong {
  color: var(--text);
  font-size: 17px;
}

.basket-empty-state .btn {
  margin-top: 12px;
}

.basket:has(.basket-empty-state) .basket-checkout,
.basket-popup-content:has(.basket-empty-state) .basket-checkout,
.basket:has(.basket-empty-state) .basket-second-header,
.basket-popup-content:has(.basket-empty-state) .basket-second-header {
  display: none;
}

/* Basket on its own page (fallback when not opened as a drawer) */
.page-basket .basket {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

/* Media lightbox */
.popup.popup-media-slider {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: rgba(5, 6, 8, 0.94);
}

.popup.popup-media-slider[hidden] {
  display: none;
}

.popup.popup-media-slider .popup-close {
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.popup.popup-media-slider .slider {
  width: 100%;
  height: 100%;
  --swiper-navigation-size: 44px;
  --swiper-navigation-color: #fff;
  --swiper-navigation-sides-offset: 16px;
}

.popup.popup-media-slider .slide {
  display: grid;
  place-items: center;
  padding: 56px 16px 16px;
}

.popup.popup-media-slider .swiper-zoom-container,
.popup.popup-media-slider .slide-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.popup.popup-media-slider .slide-frame {
  max-height: 100%;
}

.popup.popup-media-slider .thumbs {
  justify-content: center;
  padding: 12px 16px 20px;
}

.popup.popup-media-slider .thumb {
  width: 96px;
}

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */

.toaster {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toaster:empty {
  display: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 10px 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-raised-2);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.7);
  font-size: 14px;
  pointer-events: auto;
  translate: 0 0;
  transition: opacity 0.3s ease, translate 0.3s var(--ease), display 0.3s allow-discrete;
}

@starting-style {
  .toast {
    opacity: 0;
    translate: 0 12px;
  }
}

.toast[hidden] {
  display: none;
  opacity: 0;
  translate: 0 12px;
}

.toast::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 2px;
  background: var(--info);
}

.toast-info::before,
.toast-success::before {
  background: var(--accent);
}

.toast-error::before {
  background: var(--danger);
}

.toast-warning::before {
  background: var(--warning);
}

.toast p {
  flex: 1;
  color: var(--text);
  line-height: 1.5;
}

.toast-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  color: transparent;
  font-size: 0;
}

.toast-close::before {
  width: 12px;
  height: 12px;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* --------------------------------------------------------------------------
   Tiered categories & quotes
   -------------------------------------------------------------------------- */

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.tier-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.tier-card.is-subscribed {
  border-color: var(--accent-line);
}

.tier-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.tier-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tier-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
}

.tier-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 19px;
}

.tier-body .price-line .money {
  font-size: 24px;
}

.tier-body .product-actions {
  margin-top: auto;
}

.quote-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
  }

  .hero-grid {
    gap: 40px;
  }
}

@media (max-width: 1023px) {
  .hero {
    padding: 56px 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    max-width: 14ch;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px;
  }

  .product-layout {
    grid-template-columns: 1fr;
  }

  .product-aside {
    position: static;
  }

  .product-main {
    display: contents;
  }

  .product-gallery {
    order: 1;
  }

  .product-aside {
    order: 2;
  }

  .product-main > :not(.product-gallery) {
    order: 3;
  }

  .info-grid {
    margin-top: 0;
  }

  .product-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .buy-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: block;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(17, 19, 22, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    translate: 0 110%;
    transition: translate 0.3s var(--ease);
  }

  .buy-bar.is-visible {
    translate: 0 0;
  }

  .buy-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .buy-bar-info {
    flex: 1;
    min-width: 0;
  }

  .buy-bar-title {
    display: block;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .buy-bar .money {
    font-size: 14px;
  }

  .buy-bar .product-actions.is-compact .btn-icon {
    width: auto;
    height: 44px;
    padding: 0 16px;
  }

  .buy-bar .btn-label {
    display: inline;
  }

  body.page-package {
    padding-bottom: 72px;
  }
}

@media (max-width: 640px) {
  .section {
    padding-top: 48px;
  }

  .hero {
    padding: 40px 0 48px;
  }

  .hero-title {
    margin: 16px 0 18px;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-cta .btn {
    flex: 1;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .feature,
  .feature:nth-child(2n) {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 14px;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature:last-child {
    border-bottom: 0;
  }

  .feature-icon {
    margin-bottom: 0;
  }

  .feature > span:last-child {
    flex-basis: 100%;
  }

  .category-grid,
  .category-grid:has(> .category-tile:nth-child(5):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .category-grid > .category-tile,
  .category-grid:has(> .category-tile:nth-child(5):last-child) > .category-tile,
  .category-grid:has(> .category-tile:nth-child(5):last-child) > .category-tile:nth-child(n + 4) {
    grid-column: auto;
  }

  .category-grid .category-media,
  .category-grid:has(> .category-tile:nth-child(5):last-child) .category-media,
  .category-grid:has(> .category-tile:nth-child(5):last-child) > .category-tile:nth-child(n + 4) .category-media {
    aspect-ratio: 1;
  }

  /* Odd last tile spans the full row */
  .category-grid > .category-tile:last-child:nth-child(odd),
  .category-grid:has(> .category-tile:nth-child(5):last-child) > .category-tile:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .category-grid > .category-tile:last-child:nth-child(odd) .category-media,
  .category-grid:has(> .category-tile:nth-child(5):last-child) > .category-tile:last-child:nth-child(odd) .category-media {
    aspect-ratio: 21 / 9;
  }

  .category-grid > .category-tile:last-child:nth-child(odd) .category-art {
    height: 46%;
  }

  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .catalog-toolbar {
    flex-direction: column;
  }

  .search-field {
    max-width: none;
  }

  .select-field select {
    min-width: 0;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .buy-card {
    padding: 20px;
  }

  .product-title {
    font-size: 24px;
  }

  .prose-card {
    padding: 22px;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
    padding: 26px 22px;
  }

  .cta-band .btn {
    width: 100%;
  }

  .footer-grid {
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Popups become bottom sheets */
  .popup:not(.basket-popup):not(.popup-media-slider) .popup-scroll-cont {
    align-items: flex-end;
    padding: 0;
  }

  .popup:not(.basket-popup):not(.popup-media-slider) .popup-content {
    max-width: none;
    padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
  }

  .basket-popup-content {
    max-width: none;
    border-width: 0;
  }

  .basket-header,
  .basket-second-header,
  .basket-item,
  .basket-checkout {
    padding-inline: 18px;
  }

  .toaster {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
