/* Ascend shop — product grid, product page, license bars, cart, checkout.
 *
 * Self-contained so the shop looks right on any theme. Colours come from CSS variables
 * with dark defaults; a theme can override just the variables to re-skin everything.
 */

.acend-products,
.acend-product,
.acend-cart,
.acend-checkout,
.acend-confirm,
.acend-buy {
  --acend-accent: #8b5cf6;
  --acend-accent-soft: rgba(139, 92, 246, 0.14);
  --acend-text: #f3f1f8;
  --acend-muted: #9b95ad;
  --acend-surface: rgba(255, 255, 255, 0.035);
  --acend-surface-strong: rgba(255, 255, 255, 0.06);
  --acend-border: rgba(255, 255, 255, 0.11);
  --acend-radius: 14px;
  color: var(--acend-text);
}

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

/* ------------------------------------------------------------------ buttons */

.acend-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 11px;
  font: 600 0.95rem/1 inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.acend-btn:hover { transform: translateY(-1px); }
.acend-btn:active { transform: translateY(0); }

.acend-btn--primary {
  background: var(--acend-accent);
  color: #fff;
}

.acend-btn--primary:hover { background: #7c46f0; }

.acend-btn--ghost {
  background: var(--acend-surface);
  border-color: var(--acend-border);
  color: var(--acend-text);
}

.acend-btn--ghost:hover { background: var(--acend-surface-strong); }

.acend-btn--block { width: 100%; }

/* ------------------------------------------------------------ language pills */

.ascend-lang {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--acend-surface, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--acend-border, rgba(255, 255, 255, 0.11));
  border-radius: 999px;
}

.ascend-lang__item {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: inherit;
  opacity: 0.6;
}

.ascend-lang__item:hover { opacity: 1; }

.ascend-lang__item.is-active {
  background: var(--acend-accent, #8b5cf6);
  color: #fff;
  opacity: 1;
}

/* -------------------------------------------------------------- product grid */

.acend-products__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.acend-products__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.acend-products__filter {
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--acend-border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  opacity: 0.75;
}

.acend-products__filter:hover { opacity: 1; }

.acend-products__filter.is-active {
  background: var(--acend-accent-soft);
  border-color: var(--ascend-category-accent, var(--acend-accent));
  opacity: 1;
}

.acend-products__note { color: var(--acend-muted); }

.acend-products__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.acend-product-card__inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--acend-surface);
  border: 1px solid var(--acend-border);
  border-radius: var(--acend-radius);
  overflow: hidden;
}

.acend-product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

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

.acend-product-card__placeholder,
.acend-product__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 160px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(20, 20, 30, 0.9));
}

.acend-product-card__badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.25rem 0.6rem;
  background: rgba(10, 10, 16, 0.8);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.acend-product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 1.1rem 1.2rem;
  flex: 1;
}

.acend-product-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.acend-product-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--acend-muted);
}

.acend-product-card__pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
  white-space: nowrap;
}

/* The struck-through price used to be barely readable — keep it close to the
 * sale price in size so the discount is legible at a glance. */
.acend-product-card__compare {
  font-size: 0.95rem;
  color: var(--acend-muted);
  text-decoration-thickness: 1px;
}

.acend-product-card__price {
  font-size: 1.2rem;
  font-weight: 800;
}

.acend-product-card__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.acend-product-card__title a {
  color: inherit;
  text-decoration: none;
}

.acend-product-card__title a:hover { color: var(--acend-accent); }

.acend-product-card__excerpt {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--acend-muted);
}

.acend-product-card__actions { margin-top: auto; padding-top: 0.4rem; }

/* -------------------------------------------------------------- product page */

.acend-product__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 2rem;
}

@media (min-width: 820px) {
  .acend-product__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}

.acend-product__media img {
  width: 100%;
  border-radius: var(--acend-radius);
  border: 1px solid var(--acend-border);
}

.acend-product__thumbs {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  margin: 0.7rem 0 0;
  padding: 0;
  overflow-x: auto;
}

.acend-product__thumbs img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--acend-border);
}

.acend-product__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 0.9rem;
}

.acend-product__category {
  display: inline-block;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--acend-muted);
}

.acend-product__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.2;
}

.acend-product__pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  white-space: nowrap;
}

.acend-product__compare {
  font-size: 1.05rem;
  color: var(--acend-muted);
}

.acend-product__price {
  font-size: 1.6rem;
  font-weight: 800;
}

.acend-product__lead {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--acend-muted);
}

.acend-product__features {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.acend-product__features li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.94rem;
}

.acend-product__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--acend-accent);
}

.acend-product__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.2rem;
}

.acend-product__link {
  font-size: 0.88rem;
  color: var(--acend-muted);
}

