/* ==========================================================================
   DoIT Digital — Tebex storefront theme (shared.css)
   Order: tokens → reset → base → primitives → layout → pages → overlays
   Colour overrides from the template config land on :root via head.twig,
   so every derived colour below is built from the tokens, never hard-coded.
   ========================================================================== */

:root {
  /* Surfaces — a layered dark ramp instead of flat black, so cards read as elevated */
  --color-surface-0: #0b0d13;
  --color-surface-1: #12151d;
  --color-surface-2: #191d28;
  --color-surface-3: #222736;
  --color-bg: var(--color-surface-0);           /* legacy token: nav drawer, basket panel, inputs */
  --color-brighter-bg: var(--color-surface-1);  /* legacy token: cards, widgets, popups */

  /* Text */
  --color-text: #f4f6fb;
  --color-text-darker: #d3d8e2;
  --color-text-secondary: #98a2b6;
  --color-text-dark: #0d0d0d;

  /* Brand */
  --color-primary: #266eff;
  --color-primary-hover: #4a86ff;
  --color-primary-text: #ffffff;
  --color-primary-text-hover: #ffffff;
  --color-accent: #00e5c3;
  --color-secondary: #232939;
  --color-secondary-hover: #2d3447;
  --color-secondary-text: var(--color-text);
  --color-secondary-text-hover: var(--color-text);
  --color-tertiary: transparent;
  --color-tertiary-hover: rgb(255 255 255 / 0.08);
  --color-tertiary-text: var(--color-text);
  --color-tertiary-text-hover: var(--color-tertiary-text);
  --color-removed: #ff6b6b;
  --color-success: #34d399;
  --color-warning: #fbbf24;
  --color-discord: #5865f2;

  /* Lines */
  --color-border: rgb(255 255 255 / 0.08);
  --color-border-strong: rgb(255 255 255 / 0.14);

  /* Type */
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Chakra Petch', 'Inter', system-ui, sans-serif;

  /* Shape + depth */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3), 0 2px 8px rgb(0 0 0 / 0.25);
  --shadow-md: 0 8px 24px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 20px 50px rgb(0 0 0 / 0.5);
  --shadow-glow: 0 0 0 1px rgb(from var(--color-primary) r g b / 0.45), 0 10px 32px rgb(from var(--color-primary) r g b / 0.22);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;

  /* Layout */
  --ticker-height: 40px;
  --tebex-footer-height: 35px;
  --widget-padding: 24px;
  --content-padding: var(--widget-padding);
  --content-inner-width: 1280px;
  --content-width: calc((var(--content-padding) * 2) + var(--content-inner-width));
  --sidebar-width: 287px;
  --tebex-legal-footer-max-width: min(var(--content-inner-width),
      calc(100vw - (var(--content-padding) * 2)));
  --tebex-legal-footer-background-color: var(--color-surface-1);
  --tebex-legal-footer-border-color: var(--color-border);
  --tebex-legal-footer-text-color: var(--color-text-secondary);

  /* Product grid: never more than this many cards per row; fewer when the column is narrow */
  --products-max-columns: 4;
  --products-min-width: 250px;
  --products-gap: 20px;
  /* Tebex product renders are all 16:9, so the frames below match that exactly.
     With the ratios equal there is nothing to crop or letterbox, and "cover" and
     "contain" render identically. Keep contain: it also protects odd-sized images. */
  --media-ratio: 16 / 9;
  --product-image-fit: contain;

  /* Kept for the (currently disabled) rotating corner boxes in layout.html */
  --first-row-top: 80px;
  --row-gap: 240px;
}

@media (width > 960px) {
  :root {
    --content-padding: calc(var(--widget-padding) * 2);
  }
}

@media (max-width: 900px) {
  :root {
    --tebex-footer-height: 70px;
  }
}

