/* Astro21 Shop — витрина в духе «course-promo»: hero + aside + контент + мобильная панель */

:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --success: #059669;
  --header-h: 56px;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body.shop-body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  padding-bottom: env(safe-area-inset-bottom);
}

.shop-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  box-shadow: var(--shadow);
}

.page-fragment {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}

.site-header__brand-block {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  line-height: 1.3;
}

.site-header__crumb {
  color: inherit;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-header__crumb--site {
  font-size: 0.9375rem;
  font-weight: 500;
  opacity: 0.88;
}

.site-header__crumb--site:hover {
  opacity: 1;
  color: #fff;
}

.site-header__crumb-sep {
  opacity: 0.55;
  font-weight: 400;
  user-select: none;
}

.site-header__crumb--shop {
  font-size: 1.0625rem;
  font-weight: 700;
}

.site-header__crumb--shop:hover {
  color: #fff;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-header__nav a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-header__home-link {
  display: none !important;
}

.site-header__nav a:hover {
  color: #fff;
}

.site-header__menu-toggle,
.site-header__mobile-menu {
  display: none;
}

.site-header__cart-link {
  white-space: nowrap;
  justify-content: center !important;
}

.site-header__cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
}

.site-header__cta:hover {
  background: var(--accent-hover) !important;
}

@media (max-width: 900px) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
    padding-top: 0.7rem;
    padding-bottom: 0.8rem;
  }

  .site-header__brand-block {
    width: 100%;
  }

  .site-header__crumb--shop {
    font-size: 1rem;
  }

  .site-header__nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  .page-fragment {
    padding: 0 14px;
  }

  .site-header__inner {
    flex-direction: row;
    justify-content: space-between;
    min-height: auto;
    gap: 0.45rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }

  .site-header__brand-block {
    display: none;
  }

  .site-header__menu-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    cursor: pointer;
  }

  .site-header__menu-toggle span {
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .site-header__menu-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.18);
  }

  .site-header__nav {
    display: flex;
    flex-wrap: nowrap;
    width: auto;
    margin-left: auto;
    gap: 0.4rem;
    align-items: center;
  }

  .site-header__nav a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
  }

  .site-header__desktop-link {
    display: none !important;
  }

  .site-header__cart-link {
    flex: 0 0 auto;
  }

  .site-header__home-link {
    display: inline-flex !important;
    flex: 0 0 auto;
    width: 34px;
    min-width: 34px;
    justify-content: center;
    padding: 0 !important;
  }

  .site-header__home-link svg {
    display: block;
  }

  .site-header__cta {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
  }

  .site-header__mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.94));
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: var(--shadow);
    padding-top: 0.45rem;
    padding-bottom: 0.55rem;
  }

  .site-header__mobile-menu.is-open {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .site-header__mobile-menu a {
    color: #e2e8f0;
    text-decoration: none;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
  }

  .site-header__mobile-menu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
  }

  .catalog-pay-cta {
    padding-top: 0.9rem;
    padding-bottom: 1.1rem;
  }

  .catalog-pay-cta__button {
    width: 100%;
    min-height: 56px;
    padding: 0 20px;
    font-size: 1.08rem;
  }
}

.shop-main {
  flex: 1;
}

.catalog-pay-cta {
  background: #f1f5f9;
  border-top: 5px dashed #ddf;
  padding: 3rem 0 0 0;
  margin-bottom: 50px;  
}

.catalog-pay-cta__inner {
  display: flex;
  justify-content: center;
}

.catalog-pay-cta__button {
  width: min(860px, 100%);
  min-height: 72px;
  padding: 0 32px;
  border-radius: 999px;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

/* --- Способы оплаты --- */
.payment-section {
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0 2.2rem;
}

.payment-section__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.payment-section__lead {
  margin: 0 0 0.9rem;
  color: #334155;
  max-width: 72ch;
}

.payment-section__list {
  margin: 0;
  padding-left: 1.2rem;
  color: #334155;
}

.payment-section__list li {
  margin-bottom: 0.45rem;
}

.payment-section__list li:last-child {
  margin-bottom: 0;
}

.payment-section__list a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.35);
}

.payment-section__list a:hover {
  border-bottom-color: var(--accent-hover);
}

/* --- Отдельная страница: способы оплаты --- */
.payment-page {
  padding: 2rem 0 2.5rem;
}

.payment-page__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: -0.03em;
}

.payment-page__lead {
  margin: 0 0 1.25rem;
  color: #334155;
  max-width: 76ch;
}

.payment-page__block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1rem 1.1rem;
  margin-bottom: 0.9rem;
}

.payment-page__subtitle {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
  line-height: 1.35;
}

.payment-page__steps {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}

.payment-page__steps li {
  margin-bottom: 0.45rem;
}

.payment-page__steps li:last-child {
  margin-bottom: 0;
}

