/* ==========================================================================
   CP-EXPLORE (2026-09-25) - Edraak-style reskin of /explore/coursecategory
   for theme 33 (udemy_theme / brandseducation) ONLY.

   Loaded by theme_page/abha_diploma_theme/category_filtercourse_page.blade.php
   only when institute_master.theme_select_id == 33, and every rule is scoped
   under .cp-explore (the page wrapper gets that class only for theme 33).
   Other tenants never load this file. Visual only - no behaviour lives here.

   Logical properties (inset-inline / margin-inline / padding-inline) throughout
   so the same rules serve the Arabic (RTL) page.
   ========================================================================== */

/* ---------- Phase 1: design tokens ---------- */
/* 2026-09-28: the theme tokens (--purple, --text, --border, --shadow-lg, --font, ...) now come
   from tokens.css (the same :root block the Home page uses), linked just before this file.
   The names below are the 09-25 reskin's own names, kept so the older rules still resolve, but
   every one is now an ALIAS of a theme token - no teal / blue values remain. */
.cp-explore {
  --cp-font: "Open Sans", "Noto Sans Arabic", Helvetica, sans-serif; /* page chrome only; cards use var(--font) like Home */
  --text-strong: var(--text);
  --text-body: var(--text-gray);
  --text-muted: var(--text-gray);
  --primary-teal: var(--purple);
  --accent-blue: var(--purple);
  --cta-blue: var(--purple);
  --pill-teal-bg: var(--purple-tint);
  --pill-blue-bg: var(--purple-tint);
  --pill-purple-bg: var(--purple-tint);
  --pill-purple-text: var(--purple);
  --card-shadow: none;
  --card-shadow-hover: var(--shadow-lg);
  --section-shadow: var(--shadow);
  --radius-card: 12px;
  --radius-btn: var(--radius);
  --radius-pill: 999px;
  --sticky-top: 120px; /* theme 33 sticky header is 104px + 16px */

  background: var(--white);
  color: var(--text-body);
  font-family: var(--cp-font);
  padding-top: 32px;
}
/* The theme styles headings/links with its own font; make them follow the token.
   Font Awesome icons (.fa) keep their icon font. */
.cp-explore :is(h1, h2, h3, h4, h5, h6, p, a, span, strong, li, button):not(.fa) { font-family: inherit; }

/* ---------- Phase 2: layout ---------- */
/* master.css forces `.detiCourseCatego.newThemeAbha .container { max-width:100% !important;
   padding:0 35px !important }` (and 1280px/100% !important rules by breakpoint), so the
   1300px container needs !important at a higher specificity to win. */
.detiCourseCatego.newThemeAbha.cp-explore > .container {
  width: 100% !important; max-width: 1300px !important; margin-inline: auto !important;
  padding: 0 24px !important; box-sizing: border-box;
}
.cp-explore .cp-explore__title {
  margin: 0 0 24px; font-size: 32px; line-height: 1.25; font-weight: 700; color: var(--text-strong);
}
/* Materialize .row / .col s3 / .col s9 -> two-column grid */
.cp-explore .detiCategoInner > .row {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; margin: 0;
}
.cp-explore .detiCategoInner > .row::after { content: none; }
.cp-explore .detiCategoInner > .row > .col {
  float: none; width: auto; min-width: 0; margin: 0; padding: 0; left: auto; right: auto;
}

/* Sidebar */
.cp-explore .sideFilter { position: sticky; top: var(--sticky-top); padding: 0; background: none; box-shadow: none; }
.cp-explore .sideFilterTitle {
  margin: 0 0 16px; padding: 0; border: 0; font-size: 16px; line-height: 1.4; font-weight: 700; color: var(--text-strong);
}
.cp-explore .filterItems { margin: 0; padding: 0; list-style: none; }
.cp-explore .filterItems .sideFilterItem { margin: 0 0 12px; padding: 0; border: 0; background: none; list-style: none; }
.cp-explore .filterItems .sideFilterItem > a {
  display: block; padding: 0; background: none; border: 0;
  font-size: 14px; line-height: 1.45; font-weight: 600; color: var(--text-muted); text-decoration: none;
  transition: color .15s ease;
}
/* master.css: `.filterItems li a:hover { background:#C69A47 !important; color:#fff }` and a
   pale-blue active background - both replaced with text-only states. */