@media (max-width: 600px) {
  :root {
    --tebex-footer-height: 80px;
  }
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: none;
  vertical-align: baseline;
  color: inherit;
  background: transparent;
  font-size: inherit;
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

strong,
b {
  font-weight: 700;
}

em,
i {
  font-style: italic;
}

input[type=submit],
button {
  appearance: none;
  cursor: pointer;
  text-align: left;
}

textarea {
  resize: none;
}

symbol,
use,
svg {
  overflow: visible;
}

svg,
img {
  display: block;
}

li {
  display: block;
}

button {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}

:root *[hidden] {
  display: none;
}

/* Focus ring only for keyboard / assistive navigation, never on mouse clicks */
:focus {
  outline: 0;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

::placeholder {
  color: var(--color-text-secondary);
  opacity: 1;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .rolling-notification .ticker-track,
  .floating-image,
  .discord-pulse::after {
    animation: none !important;
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html,
body {
  min-height: 100vh;
}

html {
  overflow: hidden scroll;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--color-surface-3) var(--color-surface-0);
  scrollbar-gutter: stable;
}

html.no-scroll {
  overflow: hidden;
}

body {
  position: relative;
  max-width: 100%;
  width: 100%;
  padding-top: var(--ticker-height);
  line-height: 1.6;
  color: var(--color-text);
  background:
    radial-gradient(60% 420px at 50% 0, rgb(from var(--color-primary) r g b / 0.16), transparent 70%) no-repeat,
    var(--color-surface-0);
  accent-color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  color: var(--color-text);
  background-color: var(--color-primary);
  text-shadow: none;
}

select option {
  color: var(--color-text);
  background-color: var(--color-surface-2);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.page-title {
  margin-bottom: 16px;
  font-size: clamp(26px, 3vw, 34px);
}

.text-content {
  line-height: 1.55;
  word-wrap: break-word;
  word-break: break-word;
}

.text-content h1:not(:last-child),
.text-content h2:not(:last-child),
.text-content h3:not(:last-child),
.text-content h4:not(:last-child),
.text-content h5:not(:last-child),
.text-content h6:not(:last-child) {
  margin-bottom: 20px;
}

.text-content p:not(:last-child) {
  margin-bottom: 12px;
}

.text-content h1 {
  font-size: clamp(28px, 3vw, 36px);
}

.text-content h2 {
  font-size: clamp(22px, 2.4vw, 28px);
}

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

.text-content h4 {
  font-size: 18px;
}

/* Admin-entered descriptions: make lists and links readable again */
.text-content ul,
.text-content ol {
  margin: 0 0 12px;
  padding-left: 1.4em;
}

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

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

.text-content li + li {
  margin-top: 4px;
}

.text-content a:not([class*="btn-"]) {
  color: var(--color-primary-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.text-content a:not([class*="btn-"]):hover {
  color: var(--color-text);
}

.text-content img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.text-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  font-size: 14px;
}

.text-content th,
.text-content td {
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  text-align: left;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.skip-link {
  position: fixed;
  top: calc(var(--ticker-height) + 8px);
  left: 8px;
  z-index: 100001;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  translate: 0 -200%;
  opacity: 0;
  transition: translate var(--dur-fast) ease, opacity var(--dur-fast) ease;
}

.skip-link:focus-visible {
  translate: none;
  opacity: 1;
  outline-offset: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.badge-success {
  background: rgb(from var(--color-success) r g b / 0.15);
  color: var(--color-success);
}

.badge-danger {
  background: rgb(from var(--color-removed) r g b / 0.15);
  color: var(--color-removed);
}

@media (width > 960px) {
  .mobile-only {
    display: none;
  }
}

@media (width <=960px) {
  .desktop-only {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */

.breadcrumbs {
  margin-bottom: 14px;
  color: var(--color-text-secondary);
  font-size: 13px;
}

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

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.breadcrumbs li + li::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background-color: currentColor;
  opacity: 0.45;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m9 18 6-6-6-6'/></svg>") center / contain no-repeat;
}

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

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

.breadcrumbs [aria-current="page"] {
  max-width: 60ch;
  overflow: hidden;
  color: var(--color-text);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popup .breadcrumbs {
  display: none;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn-primary,
.btn-secondary,
.btn-tertiary {
  --btn-color-text: var(--color-text);
  --btn-color-text-hover: var(--btn-color-text);
  --btn-color-bg: var(--color-bg);
  --btn-color-bg-hover: var(--btn-color-bg);
  display: block;
  width: fit-content;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  line-height: 46px;
  color: var(--btn-color-text);
  background-color: var(--btn-color-bg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: pointer;
  transition:
    color var(--dur-fast) ease,
    background-color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    box-shadow var(--dur-base) ease,
    transform var(--dur-fast) ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (width > 960px) {

  .btn-primary,
  .btn-secondary,
  .btn-tertiary {
    padding: 0 18px;
  }
}

/* Only real form controls. Tebex renders the add-to-basket <a> with a bare
   `disabled` attribute whenever package.purchasable is unset, so matching
   [disabled] here would make every card's button unclickable. */
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-tertiary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn-secondary:hover,
.btn-secondary:focus-visible,
.btn-tertiary:hover,
.btn-tertiary:focus-visible {
  color: var(--btn-color-text-hover);
  background-color: var(--btn-color-bg-hover);
}

.btn-primary:active,
.btn-secondary:active,
.btn-tertiary:active {
  transform: scale(0.97);
}

.btn-primary {
  --btn-color-text: var(--color-primary-text);
  --btn-color-bg: var(--color-primary);
  --btn-color-text-hover: var(--color-primary-text-hover);
  --btn-color-bg-hover: var(--color-primary-hover);
  background-image: linear-gradient(135deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 72%, #04102e) 100%);
  box-shadow: 0 2px 10px rgb(from var(--color-primary) r g b / 0.3);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-image: linear-gradient(135deg, var(--color-primary-hover) 0%, var(--color-primary) 100%);
  box-shadow: 0 6px 20px rgb(from var(--color-primary) r g b / 0.4);
}

.btn-secondary {
  --btn-color-text: var(--color-secondary-text);
  --btn-color-bg: var(--color-secondary);
  --btn-color-text-hover: var(--color-secondary-text-hover);
  --btn-color-bg-hover: var(--color-secondary-hover);
  border: 1px solid var(--color-border-strong);
  line-height: 44px;
}

.btn-tertiary {
  --btn-color-text: var(--color-tertiary-text);
  --btn-color-bg: var(--color-tertiary);
  --btn-color-text-hover: var(--color-tertiary-text-hover);
  --btn-color-bg-hover: var(--color-tertiary-hover);
}

.btn-icon {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  padding: 0;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 18px;
}

:root .btn-icon {
  line-height: 0;
  font-size: 0;
  color: transparent;
}

.btn-icon-text {
  display: flex;
  align-items: center;
  min-width: 46px;
  gap: 8px;
}

.btn-icon-text::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
}

@media (width <=960px) {
  :root .btn-icon-text {
    justify-content: center;
    gap: 0;
    font-size: 0;
    color: transparent;
  }
}

.btn-glyph::before,
.btn-glyph-text::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
  background-color: var(--btn-color-text);
  mask-position: center center;
  mask-repeat: no-repeat;
  mask-size: contain;
  transition: background-color var(--dur-fast) ease;
}

.btn-glyph:hover::before,
.btn-glyph:focus-visible::before,
.btn-glyph-text:hover::before,
.btn-glyph-text:focus-visible::before {
  background-color: var(--btn-color-text-hover);
}

.btn-glyph {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
}

:root .btn-glyph {
  padding: 0;
  line-height: 0;
  font-size: 0;
  color: transparent;
}

.btn-glyph::before {
  position: absolute;
  inset: 0;
  margin: auto;
}

.btn-glyph-text {
  display: flex;
  align-items: center;
  min-width: 46px;
  gap: 8px;
}

@media (width <=960px) {
  :root .btn-glyph-text {
    justify-content: center;
    gap: 0;
    font-size: 0;
    color: transparent;
  }
}

.link-text {
  color: var(--color-text-darker);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-position: under;
  transition: color var(--dur-fast) ease;
}

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

/* --------------------------------------------------------------------------
   Quantity stepper
   -------------------------------------------------------------------------- */

.quantity-field {
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 36px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: var(--color-surface-2);
  overflow: hidden;
}

.quantity-field input[type=number] {
  position: relative;
  z-index: 1;
  flex: none;
  -moz-appearance: textfield;
  appearance: textfield;
  width: 40px;
  height: 100%;
  font-size: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.quantity-field input[type=number]:focus,
.quantity-field input[type=number]:hover {
  border-color: var(--color-secondary-hover);
}

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

.quantity-field.with-open-basket input[type=number] {
  margin-left: calc((40px - 2ch) * -1);
  margin-right: 0.25em;
  order: 1;
  text-align: right;
  transition: color var(--dur-fast) ease;
}

.quantity-field .open-basket {
  margin-right: 5px;
  width: fit-content;
  height: 100%;
  font-size: 15px;
  font-weight: 600;
  transition: color var(--dur-fast) ease;
  order: 2;
}

.quantity-field .open-basket:focus-visible,
.quantity-field .open-basket:hover {
  color: var(--color-primary-hover);
}

.quantity-field .open-basket:focus-visible~input[type=number],
.quantity-field .open-basket:hover~input[type=number] {
  color: var(--color-primary-hover);
}

.quantity-field .adjust {
  position: relative;
  z-index: 2;
  flex: none;
  width: 34px;
  height: 100%;
  padding: 0;
  border-radius: 0;
  line-height: 0;
  font-size: 0;
  color: transparent;
}

.quantity-field .adjust:hover {
  background-color: var(--color-tertiary-hover);
}

.quantity-field .adjust.decrease {
  margin-right: auto;
  order: -1;
}

.quantity-field .adjust.increase {
  margin-left: auto;
  order: 100;
}

.quantity-field .adjust::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--color-text);
  mask: url("https://webstore-template-assets.tebex.io/images/plus.svg") no-repeat center center;
  mask-size: 10px;
}

.quantity-field .adjust.decrease::before {
  mask-image: url("https://webstore-template-assets.tebex.io/images/minus.svg");
}

.quantity-field .adjust:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Page frame
   -------------------------------------------------------------------------- */

.site {
  display: flex;
  flex-direction: column;
  gap: var(--widget-padding);
  min-height: calc(100vh - var(--tebex-footer-height) - var(--ticker-height));
  font-size: 14px;
}

@media (width > 960px) {
  .site {
    gap: calc(var(--widget-padding) * 1.5);
  }
}

/* The main column grows so the footer sits at the bottom on short pages */
.site > .site-content,
.site > main {
  flex: 1 0 auto;
}

.site-header,
.site-home-categories,
.site-content,
.site-footer-inner,
.navigation-horizontal {
  margin: 0 auto;
  padding: 0 var(--content-padding);
  width: 100%;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 600; /* above the sticky nav so the search dropdown is never covered */
}

.site-header-inner {
  display: grid;
  align-items: center;
}

.site-header-inner .actions {
  display: flex;
  gap: 6px;
}

.site-header-inner .toggle-navigation {
  background-image: url("https://webstore-template-assets.tebex.io/images/burger.svg");
}

.site-header-inner .user-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header-inner .open-basket::before {
  mask-image: url("https://webstore-template-assets.tebex.io/images/checkout.svg");
}

.site-header-inner .site-title {
  min-width: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
}

.site-header-inner .site-title a {
  display: inline-block;
  max-width: 100%;
}

.site-header-inner .site-title img {
  margin: 0 auto;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Server IP / link block (only when configured) */
.site-header-inner .info {
  position: relative;
  display: block;
  padding-left: 58px;
  min-height: 46px;
  line-height: 22px;
}

.site-header-inner .info .image {
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.site-header-inner .info .title {
  display: block;
  line-height: 24px;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 600;
}

.site-header-inner .info .action {
  display: block;
  color: var(--color-primary-hover);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  transition: color var(--dur-fast) ease;
  cursor: pointer;
}

.site-header-inner .info:hover .action {
  color: var(--color-text);
}

.site-header-inner .info .value {
  width: fit-content;
  border: 1px solid var(--color-border-strong);
  padding: 0 6px;
  border-radius: 4px;
  background: var(--color-surface-2);
  color: var(--color-text-darker);
  font-size: 14px;
}

/* Latest release card */
.header-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.latest-release {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-areas:
    "image label"
    "image title";
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-1);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-base) ease, box-shadow var(--dur-base) ease;
}

.latest-release:hover {
  border-color: rgb(from var(--color-primary) r g b / 0.4);
  box-shadow: var(--shadow-glow);
}

.latest-release-label {
  grid-area: label;
  align-self: end;
  color: var(--color-primary-hover);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.latest-release-image {
  grid-area: image;
  display: block;
  aspect-ratio: var(--media-ratio);
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.latest-release-image img {
  width: 100%;
  height: 100%;
  object-fit: var(--product-image-fit);
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: transform var(--dur-slow) var(--ease-out);
}

.latest-release:hover .latest-release-image img {
  transform: scale(1.05);
}

.latest-release-title {
  grid-area: title;
  align-self: start;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.latest-release-title:hover {
  color: var(--color-primary-hover);
}

.latest-release-title:empty {
  display: none;
}

/* Login pill */
.btn-login-key {
  display: flex !important;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-border-strong);
  background-color: var(--color-surface-1);
}

.btn-login-key:hover {
  border-color: rgb(from var(--color-primary) r g b / 0.5);
}

.login-key-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-out);
}

.btn-login-key:hover .login-key-icon {
  transform: rotate(-15deg);
}

@media (width <=960px) {
  .site-header {
    padding-top: 12px;
  }

  .site-header-inner {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    grid-template-areas:
      "burger logo user"
      "search search search"
      "aside aside aside";
    gap: 14px 10px;
  }

  .site-header-inner .actions {
    grid-area: burger;
  }

  .site-header-inner .site-title {
    grid-area: logo;
    line-height: 56px;
    font-size: 26px;
  }

  .site-header-inner .site-title img {
    height: 56px;
  }

  .site-header-inner .log-in,
  .site-header-inner .user-actions {
    grid-area: user;
    justify-self: end;
  }

  .site-header-inner .user-name,
  .site-header-inner .user-menu {
    display: none;
  }

  .site-header-inner .header-search {
    grid-area: search;
  }

  .site-header-inner .header-aside {
    grid-area: aside;
  }

  .site-header-inner .header-aside:empty {
    display: none;
  }
}

@media (width > 960px) {
  .site-header {
    padding-top: 20px;
  }

  .site-header-inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas:
      "aside logo user"
      "search search search";
    column-gap: 24px;
    row-gap: 18px;
  }

  .site-header-inner .actions,
  .site-header-inner .toggle-navigation {
    display: none;
  }

  .site-header-inner .header-aside {
    grid-area: aside;
    justify-self: start;
    width: min(100%, 320px);
  }

  .site-header-inner .site-title {
    grid-area: logo;
    line-height: 90px;
    font-size: 44px;
  }

  .site-header-inner .site-title img {
    height: 90px;
    max-width: min(100%, 460px);
  }

  .site-header-inner .log-in,
  .site-header-inner .user-actions {
    grid-area: user;
    justify-self: end;
  }

  .site-header-inner .header-search {
    grid-area: search;
    justify-self: center;
    width: min(100%, 560px);
  }

  .site-header-inner .user-actions {
    position: relative;
    gap: 16px;
  }

  .site-header-inner .user-name {
    position: relative;
    cursor: default;
    text-align: center;
    justify-content: center;
  }

  .site-header-inner .user-name::before {
    mask-image: url("https://webstore-template-assets.tebex.io/images/user.svg");
  }

  .site-header-inner .user-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    margin: 0 auto;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface-2);
    box-shadow: var(--shadow-md);
    color: var(--color-text);
    line-height: 34px;
    font-size: 15px;
    text-align: center;
    overflow: hidden;
    translate: 0 10px;
    visibility: hidden;
    opacity: 0;
    transition: translate var(--dur-fast) ease, visibility var(--dur-fast) ease, opacity var(--dur-fast) ease;
  }

  .site-header-inner .user-menu:after {
    content: "";
    display: block;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 11px;
    height: 6px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background-color: var(--color-surface-2);
    pointer-events: none;
  }

  .site-header-inner .user-menu:before {
    content: "";
    display: block;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 20px;
  }

  .site-header-inner .user-menu li {
    background-color: var(--color-surface-2);
  }

  .site-header-inner .user-menu li:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
  }

  .site-header-inner .user-menu a,
  .site-header-inner .user-menu button {
    display: block;
    width: 100%;
    padding: 0 calc(var(--widget-padding) / 2);
    transition: background-color var(--dur-fast) ease;
  }

  .site-header-inner .user-menu a:hover,
  .site-header-inner .user-menu a:focus-visible,
  .site-header-inner .user-menu button:hover,
  .site-header-inner .user-menu button:focus-visible {
    background-color: var(--color-surface-3);
  }

  .site-header-inner .user-menu .log-out {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
  }

  .site-header-inner .user-menu .log-out::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    background-color: currentColor;
    mask: url("https://webstore-template-assets.tebex.io/images/log-out.svg") center center no-repeat;
    mask-size: contain;
  }

  .site-header-inner .user-name:hover~.user-menu,
  .site-header-inner .user-name:active~.user-menu,
  .site-header-inner .user-name:focus~.user-menu,
  .site-header-inner .user-menu:hover,
  .site-header-inner .user-menu:focus-within {
    translate: none;
    visibility: visible;
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Search (category pages)
   -------------------------------------------------------------------------- */

.category-search-container {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  z-index: 20;
}

.search-input {
  width: 100%;
  height: 46px;
  padding: 0 18px 0 46px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface-1);
  color: var(--color-text);
  font-size: 15px;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-base) ease, background-color var(--dur-fast) ease;
}

.search-input:hover {
  border-color: rgb(255 255 255 / 0.22);
}

.search-input:focus {
  background: var(--color-surface-2);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgb(from var(--color-primary) r g b / 0.2);
  outline: none;
}

.search-icon {
  position: absolute;
  top: 13px;
  left: 16px;
  width: 20px;
  height: 20px;
  color: var(--color-text-secondary);
  pointer-events: none;
}

.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface-1);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
}

.search-results-list {
  list-style: none;
  padding: 6px;
  margin: 0;
}

.search-result-item {
  display: block;
}

.result-link {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-text);
  transition: background var(--dur-fast) ease;
}

.result-link:hover,
.result-link:focus-visible {
  background: var(--color-surface-3);
}

.result-image {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  margin-right: 12px;
  flex-shrink: 0;
  background: var(--color-surface-0);
}

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

.result-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.result-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-price {
  font-size: 13px;
  color: var(--color-primary-hover);
  font-weight: 700;
}

.no-results {
  padding: 20px;
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Navigation — mobile drawer (both nav modes)
   -------------------------------------------------------------------------- */

@media (width <=960px) {
  .site-navigation {
    position: fixed;
    inset: 0;
    z-index: 100000;
    padding: 0;
    background: rgb(0 0 0 / 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: visibility var(--dur-base) ease, opacity var(--dur-base) ease;
  }

  body:not(.show-navigation) .site-navigation {
    visibility: hidden;
    opacity: 0;
  }

  .site-navigation .navigation-list {
    display: flex;
    flex-direction: column;
    position: absolute;
    inset: 0 56px 0 0;
    padding: 76px var(--widget-padding) var(--widget-padding);
    background: var(--color-surface-0);
    border-right: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    line-height: 24px;
    color: var(--color-text-darker);
    font-size: 17px;
    overflow: hidden auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-surface-3) var(--color-surface-0);
    transition: translate var(--dur-base) var(--ease-out);
  }

  body:not(.show-navigation) .site-navigation .navigation-list {
    translate: -40px 0;
  }

  .site-navigation .close-navigation {
    position: absolute;
    top: 14px;
    right: 62px;
    border-radius: var(--radius-sm);
    background-image: url("https://webstore-template-assets.tebex.io/images/close.svg");
    background-size: 22px;
  }

  .site-navigation ul ul {
    padding-left: 14px;
    line-height: 22px;
    font-size: 15px;
  }

  .site-navigation li {
    position: relative;
    width: 100%;
  }

  .site-navigation .log-out {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
  }

  .site-navigation .log-out a {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .site-navigation .log-out a::before {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background-color: currentColor;
    mask: url("https://webstore-template-assets.tebex.io/images/log-out.svg") center center no-repeat;
    mask-size: contain;
  }

  .site-navigation .has-children {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .site-navigation .has-children>a {
    flex: 1 1 auto;
  }

  .site-navigation .has-children .toggle {
    background-image: url("https://webstore-template-assets.tebex.io/images/chevron.svg");
    background-size: 20px;
    transition: rotate var(--dur-fast) ease;
  }

  .site-navigation .has-children.expanded>.toggle {
    rotate: 180deg;
  }

  .site-navigation .has-children>ul {
    width: 100%;
  }

  .site-navigation .has-children:not(.expanded)>ul {
    display: none;
  }

  .site-navigation a {
    display: block;
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: var(--radius-sm);
    transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
  }

  .site-navigation a:hover {
    color: var(--color-text);
    background: var(--color-tertiary-hover);
  }

  .site-navigation a.active,
  .site-navigation a.link-active {
    color: var(--color-primary-hover);
    background: rgb(from var(--color-primary) r g b / 0.14);
    font-weight: 700;
  }

  .site-navigation ul ul a {
    padding: 8px 12px;
  }

  .site-navigation .nav-discord a {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .site-navigation .nav-discord a::after {
    content: "Discord";
  }
}

/* --------------------------------------------------------------------------
   Navigation — horizontal bar (sticky under the ticker on desktop)
   -------------------------------------------------------------------------- */

@media (width > 960px) {
  .navigation-horizontal {
    position: sticky;
    top: var(--ticker-height);
    z-index: 500;
  }

  .navigation-horizontal .close-navigation {
    display: none;
  }

  .navigation-horizontal .navigation-list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-1);
    box-shadow: var(--shadow-sm);
    line-height: 24px;
    font-size: 15px;
    font-weight: 600;
  }

  .navigation-horizontal .navigation-list>li>a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
  }

  .navigation-horizontal .navigation-list>li.has-children>a {
    padding-right: 4px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .navigation-horizontal ul ul {
    line-height: 24px;
    font-size: 14px;
    font-weight: 500;
  }

  .navigation-horizontal>ul>li>a {
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .navigation-horizontal .has-children {
    position: relative;
    display: flex;
    align-items: center;
  }

  .navigation-horizontal .has-children .toggle {
    flex: none;
    width: 30px;
    height: 40px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background-color: transparent;
    background-image: url("https://webstore-template-assets.tebex.io/images/chevron.svg");
    background-size: 18px;
    transition: rotate var(--dur-fast) ease, background-color var(--dur-fast) ease;
  }

  .navigation-horizontal .has-children:hover>.toggle {
    rotate: 180deg;
  }

  .navigation-horizontal .has-children>ul {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: max-content;
    min-width: 200px;
    padding: 6px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    background: var(--color-surface-1);
    box-shadow: var(--shadow-lg);
    transition: opacity var(--dur-fast) ease, translate var(--dur-fast) ease, visibility var(--dur-fast) ease;
  }

  /* Bridge the 6px gap so the menu does not close while moving the cursor down */
  .navigation-horizontal .has-children>ul::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 8px;
  }

  .navigation-horizontal .has-children:not(:hover):not(:focus-within)>ul {
    visibility: hidden;
    opacity: 0;
    translate: 0 -6px;
  }

  .navigation-horizontal a {
    display: block;
    transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
  }

  .navigation-horizontal .navigation-list>li>a:hover,
  .navigation-horizontal .has-children:hover>a {
    color: var(--color-text);
    background-color: var(--color-tertiary-hover);
  }

  .navigation-horizontal .navigation-list>li>a.link-active {
    color: var(--color-primary-hover);
    background-color: rgb(from var(--color-primary) r g b / 0.14);
  }

  .navigation-horizontal li li a {
    width: 100%;
    max-width: 28ch;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .navigation-horizontal li li a:hover,
  .navigation-horizontal li li a.link-active {
    color: var(--color-text);
    background-color: rgb(from var(--color-primary) r g b / 0.2);
  }
}

/* --------------------------------------------------------------------------
   Navigation — vertical (in sidebar widget)
   -------------------------------------------------------------------------- */

@media (width > 960px) {
  .navigation-vertical.widget {
    padding: 10px;
  }

  .navigation-vertical .close-navigation {
    display: none;
  }

  .navigation-vertical .navigation-list {
    line-height: 26px;
    color: var(--color-text-darker);
    font-size: 15px;
    font-weight: 500;
  }

  .navigation-vertical ul ul {
    padding-left: 12px;
    line-height: 22px;
    font-size: 14px;
  }

  .navigation-vertical .has-children {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .navigation-vertical .has-children>a {
    flex: 1 1 auto;
    max-width: calc(100% - 46px);
  }

  .navigation-vertical .has-children .toggle {
    background-color: transparent !important;
    background-image: url("https://webstore-template-assets.tebex.io/images/chevron.svg");
    background-size: 20px;
    transition: rotate var(--dur-fast) ease;
  }

  .navigation-vertical .has-children.expanded>.toggle {
    rotate: 180deg;
  }

  .navigation-vertical .has-children>ul {
    width: 100%;
  }

  .navigation-vertical .has-children:not(.expanded)>ul {
    display: none;
  }

  .navigation-vertical a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
  }

  .navigation-vertical a:hover {
    color: var(--color-text);
    background: var(--color-tertiary-hover);
  }

  .navigation-vertical a.link-active {
    color: var(--color-primary-hover);
    background: rgb(from var(--color-primary) r g b / 0.14);
    font-weight: 600;
  }

  .navigation-vertical ul ul a {
    padding: 6px 12px;
  }
}

/* Discord icon link in the nav */
.nav-discord a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.discord-nav-icon {
  width: 22px;
  height: 22px;
  transition: opacity var(--dur-fast) ease, transform var(--dur-fast) ease, filter var(--dur-fast) ease;
  filter: brightness(0) saturate(100%) invert(36%) sepia(60%) saturate(2000%) hue-rotate(222deg) brightness(100%) contrast(92%);
}

.nav-discord a:hover .discord-nav-icon {
  transform: scale(1.15);
  filter: brightness(0) invert(1);
}

/* --------------------------------------------------------------------------
   Homepage promo cards
   -------------------------------------------------------------------------- */

.site-home-categories {
  margin-top: 4px;
}

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

.home-category-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-1);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) ease, box-shadow var(--dur-base) ease;
}

.home-category-card:hover,
.home-category-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgb(from var(--color-primary) r g b / 0.45);
  box-shadow: var(--shadow-glow);
}

.home-category-card-media {
  display: block;
  aspect-ratio: var(--media-ratio);
  overflow: hidden;
  border-radius: var(--radius-md);
}

.home-category-card-media img {
  width: 100%;
  height: 100%;
  object-fit: var(--product-image-fit);
  transition: transform var(--dur-slow) var(--ease-out);
}

.home-category-card:hover .home-category-card-media img {
  transform: scale(1.05);
}

.home-category-card-title {
  padding: 0 4px 4px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

@media (width <=760px) {
  .home-categories-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .home-categories-grid::-webkit-scrollbar {
    display: none;
  }

  .home-category-card {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
}

/* --------------------------------------------------------------------------
   Content column + forms
   -------------------------------------------------------------------------- */

.store-text {
  padding: var(--content-padding);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-1);
  line-height: 1.6;
  font-size: 16px;
  font-weight: 400;
}

.store-form {
  font-size: 16px;
}

.store-form p {
  margin-bottom: 20px;
}

.store-form .input-group,
.store-form .field,
.store-form .field-inline {
  margin-bottom: 20px;
}

.store-form .input-group>p,
.store-form .field>p,
.store-form .field-inline>p {
  margin-bottom: 10px;
}

.store-form .field-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px;
}

@media (width > 600px) {
  .store-form .field-inline {
    gap: 0 24px;
  }
}

.store-form input,
.store-form select,
.store-form textarea {
  display: block;
}

.store-form input[type=text],
.store-form input[type=password],
.store-form input[type=email],
.store-form input[type=number],
.store-form input[type=search],
.store-form input[type=url],
.store-form input[type=tel],
.store-form input[type=date],
.store-form input[type=time],
.store-form input[type=datetime-local],
.store-form input[type=file],
.store-form input[type=month],
.store-form input[type=week],
.store-form select,
.store-form textarea,
.widget-gift-card .gift-card-input {
  margin-bottom: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: var(--color-surface-2);
  font-size: 15px;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-base) ease;
}

