@charset "UTF-8";
@import url("fonts.css");

/* 1. Общие значения */
:root {
  --layout-max: 1280px;
  --layout-gutter: clamp(16px, 3vw, 32px);
  --layout-shell: calc(var(--layout-max) + 2 * var(--layout-gutter));
  --brand: #6236dc;
  --brand-2: #7950e7;
  --brand-dark: #4520b8;
  --dark: #20192d;
  --text: #302a3a;
  --muted: #686172;
  --line: #e4deec;
  --bg: #f7f6fa;
  --soft: #f1edfc;
  --yellow: #ffb31f;
  --card: #fff;
  --danger: #b42338;
  --radius: 20px;
  --radius-control: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --panel-padding: clamp(16px, 2.2vw, 28px);
  --grid-gap: 24px;
  --shadow-sm: 0 4px 20px rgb(32 25 45 / 5%);
  --shadow-md: 0 12px 32px rgb(32 25 45 / 9%);
  --shadow-lg: 0 20px 48px rgb(32 25 45 / 13%);
  --focus-ring: 0 0 0 4px rgb(98 54 220 / 14%);
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-padding-top: 96px; }
body {
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 "GolosText", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
body > main { flex: 1 0 auto; width: 100%; min-width: 0; }
img, svg, video { max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
a { color: var(--brand); text-decoration: none; text-underline-offset: .18em; }
a:hover { color: var(--brand-dark); }
p a:not(.btn):hover { text-decoration: underline; }
::selection { background: var(--brand); color: #fff; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--brand); outline-offset: 3px;
}
:where(h1,h2,h3,h4,h5,h6,p,li,td,th,label,a) { overflow-wrap: anywhere; }
h1,h2,h3,h4,h5,h6 { color: var(--dark); line-height: 1.25; font-weight: 700; }
h1, h1.title, .event-title, .inner #content.product h1 {
  font-size: clamp(28px, 3.3vw, 44px); line-height: 1.15;
  letter-spacing: -.025em; margin: 0 0 var(--space-5); text-wrap: balance;
}
h2, h2.title { font-size: clamp(24px, 2.6vw, 34px); margin: 0 0 var(--space-5); }
h3 { font-size: clamp(20px, 2vw, 26px); }
h4 { font-size: 20px; }
.title { font-weight: 750; color: var(--dark); }
.lead { max-width: 70ch; font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); }
.muted, .text-muted { color: var(--muted) !important; }
.text-brand { color: var(--brand) !important; }
.required-star { color: var(--danger); }

/* 2. Одинаковый контейнер у всех существующих шаблонов */
.page, .page-fullwidth, .inner {
  width: 100%; max-width: var(--layout-shell); margin-inline: auto;
  padding: clamp(24px, 3vw, 40px) var(--layout-gutter) var(--space-7);
}
:is(.page,.page-fullwidth,.inner) > :is(.container,.container-xxl,.container-fluid),
.inner .marketing, .page-fullwidth > .container-fluid > .container-fluid {
  width: 100%; max-width: none; padding-inline: 0 !important;
}
body > main:not(.page):not(.inner):not(.page-fullwidth) > section {
  margin: 0 !important; padding-block: clamp(24px, 3vw, 40px) !important;
}
body > main:not(.page):not(.inner):not(.page-fullwidth) > section > :is(.container,.container-xxl) {
  width: 100%; max-width: var(--layout-shell); padding-inline: var(--layout-gutter);
}
.inner .event { margin: 0 !important; }
.page > section + section { margin-top: var(--space-7); }
main :is(.row > *, .d-flex > *, .input-group) { min-width: 0; }
main .row { --bs-gutter-x: 24px; }
.topbar .container, .site-footer .container {
  width: 100%; max-width: var(--layout-shell); padding-inline: var(--layout-gutter);
}
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; color: var(--muted); font-size: 14px; }