.cp-explore .filterItems li.sideFilterItem > a:hover { color: var(--text-strong); background: none !important; }
.cp-explore .filterItems li.sideFilterItem.active > a { color: var(--primary-teal) !important; font-weight: 700; background: none; border: 0; border-radius: 0; }
.cp-explore .filterItems .sideFilterItem > a:focus-visible { outline: 2px solid var(--primary-teal) !important; outline-offset: 2px; border-radius: 4px; }

/* "Top Courses" row (h2 + the selected-filter chips) */
.cp-explore .col.s9 > .headerContainer { margin: 0 0 24px; padding: 0; border: 0; }
.cp-explore .col.s9 > .headerContainer .sectionTitle {
  margin: 0 0 12px; font-size: 20px; line-height: 1.4; font-weight: 700; color: var(--text-strong);
}

.coursingMaincard .cta-button { 
	color:#000 !important;
    background-color: #fff !important;
	border: 2px solid #000000 !important;
	}

.cp-explore #clickedCategoryNamescourse .remove-btn { 
    background: #000000;
}

.cp-explore #clickedCategoryNamescourse .childtablinks {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; margin-inline-end: 8px;
  padding: 6px 12px; border: 1px solid var(--primary-teal) !important; border-radius: var(--radius-pill);
  background: var(--pill-teal-bg) !important; color: var(--primary-teal) !important; font-size: 13px; font-weight: 600; line-height: 1.4;
}
.cp-explore #clickedCategoryNamescourse .remove-btn { cursor: pointer; font-size: 16px; line-height: 1; }

/* Sections: title on the start side, "View All" on the end side of the SAME line.
   The header's display is toggled inline by the page JS (none/block), so the layout
   must not depend on display:flex - the link is positioned instead. */
.cp-explore .speclcorsingMainBoxing { margin: 0 0 40px; padding: 0; background: none; box-shadow: none; }
.cp-explore .speclcorsingMain { margin: 0; padding: 0; }
.cp-explore .speclcorsingMain > .headerContainer.categoryname {
  position: relative; margin: 0 0 16px; padding: 0; padding-inline-end: 120px; min-height: 32px; border: 0;
}
.cp-explore .speclcorsingMain > .headerContainer .sectionTitle {
  margin: 0; font-size: 24px; line-height: 1.33; font-weight: 600; color: var(--text-strong);
}
.cp-explore .speclcorsingMain > .headerContainer .ctaText {
  position: absolute; top: 50%; inset-inline-start: auto; inset-inline-end: 0;
  transform: translateY(-50%); margin: 0; padding: 0; float: none;
  font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--text-strong); white-space: nowrap; text-decoration: none;
}
.cp-explore .speclcorsingMain > .headerContainer .ctaText:hover { color: var(--primary-teal) !important; text-decoration: underline; }

/* ---------- Phase 3: course card ---------- */
/* Owl clips its stage; give the shadow and the hover lift room, and make the
   cards in one row equal height. */
.cp-explore .exploCenter .owl-stage-outer { padding: 8px 6px 14px; margin: -8px -6px -14px; }
.cp-explore .exploCenter .owl-stage { display: flex; }
.cp-explore .exploCenter .owl-item { display: flex; float: none; }
.cp-explore .exploCenter .owl-item > .item,
.cp-explore .exploCenter .owl-item > .item > div { display: flex; flex-direction: column; width: 100%; }