.store-form input:focus,
.store-form select:focus,
.store-form textarea:focus,
.widget-gift-card .gift-card-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(from var(--color-primary) r g b / 0.2);
  outline: none;
}

.store-form select {
  appearance: none;
  padding-right: 40px;
  background-image: url("https://webstore-template-assets.tebex.io/images/chevron.svg");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}

.store-form .field-inline input,
.store-form .field-inline select,
.store-form .field-inline textarea {
  width: auto;
}

.store-form .actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.store-form .actions .link-text {
  align-self: center;
  font-size: 16px;
  font-weight: 600;
  margin: 0 16px;
}

/* Column grid with sidebars */
@media (width <=960px) {
  .site-content-widgets {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
}

@media (width > 960px) {
  .site-content-widgets {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    align-items: start;
    gap: 32px;
  }

  body.is-sidebar-right .site-content-widgets {
    grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  }

  .site-content-widgets .store-sidebar {
    order: -1;
  }

  body.is-sidebar-right .site-content-widgets .store-sidebar {
    order: 1;
  }

  /* 3-column layout: left sidebar + main + right sidebar */
  .site-content-widgets.has-right-sidebar {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--sidebar-width);
  }

  body.is-sidebar-right .site-content-widgets.has-right-sidebar {
    grid-template-columns: minmax(0, 1fr) var(--sidebar-width) var(--sidebar-width);
  }

  .site-content-widgets.has-right-sidebar .store-sidebar-right {
    order: 2;
  }
}