/* 3. Навигация */
.topbar {
  position: sticky; top: 0; z-index: 1020; flex: 0 0 auto;
  width: 100%; border-bottom: 1px solid var(--line); background: #fff;
}
.topbar .container { padding-block: 12px !important; }
.brand-logo { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; }
.brand-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.topbar b { display: block; color: var(--dark); line-height: 1.25; }
.topbar .small { margin-top: 4px; color: var(--muted); line-height: 1.3; }
.navbar-toggler { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; }
.navbar-toggler:focus { box-shadow: var(--focus-ring); }
.navbar-nav .nav-link { padding: 12px !important; color: var(--text); font-weight: 650; border-radius: 12px; }
.navbar-nav .nav-link:is(:hover,:focus-visible,.active) { color: var(--brand); background: var(--soft); }
.topbar .navbar-collapse > .d-flex .btn { display: inline-grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.dropdown-menu { min-width: min(300px, calc(100vw - 32px)); max-width: min(400px, calc(100vw - 32px)); padding: 8px; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); }
.dropdown-item { padding: 12px; border-radius: 8px; white-space: normal; color: var(--text); }
.dropdown-item:is(:hover,:focus) { background: var(--soft); color: var(--brand-dark); }
.dropdown-item:is(.active,:active) { background: var(--brand); color: #fff; }

/* 4. Кнопки: единые размеры, состояния, цвет действия */
.btn {
  --bs-btn-font-size: 1rem; --bs-btn-border-radius: var(--radius-control);
  min-height: 48px; padding: 11px 18px; font-weight: 650; line-height: 1.4;
  white-space: normal; overflow-wrap: anywhere; border-radius: var(--radius-control);
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.btn-sm { min-height: 44px; padding: 9px 14px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 13px 24px; font-size: 16px; }
.btn-brand, .btn-primary {
  --bs-btn-color: #fff; --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
  color: #fff; background: var(--brand); border: 1px solid var(--brand); box-shadow: none;
}
.btn-brand:is(:hover,:focus-visible,:active), .btn-primary:is(:hover,:focus-visible,:active) { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-soft, .btn-light, .btn-outline-primary { color: var(--brand-dark); background: var(--soft); border: 1px solid var(--line); }
.btn-soft:is(:hover,:focus-visible), .btn-light:is(:hover,:focus-visible), .btn-outline-primary:is(:hover,:focus-visible) { color: var(--brand-dark); background: #e8e0fc; border-color: #c5b3ee; }
.btn-danger { color: var(--danger); background: #fff3f4; border: 1px solid #ebbdc5; }
.btn-danger:is(:hover,:focus-visible) { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn:is(:disabled,.disabled), .btn[aria-disabled="true"] { opacity: .55; box-shadow: none; cursor: not-allowed; }
.btn:focus-visible { box-shadow: var(--focus-ring); }

/* 5. Формы, в том числе стандартные формы miniShop2 */
.form-control, .form-select {
  width: 100%; min-width: 0; max-width: 100%; min-height: 48px; padding: 11px 14px;
  color: var(--text); font-size: 16px; line-height: 1.5;
  background-color: #fff; border: 1px solid #cfc6dc; border-radius: var(--radius-control); box-shadow: none;
}
.form-select { padding-right: 40px; }
select.form-control { padding-right: 32px; appearance: auto; }
.form-control::placeholder { color: #767080; opacity: 1; }
:is(.form-control,.form-select):focus { color: var(--text); border-color: var(--brand); outline: 0; box-shadow: var(--focus-ring); }
:is(.form-control,.form-select):disabled { color: var(--muted); background-color: #eeebf2; cursor: not-allowed; }
.form-control[readonly] { background-color: #f7f5fa; }
textarea.form-control { min-height: 112px; resize: vertical; }
.form-label, .col-form-label { color: var(--text); font-size: 15px; line-height: 1.45; font-weight: 600; }
.form-label { margin-bottom: 8px; }
.form-check-input, input[type="radio"], input[type="checkbox"] { accent-color: var(--brand); flex-shrink: 0; }
.form-check-input { width: 20px; height: 20px; margin-top: .2em; border-color: #b8accb; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: var(--brand); box-shadow: var(--focus-ring); }
.form-check { min-height: 32px; padding-left: 30px; }
.form-check .form-check-input { margin-left: -30px; }
.form-check-label { cursor: pointer; }
.input-group { flex-wrap: nowrap; align-items: stretch; }
.input-group > .form-control { width: 1%; flex: 1 1 auto; }
.input-group-text { min-height: 48px; height: 100%; background: var(--soft); border-color: #cfc6dc; }
.input-group-append { display: flex; }
.input-group-append .input-group-text { border-radius: 0 12px 12px 0; }
.is-invalid, .form-control.is-invalid, .form-select.is-invalid { border-color: var(--danger); }
.invalid-feedback { color: var(--danger); font-size: 14px; }
.form-text { color: var(--muted); font-size: 14px; }

/* 6. Карточки и квадратные изображения */
.card-soft, .info-box, .course-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.info-box { padding: var(--panel-padding); height: 100%; }
.event-card { display: flex; flex-direction: column; min-width: 0; height: 100%; overflow: hidden; }
.event-card { padding: 0 !important; }
.event-card .card-img-wrapper { position: relative; width: 100%; height: auto !important; min-height: 0; aspect-ratio: 1 / 1; margin: 0 !important; padding: 0 !important; overflow: hidden; flex-shrink: 0; background: #f0edf5; }
.event-card .card-img-wrapper > a { position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; padding: 0; }
.event-card .card-img-wrapper img { position: absolute; inset: 0; display: block; width: 100% !important; height: 100% !important; max-height: none; margin: 0 !important; padding: 0 !important; border: 0; border-radius: 0; object-fit: contain; object-position: center; box-shadow: none !important; }
.media-cover > img:not([itemprop="image"]) { object-fit: cover; }
.event-card .card-body { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: var(--panel-padding) !important; }
.event-card .card-body > :not(.btn) { margin-block: 0 !important; }
.event-card .card-title { margin: 0; color: var(--dark); font-size: 20px; font-weight: 700; line-height: 1.35; }
.event-card .card-text { color: var(--muted); font-size: 15px; }
.event-card .card-text:empty { display: none; }
.event-card .btn { align-self: stretch !important; width: 100%; margin-top: auto !important; }
.price { color: var(--brand); font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.25; }
.event-card .price { font-size: 24px !important; }
.event-location { color: var(--muted); font-size: 14px; line-height: 1.5; }
.event-badge, .age-badge { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.event-badge { color: var(--brand-dark); background: var(--soft); white-space: normal; }
.age-badge { color: var(--text); background: #fff; border: 1px solid var(--line); }
.transition-all { transition: border-color .16s ease, box-shadow .16s ease; }
@media (hover: hover) and (pointer: fine) {
  .hover-shadow:hover, .course-card:hover { border-color: #c7b8e8; box-shadow: var(--shadow-md) !important; }
}
/* Bootstrap остаётся запасной сеткой для браузеров без :has(). */
@supports selector(:has(*)) {
  main .row:has(> [class*="col-"] > :is(.event-card,.course-card)) {
    display: grid; grid-template-columns: minmax(0,1fr); gap: var(--grid-gap); margin: 0;
  }
  main .row:has(> [class*="col-"] > :is(.event-card,.course-card)) > [class*="col-"] { width: auto; max-width: none; margin: 0 !important; padding: 0; }
}

/* 7. Кружки и фильтры */
.filters-panel { width: 100%; margin-bottom: 32px !important; padding: var(--panel-padding) !important; background: #fff !important; border: 1px solid var(--line) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow-sm) !important; }
.filters-panel > .row { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin: 0; }
.filters-panel > .row > [class*="col-"] { width: auto; max-width: none; margin: 0; padding: 0; }
.filters-panel > .row > .col-12 { grid-column: 1 / -1; }
.filters-panel > .row > .col-md-6 { grid-column: span 2; }
.filters-panel > .row > .col-md-3.d-flex { display: flex !important; flex-wrap: wrap; gap: 8px !important; }
.filters-panel .btn { flex: 1 1 100px; }
.filters-panel .form-label { font-size: 14px !important; color: var(--text) !important; }
.filters-panel .form-check { position: relative; margin: 0; padding: 0; }
.filters-panel .form-check-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.filters-panel .form-check-label { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #fff; font-size: 14px; }
.filters-panel .form-check-input:checked + .form-check-label { color: #fff; background: var(--brand); border-color: var(--brand); }
.filters-panel .form-check-input:focus-visible + .form-check-label { outline: 3px solid var(--brand); outline-offset: 3px; }
.filters-panel .form-check-input:disabled + .form-check-label { opacity: .5; cursor: not-allowed; }
.course-card { display: flex; height: 100%; min-width: 0; overflow: hidden; border: 1px solid var(--line) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow-sm) !important; }
.course-card > .p-3 { display: flex; flex-direction: column; width: 100%; padding: var(--panel-padding) !important; }
.course-card h4 { margin-bottom: 12px !important; font-size: 20px !important; line-height: 1.35; }
.course-card h4 + .d-flex { flex-wrap: wrap; gap: 8px !important; }
.course-card .badge { max-width: 100%; white-space: normal; text-align: left; line-height: 1.4; }
.course-card > .p-3 > .d-flex.flex-column.gap-2 { gap: 12px !important; margin-bottom: 24px; }
.course-card > .p-3 > .d-flex.flex-column.gap-2 > .d-flex { display: grid !important; grid-template-columns: 20px minmax(0,1fr); gap: 4px 8px !important; align-items: start !important; font-size: 15px; }
.course-card > .p-3 > .d-flex.flex-column.gap-2 > .d-flex > i { grid-column: 1; color: var(--brand); }
.course-card > .p-3 > .d-flex.flex-column.gap-2 > .d-flex > :not(i) { grid-column: 2; min-width: 0; }
.course-card > .p-3 > .mt-3 { margin-top: auto !important; padding-top: 16px; border-top: 1px solid var(--line); }
.course-card .btn-brand { width: 100%; }

/* 8. Обе версии страницы мероприятия и прокат. Без display:contents. */
.inner #content.product { width: 100%; min-width: 0; }
.inner #content.product > :is(h1,.col-12:first-child) { padding: 0; }
.inner #content.product h1 { text-align: left !important; }
.inner #content.product h1 .badge { display: inline-block; margin-left: 12px !important; padding: 6px 10px; font-size: 14px; vertical-align: middle; color: var(--brand-dark) !important; background: var(--soft) !important; }
.inner #msProduct { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--grid-gap); margin: 0; width: 100%; }
.inner #msProduct > [class*="col-"] { width: auto; max-width: none; padding: 0; }
#msGallery { width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
#msGallery > div, #msGallery a { display: block; width: 100%; }
#msGallery img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; box-shadow: none !important; }
.inner #msProduct > .col-md-7 > .row.my-5 { --bs-gutter-y: 16px; margin-block: 24px !important; }
.inner #msProduct > .col-md-7 > .row.my-5 img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.inner #msProduct > .col-md-7 > .form { margin-block: 24px; padding: var(--panel-padding); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.inner #msProduct .ms2_form .form-group.row { margin: 0 0 20px !important; row-gap: 8px; }
.inner #msProduct .ms2_form .form-group.row > [class*="col-"] { width: 100%; padding-inline: 0; text-align: left !important; }
.inner #msProduct .ms2_form .col-form-label { padding-block: 0; }
.inner #msProduct .ms2_form .form-group:has(> .fs-2) { padding: 16px; background: var(--soft); border-radius: 12px; }
.inner #msProduct .ms2_form .fs-2 { font-size: 28px !important; color: var(--brand); font-weight: 750; }
.inner #msProduct .ms2_form .form-group:last-child { margin-bottom: 0 !important; }
.inner #msProduct .ms2_form .form-group:has(> .fs-2) > label { font-size: 16px !important; }
.event-date-main, .event-time-main { display: inline-flex; margin: 0 8px 16px 0 !important; padding: 8px 12px; color: var(--brand-dark) !important; background: var(--soft) !important; border-radius: 8px; box-shadow: none !important; font-size: 14px !important; }
.event-detail .hero { width: 100%; min-height: 0; margin: 0; padding: 0 !important; border-radius: var(--radius); overflow: hidden; background: #fff; }
.event-detail .hero img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.event-detail .card-soft { padding: var(--panel-padding) !important; }
.event-detail .card-soft > h4 { margin-bottom: 24px !important; }
#participant-form { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; }
#participant-form > .row, .participant-block .row { margin: 0 !important; row-gap: 8px; }
#participant-form > .row > [class*="col-"], .participant-block .row > [class*="col-"] { width: 100%; padding: 0; }
#participant-form > .row:first-of-type { padding: 16px; background: var(--soft); border-radius: 12px; }
#participant-form > .mb-4.border-top { margin: 0 !important; padding-top: 20px; }
#participant-form > .text-end { padding-top: 20px; border-top: 1px solid var(--line); }
#product_price_display { font-size: 28px !important; color: var(--brand) !important; line-height: 1.25; font-weight: 750; }
#participant-form:has(#format-select:invalid) #product_price_display,
#participant-form:has(#format-select:invalid) #product_price_display + .text-muted { display: none; }
#participant-form:has(#format-select:invalid) > .row:first-of-type > div:last-child::after { content: "Выберите форму участия"; color: var(--muted); font-size: 16px; }
#participants_container { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; }
#participants_container:empty { display: none; }
.participant-block { padding: 16px !important; margin: 0 !important; background: #f8f6fc; border: 1px solid var(--line) !important; border-radius: 12px !important; }
.participant-block .row + .row { margin-top: 16px !important; }
.event-tabs { margin-top: 32px; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.event-tabs .nav-tabs { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 12px; margin: 0 !important; border-bottom: 1px solid var(--line); background: var(--soft); scrollbar-width: thin; }
.event-tabs .nav-item { flex: 1 0 auto; }
.event-tabs .nav-link { min-height: 44px; width: 100%; padding: 10px 16px; border: 0; border-radius: 10px; color: var(--muted); white-space: nowrap; }
.event-tabs .nav-link.active { color: #fff; background: var(--brand); }
.event-tabs .tab-content { padding: var(--panel-padding) !important; }
.event-tabs .tab-pane li + li { margin-top: 8px; }

/* 9. Корзина: существующие cart-item, msCart, msOrder */
#msCart { margin-bottom: 24px; }
#msCart .cart-item { padding: var(--panel-padding) !important; }
#msCart .cart-item > .row { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(120px,auto) 44px; align-items: center; gap: 20px; margin: 0; }
#msCart .cart-item > .row > [class*="col-"] { width: auto; max-width: none; padding: 0; margin: 0; min-width: 0; }
#msCart .cart-item-title { display: inline-block; color: var(--dark); font-size: 18px; line-height: 1.4; font-weight: 650; }
#msCart .cart-item-title:hover { color: var(--brand); text-decoration: underline; }
#msCart .cart-item-options { margin-top: 12px !important; color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
#msCart .cart-item-price { text-align: right; font-variant-numeric: tabular-nums; }
#msCart .cart-item-price .fw-bold { font-size: 22px !important; color: var(--dark); line-height: 1.3; }
#msCart .cart-item-price .text-nowrap { white-space: normal !important; }
#msCart .cart-remove-btn { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; }
#msCart .cart-remove-btn:hover { color: var(--danger); background: #fff1f3; border-color: #ebbdc5; }
.empty-state { padding: clamp(32px,7vw,72px) 24px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
#msCart .alert { padding: 20px; border-radius: 16px; }
#msOrder { min-width: 0; margin-top: 24px; padding: var(--panel-padding); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
#msOrder > .row { margin: 0 0 24px !important; row-gap: 24px; }
#msOrder > .row > [class*="col-"] { width: 100%; padding: 0; }
#msOrder h4 { margin: 0 0 20px; font-size: 22px; }
#msOrder .form-group.row { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; margin: 0 0 20px !important; }
#msOrder .form-group.row > [class*="col-"] { width: 100%; max-width: none; padding: 0; }
#msOrder .col-form-label { padding-block: 0; }
#msOrder #payments, #msOrder #deliveries { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #faf9fc; }
#msOrder #payments .form-group, #msOrder #deliveries .form-group { margin-bottom: 0 !important; }
#msOrder :is(.payment,.delivery) { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 44px; cursor: pointer; }
#msOrder :is(.payment,.delivery) input { width: 20px; height: 20px; }
#msOrder :is(.payment,.delivery) p { flex-basis: 100%; margin: 0; }
#msOrder > .form-check { display: flex; align-items: flex-start; gap: 12px; padding: 0; margin-bottom: 24px !important; }
#msOrder > .form-check .form-check-input { float: none; width: 20px; height: 20px; margin: 3px 0 0; font-size: 16px !important; }
#msOrder > .form-check .form-check-label { font-size: 15px !important; line-height: 1.6; }
#msOrder > .form-check a { text-decoration: underline; }
#msOrder > .d-flex { display: grid !important; grid-template-columns: minmax(0,1fr) auto; gap: 8px 24px; align-items: center !important; margin: 0 !important; padding: 24px; border: 1px solid #ded3f4; border-radius: 16px; background: var(--soft); }
#msOrder > .d-flex > h4 { grid-column: 1; margin: 0 !important; font-size: 16px; font-weight: 500; color: var(--muted); }
#msOrder > .d-flex > h3 { grid-column: 1; margin: 0 !important; font-size: clamp(22px,2.5vw,30px); font-variant-numeric: tabular-nums; line-height: 1.4; }
#ms2_order_VAT { font-size: 14px; font-weight: 400; color: var(--muted); }
#msOrder > .d-flex > .btn { grid-column: 2; grid-row: 1 / 3; min-width: 192px; align-self: center; }
#msOrder hr { border-color: var(--line); opacity: 1; }

/* 10. Информационные страницы, таблицы и окна */
main :is(.container-fluid,.container-xxl) p { line-height: 1.65; }
main iframe { display: block; max-width: 100%; border: 0; border-radius: 16px; }
.page iframe { width: 100%; }
main table { width: 100%; max-width: 100%; border-collapse: collapse; background: #fff; }
main table :is(th,td) { padding: 12px 16px; border: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
main table th { background: var(--soft); color: var(--dark); font-weight: 650; }
main table p:last-child { margin-bottom: 0; }
.table-responsive { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
main pre { max-width: 100%; overflow: auto; }
.modal-dialog { max-width: min(640px,calc(100vw - 32px)); margin: 16px auto; }
.modal-content { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.modal-body { min-height: 0; overflow-y: auto; padding: var(--panel-padding); }
.modal-header, .modal-footer { padding: 16px 24px; border-color: var(--line); }
.modal-footer { gap: 8px; }
.modal .btn-close { width: 24px; height: 24px; padding: 10px; }
.pagination-wrapper { display: flex; justify-content: center; margin-top: 32px; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.pagination .page-item .page-link { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #fff; }
.pagination .page-item.active .page-link { color: #fff; background: var(--brand); border-color: var(--brand); }
.pagination .page-item.disabled .page-link { color: var(--muted); background: #eeebf2; pointer-events: none; }
.icon { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; color: var(--brand); background: var(--soft); font-size: 22px; }
.card-soft.d-block.text-center { padding: 24px 16px !important; height: 100%; }
.card-soft.d-block.text-center .icon { margin-inline: auto; }
.page .hero { position: relative; padding: clamp(24px,5vw,56px) !important; border-radius: var(--radius); color: #fff; background: #302050; }
.page .hero .title { color: #fff; }
.page .hero .lead { color: #eee7fb !important; }
.hero-label { display: inline-block; margin-bottom: 16px; padding: 8px 12px; border-radius: 8px; color: #3b2a00; background: var(--yellow); }

/* 11. Подвал */
.site-footer { width: 100%; margin-top: auto; padding-bottom: 24px; color: #f6f3fa; background: #20192d; }
.footer-title { margin-bottom: 16px; color: #fff; font-size: 18px; font-weight: 650; }
.footer-nav { padding: 0; margin: 0; list-style: none; }
.footer-nav li + li { margin-top: 8px; }
.footer-nav a { display: inline-block; padding-block: 4px; color: #d1c9de; font-size: 15px; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-contacts li { display: flex; align-items: flex-start; gap: 8px; color: #d1c9de; }
.footer-contacts i { color: #c5acf9; flex-shrink: 0; }
.social-link { display: inline-grid; place-items: center; width: 44px; height: 44px; color: #fff; background: #3b2d50; border-radius: 50%; }
.social-link:hover { color: #fff; background: var(--brand); }
.footer-bottom { margin-top: 24px; padding-top: 24px; border-top: 1px solid #44364f !important; }
.site-footer :is(.text-muted,.text-secondary,.muted) { color: #c5bbd2 !important; }
.site-footer .brand-logo + div .fw-bold { color: #fff; }

/* 12. Адаптивность: без скрытия горизонтального переполнения страницы */
@media (min-width: 640px) {
  @supports selector(:has(*)) {
    main .row:has(> [class*="col-"] > :is(.event-card,.course-card)) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  }
}
@media (min-width: 768px) {
  #msOrder > .row:first-of-type > .col-md-8 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; }
  #msOrder > .row:first-of-type h4, #msOrder > .row:first-of-type .form-group:has(textarea) { grid-column: 1 / -1; }
  #participant-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #participant-form > :is(.row:first-of-type,.border-top,#quantity_container,#participants_container,.text-end) { grid-column: 1 / -1; }
  #participants_container { grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); }
}
@media (min-width: 992px) {
  .inner #msProduct { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); align-items: start; }
}
@media (min-width: 1100px) {
  @supports selector(:has(*)) {
    main .row:has(> [class*="col-"] > :is(.event-card,.course-card)) { grid-template-columns: repeat(3,minmax(0,1fr)); }
  }
}
@media (max-width: 1199.98px) {
  .filters-panel > .row { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 991.98px) {
  .topbar { position: relative; }
  .navbar-collapse { margin-top: 12px; padding: 8px; border-top: 1px solid var(--line); }
  .navbar-collapse .dropdown-menu { min-width: 0; max-width: 100%; width: 100%; box-shadow: none; }
  .navbar-collapse > .d-flex { padding-top: 12px; }
  #msCart .cart-item > .row { grid-template-columns: minmax(0,1fr) auto 44px; gap: 16px; }
  #msCart .cart-item > .row > :first-child { grid-column: 1 / -1; }
  #msCart .cart-item > .row > :last-child { grid-column: 3; }
  .inner #msProduct > .col-md-5 { max-width: 560px; width: 100%; margin-inline: auto; }
}
@media (max-width: 767.98px) {
  :root { --grid-gap: 16px; --space-7: 32px; }
  #msOrder > .d-flex { grid-template-columns: minmax(0,1fr); padding: 16px; }
  #msOrder > .d-flex > .btn { grid-column: 1; grid-row: auto; width: 100%; min-width: 0; margin-top: 12px; }
  #msOrder #payments, #msOrder #deliveries { padding: 16px; }
  #msOrder > .row { margin-bottom: 20px !important; }
  #msOrder h4 { font-size: 20px; }
  #msOrder > .d-flex > h4 { font-size: 16px; }
  #participant-form > .text-end .btn, .inner #msProduct .ms2_form button[type="submit"] { width: 100%; }
  .page .hero .btn { width: 100%; }
  main :is(.text-end,.text-md-end):has(> .fs-1) { text-align: left !important; }
  main table { table-layout: fixed; font-size: 14px; }
  main table :is(th,td) { padding: 10px 8px; }
}
@media (max-width: 639.98px) {
  .filters-panel > .row { grid-template-columns: minmax(0,1fr); }
  .filters-panel > .row > [class*="col-"] { grid-column: 1; }
  .filters-panel .btn { flex-basis: 120px; }
  .event-card .card-title { font-size: 19px; }
  .event-card .price { font-size: 22px !important; }
  .site-footer :is(.col-5,.col-7) { width: 100%; }
  .site-footer .row { --bs-gutter-y: 24px; }
  .topbar .brand-logo { width: 40px; height: 40px; flex-basis: 40px; }
  .topbar b { font-size: 14px; }
  .topbar .small { max-width: 180px; font-size: 11px; }
  #msCart .cart-item-title { font-size: 17px; }
  #msCart .cart-item-price .fw-bold { font-size: 20px !important; }
}
@media (max-width: 359.98px) {
  #msCart .cart-item > .row { grid-template-columns: minmax(0,1fr) 44px; gap: 12px; }
  #msCart .cart-item > .row > :first-child { grid-column: 1 / -1; }
  #msCart .cart-item > .row > :nth-child(2), #msCart .cart-item > .row > :nth-child(3) { grid-column: 1; }
  #msCart .cart-item > .row > :last-child { grid-column: 2; grid-row: 2 / 4; }
  #msCart .cart-item-price { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (forced-colors: active) {
  .btn, .card-soft, .form-control, .form-select, .event-badge { border: 1px solid ButtonText; }
}
@media print {
  .topbar, .site-footer, .cart-remove-btn, #msCart form, #msOrder > button, #msOrder > .d-flex > .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .page, .inner, .page-fullwidth { max-width: none; padding: 0; }
  .card-soft, #msOrder { box-shadow: none; break-inside: avoid; }
}