.payment-page__note,
.payment-page__law-note {
  margin: 0.65rem 0 0;
  color: #334155;
}

.payment-page__block a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.35);
}

.payment-page__block a:hover {
  border-bottom-color: var(--accent-hover);
}

/* --- FAQ (аккордеон, над блоком об авторе) --- */
.faq-section {
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.25rem 0 2.5rem;
  flex-shrink: 0;
}

.faq-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 1.25rem;
}

.faq-section__title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.faq-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.faq-section__action {
  padding: 8px 14px;
  font-size: 0.875rem;
}

.faq-section__action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.faq-list {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

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

.faq-item__summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 2.75rem 1rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text);
  position: relative;
  transition: background 0.15s ease;
  user-select: none;
}

.faq-item__summary::-webkit-details-marker {
  display: none;
}

.faq-item__summary::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq-item[open] > .faq-item__summary::after {
  transform: translateY(-25%) rotate(-135deg);
}

.faq-item__summary:hover {
  background: #f8fafc;
}

.faq-item__panel {
  border-top: 1px solid var(--border);
}

.faq-item__answer {
  padding: 1rem 1.1rem 1.15rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #475569;
}

.faq-item__answer a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.35);
}

.faq-item__answer a:hover {
  border-bottom-color: var(--accent-hover);
}

/* --- Блок «Афа Суари» (над футером, все страницы) --- */
.author-section {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.25rem 0 2.5rem;
  flex-shrink: 0;
}

.author-section__grid {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 2rem 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .author-section__grid {
    grid-template-columns: 1fr;
  }
}

.author-section__media {
  position: relative;
  text-align: center;
}

.author-section__photo {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 50%;
  display: block;
  margin-inline: auto;
}

.author-section__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.author-section__body {
  font-size: 0.9375rem;
  color: #334155;
}

.author-section__list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.author-section__list li {
  margin-bottom: 0.45rem;
}

.author-section__list:last-of-type {
  margin-bottom: 1.25rem;
}

.author-section__courses {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0.75rem 0 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(37, 99, 235, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.author-section__courses li {
  margin-bottom: 0.35rem;
  padding-left: 0;
}

.author-section__courses li:last-child {
  margin-bottom: 0;
}

.author-section__courses a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.35);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.author-section__courses a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.author-section__body .author-section__list a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.35);
}

.author-section__body .author-section__list a:hover {
  border-bottom-color: var(--accent-hover);
}

.author-section__contacts {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted);
}

.author-section__contacts a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.3);
}

.author-section__contacts a:hover {
  border-bottom-color: var(--accent-hover);
}

.author-section__footer-note {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text);
}

.author-section__footer-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.35);
}

.author-section__footer-note a:hover {
  border-bottom-color: var(--accent-hover);
}

/* --- Группы каталога --- */
.catalog-group {
  margin-bottom: 2.5rem;
}

.catalog-group:last-child {
  margin-bottom: 0;
}

.catalog-group__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  inline-size: 100%;
}

.catalog-group__title-text {
  min-width: 0;
}

.catalog-group__title-icon {
  flex-shrink: 0;
  inline-size: 2.25rem;
  block-size: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(160deg, #c7e6fe 0%, #8a93fd 100%);
  font-size: 1.35rem;
  line-height: 1;
}

.catalog-group__intro {
  margin: -0.35rem 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  max-width: 52rem;
}

.catalog-group__intro--astrodox {
  color: #713f12;
}

.course-skill-filter {
  margin: 0.15rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.course-skill-filter--sections {
  margin-top: 0.15rem;
}

.catalog-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.catalog-filters .course-skill-filter {
  margin: 0;
}

.catalog-group__title::after {
  content: "";
  margin-left: auto;
  inline-size: 0.55rem;
  block-size: 0.55rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.catalog-group--collapsed .catalog-group__title::after {
  transform: rotate(-45deg) translateY(1px);
}

.catalog-group__title:hover {
  color: #1e293b;
}

.catalog-group__title:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
}

.catalog-group--collapsed .catalog-group__content {
  display: none;
}

.course-skill-filter__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem 0;
}

/* Широкая зона нажатия: клик по тексту не должен требовать попадания в крошечный чекбокс.
   Логика мгновенного переключения — в app.js (mousedown + подавление лишнего click по label). */
.course-skill-filter__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  color: #334155;
  user-select: none;
  cursor: pointer;
  box-sizing: border-box;
  min-height: 2.5rem;
  padding: 0.35rem 0.4rem;
  margin: -0.55rem 0;
  border-radius: 6px;
}

.course-skill-filter__item:hover {
  background: rgba(15, 23, 42, 0.04);
}

.course-skill-filter__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 1rem;
  block-size: 1rem;
  color: #334155;
}

.course-skill-filter__icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-skill-filter__text {
  line-height: 1.2;
}