.category-description {
  margin-bottom: var(--widget-padding);
  padding: var(--content-padding);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-1);
  line-height: 1.55;
  font-size: 16px;
}

.category-title + .category-description {
  margin-top: 8px;
}

.no-products {
  padding: var(--widget-padding);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  color: var(--color-text-secondary);
  font-size: 16px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Product cards (grid + list)
   -------------------------------------------------------------------------- */

.store-products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store-products-images {
  display: grid;
  /* Each column is at least 1/N of the row (N = --products-max-columns), so wide
     screens cap at N cards per row instead of packing in as many as fit. */
  grid-template-columns: repeat(auto-fill, minmax(max(var(--products-min-width), calc((100% - (var(--products-max-columns) - 1) * var(--products-gap)) / var(--products-max-columns))), 1fr));
  gap: var(--products-gap);
}

.store-product {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-1);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) ease, box-shadow var(--dur-base) ease;
}

.store-product:hover,
.store-product:focus-within {
  transform: translateY(-4px);
  border-color: rgb(from var(--color-primary) r g b / 0.45);
  box-shadow: var(--shadow-glow);
}

.store-product .product-title {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

.store-product .product-title a {
  color: inherit;
  transition: color var(--dur-fast) ease;
}

.store-product .product-title a:hover,
.store-product .image-link:hover~.product-title a {
  color: var(--color-primary-hover);
}

.store-product .product-title .countdown {
  display: block;
  margin-top: 8px;
  color: var(--color-removed);
  font-size: 0.75em;
  font-variant-numeric: tabular-nums;
}

.store-product .product-title .countdown::before {
  content: "";
  display: inline-block;
  vertical-align: -0.15em;
  margin-right: 0.25em;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  mask: url("https://webstore-template-assets.tebex.io/images/countdown.svg") center center/contain no-repeat;
}

.store-product .image-link {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--media-ratio);
  overflow: hidden;
  border-radius: var(--radius-md);
}

