/* All lectures (filtered list) - design v1. Scoped to body.al-page.
   Visual rules only. No IDs, classes used by JavaScript, data attributes or display toggles are changed. */

.al-page {
  --al-ink: #1d1d1f;
  --al-muted: #6e6e75;
  --al-hair: #e0e0e6;
  --al-surface: #ffffff;
  --al-fill: #f3f3f7;
  --al-accent: #e8485c;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--al-ink);
  background-color: #f6f6f8 !important;
}

/* Breadcrumb and headline */
.al-page .head-quick-links { max-width: 1312px; margin: 0 auto; padding: 24px 64px 0; box-sizing: border-box; }
.al-page .head-quick-links p { margin: 0; font-size: 13px; color: var(--al-muted); }
.al-page .headline { max-width: 1312px; margin: 0 auto; padding: 12px 64px 0; box-sizing: border-box; }
.al-page .headline h2 { margin: 0; font-size: clamp(1.9rem, 3.2vw, 2.75rem); font-weight: 700; letter-spacing: -0.02em; color: var(--al-ink); }
.al-page .headline p { margin: 8px 0 0; font-size: 17px; color: var(--al-muted); }

/* Subject chips (rendered by the page script) */
.al-page #subject-filters-container { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.al-page .subject-filter-btn {
  min-height: 38px; padding: 8px 18px; border-radius: 19px; border: 1px solid var(--al-hair);
  background: var(--al-surface); color: var(--al-ink); font-size: 14px; font-weight: 700; cursor: pointer;
}
.al-page .subject-filter-btn.active { background: var(--al-ink); border-color: var(--al-ink); color: #fff; }

/* Mobile filter toggle */
.al-page .mobile-filter-toggle {
  min-height: 48px; border-radius: 14px; border: 1px solid var(--al-hair); background: var(--al-surface); color: var(--al-ink); font-weight: 700;
}

/* Layout: sidebar + grid */
.al-page .product-section { max-width: 1312px; margin: 0 auto; padding: 24px 64px 0 !important; box-sizing: border-box; }
.al-page .product-section > .row { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; margin: 0; }
.al-page .product-section > .row > [class*="col-"] { width: auto; max-width: none; flex: none; padding: 0; }

/* Filter sidebar */
.al-page .filter-sidebar {
  background: var(--al-surface); border: 1px solid var(--al-hair); border-radius: 22px; padding: 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
}
.al-page #filter-count { margin: 0 0 16px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: var(--al-muted); }
.al-page .filter-group { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--al-hair); }
.al-page .filter-group:last-child { border-bottom: 0; }
.al-page .filter-group h6, .al-page .filter-group .fw-bold { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--al-ink); }
.al-page .form-check { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; min-height: 22px; }
.al-page .form-check-input { width: 18px; height: 18px; margin: 0; border-radius: 5px; border: 1px solid #c9c9d0; accent-color: var(--al-ink); }
.al-page .form-check-label { font-size: 14px; color: var(--al-ink); cursor: pointer; }

/* Product grid */
.al-page #product-list {
  display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0 !important;
}
.al-page #product-list > [class*="col-"] { width: auto; max-width: none; flex: none; padding: 0; margin: 0 !important; }