.course-skill-filter__label {
  display: inline-flex;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
}

.course-skill-filter__item input[type="checkbox"] {
  margin: 0;
  inline-size: 1rem;
  block-size: 1rem;
}

.catalog-group[data-group="astrodox"] .product-card--astrodox {
}

.catalog-group[data-group="astrodox"] .product-card--astrodox:hover {
}

.catalog-group[data-group="astrodox"] .price-current {
}

.catalog-group[data-group="astrodox"] .btn--primary {
}

.catalog-group[data-group="astrodox"] .btn--primary:hover {
}

/* --- Catalog hero --- */
.catalog-hero {
  background: linear-gradient(160deg, #1e293b 0%, #334155 50%, #475569 100%);
  color: #f8fafc;
  padding: 2.5rem 0 2rem;
  margin-bottom: 0;
}

.catalog-hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 125%;
}

.catalog-hero__top {
  display: grid;
  grid-template-columns: minmax(200px, 200px) minmax(0, 1fr);
  gap: 2rem 2.25rem;
  align-items: start;
}

.catalog-hero__top--card-right {
  grid-template-columns: minmax(0, 1fr) minmax(200px, 200px);
}

.catalog-hero__top-main {
  min-width: 0;
}

.catalog-hero__image-wrap {
  margin: 0;
  align-self: center;
  justify-self: start;
  width: 100%;
  max-width: 200px;
}

.catalog-hero__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 100%;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.24);
  object-fit: cover;
  border:5px solid rgba(255,255,255,0.85);
}

.catalog-hero__card-wrap {
  width: 100%;
  max-width: 300px;
  justify-self: end;
}

.catalog-hero__buy-card {
  position: static;
  top: auto;
  margin: 0;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
}

.catalog-hero__buy-card .buy-card__price-old,
.catalog-hero__buy-card .buy-card__price-current,
.catalog-hero__buy-card .buy-card__hint {
  color: var(--text);
}

.catalog-hero__buy-card .course-skill-badges {
  margin-bottom: 0.35rem;
}

.catalog-hero__buy-card .course-skill-badge svg {
  width: 1.3rem;
  height: 1.3rem;
}

.catalog-hero__buy-card #product-buy-cta .buy-card__offer:not(.buy-card__offer--pair) {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.catalog-hero__buy-card #product-buy-cta .buy-card__offer:not(.buy-card__offer--pair) .buy-card__price-row {
  flex: 0 0 auto;
  white-space: nowrap;
}

.catalog-hero__buy-card #product-buy-cta .buy-card__offer:not(.buy-card__offer--pair) .btn--block {
  width: auto;
  flex: 1 1 220px;
}

.catalog-hero__subtitle {
  margin: 0 0 0.7rem;
  opacity: 0.88;
  font-size: 1rem;
}

.catalog-hero__text {
  margin: 0 0 0.65rem;
  opacity: 0.88;
  font-size: 1rem;
  line-height: 1.5;
}

.catalog-hero__divider {
  margin: 0.35rem 0 0;
  opacity: 0.78;
  letter-spacing: 0.16em;
  font-size: 1.05rem;
}

@media (max-width: 820px) {
  .catalog-hero__top {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .catalog-hero__image-wrap {
    justify-self: center;
    max-width: min(100%, 220px);
    margin-inline: auto;
  }

  .catalog-hero__card-wrap {
    justify-self: center;
    max-width: 100%;
    margin-inline: auto;
  }

  .catalog-hero__buy-card #product-buy-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .catalog-hero__buy-card #product-buy-cta .buy-card__offer {
    flex: 1 1 260px;
    min-width: 0;
  }

  .catalog-hero__buy-card #product-buy-cta .buy-card__offer + .buy-card__offer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }
}

/* --- Блок отзывов (HTML из get-reviews.php) */
.shop-reviews {
  background: #fff;
  border-block: 1px solid var(--border);
  text-align: center;
  padding: 1rem 0 1.25rem;
  margin: 0 0 1rem;
}

.shop-reviews[hidden] {
  display: none !important;
}

.shop-reviews__fragment {
  max-width: 100%;
}

.shop-reviews__inner {
  max-width: 100%;
  text-align: center;
}

.shop-reviews__feed {
  max-width: min(72rem, 100%);
  margin-inline: auto;
}

.shop-reviews__heading {
  margin: 0 0 0.65rem;
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  text-align: center;
}

.shop-reviews__empty {
  margin: 0;
  text-align: center;
}

.shop-reviews__mode {
  width: 100%;
}

.shop-reviews__mode--landscape {
  display: none;
}

.shop-reviews__mode--portrait {
  display: block;
  overflow-x: hidden;
}