.store-product .image {
  width: 100%;
  height: 100%;
  object-fit: var(--product-image-fit);
  transition: transform var(--dur-slow) var(--ease-out);
}

.store-product:hover .image {
  transform: scale(1.05);
}

.store-product .descr {
  color: var(--color-text-secondary);
}

.store-product .price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.store-product .price strong {
  color: var(--color-text);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.store-product .price .discount {
  order: 2;
  color: var(--color-text-secondary);
  font-weight: 400;
  text-decoration-line: line-through;
  text-decoration-color: var(--color-removed);
}

.store-product .price .discount strong {
  color: inherit;
  font-size: 14px;
  font-weight: 400;
}

.store-product .price .currency-code {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.store-product .actions {
  display: flex;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.store-product .actions.updating {
  pointer-events: none;
}

.store-product .actions.updating>* {
  opacity: 0.3;
  filter: grayscale(100%);
}

.store-product .actions.updating::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: 10;
  margin: auto;
  width: 30px;
  height: 30px;
  background: url("https://webstore-template-assets.tebex.io/images/loading.svg") center center no-repeat;
  background-size: contain;
}

.store-product .quantity-field {
  height: 46px;
}

.store-product .wide {
  flex: 1 1 auto;
}

/* Gift / remove icon buttons: masked glyph so they work on any button colour */
.store-product .gift,
.store-product .remove {
  flex: none;
  background-image: none;
}

.store-product .gift::before,
.store-product .remove::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  background-color: var(--btn-color-text);
  mask: url("https://webstore-template-assets.tebex.io/images/gift.svg") center center / contain no-repeat;
  transition: background-color var(--dur-fast) ease;
}

.store-product .remove::before {
  mask-image: url("https://webstore-template-assets.tebex.io/images/delete.svg");
}

.store-product .gift:hover::before,
.store-product .remove:hover::before {
  background-color: var(--btn-color-text-hover);
}

.store-products-images .store-product .descr {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

/* Sale badge sits over the image */
.product-sale-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: #001a15;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgb(from var(--color-accent) r g b / 0.35);
  pointer-events: none;
}

/* List layout */
.store-products-list .store-product {
  padding: 12px;
}

.store-products-list .store-product .image-link {
  width: 72px;
  aspect-ratio: 1;
  flex: none;
  margin: 0;
}

.store-products-list .product-sale-badge {
  top: 14px;
  left: 14px;
  padding: 2px 6px;
  font-size: 9px;
}

@media (width > 600px) {
  .store-products-list .store-product {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .store-products-list .store-product .actions {
    gap: 8px;
  }

  .store-products-list .store-product .actions .wide {
    min-width: 170px;
  }

  .store-products-list .store-product .product-title {
    margin-right: auto;
  }

  .store-products-list .store-product .price {
    margin-top: 0;
  }
}

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

.store-product-full,
.store-product-full.popup-content {
  padding: var(--content-padding);
  padding-bottom: 0;
  overflow: visible;
}

.store-product-full:hover,
.store-product-full:focus-within {
  transform: none;
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.store-product-full .product-title {
  grid-area: title;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.store-product-full .image {
  width: 100%;
  aspect-ratio: var(--media-ratio);
  max-height: 560px;
  object-fit: var(--product-image-fit);
  border-radius: var(--radius-md);
  transition: none;
}

.store-product-full:hover .image {
  transform: none;
}

/* Stacked product layout: title, hero, description, then the sticky purchase bar.
   The main column sits between two sidebars, so a side-by-side hero/title split
   left the title squeezed into ~200px; a full-width hero also sells the asset better. */
.store-product-full {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.store-product-full .breadcrumbs {
  margin-bottom: 0;
}

.store-product-full .actions {
  order: 10;
}

.store-product-full .descr {
  color: var(--color-text-darker);
  font-size: 15px;
}

.store-product-full .actions {
  position: sticky !important;
  bottom: 0;
  z-index: 5;
  align-items: center;
  justify-content: center;
  margin: 0 calc(var(--content-padding) * -1);
  padding: 16px var(--content-padding);
  border-top: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--color-surface-1);
}

@media (width <=600px) {
  .store-product-full .actions {
    flex-wrap: wrap;
  }

  .store-product-full .price {
    width: 100%;
  }
}

.store-product-full .actions .wide {
  max-width: 260px;
}

.store-product-full .price {
  margin-right: auto;
  margin-top: 0;
}

.store-product-full .price strong {
  font-size: 26px;
}

/* --------------------------------------------------------------------------
   Options step (server / variables) and tier quote
   -------------------------------------------------------------------------- */

.store-product-options,
.store-quote {
  padding: var(--content-padding);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-1);
}

.store-product-options .product-title {
  margin-bottom: 16px;
  font-size: 22px;
}

.store-product-options .actions {
  position: sticky !important;
  bottom: var(--widget-padding);
  justify-content: start;
  width: fit-content;
  max-width: 100%;
}

.store-product-options .actions.updating {
  pointer-events: none;
}

.store-product-options .actions.updating>* {
  opacity: 0.3;
  filter: grayscale(100%);
}

.store-product-options .actions.updating::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: 10;
  margin: auto;
  width: 30px;
  height: 30px;
  background: url("https://webstore-template-assets.tebex.io/images/loading.svg") center center no-repeat;
  background-size: contain;
}

.store-product-options .actions .btn-primary,
.store-product-options .actions .btn-secondary,
.store-product-options .actions .btn-tertiary {
  width: 230px;
}

.store-product-options .actions-multiple {
  width: auto;
}

.store-product-options .actions-multiple .btn-primary,
.store-product-options .actions-multiple .btn-secondary,
.store-product-options .actions-multiple .btn-tertiary {
  width: auto;
  flex: 1 1 auto;
}

.quote-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

/* Tiered subscription categories */
.store-category-tiered-header {
  margin-bottom: var(--widget-padding);
  padding: var(--content-padding);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-1);
}

.store-products-tiered {
  gap: 20px;
}

.store-product-tiered {
  flex: 1 1 260px;
  max-width: 100%;
}

.store-product-tiered .image {
  width: 100%;
  aspect-ratio: var(--media-ratio);
  object-fit: var(--product-image-fit);
  border-radius: var(--radius-md);
}

.store-product-tiered.subscribed {
  border-color: rgb(from var(--color-primary) r g b / 0.6);
}

/* --------------------------------------------------------------------------
   Sidebar widgets
   -------------------------------------------------------------------------- */

.widget {
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-1);
  box-shadow: var(--shadow-sm);
}