/* Product card (the same classes are used by the initial render and the AJAX filter response) */
.al-page .product-card-wrapper {
  height: 100%; background: var(--al-surface); border: 1px solid var(--al-hair); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04); overflow: hidden;
}
.al-page .product-card-link { color: var(--al-ink); height: 100%; }
.al-page .product-card-link .img-card {
  position: relative; margin: 14px; border-radius: 14px; background: #f1eeec; aspect-ratio: 16 / 10; overflow: hidden;
  display: flex; align-items: center; justify-content: center; border: 0;
}
.al-page .product-card-link img { width: 100%; height: 100%; object-fit: cover; }
.al-page .ribbon {
  position: absolute; top: 10px; left: 10px; z-index: 2; padding: 5px 10px; border-radius: 8px;
  background: var(--al-ink); color: #fff; font-size: 11px; font-weight: 700;
}
.al-page .badge-custom {
  position: absolute; top: 10px; right: 10px; z-index: 2; padding: 5px 10px; border-radius: 8px;
  background: var(--al-accent); color: #fff; font-size: 11px; font-weight: 700;
}
.al-page .badge-circle-hours {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 58px; height: 58px; border-radius: 50%;
  background: var(--al-ink); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.al-page .hours-number { font-size: 16px; font-weight: 700; line-height: 1; }
.al-page .hours-text { font-size: 10px; opacity: 0.8; }
.al-page .product-info { padding: 4px 18px 18px !important; }
.al-page .product-info .product-name { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; color: var(--al-ink); margin: 0 0 6px; }
.al-page .product-info .author-name { display: block; font-size: 13px; color: var(--al-muted); margin-bottom: 14px; }
.al-page .price-info { display: flex; align-items: baseline; gap: 8px; }
.al-page .price-current { margin: 0; font-size: 18px; font-weight: 700; color: var(--al-ink); }
.al-page .price-original { font-size: 13px; color: var(--al-muted); text-decoration: line-through; }

/* Pagination */
.al-page #pagination-container { margin-top: 40px !important; }
.al-page .pagination { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0; }
.al-page .page-item .page-link {
  min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid var(--al-hair); background: var(--al-surface); color: var(--al-ink);
  font-size: 14px; font-weight: 700; text-decoration: none;
}
.al-page .page-item.active .page-link { background: var(--al-ink); border-color: var(--al-ink); color: #fff; }

/* Loader */
.al-page .loader-overlay { background: rgba(246,246,248,0.7); }

/* Responsive */
@media (max-width: 1199.98px) {
  .al-page #product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  .al-page .product-section { padding: 16px 32px 0 !important; }
  .al-page .head-quick-links, .al-page .headline { padding-left: 32px; padding-right: 32px; }
  .al-page .product-section > .row { grid-template-columns: minmax(0, 1fr); }
  .al-page .filter-sidebar { border-radius: 16px; }
}
@media (max-width: 575.98px) {
  .al-page .product-section { padding: 12px 16px 0 !important; }
  .al-page .head-quick-links, .al-page .headline { padding-left: 16px; padding-right: 16px; }
  .al-page #product-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .al-page .headline h2 { font-size: 1.75rem; }
}

/* ---------- Fixes from live check (card overflow, arrow icon size, checkbox style) ---------- */
.al-page #product-list { align-items: stretch; }
.al-page #product-list > div { min-width: 0; display: flex; }
.al-page #product-list .product-card-wrapper { width: 100%; min-width: 0; display: flex; flex-direction: column; }
.al-page #product-list .product-card-link { display: flex !important; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.al-page .product-card-link .img-card {
  position: relative; display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 10;
  margin: 14px 14px 0; width: calc(100% - 28px); overflow: hidden; border-radius: 14px; background: #f1eeec;
}
.al-page .product-card-link .img-card img {
  position: absolute !important;  width: 100% !important; max-width: none !important;
  object-fit: cover; border-radius: 0; margin: 0;
}
.al-page .product-card-link .product-info { flex: 1 1 auto; display: flex; flex-direction: column; }
.al-page .product-card-link .product-info .line { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.al-page .product-card-link .product-info .line img,
.al-page .product-card-link .line > img {
  width: 30px !important; height: 30px !important; max-width: 30px !important; flex: none; object-fit: contain; margin-top: 2px;
}
.al-page .product-card-link .product-name { flex: 1 1 auto; min-width: 0; }
.al-page .product-card-link .price-info { margin-top: auto; }
.al-page .product-card-link .author-name a { color: var(--al-muted) !important; text-decoration: none; }

/* Filter checkboxes: one clean style (no browser default outline) */
.al-page .filter-sidebar .form-check { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 0; min-height: 22px; }
.al-page .filter-sidebar .form-check-input {
  appearance: none; -webkit-appearance: none; float: none; margin: 0 !important; width: 18px; height: 18px; flex: none;
  border: 1.5px solid #c9c9d0; border-radius: 5px; background: #fff; cursor: pointer; position: relative;
}
.al-page .filter-sidebar .form-check-input:checked { background: var(--al-ink); border-color: var(--al-ink); }
.al-page .filter-sidebar .form-check-input:checked::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.al-page .filter-sidebar .form-check-input:focus-visible { outline: 2px solid var(--al-accent); outline-offset: 2px; }
.al-page .filter-sidebar .form-check-label { font-size: 14px; line-height: 1.3; color: var(--al-ink); cursor: pointer; }
.al-page .filter-sidebar .form-check-input:focus,
.al-page .filter-sidebar .form-check-input:active { box-shadow: none; }

/* Keep the grid inside its column on every screen */
.al-page .product-section > .row > .col-lg-9,
.al-page .product-section > .row > .col-12,
.al-page .product-section > .row > .col-md-8,
.al-page .product-section > .row > .col-md-9 { min-width: 0; }
@media (max-width: 575.98px) {
  .al-page .product-card-link .img-card { aspect-ratio: 16 / 10; }
}

/* ---------- Spacing: header, content and footer (final) ---------- */
.al-page .section-1 { background: transparent !important; height: auto; padding: 0; }
.al-page .include-header { padding-top: 0 !important; }
.al-page .head-quick-links { padding-top: 40px; }
.al-page .headline { padding-top: 12px; }
.al-page .product-section { padding-bottom: 80px !important; }
@media (max-width: 991.98px) { .al-page .head-quick-links { padding-top: 32px; } .al-page .product-section { padding-bottom: 64px !important; } }
@media (max-width: 575.98px) { .al-page .head-quick-links { padding-top: 24px; } .al-page .product-section { padding-bottom: 48px !important; } }

/* ---------- Header: not sticky on this page, so it never covers the lectures ---------- */
.al-page .sticky-nav { position: relative !important; top: auto !important; }

/* ===== List page only: show the full poster (no side cut-off) ===== */
.al-page .product-card-link .img-card {
  aspect-ratio: 4 / 5; background: #f1eeec; margin: 14px 14px 0; width: calc(100% - 28px); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.al-page .product-card-link .img-card img,
.al-page .product-card-link img.jjjj2 {
  position: static !important; width: 100% !important; height: 100% !important; max-width: 100%;
  object-fit: contain !important; border-radius: 0; margin: 0;
}
@media (max-width: 575.98px) {
  .al-page .product-card-link .img-card { aspect-ratio: 4 / 5; }
}