@media (orientation: landscape) {
  .shop-reviews {  
    background: #fff;
    border-block: 1px solid var(--border);
    text-align: center;
    padding: 1rem 3rem;
    margin: 0 0 1rem;
    max-width: 1100px;
    border: 1px solid #eee;
    border-top-width: 0px;
    border-radius: 0 0 15px 15px;    
  }

  .shop-reviews__mode--portrait {
    display: none;
  }

  .shop-reviews__mode--landscape {
    display: block;
  }
}

.shop-reviews__more {
  margin: 0.75rem auto 0;
  display: inline-flex;
  justify-content: center;
}

.shop-reviews__portrait-bleed {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
}

.shop-reviews__portrait-cell {
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.shop-reviews__thumb {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: top center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.shop-reviews__mode--portrait .shop-reviews__thumb {
  min-height: auto;
  cursor: zoom-in;
}

.shop-reviews__grid--landscape {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 0.85rem 1rem;
  margin: 0;
  align-items: start;
  justify-items: center;
}

@media (min-width: 700px) {
  .shop-reviews__grid--landscape {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-items: stretch;
  }
}

.shop-reviews__mode--landscape .shop-reviews__cell {
  margin: 0;
  min-width: 0;
  width: 100%;
  max-width: 28rem;
}

.shop-reviews__mode--landscape .shop-reviews__thumb {
  min-height: 10rem;
  cursor: zoom-in;
}

/* Полноэкранный просмотр (создаётся in app.js) */
.shop-reviews-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  box-sizing: border-box;
  padding: 12px 10px;
  background: rgba(15, 23, 42, 0.94);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shop-reviews-lightbox[hidden] {
  display: none !important;
}

.shop-reviews-lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: rgba(248, 250, 252, 0.12);
  color: #f8fafc;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.shop-reviews-lightbox__nav,
.shop-reviews-lightbox__zoom {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding-inline: 3.5rem;
}

.shop-reviews-lightbox__nav {
  padding-top: 0.1rem;
  padding-bottom: 0.65rem;
}

.shop-reviews-lightbox__zoom {
  padding-bottom: 0.9rem;
}

.shop-reviews-lightbox__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: var(--radius);
  background: rgba(248, 250, 252, 0.12);
  color: #f8fafc;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.shop-reviews-lightbox__nav-btn:hover:not(:disabled),
.shop-reviews-lightbox__close:hover {
  background: rgba(248, 250, 252, 0.22);
}

.shop-reviews-lightbox__nav-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.shop-reviews-lightbox__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0 0 10px;
}

.shop-reviews-lightbox__scroll--centered {
  align-items: center;
  justify-content: center;
}

.shop-reviews-lightbox__frame {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-width: 100%;
}

.shop-reviews-lightbox__title {
  margin: 0;
  width: min(1100px, 90%);
  max-width: 100%;
  padding: 0 0.5rem;
  color: #f8fafc;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
}

.shop-reviews-lightbox__img {
  display: block;
  width: min(1100px, 90%);
  max-width: none;
  height: auto;
  margin-inline: auto;
  border-radius: 15px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.38);
}

@media (orientation: portrait) {
  .shop-reviews-lightbox__frame {
    width: max-content;
    min-width: 100%;
    align-items: flex-start;
  }

  .shop-reviews-lightbox__title {
    width: 100%;
    min-width: 100%;
    text-align: left;
    padding: 0 0.25rem;
  }

  .shop-reviews-lightbox__img {
    width: auto;
    margin-inline: 0;
  }
}

@media (max-width: 640px) {
  .shop-reviews-lightbox {
    padding: 10px 8px;
  }

  .shop-reviews-lightbox__nav,
  .shop-reviews-lightbox__zoom {
    gap: 0.5rem;
    padding-inline: 3rem;
  }

  .shop-reviews-lightbox__nav {
    padding-bottom: 0.5rem;
  }

  .shop-reviews-lightbox__zoom {
    padding-bottom: 0.75rem;
  }

  .shop-reviews-lightbox__nav-btn {
    flex: 1 1 12rem;
    padding: 0.75rem 0.9rem;
    font-size: 0.875rem;
  }

  .shop-reviews-lightbox__close {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.35rem;
  }

  .shop-reviews-lightbox__title {
    font-size: 0.95rem;
  }

  .shop-reviews-lightbox__img {
    border-radius: 12px;
  }
}

/* Баннер согласия на cookie */
.shop-cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 12px);
  z-index: 260;
}

.shop-cookie-banner[hidden] {
  display: none !important;
}

.shop-cookie-banner__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.shop-cookie-banner__text {
  flex: 1 1 26rem;
  min-width: 0;
  text-align: left;
}

.shop-cookie-banner__title {
  display: block;
  margin: 0 0 0.2rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
}