.widget+.widget {
  margin-top: var(--widget-padding);
}

.widget-title {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.widget-featured .store-product {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.widget-featured .store-product:hover,
.widget-featured .store-product:focus-within {
  transform: none;
  box-shadow: none;
}

.widget-featured .product-sale-badge {
  top: 10px;
  left: 10px;
}

.widget-gift-card {
  text-align: center;
}

.widget-gift-card .check {
  width: 100%;
}

.widget-recent .purchase {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  padding: 8px 0;
  line-height: 1.4;
}

.widget-recent .purchase+.purchase {
  border-top: 1px solid var(--color-border);
}

.widget-recent .avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--color-surface-2);
}

.widget-recent .username {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
}

.widget-recent .empty {
  text-align: center;
  color: var(--color-text-secondary);
}

.widget-recent time {
  color: var(--color-text-secondary);
  font-size: 0.9em;
}

.widget-recent .sep {
  margin: 0 0.3em;
  color: var(--color-text-secondary);
}

.widget-recent .price {
  color: var(--color-primary-hover);
  font-weight: 600;
}

.widget-top-donator {
  text-align: center;
}

.widget-top-donator .avatar {
  margin: 0 auto 12px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-surface-2);
}

.widget-top-donator .username {
  margin-bottom: 6px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
}

.widget-top-donator .empty {
  text-align: center;
  color: var(--color-text-secondary);
}

.widget-community-goal .widget-content,
.widget-goal .widget-content {
  text-align: center;
}

.widget-community-goal p:not(:last-child),
.widget-goal p:not(:last-child) {
  margin-bottom: 12px;
}

.widget-community-goal .progress,
.widget-goal .progress {
  height: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--color-surface-3);
}

@keyframes progressBarAnimation {
  to {
    background-position: 100% 0;
  }
}

.widget-community-goal .progress-bar,
.widget-goal .progress-bar {
  height: 12px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
}

.widget-community-goal .progress-bar.striped,
.widget-goal .progress-bar.striped {
  background: var(--color-primary) linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary) 33%, rgb(from var(--color-primary-hover) r g b/0.35) 33%, rgb(from var(--color-primary-hover) r g b/0.35) 66%, var(--color-primary) 66%, var(--color-primary) 100%) repeat;
  background-size: 24px 100%;
}

.widget-community-goal .progress-bar.striped.animated,
.widget-goal .progress-bar.striped.animated {
  animation: progressBarAnimation 10s infinite linear;
}

.widget-community-goal .goal-image {
  margin: 0 auto 12px;
  max-width: 96px;
  border-radius: var(--radius-md);
}

.widget-community-goal .descr {
  margin-bottom: 12px;
}

.widget-server-status .widget-content {
  text-align: center;
}

.widget-server-status h6 {
  margin-bottom: 8px;
  padding: 6px 10px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.widget-server-status h6:hover {
  border-color: rgb(from var(--color-primary) r g b / 0.5);
}

/* --------------------------------------------------------------------------
   Featured right sidebar
   -------------------------------------------------------------------------- */

.store-sidebar-right {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.right-sidebar-heading {
  margin-bottom: 14px;
}

.right-sidebar-heading h3 {
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.right-sidebar-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.right-sidebar-item {
  position: relative;
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-1);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) ease, border-color var(--dur-base) ease;
}

.right-sidebar-item:hover,
.right-sidebar-item:focus-visible {
  transform: translateY(-3px);
  border-color: rgb(from var(--color-primary) r g b / 0.45);
  box-shadow: var(--shadow-glow);
}

.right-sidebar-item img {
  width: 100%;
  aspect-ratio: var(--media-ratio);
  object-fit: var(--product-image-fit);
  display: block;
  transition: transform var(--dur-slow) var(--ease-out);
}

.right-sidebar-item:hover img {
  transform: scale(1.05);
}

.right-sidebar-label {
  display: block;
  padding: 10px 14px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface-1);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (width <=960px) {
  .store-sidebar-right {
    order: 10;
  }

  .right-sidebar-items {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .right-sidebar-item {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
  }
}

/* Discord server widget */
.discord-widget {
  margin-top: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-1);
  box-shadow: var(--shadow-sm);
}

.discord-widget-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
}

.discord-widget-server-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-surface-3);
}

.discord-widget-server-icon[src=""] {
  visibility: hidden;
}

.discord-widget-server-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.discord-widget-server-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discord-widget-online-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.dw-separator {
  margin: 0 2px;
  color: var(--color-text-secondary);
}

.dw-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dw-status-dot.online {
  background: #3ba55d;
}

.dw-status-dot.idle {
  background: #faa61a;
}

.dw-status-dot.dnd {
  background: #ed4245;
}

.dw-status-dot.offline {
  background: #747f8d;
}

.discord-widget-members {
  padding: 8px 0;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-surface-3) transparent;
}

.discord-widget-members::-webkit-scrollbar {
  width: 6px;
}

.discord-widget-members::-webkit-scrollbar-thumb {
  background: var(--color-surface-3);
  border-radius: 3px;
}

.discord-widget-members:empty {
  display: none;
}

.dw-loading {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.dw-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px;
  transition: background var(--dur-fast) ease;
}

.dw-member:hover {
  background: var(--color-tertiary-hover);
}

.dw-member-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.dw-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-surface-3);
}

.dw-member-avatar-wrap .dw-status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--color-surface-1);
  border-radius: 50%;
}

.dw-member-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-darker);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dw-member-more {
  padding: 8px 16px;
  font-size: 11px;
  color: var(--color-text-secondary);
  text-align: center;
}

.discord-widget-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
}

.discord-widget-join {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: var(--color-discord);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.discord-widget-join:hover {
  background: #4752c4;
  transform: translateY(-1px);
}

.dw-join-icon {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

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

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-1);
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}