.acend-product__description {
  padding-top: 1.5rem;
  border-top: 1px solid var(--acend-border);
  line-height: 1.7;
}

.acend-product__unavailable {
  padding: 1rem;
  border: 1px dashed var(--acend-border);
  border-radius: var(--acend-radius);
  color: var(--acend-muted);
}

/* ------------------------------------------------------- license option bars */

.acend-buy {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin: 1.5rem 0;
}

.acend-buy__options {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.acend-buy__legend {
  padding: 0;
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--acend-muted);
}

.acend-option { position: relative; }

.acend-option__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.acend-option__bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.15rem;
  background: var(--acend-surface);
  border: 1.5px solid var(--acend-border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.acend-option__bar:hover {
  background: var(--acend-surface-strong);
  transform: translateY(-1px);
}

.acend-option__input:checked + .acend-option__bar {
  border-color: var(--acend-accent);
  background: var(--acend-accent-soft);
}

.acend-option__input:focus-visible + .acend-option__bar {
  outline: 2px solid var(--acend-accent);
  outline-offset: 2px;
}

.acend-option__check {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--acend-border);
  border-radius: 50%;
  position: relative;
}

.acend-option__input:checked + .acend-option__bar .acend-option__check {
  border-color: var(--acend-accent);
}

.acend-option__input:checked + .acend-option__bar .acend-option__check::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--acend-accent);
}

.acend-option__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.acend-option__title {
  font-weight: 700;
  font-size: 1rem;
}

.acend-option__badge {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.1rem 0.5rem;
  background: var(--acend-accent);
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  vertical-align: 0.1em;
}

.acend-option__meta {
  font-size: 0.83rem;
  color: var(--acend-muted);
}

.acend-option__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  white-space: nowrap;
  line-height: 1.25;
}

.acend-option__compare {
  font-size: 0.92rem;
  color: var(--acend-muted);
}

.acend-option__amount { font-size: 1.15rem; }

.acend-buy__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.acend-buy__actions .acend-btn { flex: 1 1 12rem; }

.acend-buy__hint {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--acend-muted);
}

/* ----------------------------------------------------------------- owned box */

.acend-owned {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.4rem;
  background: var(--acend-accent-soft);
  border: 1px solid var(--acend-accent);
  border-radius: var(--acend-radius);
}

.acend-owned__title { margin: 0 0 0.5rem; font-size: 1.2rem; }

.acend-owned__label {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--acend-muted);
}

.acend-owned__key { margin: 0 0 1rem; }

.acend-owned__key code {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 9px;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  word-break: break-all;
}

/* ---------------------------------------------------------------------- cart */

.acend-cart__title,
.acend-checkout__title,
.acend-confirm__title {
  margin: 0 0 1.4rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.acend-cart__empty {
  margin: 0 0 1.2rem;
  color: var(--acend-muted);
}

.acend-cart__lines {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.acend-cart-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem;
  background: var(--acend-surface);
  border: 1px solid var(--acend-border);
  border-radius: 12px;
}

.acend-cart-line__image {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 9px;
}

.acend-cart-line__image--empty {
  display: block;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(20, 20, 30, 0.9));
}

.acend-cart-line__info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.acend-cart-line__title {
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}

.acend-cart-line__variant,
.acend-cart-line__unit {
  font-size: 0.84rem;
  color: var(--acend-muted);
}

.acend-cart-line__qty input {
  width: 4.2rem;
  padding: 0.5rem;
  background: var(--acend-surface-strong);
  border: 1px solid var(--acend-border);
  border-radius: 9px;
  color: inherit;
  text-align: center;
}

.acend-cart-line__total {
  font-weight: 700;
  white-space: nowrap;
}

.acend-cart-line__remove {
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: 1px solid var(--acend-border);
  border-radius: 50%;
  color: var(--acend-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.acend-cart-line__remove:hover {
  border-color: #f87171;
  color: #f87171;
}

@media (max-width: 640px) {
  .acend-cart-line {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    grid-template-areas:
      "image info remove"
      "qty   qty  total";
  }
  .acend-cart-line__image { grid-area: image; width: 56px; height: 56px; }
  .acend-cart-line__info { grid-area: info; }
  .acend-cart-line__remove { grid-area: remove; }
  .acend-cart-line__qty { grid-area: qty; }
  .acend-cart-line__total { grid-area: total; text-align: right; }
}

.acend-cart__footer {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.2rem;
  background: var(--acend-surface);
  border: 1px solid var(--acend-border);
  border-radius: var(--acend-radius);
}

.acend-cart__totals {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 700;
}

.acend-cart__note,
.acend-checkout__note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--acend-muted);
}

.acend-cart__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.acend-cart__actions .acend-btn { flex: 1 1 12rem; }

.acend-cart__continue {
  font-size: 0.88rem;
  color: var(--acend-muted);
}