.shop-cookie-banner__desc {
  margin: 0;
  color: #334155;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.shop-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

@media (max-width: 640px) {
  .shop-cookie-banner {
    left: 10px;
    right: 10px;
  }

  .shop-cookie-banner__inner {
    padding: 0.95rem;
  }

  .shop-cookie-banner__actions {
    width: 100%;
  }

  .shop-cookie-banner__actions .btn {
    flex: 1 1 100%;
  }
}

/* --- Каталог: список, горизонтальные карточки --- */
.catalog-section {
  padding: 2rem 0 3rem;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-list__row {
  min-width: 0;
}

/* Теория + практика одного курса — общая рамка */
.product-pair {
  display: flex;
  flex-wrap: wrap;
  border: 2px solid rgba(37, 99, 235, 0.38);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, var(--surface) 100%);
  box-shadow: var(--shadow);
}

.product-pair .product-card--row {
  flex: 1 1 min(100%, 320px);
  min-width: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Теория шире, практикум — узкая колонка (~⅓) */
.product-pair .product-card--pair-theory {
  flex: 1 1 0;
  min-width: 0;
}

.product-pair .product-card--pair-practice {
  flex: 0 0 50%;
  max-width: 50%;
  min-width: 0;
}

.product-pair .product-card--row:not(:last-child) {
  border-right: 1px solid var(--border);
}

.product-pair .product-card--row:hover {
  transform: none;
  box-shadow: none;
}

.product-pair .product-card--row:hover .product-card__body {
  background: rgba(255, 255, 255, 0.65);
}

/* Заголовки и блоки в обеих колонках с одной высоты — с верхнего края, не по центру */
.product-pair .product-card--row .product-card__body {
  align-items: flex-start;
}

.product-pair .product-card__thumb {
  align-self: flex-start;
}

@media (max-width: 720px) {
  .product-pair .product-card--row:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .product-pair .product-card--pair-theory,
  .product-pair .product-card--pair-practice {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .catalog-filters {
    grid-template-columns: 1fr;
  }
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card--dimmed {
  opacity: 0.25;
}

.product-card--row {
  flex-direction: row;
  align-items: stretch;
}

.product-card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card--row .product-card__body {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.product-card__thumb {
  flex: 0 0 auto;
  align-self: center;
}

.product-card__thumb img {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(202, 138, 4, 0.35);
  background: #fff;
}

.product-card__main {
  flex: 1 1 200px;
  min-width: 0;
}

.product-card__aside {
  flex: 0 0 auto;
  margin-left: auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.product-card--row .product-card__title {
  margin-bottom: 0.35rem;
}

.product-card--row .product-card__desc {
  margin-bottom: 0;
}

.product-card--row .product-card__price-row {
  margin-bottom: 0;
  justify-content: flex-end;
}

@media (max-width: 520px) {
  .product-card--row .product-card__aside {
    width: 100%;
    align-items: stretch;
    text-align: left;
  }

  .product-card--row .product-card__price-row {
    justify-content: flex-start;
  }

  .product-card--row .product-card__actions {
    justify-content: flex-start;
  }
}

.product-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

.product-card__title-link {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  color: var(--accent);
  border-bottom-color: rgba(37, 99, 235, 0.35)
}

.product-card__title-link:hover {
  color: var(--accent);
  border-bottom-color: rgba(0, 58, 184, 0.782);
}

.product-card__desc {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  flex: 1;
}

.product-card__variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 0.6rem;
  margin-top: 0.35rem;
}

.product-card__variant-choice {
  border: 1px solid #bfccde;
  border-radius: 10px;
  background: #e9eff8;
  padding: 0.58rem 0.7rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  cursor: pointer;
  color: #0f172a;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease,
    color 0.15s ease;
}

.product-card__variant-choice:hover {
  background: #dde7f5;
  border-color: #9fb4d1;
}

.product-card__variant-choice.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.24);
  background: var(--accent);
  color: #fff;
}

.product-card__variant-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: inherit;
  line-height: 1.25;
}

.product-card__variant-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  width: 100%;
  justify-content: flex-start;
}

.product-card__variant-price-old {
  font-size: 0.76rem;
  color: #64748b;
  text-decoration: line-through;
}

.product-card__variant-price-current {
  font-size: 1.02rem;
  font-weight: 700;
  color: inherit;
}

.product-card__price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.course-skill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.2rem;
  color: #334155;
}

.course-skill-badge svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.course-skill-badges {
  display: inline-flex;
  align-items: center;
  margin-right: 0.2rem;
}

.price-old {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 0.875rem;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* В каталоге: товар уже в корзине (не кнопка) */
.product-card__added {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 10px 14px 10px 18px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  user-select: none;
}

.product-card__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.2rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(4, 120, 87, 0.12);
  color: #065f46;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.product-card__remove:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.product-card__check {
  font-weight: 700;
  color: #059669;
}

.catalog-group[data-group="astrodox"] .product-card__added {
  color: #065f46;
  background: #d1fae5;
  border-color: #6ee7b7;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

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

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

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: #f8fafc;
}

