/* OneDigitalite course catalogue (.ocl) */
.ocl {
  --ink: #0E0B33; --text: #3D3B5C; --muted: #5E5C7A; --line: #E7E6F2; --soft: #F6F5FC;
  --violet: #5B3CF5; --violet-ink: #4A2FE0; --violet-soft: #E9E4FF;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--text);
}
.ocl *, .ocl *::before, .ocl *::after { box-sizing: border-box; }
.ocl a { text-decoration: none; }
.ocl h1, .ocl h2, .ocl p, .ocl ul { margin: 0; }
.ocl ul { list-style: none; padding: 0; }
.ocl-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* Header */
.ocl-hero { background: var(--soft); border-bottom: 1px solid var(--line); }
.ocl-hero .ocl-wrap { padding-top: 28px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 14px; }
.ocl-crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted); }
.ocl-crumbs a { color: var(--violet-ink); font-weight: 600; }
.ocl-hero h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1.15; }
.ocl-sub { font-size: 16px; color: var(--muted); }
.ocl-search { display: flex; align-items: center; gap: 10px; max-width: 640px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 6px 16px; box-shadow: 0 10px 30px -20px rgba(14, 11, 51, .35); color: var(--muted); }
.ocl-search:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(91, 60, 245, .12); }
.ocl-search input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; color: var(--ink); min-height: 44px; background: transparent; }
.ocl-search button { border: 0; border-radius: 10px; background: var(--violet); color: #fff; font: inherit; font-weight: 700; padding: 0 20px; min-height: 44px; cursor: pointer; }
.ocl-search button:hover { background: var(--violet-ink); }
.ocl-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.ocl-cats a { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 600; font-size: 14px; border-radius: 999px; padding: 8px 14px; }
.ocl-cats a i { color: var(--violet-ink); }
.ocl-cats a small { color: var(--muted); font-weight: 600; }
.ocl-cats a:hover { border-color: #C9BEFF; }
.ocl-cats a.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.ocl-cats a.is-on i, .ocl-cats a.is-on small { color: #C9C7E3; }

/* Layout */
.ocl-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 32px; padding-top: 28px; padding-bottom: 72px; align-items: start; }

/* Filters */
.ocl-filters { position: sticky; top: calc(var(--od-header-h, 96px) + 16px); max-height: calc(100vh - 130px); overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 6px 18px 12px; }
.ocl-filters-head { display: flex; align-items: center; gap: 10px; padding: 14px 0 10px; border-bottom: 1px solid var(--line); }
.ocl-filters-head h2 { flex: 1; font-size: 17px; font-weight: 800; color: var(--ink); }
.ocl-filters-head a { font-size: 13px; font-weight: 700; color: var(--violet-ink); }
.ocl-filters-close { display: none; border: 0; background: none; color: var(--ink); cursor: pointer; }
.ocl-fgroup { border-bottom: 1px solid var(--line); padding: 12px 0; }
.ocl-fgroup:last-child { border-bottom: 0; }
.ocl-fgroup summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 800; color: var(--ink); font-size: 14px; padding: 4px 0 8px; }
.ocl-fgroup summary::-webkit-details-marker { display: none; }
.ocl-fgroup summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.ocl-fgroup[open] summary::after { transform: rotate(-135deg); }
.ocl-opts { display: flex; flex-direction: column; gap: 2px; }
.ocl-opts ul { padding-left: 22px; margin-top: 2px; display: flex; flex-direction: column; gap: 2px; }
.ocl-opts a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; color: var(--text); font-size: 14px; font-weight: 500; }
.ocl-opts a:hover { background: var(--soft); color: var(--ink); }
.ocl-opts a i { width: 16px; height: 16px; border-radius: 999px; border: 2px solid #C9C7E3; flex: 0 0 16px; }
.ocl-opts a.is-on { color: var(--ink); font-weight: 700; }
.ocl-opts a.is-on i { border: 5px solid var(--violet); }
.ocl-opts a small { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600; }
.ocl-opts-inline { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.ocl-opts-inline a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 600; }
.ocl-opts-inline a.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.ocl-stars { display: inline-flex; gap: 1px; }

/* Toolbar */
.ocl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.ocl-filters-btn { display: none; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 0 14px; min-height: 42px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.ocl-filters-btn b { background: var(--violet); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 7px; }
.ocl-count { flex: 1; font-size: 15px; color: var(--muted); }
.ocl-count b { color: var(--ink); }
.ocl-sort { display: flex; align-items: center; gap: 8px; }
.ocl-sort label { font-size: 14px; color: var(--muted); font-weight: 600; margin: 0; }
.ocl-sort select { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 34px 0 12px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235E5C7A' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; -webkit-appearance: none; appearance: none; cursor: pointer; }
.ocl-view { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ocl-view button { width: 42px; height: 40px; border: 0; background: #fff; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ocl-view button + button { border-left: 1px solid var(--line); }
.ocl-view button.is-on { background: var(--violet-soft); color: var(--violet-ink); }

.ocl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ocl-chips a { display: inline-flex; align-items: center; gap: 6px; background: var(--violet-soft); color: #3A22B8; border-radius: 999px; padding: 6px 10px 6px 14px; font-size: 13px; font-weight: 700; }
.ocl-chips a:hover { background: #DCD3FF; }
.ocl-chips .ocl-chips-clear { background: none; color: var(--muted); }

/* Cards */
.ocl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.ocl-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.ocl-card:hover { box-shadow: 0 18px 40px -18px rgba(14, 11, 51, .28); transform: translateY(-2px); }
.ocl-card-media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--soft); overflow: hidden; }
.ocl-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ocl-card:hover .ocl-card-media img { transform: scale(1.03); }
.ocl-badge { position: absolute; left: 12px; top: 12px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
.ocl-badge-deal { background: #FFF1D6; color: #7A4A00; }
.ocl-badge-free { background: #E3F6EC; color: #0B6B3A; }
.ocl-wish { position: absolute; top: 10px; right: 10px; z-index: 2; }
.ocl-wish button { width: 36px; height: 36px; border-radius: 999px; border: 0; background: rgba(255,255,255,.95); color: #B5B3CC; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.ocl-wish.red-heart button, .ocl-wish button:hover { color: #E11D48; }
.ocl-card-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.ocl-card-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.ocl-cat { font-size: 12.5px; font-weight: 700; color: var(--violet-ink); }
.ocl-level { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ocl-title { font-size: 17px; line-height: 1.35; font-weight: 800; }
.ocl-title a { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ocl-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.ocl-desc { font-size: 14px; line-height: 1.55; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ocl-by { font-size: 13.5px; color: var(--muted); }
.ocl-rating { display: flex; align-items: center; gap: 3px; font-size: 13px; color: var(--muted); }
.ocl-rating b { color: #8A5A00; margin-right: 3px; font-size: 14px; }
.ocl-rating span { margin-left: 4px; }
.ocl-new { margin-left: 0 !important; background: var(--violet-soft); color: #3A22B8; border-radius: 999px; padding: 2px 9px; font-weight: 700; font-size: 12px; }
.ocl-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.ocl-meta li { display: inline-flex; align-items: center; gap: 5px; }
.ocl-card-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid #F0EFF7; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ocl-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.ocl-price strong { font-size: 19px; font-weight: 800; color: var(--ink); }
.ocl-price strong.is-free { color: #0B6B3A; }
.ocl-price del { font-size: 13px; color: var(--muted); }
.ocl-cta { position: relative; z-index: 2; background: var(--violet-soft); color: #3A22B8 !important; font-weight: 700; font-size: 14px; border-radius: 10px; padding: 9px 14px; white-space: nowrap; }
.ocl-cta:hover { background: var(--violet); color: #fff !important; }
.ocl-cta.is-owned { background: #E3F6EC; color: #0B6B3A !important; }

/* List layout */
.ocl-grid.is-list { grid-template-columns: 1fr; }
.ocl-grid.is-list .ocl-card { flex-direction: row; }
.ocl-grid.is-list .ocl-card-media { flex: 0 0 clamp(260px, 34%, 380px); aspect-ratio: 16 / 9; align-self: flex-start; margin: 16px 0 16px 16px; border-radius: 12px; }
.ocl-grid.is-list .ocl-wish { top: 26px; right: auto; left: calc(16px + clamp(260px, 34%, 380px) - 46px); }

/* Empty + pagination */
.ocl-empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line); border-radius: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ocl-empty > span { width: 60px; height: 60px; border-radius: 16px; background: var(--violet-soft); color: var(--violet-ink); display: flex; align-items: center; justify-content: center; }
.ocl-empty h2 { font-size: 20px; font-weight: 800; color: var(--ink); }
.ocl-btn { margin-top: 6px; background: var(--violet); color: #fff !important; font-weight: 700; border-radius: 10px; padding: 12px 20px; }
.ocl-pagination { margin-top: 32px; }
.ocl-pagination .pagination { display: flex; justify-content: center; gap: 6px; padding: 0; margin: 0; }
.ocl-pagination .page-link { min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px !important; border: 1px solid var(--line); color: var(--ink); font-weight: 700; background: #fff; }
.ocl-pagination .page-item.active .page-link { background: var(--violet); border-color: var(--violet); color: #fff; }
.ocl-pagination .page-link:hover { border-color: var(--violet); color: var(--violet-ink); }

.ocl-backdrop { display: none; }

/* Responsive: filters become a drawer */
@media (max-width: 991px) {
  .ocl-layout { grid-template-columns: 1fr; }
  .ocl-filters-btn { display: inline-flex; }
  .ocl-filters { position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 88vw); max-height: none; border-radius: 0 18px 18px 0; z-index: 1100; transform: translateX(-105%); transition: transform .25s ease; }
  .ocl-filters-close { display: inline-flex; }
  body.ocl-filters-open .ocl-filters { transform: none; }
  body.ocl-filters-open .ocl-backdrop { display: block; position: fixed; inset: 0; background: rgba(14, 11, 51, .45); z-index: 1090; }
  .ocl-grid.is-list .ocl-card { flex-direction: column; }
  .ocl-grid.is-list .ocl-card-media { flex: none; aspect-ratio: 16 / 9; margin: 0; border-radius: 0; align-self: stretch; }
  .ocl-grid.is-list .ocl-wish { top: 10px; left: auto; right: 10px; }
}
@media (max-width: 640px) {
  .ocl-count { flex-basis: 100%; order: 3; }
  .ocl-sort label { display: none; }
}

/* Filter panel scrolling: slim, brand-coloured, only visible on hover */
@media (min-width: 992px) {
  .ocl-filters {
    max-height: calc(100vh - var(--od-header-h, 96px) - 32px);
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    scrollbar-gutter: stable;
    padding-right: 10px;
  }
  .ocl-filters:hover, .ocl-filters:focus-within { scrollbar-color: #C9BEFF transparent; }
  .ocl-filters::-webkit-scrollbar { width: 6px; }
  .ocl-filters::-webkit-scrollbar-track { background: transparent; margin: 14px 0; }
  .ocl-filters::-webkit-scrollbar-thumb { background: transparent; border-radius: 999px; }
  .ocl-filters:hover::-webkit-scrollbar-thumb, .ocl-filters:focus-within::-webkit-scrollbar-thumb { background: #C9BEFF; }
  .ocl-filters::-webkit-scrollbar-thumb:hover { background: var(--violet); }
}

/* quick add-to-cart next to "View course" (opens the cart drawer) */
.ocl-ctas { display: flex; align-items: center; gap: 8px; }
.ocl-cart { width: 42px; height: 42px; padding: 11px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--violet); cursor: pointer; display: inline-block; line-height: 0; transition: background .15s, border-color .15s, color .15s; }
.ocl-cart svg { display: block; }
.ocl-cart:hover { border-color: var(--violet); background: var(--violet); color: #fff; }
.ocl-cart.is-added { background: #E3F6EC; border-color: #BDE8CF; color: #0B6B3A; }