.cp-explore .stm_lms_courses__single {
  display: flex; flex-direction: column; width: 100%; height: 100%; margin: 0;
  background: var(--white); border-radius: var(--radius-card); box-shadow: var(--card-shadow); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cp-explore .stm_lms_courses__single:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.cp-explore .stm_lms_courses__single__inner {
  position: relative; display: flex; flex-direction: column; flex: 1 1 auto; height: 100%; margin: 0; padding: 0;
  border: 0; box-shadow: none; background: none;
}

/* Thumbnail 16:9 */
.cp-explore .stm_lms_courses__single--image {
  position: relative; flex: 0 0 auto; width: 100%; height: auto; aspect-ratio: 16 / 9; margin: 0; overflow: hidden;
  border-radius: var(--radius-card) var(--radius-card) 0 0; background: var(--gray-bg);
}
.cp-explore .stm_lms_courses__single--image > a,
.cp-explore .stm_lms_courses__single--image > a > div,
.cp-explore .stm_lms_courses__single--image .stm_lms_lazy_image { display: block; width: 100%; height: 100%; margin: 0; }
.cp-explore .stm_lms_courses__single--image img {
  display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .3s ease;
}

/* Overlay: info (start/top), duration (end/top), type pills (end/bottom) */
.cp-explore .cp-card__overlay { position: absolute; inset: 0; pointer-events: none; }
.cp-explore .cp-card__info {
  position: absolute; top: 12px; inset-inline-start: 12px; pointer-events: auto; cursor: help;
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--white); color: var(--primary-teal) !important; box-shadow: 0 0 2px rgba(0, 0, 0, .15);
}
.cp-explore .cp-card__info svg { width: 14px; height: 14px; display: block; }
.cp-explore .cp-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--radius-pill);
  font-size: 12px; line-height: 1; font-weight: 700; white-space: nowrap; box-shadow: 0 0 2px rgba(0, 0, 0, .15);
}
.cp-explore .cp-pill svg { width: 12px; height: 12px; flex: 0 0 12px; display: block; }
.cp-explore .cp-pill--time { position: absolute; top: 12px; inset-inline-end: 12px; background: var(--white); color: var(--text-strong); }
.cp-explore .cp-card__tags { position: absolute; bottom: 12px; inset-inline-end: 12px; display: flex; gap: 6px; }
.cp-explore .cp-pill--type { background: var(--pill-blue-bg); color: var(--accent-blue); }
.cp-explore .cp-pill--level { background: var(--pill-teal-bg) !important; color: var(--primary-teal) !important; }

/* Body */
/* master.css: `.exploCenter .owl-carousel.owl-theme .stm_lms_courses__single--inner
   { display:inline-block; padding:5px 10px 20px !important }` - matched and beaten here. */