.btn--info {
  font-size:120%;
  padding: 2px 5px;
  border-width:0px; 
}

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

/* --- Product page: promo head (как course-promo__head) --- */
.promo-head {
  background: linear-gradient(165deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0 1.5rem;
}

.promo-head__grid {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .promo-head__grid {
    grid-template-columns: 1fr;
  }
}

.promo-head__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.promo-head__lead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 56ch;
}

/* Buy card aside */
.buy-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  position: sticky;
  top: calc(var(--header-h) + 12px);
}

.buy-card__price-block {
  display:none;
  margin-bottom: 1rem;
}

.buy-card__price-old {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 0.9rem;
}

.buy-card__price-current {
  font-size: 1.75rem;
  font-weight: 700;
  display: block;
  margin-top: 4px;
}

.buy-card__offer {
  display: flex;
  flex-direction: column;
}

.buy-card__offer + .buy-card__offer {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.buy-card__offer-label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.buy-card__price-row {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.buy-card--pair .buy-card__price-block {
  margin-bottom: 0.65rem;
}

.buy-card--pair .buy-card__price-block .buy-card__price-current,
.buy-card--pair .buy-card__price-block .buy-card__price-old {
  display: none !important;
}

.buy-card__hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
}

.buy-card__variant-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
  min-width: 0;
}

.buy-card__variant-choice {
  border: 1px solid #bfccde;
  border-radius: 10px;
  background: #e9eff8;
  padding: 0.58rem 0.7rem;
  text-align: left;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  cursor: pointer;
  min-width: 0;
  color: #0f172a;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease,
    color 0.15s ease;
}

.buy-card__variant-choice:hover {
  background: #dde7f5;
  border-color: #9fb4d1;
}

.buy-card__variant-choice.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.24);
  background: var(--accent);
  color: #fff;
}

.buy-card__variant-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: inherit;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.buy-card__variant-price {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (min-width: 901px) {
  .buy-card__variant-choice {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.18rem;
  }

  .buy-card__variant-title {
    width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .buy-card__variant-price {
    display: flex;
    width: 100%;
    justify-content: flex-start;
  }
}

.buy-card__variant-price-old {
  font-size: 0.8rem;
  color: #64748b;
  text-decoration: line-through;
}

.buy-card__variant-price-current {
  font-size: 1.02rem;
  font-weight: 700;
  color: inherit;
}

.buy-card__added {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  box-sizing: border-box;
}

.buy-card__added-text {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #047857;
}

/* --- Main article + markdown --- */
.promo-main {
  padding: 2rem 0 3rem;
}

.markdown-body {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
  max-width: 100%;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
  margin-top: 0;
}

.markdown-body p {
  margin: 0.75rem 0;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0.5rem 0;
  padding-left: 1.35rem;
}

.markdown-body li {
  margin: 0.35rem 0;
}

.markdown-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.markdown-body blockquote {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--accent);
  background: #f8fafc;
  color: var(--muted);
}

.markdown-body pre,
.markdown-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.9em;
}

.markdown-body pre {
  overflow-x: auto;
  padding: 1rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
}

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

.markdown-body th {
  background: #f8fafc;
  font-weight: 600;
}

/* TABLE_PLAIN_LEFT: левый столбец как подпись строки */
.markdown-body table.table-plain-left tbody td:first-child {
  background: #f8fafc;
  font-weight: 600;
}

.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.markdown-body__image--zoom {
  cursor: zoom-in;
}

.markdown-body::after {
  content: "";
  display: table;
  clear: both;
}

.markdown-body__figure {
  margin: 1.25rem 0;
  max-width: 100%;
}

.markdown-body__figure img {
  width: 100%;
}

.markdown-body__figure--center {
  margin-left: auto;
  margin-right: auto;
  clear: both;
}

.markdown-body__figure--left {
  float: left;
  margin: 0.25rem 1rem 0.75rem 0;
  clear: left;
}

.markdown-body__figure--right {
  float: right;
  margin: 0.25rem 0 0.75rem 1rem;
  clear: right;
}

.markdown-body__figure--inline {
  display: inline-block;
  vertical-align: middle;
  margin: 0 0.25rem 0.5rem;
  max-width: min(100%, 480px);
}

.markdown-body__figure--small {
  max-width: 240px;
}

.markdown-body__figure--medium {
  max-width: 480px;
}

.markdown-body__figure--large {
  max-width: 720px;
}

.markdown-body__figure--full {
  max-width: 100%;
}

.markdown-body__figure-caption {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 6px;
  line-height: 1.35;
}

.markdown-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.88);
  cursor: zoom-out;
}