/* ------------------------------------------------------------------ checkout */

.acend-checkout__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 860px) {
  .acend-checkout__grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
}

.acend-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.3rem;
}

.acend-field label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--acend-muted);
}

.acend-field input {
  padding: 0.75rem 0.9rem;
  background: var(--acend-surface-strong);
  border: 1px solid var(--acend-border);
  border-radius: 11px;
  color: inherit;
  font-size: 1rem;
}

.acend-checkout__gateways {
  border: 0;
  margin: 0 0 1.3rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.acend-checkout__gateways legend {
  padding: 0;
  margin-bottom: 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--acend-muted);
}

.acend-checkout__terms {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--acend-muted);
}

.acend-checkout__terms input { margin-top: 0.25rem; }

.acend-checkout__summary {
  padding: 1.3rem;
  background: var(--acend-surface);
  border: 1px solid var(--acend-border);
  border-radius: var(--acend-radius);
  position: sticky;
  top: 1.5rem;
}

.acend-checkout__summary h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.acend-summary__lines {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--acend-border);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.acend-summary__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.9rem;
  font-size: 0.92rem;
}

.acend-summary__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.acend-summary__variant,
.acend-summary__qty {
  font-size: 0.82rem;
  color: var(--acend-muted);
}

.acend-summary__value { white-space: nowrap; }

.acend-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 0.92rem;
  color: var(--acend-muted);
}

.acend-summary__row--total {
  margin: 0.5rem 0 1.1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--acend-border);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--acend-text);
}

.acend-checkout__back {
  display: block;
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--acend-muted);
}

/* -------------------------------------------------------------- confirmation */

.acend-confirm__ref {
  margin: 0 0 1.5rem;
  color: var(--acend-muted);
}

.acend-confirm__pending {
  padding: 0.9rem 1.1rem;
  background: var(--acend-surface);
  border: 1px solid var(--acend-border);
  border-radius: 11px;
  color: var(--acend-muted);
}

.acend-confirm__keys { margin-bottom: 1.5rem; }

.acend-confirm__keys h2 { margin: 0 0 0.8rem; font-size: 1.05rem; }

.acend-confirm__key {
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.6rem;
  background: var(--acend-surface);
  border: 1px solid var(--acend-border);
  border-radius: 11px;
}

.acend-confirm__key-title { margin: 0 0 0.45rem; font-weight: 700; }

.acend-confirm__key-variant { color: var(--acend-muted); font-weight: 400; }

.acend-confirm__key-value {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 9px;
  font-size: 1.02rem;
  letter-spacing: 0.07em;
  word-break: break-all;
}

.acend-confirm__downloads,
.acend-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.acend-confirm__download-name { font-weight: 400; opacity: 0.85; }

.acend-confirm__items {
  padding: 1.1rem;
  margin-bottom: 1.5rem;
  background: var(--acend-surface);
  border: 1px solid var(--acend-border);
  border-radius: var(--acend-radius);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

/* --------------------------------------------------------------- captcha */

.acend-captcha {
  --acend-accent: #8b5cf6;
  --acend-border: rgba(255, 255, 255, 0.11);
  --acend-surface: rgba(255, 255, 255, 0.035);
  margin: 1rem 0;
}

.acend-captcha__prompt {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.acend-captcha__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  max-width: 15rem;
}

.acend-captcha__cell { position: relative; }

.acend-captcha__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.acend-captcha__tile {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: var(--acend-surface);
  border: 1.5px solid var(--acend-border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.acend-captcha__tile:hover { background: rgba(255, 255, 255, 0.07); }

.acend-captcha__input:checked + .acend-captcha__tile {
  border-color: var(--acend-accent);
  background: rgba(139, 92, 246, 0.16);
}

.acend-captcha__input:focus-visible + .acend-captcha__tile {
  outline: 2px solid var(--acend-accent);
  outline-offset: 2px;
}

.acend-captcha__shape {
  width: 58%;
  height: 58%;
  fill: currentColor;
  opacity: 0.85;
}

.acend-captcha__input:checked + .acend-captcha__tile .acend-captcha__shape {
  fill: var(--acend-accent);
  opacity: 1;
}

.acend-captcha__reset {
  margin-top: 0.6rem;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  opacity: 0.6;
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
}

.acend-captcha__reset:hover { opacity: 1; }

/* ------------------------------------------------------------ verify code */

.acend-verify__code {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-align: center;
}

.acend-verify__resend { margin-top: 0.9rem; }

/* ------------------------------------------------------- account long lists */

.acend-pager {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.acend-pager__status {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Keep the key list from stretching the page when a customer owns many licenses. */
.ascent-key-list {
  max-height: 26rem;
  overflow-y: auto;
  padding-right: 0.4rem;
}
