/* Catalog presentation. Filters use the existing GET destination. */
.catalog-page { padding-block: 2.5rem 4rem; color: var(--ui-text, #242438); }
.catalog-heading { max-width: 760px; margin-bottom: 1.8rem; }
.catalog-heading h1 { margin: .5rem 0; font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.4; color: var(--ui-brand, #2e2a7b); }
.catalog-heading p { color: #626277; line-height: 1.8; margin: 0; }
.catalog-filter-toggle { display: none; }
.catalog-filters { display: grid; grid-template-columns: 1.5fr 1fr 1fr auto; align-items: end; gap: 1rem; padding: 1.3rem; border: 1px solid #e6e4ee; border-radius: 12px; background: #fff; }
.catalog-free-filter { grid-column: 1 / -1; grid-row: 2; display: inline-flex; align-items: center; gap: .65rem; width: fit-content; min-height: 36px; color: #2e2a7b; font-size: .9rem; font-weight: 700; cursor: pointer; }
.catalog-free-filter input { width: 20px; height: 20px; margin: 0; accent-color: #2e2a7b; cursor: pointer; }
.catalog-filters .button { grid-column: 4; grid-row: 1; }
.catalog-field { min-width: 0; }
.catalog-field label { display: block; font-size: .9rem; font-weight: 700; margin-bottom: .5rem; }
.catalog-field input, .catalog-field select { width: 100%; min-height: 46px; margin: 0; padding: .65rem .8rem; border: 1px solid #c9c5d7; border-radius: 7px; background: #fff; color: #242438; font: inherit; font-size: .9rem; }
.catalog-filters .button { min-height: 46px; border-radius: 7px; box-shadow: none; white-space: nowrap; }
.catalog-page :focus-visible { outline: 3px solid #b8922a; outline-offset: 3px; }
.catalog-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.8rem 1rem; }
.catalog-results-heading h2 { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: 1.3rem; color: #2e2a7b; }
.catalog-results-heading h2 span { font-size: .85rem; color: #555069; background: #eeebf7; padding: .25rem .6rem; border-radius: 20px; }
.catalog-results-heading a { color: #2e2a7b; text-underline-offset: 4px; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.catalog-course { min-width: 0; overflow: hidden; display: flex; flex-direction: column; background: white; border: 1px solid #e6e4ee; border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.catalog-course:hover, .catalog-course:focus-within { border-color: #aaa3c5; box-shadow: 0 8px 20px -16px #23205970; }
.catalog-course-image { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #eeebf7; }
.catalog-free-badge { position: absolute; top: .75rem; inset-inline-start: .75rem; padding: .3rem .7rem; border-radius: 999px; background: #f2d679; color: #28214d; font-size: .8rem; font-weight: 800; box-shadow: 0 2px 8px #23205930; }
.catalog-course-image img { width: 100%; height: 100%; object-fit: cover; }
.catalog-image-placeholder { display: grid; place-items: center; height: 100%; color: #2e2a7b; font-weight: 800; }
.catalog-course-body { display: flex; flex-direction: column; flex: 1; padding: 1.2rem; }
.catalog-course-tags { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .78rem; color: #555069; }
.catalog-course-tags span { background: #f1eff8; border-radius: 4px; padding: .2rem .5rem; }
.catalog-course h3 { margin: .8rem 0 .5rem; font-size: 1.15rem; line-height: 1.6; }
.catalog-course h3 a { color: #2e2a7b; text-decoration: none; }
.catalog-course h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.catalog-course p { font-size: .9rem; line-height: 1.8; color: #626277; margin: 0 0 1rem; overflow-wrap: anywhere; }
.catalog-course-bottom { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid #efedf5; }
.catalog-course-bottom strong { color: #2e2a7b; }
.catalog-course-bottom a { display: inline-flex; align-items: center; gap: .4rem; padding-block: .35rem; color: #2e2a7b; font-size: .9rem; font-weight: 700; text-decoration: none; }
[dir="rtl"] .catalog-arrow { transform: scaleX(-1); }
.catalog-empty { text-align: center; padding: 3rem 1.5rem; background: #fff; border: 1px solid #e6e4ee; border-radius: 12px; }
.catalog-empty svg { color: #82799f; }
.catalog-empty h3 { color: #2e2a7b; }
.catalog-empty p { color: #626277; }
.catalog-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; margin-top: 2rem; }
.catalog-pagination a, .catalog-pagination span { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: .5rem .8rem; border: 1px solid #d7d2e5; background: white; border-radius: 7px; color: #2e2a7b; text-decoration: none; }
.catalog-pagination a[aria-current="page"] { background: #2e2a7b; color: #fff; border-color: #2e2a7b; }
.catalog-pagination a:hover:not([aria-current]) { background: #eeebf7; }
.catalog-pagination .catalog-page-disabled { color: #777384; background: #f5f4f8; }
.catalog-page-summary { text-align: center; font-size: .85rem; color: #626277; }
.catalog-packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.catalog-package-page .nl-package { min-width: 0; }
.catalog-package-page .nl-package h2 { margin: .9rem 0 .6rem; color: #2e2a7b; font-size: 1.4rem; line-height: 1.4; overflow-wrap: anywhere; }
@media (max-width: 960px) { .catalog-filters { grid-template-columns: 1fr 1fr; } .catalog-filters .button { grid-column: 2; grid-row: 2; } .catalog-free-filter { grid-row: 3; } .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) { .catalog-packages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .catalog-page { padding-top: 1.5rem; } .catalog-filters { grid-template-columns: 1fr; padding: 1rem; gap: .85rem; } .catalog-grid { grid-template-columns: 1fr; gap: 1rem; } .catalog-course-image { aspect-ratio: 16 / 8; } .catalog-results-heading { align-items: baseline; } }
@media (max-width: 600px) { .catalog-packages { grid-template-columns: 1fr; gap: 1rem; } }
@media (prefers-reduced-motion: reduce) { .catalog-course { transition: none; } }

/* Mobile filters stay visible without taking four full rows above the results. */
@media (max-width: 600px) {
  .catalog-page { padding-block: 1.5rem 3rem; }
  .catalog-heading { margin-bottom: 1.25rem; }
  .catalog-heading h1 { font-size: clamp(1.65rem, 7vw, 2rem); line-height: 1.35; }
  .catalog-heading p { font-size: .94rem; line-height: 1.65; }
  .catalog-search-tools[data-search-ready] .catalog-filter-toggle { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 52px; padding: .7rem .9rem; border: 1px solid #d8d2e8; border-radius: 10px; background: #fff; color: #2e2a7b; font: inherit; font-weight: 700; text-align: start; cursor: pointer; }
  .catalog-filter-toggle > svg { width: 21px; height: 21px; flex-shrink: 0; }
  .catalog-filter-toggle > span:nth-child(2) { flex: 1; }
  .catalog-filter-count { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; background: #2e2a7b; color: #fff; font-size: .75rem; }
  .catalog-filter-chevron { transition: transform .18s ease; }
  .catalog-filter-toggle[aria-expanded="true"] .catalog-filter-chevron { transform: rotate(180deg); }
  .catalog-search-tools[data-search-ready]:not([data-search-open]) .catalog-filters { display: none; }
  .catalog-search-tools[data-search-ready][data-search-open] .catalog-filters { margin-top: .75rem; }
  .catalog-search-tools[data-search-ready]:not([data-search-open]) + .catalog-results-heading { padding-top: 1rem; }
  .catalog-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; padding: 1rem; }
  .catalog-search, .catalog-filters .button { grid-column: 1 / -1; }
  .catalog-filters .button { grid-row: 4; }
  .catalog-free-filter { grid-row: 3; }
  .catalog-field label { font-size: .82rem; margin-bottom: .35rem; }
  .catalog-field input, .catalog-field select { min-height: 48px; font-size: 1rem; }
  .catalog-filters .button { min-height: 48px; }
  .catalog-results-heading { padding-block: 1.5rem .9rem; }
  .catalog-results-heading h2 { font-size: 1.15rem; }
  .catalog-grid { grid-template-columns: 1fr; gap: 1rem; }
  .catalog-course-image { aspect-ratio: 16 / 9; }
  .catalog-course-body { padding: 1rem; }
  .catalog-course h3 { margin-block: .65rem .4rem; }
  .catalog-course p { margin-bottom: .85rem; }
  .catalog-course-bottom { flex-wrap: wrap; }
  .catalog-course-bottom a { min-height: 44px; padding-inline: .5rem; }
}
@media (prefers-reduced-motion: reduce) { .catalog-filter-chevron { transition: none; } }

/* Package detail reuses course cards to show the exact courses in the offer. */
.package-detail__courses { margin-top: clamp(2.5rem, 5vw, 4rem); }
.package-detail__heading { margin-bottom: 1.5rem; }
.package-detail__heading h2 { margin: 0 0 .4rem; color: #2e2a7b; font-size: clamp(1.5rem, 3vw, 2rem); }
.package-detail__heading p, .package-detail__notice { margin: 0; color: #626277; line-height: 1.8; }
.package-detail__notice { margin-top: 1.5rem; padding: 1rem; border: 1px solid #e6e4ee; border-radius: 8px; background: #fff; }
.package-detail .catalog-course-bottom { justify-content: flex-start; }
.package-detail .catalog-course-bottom a { min-height: 44px; }
.purchase-detail-page .course-detail { padding-bottom: 9rem; }
.detail-purchase { position: fixed; z-index: 15; inset-inline-end: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 1rem; width: min(28rem, calc(100vw - 2rem)); padding: .85rem; border: 1px solid #d8d2e8; border-radius: 16px; background: #fff; box-shadow: 0 12px 38px #23205930; }
.detail-purchase__price { display: grid; gap: .1rem; min-width: 0; }
.detail-purchase__price span { color: #626277; font-size: .75rem; }
.detail-purchase__price strong { color: #2e2a7b; font-size: 1.2rem; white-space: nowrap; }
.detail-purchase__price small { font-size: .7em; }
.detail-purchase form { flex: 1; margin: 0; }
.detail-purchase .button { width: 100%; min-height: 48px; white-space: nowrap; }
.purchase-detail-page .public-footer { padding-bottom: calc(8rem + env(safe-area-inset-bottom)); }
@media (max-width: 540px) {
  .detail-purchase { inset-inline: .75rem; bottom: max(.75rem, env(safe-area-inset-bottom)); width: auto; gap: .65rem; padding: .7rem; }
  .detail-purchase__price strong { font-size: 1rem; }
  .detail-purchase .button { padding-inline: .8rem; font-size: .85rem; }
}