.markdown-image-lightbox__inner {
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.markdown-image-lightbox__img {
  max-width: 100%;
  max-height: calc(90vh - 3rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.markdown-image-lightbox__caption {
  color: #e2e8f0;
  font-size: 0.95rem;
  text-align: center;
  max-width: 48rem;
  line-height: 1.4;
}

.markdown-image-lightbox[hidden] {
  display: none !important;
}

/* Узкий экран: две колонки → одна колонка (flex-карточки вместо широкой таблицы) */
@media (max-width: 36rem) {
  .markdown-body {
    margin:0 -14px;
    width: auto;
    max-width: fit-content;
    border-width: 0px;
    border-radius: 0;
    padding: 1.5rem 1rem;
  }

  .markdown-body table.table-plain-left {
    display: block;
    width: 100%;
    max-width: 100%;
    border: none;
    margin-left: 0;
    margin-right: 0;
    font-size: 0.875rem;
  }

  .markdown-body table.table-plain-left tbody {
    display: block;
    width: 100%;
  }

  .markdown-body table.table-plain-left tbody tr {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    margin: 0 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-sizing: border-box;
  }

  .markdown-body table.table-plain-left tbody tr:last-child {
    margin-bottom: 0;
  }

  .markdown-body table.table-plain-left tbody td {
    display: block;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: none;
    border-radius: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .markdown-body table.table-plain-left tbody td:first-child {
    flex: 0 0 auto;
    border-bottom: 1px solid var(--border);
  }

  .markdown-body table.table-plain-left tbody td:last-child:not(:first-child) {
    flex: 1 1 auto;
  }

  .markdown-body__figure--left,
  .markdown-body__figure--right {
    float: none;
    margin: 1rem auto;
    max-width: 100%;
  }

  .markdown-body__figure--inline {
    display: block;
    margin: 1rem auto;
    max-width: 100%;
  }

  .markdown-body__figure--small,
  .markdown-body__figure--medium,
  .markdown-body__figure--large {
    max-width: 100%;
  }
}

.markdown-body__details {
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.markdown-body__details-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  user-select: none;
}

.markdown-body__details-summary::-webkit-details-marker {
  display: none;
}

.markdown-body__details-summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.45em;
  height: 0.45em;
  margin-top: 0.35em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  opacity: 0.55;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.markdown-body__details[open] .markdown-body__details-summary::after {
  transform: rotate(45deg);
  margin-top: 0.25em;
}

.markdown-body__details-inner {
  padding: 14px;
  border-top: 1px solid var(--border);
}

.markdown-body__details-inner > :first-child {
  margin-top: 0.75rem;
}

/* --- Cart / checkout --- */
.page-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.checkout-section--form {
  margin-top: 1.5rem;
}

.checkout-undo {
  margin: 0 0 1rem;
  padding: 12px 16px;
  border: 1px solid #c7d2fe;
  border-radius: var(--radius);
  background: #eef2ff;
  color: #3730a3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkout-undo__btn {
  border: 1px solid #818cf8;
  background: #fff;
  color: #3730a3;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 600;
  cursor: pointer;
}

.checkout-undo__btn:hover {
  background: #e0e7ff;
}

.checkout-undo__btn--inline {
  padding: 5px 10px;
  font-size: 0.85rem;
}

.checkout-email-intro {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text);
}

.checkout-email-intro > p {
  margin: 0 0 0.75rem;
}

.checkout-email-intro ol {
  margin: 0 0 0.85rem 1.2rem;
  padding: 0;
  line-height: 1.55;
}

.checkout-email-intro li + li {
  margin-top: 0.35rem;
}

.checkout-email-intro__lead {
  font-weight: 600;
  margin-bottom: 0;
}

.form-stack label {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 6px;
  color: var(--text);
}

.form-stack .field {
  margin-bottom: 1rem;
}

.consent-group {
  margin: 0 0 1rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
}

.consent-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.consent-item input[type="checkbox"] {
  margin-top: 0.2rem;
}

.consent-item label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
}

.consent-info {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.table th,
.table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.table tr:last-child td {
  border-bottom: none;
}

.table input[type="number"] {
  width: 72px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.table tfoot td {
  border-bottom: none;
  border-top: 2px solid var(--border);
  background: #f1f5f9;
  padding-top: 14px;
  padding-bottom: 14px;
}

.cart-table__product-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.35);
}

.cart-table__product-link:hover {
  border-bottom-color: var(--accent-hover);
  color: var(--accent-hover);
}

.cart-table__th-remove {
  width: 3rem;
  text-align: center;
}

.cart-table__cell-remove {
  text-align: center;
  vertical-align: middle;
}

.cart-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.cart-remove:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.cart-table__grand-total {
  font-size: 1.0625rem;
  color: var(--text);
}

.cart-table__row-removed td {
  background: #f8fafc;
}

.cart-table__removed-title {
  color: var(--muted);
  text-decoration: line-through;
}

.cart-table__removed-price {
  color: #64748b;
  font-weight: 600;
}

.notice {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: #0e7490;
}

.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: #991b1b;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}

#checkout-form #email {
  border-color: #94a3b8;
  border-width: 3px;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  animation: checkout-email-pulse 1s ease-in-out infinite;
}

#checkout-form #email:focus {
  animation: none;
}