@media (width <=960px) {
  .site-footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

.site-footer-inner .site-footer-nav {
  line-height: 150%;
  font-size: 14px;
}

.site-footer-inner .site-footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer-inner .site-footer-nav a {
  color: var(--color-text-darker);
  text-decoration-line: underline;
  text-underline-offset: 2px;
  transition: color var(--dur-fast) ease;
}

.site-footer-inner .site-footer-nav a:hover {
  color: var(--color-primary-hover);
}

.site-footer-inner .copyright {
  max-width: 70ch;
  line-height: 1.5;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.site-footer-inner .we-accept {
  display: flex;
  align-items: center;
  gap: 10px;
  order: 2;
}

@media (width <=960px) {
  .site-footer-inner .we-accept {
    order: -1;
    justify-content: center;
  }
}

.site-footer-inner .we-accept li {
  display: block;
}

.site-footer-inner .we-accept img {
  display: block;
  height: 26px;
  width: auto;
  max-width: 57px;
  opacity: 0.9;
}

.site-footer-credit {
  color: var(--color-text-secondary);
  background: var(--color-surface-0);
  font-size: 11px;
}

.site-footer-credit .site-footer-credit-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-direction: column;
  gap: 22px;
  margin: auto;
  padding-top: 16px;
  padding-bottom: 16px;
  min-height: 45px;
}

@media (width > 960px) {
  .site-footer-credit .site-footer-credit-inner {
    align-items: center;
    flex-direction: row;
  }
}

.site-footer-credit .copyright {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

@media (width > 960px) {
  .site-footer-credit .copyright {
    align-items: center;
  }
}

.site-footer-credit .copyright .tebex-logo-link {
  flex: none;
}

.site-footer-credit .legal {
  display: flex;
  gap: 16px;
  white-space: nowrap;
}

@media (width > 960px) {
  .site-footer-credit .legal {
    gap: 20px;
  }
}

.site-footer-credit .legal a {
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--dur-fast) ease;
}

.site-footer-credit .legal a:hover {
  color: var(--color-primary-hover);
}

.tebex-footer {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
  background: transparent;
}

/* --------------------------------------------------------------------------
   Popups
   -------------------------------------------------------------------------- */

.popup {
  --fade-duration: 0.3s;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100vw;
  z-index: 1000;
  overflow: hidden scroll;
  scrollbar-width: thin;
  scrollbar-color: var(--color-surface-3) transparent;
  background: rgb(6 8 12 / 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity var(--fade-duration) ease-in-out, display var(--fade-duration) allow-discrete;
}

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

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

.popup-scroll-cont {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: calc(var(--content-padding) / 2);
  overscroll-behavior: none;
}

@media (width > 600px) {
  .popup-scroll-cont {
    padding: var(--content-padding);
  }
}

.popup-content {
  position: relative;
  width: 100%;
  max-width: 550px;
  padding: var(--widget-padding);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-surface-1);
  box-shadow: var(--shadow-lg);
  transition: translate var(--fade-duration) var(--ease-out);
}

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

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

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

.popup.popup-loading .popup-content::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  margin: auto;
  width: 38px;
  height: 38px;
  background: url("https://webstore-template-assets.tebex.io/images/loading.svg") center center no-repeat;
  background-size: contain;
}

.popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: url("https://webstore-template-assets.tebex.io/images/close.svg") center center no-repeat;
  background-size: 20px;
  opacity: 0.6;
  line-height: 0;
  font-size: 0;
  color: transparent;
  transition: opacity var(--dur-fast) ease, background-color var(--dur-fast) ease;
}

@media (width <=600px) {
  .popup-close {
    width: 50px;
    height: 50px;
    background-size: 24px;
  }
}

.popup-close:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
}

.store-product-popup-content {
  max-width: 860px;
}

.popup .store-product-full {
  border: none;
  box-shadow: none;
}

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

.popup .store-product-options,
.popup .store-text {
  border: none;
  background: transparent;
  padding: 0;
}

.gift-form-popup .popup-content h1,
.gift-form-popup .popup-content h2,
.gift-form-popup .popup-content h3,
.gift-form-popup .popup-content h4,
.gift-form-popup .popup-content h5,
.gift-form-popup .popup-content h6 {
  margin-bottom: 12px;
}

.gift-form-popup .popup-content .btn-primary {
  width: 240px;
}

.gift-form-popup .popup-content .actions {
  position: relative;
  width: fit-content;
  max-width: 100%;
}

.gift-form-popup .popup-content .actions.updating {
  pointer-events: none;
}

.gift-form-popup .popup-content .actions.updating>* {
  opacity: 0.3;
  filter: grayscale(100%);
}

.gift-form-popup .popup-content .actions.updating::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: 10;
  margin: auto;
  width: 30px;
  height: 30px;
  background: url("https://webstore-template-assets.tebex.io/images/loading.svg") center center no-repeat;
  background-size: contain;
}

.login-popup {
  z-index: 1002;
}

.login-popup-content {
  max-width: 480px;
  padding-bottom: calc(var(--widget-padding) - 12px);
}

/* --------------------------------------------------------------------------
   Basket drawer
   -------------------------------------------------------------------------- */

.basket {
  position: relative;
  z-index: 1001;
}

.site-content .basket {
  display: none;
}

.basket .basket-empty {
  margin: auto;
  padding: var(--widget-padding);
  color: var(--color-text-secondary);
  text-align: center;
  font-size: 18px;
}

.basket .basket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: calc(var(--ticker-height) + 20px) var(--content-padding) 20px;
  font-size: 20px;
  font-weight: 600;
  background: var(--color-surface-1);
  border-bottom: 1px solid var(--color-border);
}

.basket .basket-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.basket .basket-title::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  background-color: var(--color-text);
  mask: url("https://webstore-template-assets.tebex.io/images/user.svg") center center no-repeat;
  mask-size: contain;
}

.basket .basket-second-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--content-padding);
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.basket .basket-second-header .total {
  font-size: 14px;
}

.basket .basket-second-header .total strong {
  color: var(--color-text);
  font-size: 18px;
  font-weight: 700;
}

.basket .basket-second-header .currency {
  display: flex;
  align-items: center;
  gap: 6px;
}

.basket .basket-second-header .currency::after {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background: url("https://webstore-template-assets.tebex.io/images/dropdown-arrow.svg") center center no-repeat;
}

.basket .basket-content {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
}

.basket .basket-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: var(--widget-padding);
}

.basket .basket-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-1);
}

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

.basket .basket-item .options {
  list-style-position: inside;
  color: var(--color-text-secondary);
  font-size: 13px;
}

.basket .basket-item .options:has(li) {
  padding: 5px 0;
}

.basket .basket-item .options li {
  display: block;
  padding: 1px 0;
}

.basket .basket-item .options li::before {
  content: "";
  display: inline-block;
  margin-right: 0.4em;
  width: 3px;
  height: 3px;
  vertical-align: middle;
  background-color: currentColor;
  border-radius: 50%;
}

.basket .basket-item .title {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

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

.basket .basket-item .price {
  margin-top: 4px;
  color: var(--color-primary-hover);
  font-size: 14px;
}

.basket .basket-item .price strong {
  font-size: 18px;
  font-weight: 700;
}

.basket .basket-item .quantity-field {
  height: 40px;
}

.basket .basket-item .remove {
  width: 40px;
  height: 40px;
  line-height: 38px;
}

.basket .basket-item .remove::before {
  mask-image: url("https://webstore-template-assets.tebex.io/images/delete.svg");
}

.basket .basket-checkout {
  margin-top: auto;
  padding: 16px var(--content-padding) 40px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-1);
}

@media (width > 960px) {
  .basket .basket-checkout {
    padding-bottom: 60px;
  }
}

.basket .basket-checkout h3 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.basket .basket-checkout .total {
  color: var(--color-text);
  font-size: 16px;
  font-weight: 400;
}

.basket .basket-checkout .total strong {
  font-size: 26px;
  font-weight: 700;
}

.basket .basket-checkout .checkout {
  width: 100%;
  height: 52px;
  line-height: 52px;
  font-size: 16px;
}

.basket-popup {
  background-color: transparent;
}

.basket-popup .popup-scroll-cont {
  justify-content: flex-end;
  padding: 0;
}

.basket-popup-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  border: none;
  border-left: 1px solid var(--color-border-strong);
  border-radius: 0;
  background: var(--color-surface-0);
  box-shadow: var(--shadow-lg);
  transition: translate var(--fade-duration) var(--ease-out);
}

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

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

.basket-popup-content .popup-close {
  top: calc(var(--ticker-height) + 12px);
}

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

.basket-popup-content.updating::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: 10;
  margin: auto;
  width: 38px;
  height: 38px;
  background: url("https://webstore-template-assets.tebex.io/images/loading.svg") center center no-repeat;
  background-size: contain;
}

.basket-popup-content.updating>* {
  filter: grayscale(100%);
}

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

.toaster {
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  position: fixed;
  bottom: var(--widget-padding);
  left: 0;
  right: 0;
  z-index: 10000;
  margin: 0 auto;
  padding: 0 var(--widget-padding);
  width: 100%;
  height: 100%;
  max-width: 520px;
  pointer-events: none;
}

.toaster:empty {
  display: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 50px;
  padding: 0 8px 0 20px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  font-size: 15px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  transition: height var(--dur-base) ease, opacity var(--dur-base) ease;
}