.cp-explore .stm_lms_courses__single--inner,
.cp-explore .exploCenter .owl-carousel.owl-theme .stm_lms_courses__single--inner {
  display: flex; flex-direction: column; flex: 1 1 auto; gap: 8px; width: auto; padding: 24px !important; margin: 0; text-align: start;
}
.cp-explore .stm_lms_courses__single--title { margin: 0; padding: 0; min-height: 0; }
.cp-explore .stm_lms_courses__single--title a { text-decoration: none; }
.cp-explore .stm_lms_courses__single--title h5 {
  margin: 0; font-size: 18px; line-height: 1.4; font-weight: 700; color: var(--text-strong);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  min-height: calc(18px * 1.4 * 2);
}
.cp-explore .stm_lms_courses__single--terms { margin: 0; padding: 0; }
.cp-explore .stm_lms_courses__single--term { margin: 0; padding: 0; font-size: 13px; line-height: 1.4; color: var(--text-body); }
.cp-explore .stm_lms_courses__single--meta { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }
.cp-explore .average-rating-stars__top,
.cp-explore .star-rating { margin: 0; padding: 0; line-height: 1; }
.cp-explore .star-rating > span { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--text-body); }
.cp-explore .star-rating a { color: var(--text-strong); font-weight: 700; text-decoration: none; margin-inline-end: 4px; }
.cp-explore .star-rating a:has(.fa) { margin: 0; }
.cp-explore .star-rating .fa { color: var(--star); font-size: 13px; }
.cp-explore .star-rating .rating { margin-inline-start: 4px; font-weight: 400; color: var(--text-muted); font-size: 13px; }
.cp-explore .stm_lms_courses__single--price { margin: 0; padding: 0; display: flex; align-items: baseline; gap: 8px; }
.cp-explore .stm_lms_courses__single--price strong,
.cp-explore .exploCenter .stm_lms_courses__single--price.heading_font strong { /* beats master.css 20px / display:contents */
  display: inline; margin: 0; font-size: 16px; line-height: 1.3; font-weight: 700; color: var(--accent-blue);
}
.cp-explore .stm_lms_courses__single--price .sale_price_ing { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.cp-explore .bsbtsno { margin: 0; }
.cp-explore .bsbtsno span { display: inline-block; border-radius: var(--radius-pill); padding: 4px 10px !important; font-size: 12px; font-weight: 700; }

/* "View Course" - full width outline, pinned to the card bottom */
.cp-explore .cp-card__cta {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; box-sizing: border-box;
  margin-top: auto; padding: 12px; border: 2px solid var(--primary-teal) !important; border-radius: var(--radius-btn);
  background: var(--white); color: var(--primary-teal) !important; font-size: 14px; line-height: 1.2; font-weight: 700; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.cp-explore .cp-card__cta:hover, .cp-explore .cp-card__cta:focus-visible { background: var(--primary-teal) !important; color: var(--white); outline: none; }
.cp-explore .cp-card__cta span { font-size: 18px; line-height: 1; }
/* U+203A mirrors itself in RTL - no transform needed. */

/* Hover preview popup (title / last updated / benefits / add to cart / wishlist).
   Kept, but Owl's stage and the card clip it where it sits, so on desktop the page
   script moves it into .cp-pop-layer (inside the 1300px container) while it is open
   and puts it back on close. Inside a card it is never shown. */
.cp-explore .stm_lms_courses__single__inner .stm_lms_courses__single--info { display: none !important; }
.cp-explore > .container { position: relative; }
.cp-explore .cp-pop-layer { position: absolute; inset: 0; pointer-events: none; z-index: 1100; }
.cp-explore .cp-pop-layer .stm_lms_courses__single--info.cp-pop {
  display: block; position: absolute; left: 0; right: auto; top: 0; width: 320px; max-width: calc(100% - 16px); box-sizing: border-box;
  margin: 0; padding: 20px; background: var(--white); border-radius: var(--radius-card);
  box-shadow: 0 10px 32px rgba(15, 24, 32, .18), 0 0 1px rgba(15, 24, 32, .2);
  text-align: start; pointer-events: auto;
  visibility: hidden; opacity: 0; transform: translateY(-6px); filter: none;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.cp-explore .cp-pop-layer .cp-pop.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .18s ease, transform .18s ease; }
/* pointer toward the card */
.cp-explore .cp-pop-layer .cp-pop::before {
  content: ""; position: absolute; top: var(--arrow-y, 50%); width: 14px; height: 14px; margin-top: -7px;
  background: var(--white); transform: rotate(45deg); box-shadow: -2px 2px 3px rgba(15, 24, 32, .06); border: 0;
}
.cp-explore .cp-pop-layer .cp-pop[data-side="right"]::before { left: -7px; right: auto; }
.cp-explore .cp-pop-layer .cp-pop[data-side="left"]::before { right: -7px; left: auto; box-shadow: 2px -2px 3px rgba(15, 24, 32, .06); }
.cp-explore .cp-pop .stm_lms_courses__single--info_preview { position: relative; margin: 0; padding: 0; }
.cp-explore .cp-pop .autBoxim { margin: 0 0 10px; }
.cp-explore .cp-pop .autBoxim > a {
  display: block; margin: 0 0 8px; padding: 0; background: none; width: auto; border-radius: 0; text-align: start;
  text-transform: none; font-size: 16px; line-height: 1.4; font-weight: 700; color: var(--text-strong);
}
.cp-explore .cp-pop .autBoxim > a:hover { background: none; color: var(--primary-teal) !important; }
.cp-explore .cp-pop .autBoxim > span { display: inline-block; font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.cp-explore .cp-pop .autBoxim > span[style] { margin-inline-end: 6px; border-radius: var(--radius-pill); padding: 3px 10px !important; color: var(--white); font-weight: 700; }
.cp-explore .cp-pop .allSubtit { margin: 0 0 10px; font-size: 12px; line-height: 1.5; color: var(--text-body); }
.cp-explore .cp-pop .allMistSubt p { margin: 0 0 10px; font-size: 13px; line-height: 1.55; color: var(--text-body); }
.cp-explore .cp-pop .allMistSubt ul { margin: 0 0 14px; padding: 0; list-style: none; }
.cp-explore .cp-pop .allMistSubt li { display: flex; gap: 8px; margin: 0 0 6px; font-size: 13px; line-height: 1.5; color: var(--text-strong); list-style: none; }
.cp-explore .cp-pop .allMistSubt li .fa { flex: 0 0 auto; margin-top: 3px; color: var(--primary-teal) !important; font-size: 12px; }
.cp-explore .cp-pop .ntb_cart { display: flex; align-items: center; gap: 8px; margin: 0; }
.cp-explore .cp-pop .ntb_cart > a {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; margin: 0; padding: 12px; width: auto;
  background: var(--cta-blue); color: var(--white); border: 0; border-radius: var(--radius-btn);
  text-transform: none; font-size: 14px; line-height: 1.2; font-weight: 700; text-decoration: none;
}
.cp-explore .cp-pop .ntb_cart > a[style*="display:none"], .cp-explore .cp-pop .ntb_cart > a[style*="display: none"] { display: none; }
.cp-explore .cp-pop .ntb_cart > a:hover { background: var(--purple-dark); color: var(--white) !important; }
.cp-explore .cp-pop .ntb_cartIcon { flex: 0 0 auto; }
.cp-explore .cp-pop .ntb_cartIcon a {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0;
  background: var(--white); border: 2px solid var(--primary-teal) !important; border-radius: var(--radius-btn); color: var(--primary-teal) !important;
}
.cp-explore .cp-pop .ntb_cartIcon a:hover { background: var(--pill-teal-bg) !important; color: var(--primary-teal) !important; }

/* Filtered results (AJAX grid, coursesub_tab_filter.blade.php): same cards,
   equal-height rows. */
.cp-explore #allcategorydatasub .row { display: flex; flex-wrap: wrap; margin-inline: -12px; }
.cp-explore #allcategorydatasub .row > .col.s4 { float: none; display: flex; padding: 12px; margin: 0; }
.cp-explore #allcategorydatasub .item,
.cp-explore #allcategorydatasub .custFullwdt { display: flex; flex-direction: column; width: 100%; }

/* ---------- Phase 4: carousel navigation ---------- */
/* The page script (theme 33 branch of the Owl init) gives every carousel its own
   nav container, .cp-nav, placed right after it: round prev/next at the end
   (bottom-right in LTR, bottom-left in RTL) of each section. Owl adds
   .disabled to the container when every card already fits, and to a button at
   either end of the track. */
.cp-explore .cp-nav { display: flex; justify-content: flex-end; gap: 8px; margin: 16px 0 0; }
.cp-explore .cp-nav.disabled { display: none; }
.cp-explore .cp-nav > button {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0; padding: 0;
  position: static; border: 0; border-radius: 50%; background: #E9ECEF; color: var(--text-strong); cursor: pointer;
  font-size: 0; line-height: 0; box-shadow: none; transition: background-color .15s ease, opacity .15s ease;
}
.cp-explore .cp-nav > button:hover { background: #DDE2E6; }
.cp-explore .cp-nav > button:focus-visible { outline: 2px solid var(--primary-teal) !important; outline-offset: 2px; }
.cp-explore .cp-nav > button.disabled { opacity: .4; cursor: default; background: #E9ECEF; }
.cp-explore .cp-nav svg { width: 18px; height: 18px; display: block; }
/* RTL: the theme sets .exploCenter to direction:ltr, so the nav row is put back to rtl
   (prev on the right, next on the left) and the chevrons are mirrored. */
[dir="rtl"] .cp-explore .cp-nav, html[lang="ar"] .cp-explore .cp-nav { direction: rtl; }
[dir="rtl"] .cp-explore .cp-nav svg, html[lang="ar"] .cp-explore .cp-nav svg { transform: scaleX(-1); }
.cp-explore .cp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Phase 5: responsive ---------- */
/* The theme's mobile rules give the card inner a % side margin and pull the image
   left with a negative margin, and master.css forces img { width:auto !important;
   max-height:160px/200px !important }. None of it fits the 16:9 object-fit thumbnail,
   so all of it is neutralised at every width. */
.cp-explore .stm_lms_courses__single .stm_lms_courses__single__inner { margin: 0 !important; width: auto !important; max-width: none !important; align-self: stretch; }
.cp-explore .stm_lms_courses__single .stm_lms_courses__single--image { width: 100% !important; height: auto !important; max-height: none !important; }
.cp-explore .stm_lms_courses__single .stm_lms_courses__single--image > a,
.cp-explore .stm_lms_courses__single .stm_lms_courses__single--image > a > div,
.cp-explore .stm_lms_courses__single .stm_lms_courses__single--image .stm_lms_lazy_image { height: 100% !important; max-height: none !important; }
.cp-explore .stm_lms_courses__single .stm_lms_courses__single--image img {
  margin: 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: cover;
}
/* < 992px: one column; the sidebar becomes a horizontally scrollable chip row. */
@media (max-width: 991.98px) {
  .cp-explore { padding-top: 24px; }
  .cp-explore .detiCategoInner > .row { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cp-explore .sideFilter { position: static; }
  .cp-explore .sideFilterTitle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
  .cp-explore .filterItems {
    display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
    padding: 2px 2px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .cp-explore .filterItems::-webkit-scrollbar { display: none; }
  .cp-explore .filterItems .sideFilterItem { flex: 0 0 auto; margin: 0; }
  .cp-explore .filterItems .sideFilterItem > a {
    padding: 8px 14px; border: 1px solid #D9DEE2; border-radius: var(--radius-pill); background: #fff;
    white-space: nowrap; font-size: 14px; line-height: 1.3;
  }
  .cp-explore .filterItems li.sideFilterItem > a:hover { background: #F5F7F8 !important; }
  .cp-explore .filterItems li.sideFilterItem.active > a { border: 1px solid var(--primary-teal) !important; border-radius: var(--radius-pill); background: var(--pill-teal-bg) !important; }
}
/* < 576px: 16px gutters, smaller headings, no horizontal page scroll. */
@media (max-width: 575.98px) {
  .detiCourseCatego.newThemeAbha.cp-explore > .container { padding: 0 16px !important; }
  .cp-explore .cp-explore__title { font-size: 24px; margin-bottom: 16px; }
  .cp-explore .col.s9 > .headerContainer .sectionTitle { font-size: 18px; }
  .cp-explore .speclcorsingMain > .headerContainer.categoryname { padding-inline-end: 84px; }
  .cp-explore .speclcorsingMain > .headerContainer .sectionTitle { font-size: 20px; }
  .cp-explore .stm_lms_courses__single--inner,
  .cp-explore .exploCenter .owl-carousel.owl-theme .stm_lms_courses__single--inner { padding: 16px !important; }
  .cp-explore .stm_lms_courses__single--title h5 { font-size: 16px; min-height: calc(16px * 1.4 * 2); }
  .cp-explore #allcategorydatasub .row > .col.s4 { width: 100%; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
  .cp-explore #allcategorydatasub .row > .col.s4 { width: 50%; }
}
/* Nothing inside the page may cause a horizontal page scroll. */
.cp-explore { max-width: 100%; overflow-x: clip; }

/* ==========================================================================
   Phase 6 (2026-09-28): course cards + hover popover take the Home card's LOOK
   (theme tokens: border, colours, link-style CTA, purple popover actions).
   Rev 2: every width / height / padding / font-size stays exactly as it was
   before (card, thumb, body, popover, grid) - only colours, borders, radii
   and shadows change. Markup, ids and onclick handlers unchanged.
   ========================================================================== */

/* ---- Card ---- */
.cp-explore .stm_lms_courses__single {
  border: 1px solid var(--border); background: var(--white); box-shadow: none;
  box-sizing: border-box; font-family: var(--font); color: var(--text);
}
.cp-explore .stm_lms_courses__single:hover { transform: none; box-shadow: var(--shadow-lg); }
/* The theme draws its own 1px/8px box on the inner wrapper and centres the meta
   column; the card box is the outer element now, so both are reset. */
.cp-explore .stm_lms_courses__single .stm_lms_courses__single__inner { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.cp-explore .stm_lms_courses__single--meta { align-items: stretch; }
.cp-explore .stm_lms_courses__single--price { width: 100%; justify-content: flex-start; text-align: start; }
.cp-explore .stm_lms_courses__single--title h5 { color: var(--text); }
.cp-explore .stm_lms_courses__single--title a:hover h5 { color: var(--purple); }
.cp-explore .stm_lms_courses__single--term { color: var(--text-gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Rating: hidden when there are no ratings yet (.cp-hide set in the view). */
.cp-explore .average-rating-stars__top.cp-hide { display: none; }
.cp-explore .star-rating a { color: var(--text); }
.cp-explore .star-rating .fa { color: var(--star); }
.cp-explore .star-rating .rating { color: var(--text-gray); }
.cp-explore .stm_lms_courses__single--price strong,
.cp-explore .exploCenter .stm_lms_courses__single--price.heading_font strong { color: var(--text); }
.cp-explore .stm_lms_courses__single--price .sale_price_ing { color: var(--text-gray); }
.cp-explore .stm_lms_courses__single--price svg { fill: currentColor; }
/* "View Course ›": the Home a.link look (purple text, no border / fill) inside the
   SAME box as before (full width, 12px padding, 2px border kept transparent), so the
   card keeps its height. The chevron mirrors itself in RTL. */
.cp-explore .cp-card__cta {
  justify-content: flex-start; border-color: transparent !important; background: none !important; color: var(--purple) !important;
}
.cp-explore .cp-card__cta:hover,
.cp-explore .cp-card__cta:focus-visible { color: var(--purple-dark) !important; background: none !important; text-decoration: underline; outline: none; }
/* Thumbnail pills */
.cp-explore .cp-pill { box-shadow: none; }
.cp-explore .cp-pill--type { border: 0; background: var(--purple-tint); color: var(--purple); }
.cp-explore .cp-pill--time { color: var(--text); }
.cp-explore .cp-card__info { color: var(--purple) !important; box-shadow: none; }

/* ---- Hover popover (same size as before) ---- */
.cp-explore .cp-pop-layer .stm_lms_courses__single--info.cp-pop {
  border: 1px solid var(--border); background: var(--white); box-shadow: var(--shadow-lg); font-family: var(--font); color: var(--text);
}
.cp-explore .cp-pop-layer .cp-pop::before { background: var(--white); box-shadow: none; border: 0; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cp-explore .cp-pop-layer .cp-pop[data-side="right"]::before { transform: rotate(45deg); box-shadow: none; }
.cp-explore .cp-pop-layer .cp-pop[data-side="left"]::before { transform: rotate(225deg); box-shadow: none; }
.cp-explore .cp-pop .autBoxim > a { color: var(--text); }
.cp-explore .cp-pop .autBoxim > a:hover { color: var(--purple) !important; }
.cp-explore .cp-pop .autBoxim > span:not([style]) { font-weight: 700; color: var(--purple); }  /* Last updated */
.cp-explore .cp-pop .allSubtit { color: var(--text-gray); }
.cp-explore .cp-pop .allMistSubt p { color: var(--text); }
.cp-explore .cp-pop .allMistSubt li { color: var(--text); }
.cp-explore .cp-pop .allMistSubt li .fa { color: var(--purple) !important; }
.cp-explore .cp-pop .ntb_cart > a { background: var(--purple); color: var(--white) !important; border-radius: var(--radius); }
.cp-explore .cp-pop .ntb_cart > a:hover { background: var(--purple-dark); color: var(--white) !important; }
/* the theme wraps the heart in a round bordered span - only the square link shows */
.cp-explore .cp-pop .ntb_cartIcon { padding: 0; border: 0 !important; border-radius: 0; background: none; box-shadow: none; }
.cp-explore .cp-pop .ntb_cartIcon a {
  border: 1px solid var(--border) !important; border-radius: var(--radius); background: var(--white); color: var(--text) !important;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.cp-explore .cp-pop .ntb_cartIcon a:hover { border-color: var(--purple) !important; background: var(--white) !important; color: var(--purple) !important; }
/* wishlisted: savetowishlist() swaps fa-heart-o <-> fa-heart */
.cp-explore .cp-pop .ntb_cartIcon a:has(.fa-heart) { border-color: var(--purple) !important; background: var(--purple-tint) !important; color: var(--purple) !important; }

/* ==========================================================================
   Mobile filters drawer (2026-09-30, Arshad). Phones only (<768px): the chip row is
   replaced by a "Filters" button; the real .sideFilter is moved into #cpfDrawer
   (moved to <body> by the view's CP-FILTERS script, so the drawer rules below are
   NOT under .cp-explore). >=768px: .cpf-* never shows and nothing else changes.
   Brand colour #497e9f.
   ========================================================================== */
.cpf-bar, .cpf-overlay, .cpf-drawer { display: none; }
@media (max-width: 767.98px) {
  .cp-explore .cpf-bar { display: flex; justify-content: center; margin: 0 0 20px; }
  .cp-explore .cpf-open {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; max-width: 310px; height: 44px; padding: 0 16px; margin: 0;
    background: #fff !important; border: 1.5px solid #497e9f !important; border-radius: 10px;
    color: #497e9f; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1;
    cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: normal;
  }
  .cp-explore .cpf-open svg { width: 20px; height: 20px; flex: 0 0 auto; }
  .cp-explore .cpf-open:focus-visible { outline: 2px solid #497e9f; outline-offset: 2px; }
  /* Sidebar column gone; results take the full width. */
  .cp-explore.cpf-mode .detiCategoInner > .row > .col.s3 { display: none; }

  .cpf-overlay {
    display: block; position: fixed; inset: 0; z-index: 10040;
    background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .28s ease;
  }
  .cpf-overlay.is-open { opacity: 1; }
  .cpf-overlay[hidden] { display: none; }

  .cpf-drawer {
    display: block; position: fixed; top: 0; left: 0; z-index: 10050;
    height: 100vh; height: 100dvh; width: min(86vw, 340px); box-sizing: border-box;
    padding: 24px 20px; overflow-y: auto; overscroll-behavior: contain;
    background: #fff; border-radius: 0 16px 16px 0; box-shadow: 0 0 24px rgba(0, 0, 0, .18);
    text-align: start; transform: translateX(-100%); visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s;
  }
  .cpf-drawer.is-open { transform: none; visibility: visible; transition: transform .28s ease, visibility 0s; }
  .cpf-drawer[dir="rtl"] { left: auto; right: 0; border-radius: 16px 0 0 16px; transform: translateX(100%); }
  .cpf-drawer[dir="rtl"].is-open { transform: none; }
  body.cpf-lock { overflow: hidden; }

  .cpf-drawer .cpf-close {
    position: absolute; top: 12px; inset-inline-end: 12px; width: 36px; height: 36px; margin: 0; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent !important; border: 0 !important; border-radius: 50%; box-shadow: none;
    color: #1f2430; font-size: 28px; line-height: 1; cursor: pointer;
  }
  .cpf-drawer .cpf-close:focus-visible { outline: 2px solid #497e9f; outline-offset: 2px; }

  /* The moved sidebar: plain lists, no chips, no pills, no horizontal scroll. */
  .cpf-drawer .sideFilter { position: static; margin: 0; padding: 0; background: none; box-shadow: none; border: 0; }
  .cpf-drawer .sideFilterTitle {
    position: static; width: auto; height: auto; overflow: visible; clip: auto;
    margin: 28px 0 0; padding: 0; border: 0; background: none;
    font-size: 16px; font-weight: 700; line-height: 1.3; color: #1f2430;
  }
  .cpf-drawer .sideFilterTitle:first-child { margin-top: 36px; }
  .cpf-drawer .cpf-acc {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; height: auto; margin: 0; padding: 0 0 10px;
    background: transparent !important; border: 0 !important; border-bottom: 1.5px solid #1f2430 !important;
    border-radius: 0; box-shadow: none; color: inherit; font: inherit; text-align: start;
    text-transform: none; letter-spacing: normal; cursor: pointer;
  }
  .cpf-drawer .cpf-acc:focus-visible { outline: 2px solid #497e9f; outline-offset: 2px; }
  .cpf-drawer .cpf-chev { flex: 0 0 auto; transition: transform .2s ease; }
  .cpf-drawer .cpf-acc[aria-expanded="false"] .cpf-chev { transform: rotate(180deg); }
  .cpf-drawer .filterItems {
    display: block; margin: 8px 0 0; padding: 0; list-style: none;
    overflow: visible; white-space: normal; background: none; border: 0;
  }
  .cpf-drawer .filterItems[hidden] { display: none; }
  .cpf-drawer .filterItems .sideFilterItem {
    display: block; float: none; width: auto; margin: 0; padding: 0; border: 0; background: none; list-style: none;
  }
  .cpf-drawer .filterItems .sideFilterItem > a {
    display: block; margin: 0; padding: 8px 0; background: none !important; border: 0 !important; border-radius: 0;
    font-size: 14px; font-weight: 400; line-height: 1.4; color: #6b6f78 !important;
    text-decoration: none; white-space: normal; box-shadow: none;
  }
  .cpf-drawer .filterItems li.sideFilterItem > a:hover { color: #1f2430 !important; background: none !important; }
  .cpf-drawer .filterItems li.sideFilterItem.active > a { color: #497e9f !important; font-weight: 600; }
  .cpf-drawer .filterItems .sideFilterItem > a:focus-visible { outline: 2px solid #497e9f; outline-offset: 2px; }
  /* The brand-wide `button:focus { background:#497e9f !important }` (brandseducation.css) must not fill these. */
  .cpf-drawer button:focus, .cp-explore .cpf-bar .cpf-open:focus { background-color: transparent !important; }
  .cp-explore .cpf-bar .cpf-open:focus { background-color: #fff !important; }
}