@keyframes checkout-email-pulse {
  0%,
  100% {
    border-color: #94a3b8;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
  50% {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
  }
}

@media (prefers-reduced-motion: reduce) {
  #checkout-form #email {
    animation: none;
  }
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* --- Mobile bottom dock (как course-promo__bottom enrollment) --- */
.mobile-buy-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.1);
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}

.mobile-buy-dock[hidden] {
  display: none !important;
}

.mobile-buy-dock__price {
  font-weight: 700;
  font-size: 1.125rem;
}

.mobile-buy-dock__offers {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  justify-content: center;
  margin: 0 auto;
  overflow: hidden;
}

.mobile-buy-dock__variant-select-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.mobile-buy-dock__variant-select {
  width: 100%;
  min-height: 2rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.35rem 0.55rem;
}

.mobile-buy-dock__offers:not(.mobile-buy-dock__offers--pair) .buy-card__offer {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  white-space: nowrap;
}

.mobile-buy-dock .buy-card__variant-grid {
  display: flex;
  gap: 0.45rem;
  margin: 0;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.mobile-buy-dock .buy-card__variant-choice {
  flex: 0 0 auto;
  padding: 0.45rem 0.6rem;
  border-radius: 9px;
  gap: 0.5rem;
}

.mobile-buy-dock .buy-card__variant-title {
  font-size: 0.76rem;
}

.mobile-buy-dock .buy-card__variant-price-current {
  font-size: 0.86rem;
}

.mobile-buy-dock__offers:not(.mobile-buy-dock__offers--pair) .buy-card__offer + .buy-card__offer {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.mobile-buy-dock__offers:not(.mobile-buy-dock__offers--pair) .buy-card__price-row {
  min-width: auto;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.mobile-buy-dock__offers:not(.mobile-buy-dock__offers--pair) .buy-card__price-current {
  margin-top: 0;
  line-height: 1;
  font-size: 0.875rem;
}

.mobile-buy-dock__offers:not(.mobile-buy-dock__offers--pair) .btn {
  white-space: nowrap;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 8px;
}

.mobile-buy-dock__offers--pair {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  padding: 0 2px 2px;
  max-width: 100vw;
}

.mobile-buy-dock__offers--pair .buy-card__offer {
  display: inline-flex;
  flex: 0 1 auto;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  white-space: nowrap;
}

.mobile-buy-dock__offers--pair .buy-card__offer + .buy-card__offer {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}

.mobile-buy-dock__offers--pair .buy-card__offer-label {
  margin: 0;
  white-space: nowrap;
  color: #475569;
  line-height: 1;
}

.mobile-buy-dock__offers--pair .buy-card__offer-label--inline {
  display: inline-flex;
  align-items: center;
  transform: translateY(0);
}

.mobile-buy-dock__offers--pair .buy-card__price-row {
  min-width: auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.mobile-buy-dock__offers--pair .buy-card__price-current {
  font-size: 0.875rem;
  margin-top: 0;
  line-height: 1;
}

.mobile-buy-dock__offers--pair .btn {
  white-space: nowrap;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 8px;
}

.mobile-buy-dock__offers--pair .product-card__added {
  padding: 4px 8px;
  min-height: 28px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.mobile-buy-dock__added {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
}

@media (max-width: 900px) {
  .mobile-buy-dock {
    display: flex;
  }

  .shop-main {
    padding-bottom: 15px;
  }

  /* Keep purchase CTA visible on mobile in the hero buy-card. */
}


/* --- Footer --- */
.site-footer {
  margin-top: auto;
  background: #111111;
  color: #cbd5e1;
  border-top: 1px solid #292929;
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom));
  font-size: 0.8125rem;
  line-height: 1.65;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}

.site-footer__legal {
  flex: 1 1 280px;
  max-width: 52rem;
}

.site-footer__line {
  margin: 0;
}

.site-footer__line:last-child {
  margin-bottom: 0;
}

.site-footer__legal a {
  color: #f8fafc;
  text-decoration: none;
  border-bottom: 1px solid rgba(248, 250, 252, 0.35);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.site-footer__legal a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.site-footer__social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

.site-footer__soc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #f8fafc;
  text-decoration: none;
  border: 1px solid #3f3f46;
  border-bottom: 1px solid #3f3f46;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.site-footer__soc:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #71717a;
  color: #fff;
}

.site-footer__soc svg {
  display: block;
}

@media (max-width: 640px) {
  .site-footer__inner {
    flex-direction: column-reverse;
  }

  .site-footer__social {
    justify-content: flex-start;
  }
}

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

/* --- Plus --- */

.hl {
  color: #42e6ff;
  font-weight: 700;
}