@starting-style {
  .toast {
    opacity: 0;
    height: 0;
  }
}

.toast[hidden] {
  display: block;
  opacity: 0;
  height: 0;
}

.toast.toast-warning {
  border-color: rgb(from var(--color-warning) r g b / 0.5);
  background: color-mix(in srgb, var(--color-warning) 22%, var(--color-surface-2));
}

.toast.toast-error {
  border-color: rgb(from var(--color-removed) r g b / 0.5);
  background: color-mix(in srgb, var(--color-removed) 22%, var(--color-surface-2));
}

.toast.toast-success {
  border-color: rgb(from var(--color-success) r g b / 0.5);
  background: color-mix(in srgb, var(--color-success) 22%, var(--color-surface-2));
}

.toast-close {
  margin-left: auto;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: url("https://webstore-template-assets.tebex.io/images/close.svg") center center no-repeat;
  background-size: 20px;
  opacity: 0.6;
  line-height: 0;
  font-size: 0;
  color: transparent;
  transition: opacity var(--dur-fast) ease, background-color var(--dur-fast) ease;
}

.toast-close:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   Announcement ticker (fixed to the top of the viewport)
   -------------------------------------------------------------------------- */

.rolling-notification {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--ticker-height);
  overflow: hidden;
  border-bottom: 1px solid rgb(from var(--color-primary) r g b / 0.35);
  background: var(--color-surface-0);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.rolling-notification .ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 42s linear infinite;
  will-change: transform;
}

.rolling-notification:hover .ticker-track,
.rolling-notification:focus-within .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.ticker-group {
  display: flex;
  align-items: center;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}

.ticker-icon {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--color-accent);
}

.ticker-item:first-child .ticker-icon {
  color: #8b9cff;
}

.ticker-separator {
  display: inline-block;
  width: 1px;
  height: 16px;
  margin: 0 12px;
  background: var(--color-border-strong);
}

.ticker-highlight-purple {
  color: #8b9cff;
  font-weight: 700;
}

.ticker-highlight-cyan {
  color: var(--color-accent);
  font-weight: 700;
}

.ticker-btn-discord {
  display: inline-block;
  margin-left: 4px;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background-color: var(--color-discord);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.ticker-btn-discord:hover {
  background-color: #4752c4;
  transform: translateY(-1px);
}

/* Expanding ring on a pseudo-element: transform and opacity stay on the
   compositor, whereas animating box-shadow repaints the element every frame. */
@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }

  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.discord-pulse {
  position: relative;
}

.discord-pulse::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid rgba(88, 101, 242, 0.7);
  border-radius: inherit;
  animation: pulse-ring 2.4s ease-out infinite;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Product tags, video embed, image lightbox
   -------------------------------------------------------------------------- */

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.product-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-primary-hover);
  border: 1px solid rgb(from var(--color-primary) r g b / 0.35);
  background: rgb(from var(--color-primary) r g b / 0.1);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.store-product-full .product-tags {
  margin-top: 14px;
  gap: 8px;
}

.store-product-full .product-tag {
  padding: 4px 14px;
  font-size: 12px;
}

.product-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.product-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.descr.text-content img:not(a img) {
  cursor: zoom-in;
  transition: opacity var(--dur-fast) ease;
}

.descr.text-content img:not(a img):hover {
  opacity: 0.85;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--dur-base) ease;
  cursor: zoom-out;
}

.image-lightbox.active {
  opacity: 1;
}

.image-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transform: scale(0.92);
  transition: transform var(--dur-slow) var(--ease-out);
}

.image-lightbox.active img {
  transform: scale(1);
}

.image-lightbox-close {
  position: absolute;
  top: calc(var(--ticker-height) + 12px);
  right: 24px;
  padding: 8px 16px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--dur-fast) ease;
}

.image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------------------------------
   Homepage reviews
   -------------------------------------------------------------------------- */

.customer-reviews-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  text-align: left;
}

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

.customer-reviews-section .section-heading h2 {
  margin: 0;
  font-size: 22px;
}

.reviews-nav {
  display: flex;
  gap: 8px;
}

.reviews-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
  color: var(--color-text);
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, opacity var(--dur-fast) ease;
}

.reviews-nav-btn svg {
  width: 18px;
  height: 18px;
}

.reviews-nav-btn:hover:not(:disabled) {
  background: var(--color-surface-3);
  border-color: rgb(from var(--color-primary) r g b / 0.5);
}

.reviews-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

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

.review-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  font-size: 14px;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-header img.avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-surface-3);
}

.customer-reviews-section .review-header h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.customer-reviews-section .review-card p {
  margin: 0;
  color: var(--color-text-darker);
  line-height: 1.55;
}

.rating {
  display: flex;
  gap: 2px;
  margin-top: auto;
  color: var(--color-warning);
}

.rating svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.rating svg.is-empty {
  opacity: 0.25;
}

@media (width > 960px) {
  .review-card:not(.is-visible) {
    display: none;
  }
}

@media (width <=960px) {
  .reviews-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }

  .review-card {
    flex: 0 0 min(300px, 85%);
    scroll-snap-align: start;
  }

  .reviews-nav {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Category FAQ accordion
   -------------------------------------------------------------------------- */

.faq-section {
  margin-top: 32px;
  padding: var(--content-padding);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-1);
}

.faq-section>h2 {
  margin-bottom: 16px;
  font-size: 22px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 820px;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  overflow: hidden;
}

.faq-question {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background var(--dur-fast) ease;
}

.faq-question:hover {
  background: var(--color-surface-3);
}

.faq-question:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.faq-question-text {
  flex: 1 1 auto;
}

.faq-chevron {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--color-text-secondary);
  transition: rotate var(--dur-base) var(--ease-out);
}

.faq-question[aria-expanded="true"] .faq-chevron {
  rotate: 180deg;
  color: var(--color-primary-hover);
}

.faq-answer {
  padding: 0 16px 14px;
  color: var(--color-text-darker);
  font-size: 14px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   GTranslate floating language switcher
   It is fixed to the bottom of the viewport, which is also where Tebex's legal
   footer and the product page's sticky purchase bar live. Lift it clear of both.
   Measured at phone width: the purchase bar is 129px tall, so 152px clears it
   with room to spare. :has() covers the popup product view too, because the
   popup inserts .store-product-full into the same document.
   -------------------------------------------------------------------------- */

@media (width <= 960px) {
  :root {
    --gt-bottom: 92px;
  }

  body:has(.store-product-full) {
    --gt-bottom: 152px;
  }

  .gtranslate_wrapper .gt_float_switcher,
  .gt_float_switcher,
  #gt_float_wrapper {
    bottom: var(--gt-bottom) !important;
  }
}

/* --------------------------------------------------------------------------
   Scrollbars (WebKit)
   -------------------------------------------------------------------------- */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface-0);
}

::-webkit-scrollbar-thumb {
  background: var(--color-surface-3);
  border-radius: 5px;
  border: 2px solid var(--color-surface-0);
}

::-webkit-scrollbar-thumb:hover {
  background: #2f3646;
}

/* --------------------------------------------------------------------------
   Floating promo image + (disabled) rotating corner boxes
   The corner-box markup is commented out in layout.html; styles are kept so
   it can be switched back on without touching CSS.
   -------------------------------------------------------------------------- */

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-5px);
  }

  100% {
    transform: translateY(0px);
  }
}

.floating-image {
  animation: float 3s ease-in-out infinite;
  max-width: 100%;
}

.corner-box {
  position: fixed;
  top: var(--first-row-top);
  width: 200px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgb(from var(--color-surface-1) r g b / 0.9);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
  text-align: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slow) ease;
}

.corner-box.visible {
  opacity: 1;
  pointer-events: auto;
}

.corner-box.top-left {
  left: 20px;
}

.corner-box.top-right {
  right: 20px;
}

.corner-box h3 {
  margin: 0 0 8px;
  font-size: 15px;
  transition: opacity 0.6s ease-in-out;
}

.corner-box img {
  width: 100%;
  border-radius: var(--radius-sm);
  transition: opacity 0.6s ease-in-out, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.corner-box.second-row {
  top: calc(var(--first-row-top) + var(--row-gap));
}

@media screen and (max-width: 768px) {
  .corner-box {
    display: none;
  }
}
