/* Catalog / search results page */

:root { --cm-brand: #913075; --cm-brand-dark: #6f2359; --cm-tint: #f6eef9; --cm-border: #efe6f3; }

/* ---------- Page header ---------- */
.cm-hero { background: linear-gradient(135deg, #fbf4fa 0%, #f3e9f7 100%); border-bottom: 1px solid var(--cm-border); }
.cm-hero-inner { max-width: none; margin: 0 auto; padding: 22px 24px 20px; }
.cm-crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #8a7a94; margin-bottom: 8px; }
.cm-crumbs a { color: #8a7a94; text-decoration: none; }
.cm-crumbs a:hover { color: var(--cm-brand); }
.cm-crumbs i { font-size: 9px; opacity: .6; }
[dir="rtl"] .cm-crumbs i { transform: scaleX(-1); }
.cm-title { margin: 0; font-size: 1.6rem; font-weight: 800; color: #1f1633; }
.cm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cm-chip {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
    padding: 6px 8px 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--cm-border);
    font-size: 13px; color: #3b2d47; box-shadow: 0 4px 12px -8px rgba(80, 20, 70, .4);
}
[dir="rtl"] .cm-chip { padding: 6px 14px 6px 8px; }
.cm-chip b { color: var(--cm-brand); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-chip a { width: 22px; height: 22px; border-radius: 50%; background: #f1e7f5; color: var(--cm-brand); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 14px; line-height: 1; }
.cm-chip a:hover { background: var(--cm-brand); color: #fff; }

/* ---------- Page body ---------- */
.cm-page { background: #f8f6fa; }

/* ---------- Toolbar (sort / view) ---------- */
.cm-toolbar {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    background: #fff; border: 1px solid var(--cm-border); border-radius: 18px; padding: 10px 14px;
    box-shadow: 0 6px 18px -14px rgba(80, 20, 70, .4);
}
.cm-count { font-size: 14px; color: #6b5b75; }
.cm-count b { color: #1f1633; font-size: 15px; }
.cm-tools { display: flex; align-items: center; gap: 10px; }
.cm-tools form { margin: 0; display: flex; gap: 8px; }
.cm-tools select {
    height: 40px; padding: 0 34px 0 14px; border-radius: 12px; border: 1.5px solid #ece4f0; background-color: #faf8fb;
    font-size: 13.5px; font-weight: 600; color: #3b2d47; cursor: pointer; outline: none;
}
[dir="rtl"] .cm-tools select { padding: 0 14px 0 34px; }
.cm-tools select:focus { border-color: var(--cm-brand); box-shadow: 0 0 0 3px rgba(145, 48, 117, .12); }
.cm-views { display: flex; gap: 6px; }
.cm-views a {
    width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid #ece4f0; background: #faf8fb;
    display: inline-flex; align-items: center; justify-content: center; color: #8a7a94; text-decoration: none; font-size: 15px;
}
.cm-views a:hover, .cm-views a.active { background: var(--cm-brand); border-color: var(--cm-brand); color: #fff; }

/* ---------- Product grid ---------- */
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px)  { .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1280px) { .catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }

.cc-card {
    display: flex; flex-direction: column; height: 100%;
    background: #fff; border: 1px solid var(--cm-border); border-radius: 20px; overflow: hidden;
    box-shadow: 0 6px 18px -14px rgba(80, 20, 70, .4); transition: box-shadow .2s, transform .2s;
}
.cc-card:hover { box-shadow: 0 16px 30px -16px rgba(80, 20, 70, .5); transform: translateY(-3px); }

.cc-media { position: relative; aspect-ratio: 1 / 1; background: #faf8fb; display: flex; align-items: center; justify-content: center; }
.cc-media-link { width: 100%; height: 100%; padding: 14px; display: flex; align-items: center; justify-content: center; }
.cc-media img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .3s; }
.cc-card:hover .cc-media img { transform: scale(1.05); }

.cc-badge {
    position: absolute; top: 10px; right: 10px; left: auto; z-index: 2;
    padding: 3px 9px; border-radius: 999px; background: #e53e3e; color: #fff;
    font-size: 11.5px; font-weight: 800; direction: ltr; unicode-bidi: isolate;
}
html[dir="ltr"] .cc-badge, [dir="ltr"] .cc-badge { right: auto; left: 10px; }
.cc-side { position: absolute; top: 10px; left: 10px; right: auto; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
html[dir="ltr"] .cc-side, [dir="ltr"] .cc-side { left: auto; right: 10px; }
.cc-icon {
    width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #6b5b75;
    display: flex; align-items: center; justify-content: center; font-size: .8rem; text-decoration: none;
    box-shadow: 0 4px 12px rgba(60, 20, 70, .15); transition: background .15s, color .15s, transform .15s;
}
.cc-icon:hover { background: var(--cm-brand); color: #fff; transform: scale(1.08); }
@media (min-width: 1024px) {
    .cc-side { opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; }
    .cc-card:hover .cc-side { opacity: 1; transform: none; }
}

.cc-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 14px; flex: 1; }
.cc-name {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.8em; line-height: 1.4; font-size: 13.5px; font-weight: 700; color: #1f1633;
    text-decoration: none; text-align: start; overflow-wrap: anywhere;
}
.cc-name:hover { color: var(--cm-brand); }
.cc-meta { margin-top: auto; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-height: 40px; }
[dir="rtl"] .cc-meta { align-items: flex-end; }
.cc-price { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; max-width: 100%; overflow: hidden; }
.cc-price-now { font-size: 16px; font-weight: 900; color: var(--cm-brand); }
.cc-price-old { font-size: 12px; font-weight: 600; color: #9b94a3; text-decoration: line-through; }
.cc-rating { font-size: 11.5px; color: #8a8294; } .cc-rating i { color: #f6ad55; }

.cc-actions { display: flex; gap: 8px; }
.cc-btn {
    height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 13px; font-weight: 800; text-decoration: none; border: 0; cursor: pointer; white-space: nowrap;
    transition: filter .15s, transform .15s;
}
.cc-btn-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cc-btn i { flex-shrink: 0; }
.cc-btn-primary { flex: 1; min-width: 0; padding: 0 8px; background: linear-gradient(135deg, var(--cm-brand), #b0408f); color: #fff !important; box-shadow: 0 8px 16px -10px rgba(145, 48, 117, .8); }
.cc-btn-dark { width: 40px; flex: 0 0 40px; background: #1f1633; color: #fff !important; }
.cc-btn-disabled { flex: 1; background: #eee9f1; color: #a29aab; cursor: not-allowed; }
.cc-btn:hover { filter: brightness(1.08); }
@media (max-width: 400px) { .cc-btn-primary { font-size: 12px; gap: 5px; padding: 0 6px; } }

/* ---------- Pagination ---------- */
#custom-pagination .pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 0; margin: 0; list-style: none; }
#custom-pagination .pagination li { list-style: none; }
#custom-pagination .page-link, #custom-pagination .pagination li a, #custom-pagination .pagination li span {
    min-width: 40px; height: 40px; padding: 0 12px; border-radius: 12px !important; border: 1.5px solid #ece4f0 !important;
    background: #fff !important; color: #3b2d47 !important; font-size: 14px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: none !important;
}
#custom-pagination .page-link:hover, #custom-pagination .pagination li a:hover { background: var(--cm-tint) !important; border-color: var(--cm-brand) !important; color: var(--cm-brand) !important; }
#custom-pagination .active .page-link, #custom-pagination .pagination li.active span, #custom-pagination .pagination li.active a {
    background: linear-gradient(135deg, var(--cm-brand), #b0408f) !important; border-color: var(--cm-brand) !important; color: #fff !important;
}
#custom-pagination .disabled .page-link, #custom-pagination .pagination li.disabled span { opacity: .45; }

/* ---------- Sidebar ---------- */
/* the partial wraps itself in a bootstrap .col-xl-3, which squeezed it to a quarter of the sidebar */
#catalogSidebar .col-xl-3 { flex: 0 0 100%; max-width: 100%; width: 100%; padding: 0; }
#catalogSidebar > .bg-white { border: 1px solid var(--cm-border) !important; border-radius: 22px !important; padding: 8px 6px 14px !important; box-shadow: 0 6px 18px -14px rgba(80, 20, 70, .4) !important; }
@media (min-width: 1280px) { #catalogSidebar { position: sticky; top: 90px; align-self: start; } }

#catalogSidebar .widget { margin: 0 0 6px; padding: 8px 10px; }
#catalogSidebar .widget-title {
    display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; padding: 0 4px 10px;
    font-size: 15px; font-weight: 800; color: #1f1633; border-bottom: 1px dashed #eadff0; background: none;
}
#catalogSidebar .widget-title::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: var(--cm-brand); }

#catalogSidebar .product-categories, #catalogSidebar .product-categories ul { list-style: none; margin: 0; padding: 0; }
#catalogSidebar .product-categories { max-height: 420px; overflow-y: auto; padding-inline-end: 4px; scrollbar-width: thin; }
#catalogSidebar .product-categories li { position: relative; display: block; }
#catalogSidebar .product-categories li > a {
    display: block; padding: 9px 12px; margin: 1px 0; border-radius: 12px;
    font-size: 14px; font-weight: 600; color: #3b2d47; text-decoration: none; line-height: 1.35;
}
#catalogSidebar .product-categories li > a:hover { background: var(--cm-tint); color: var(--cm-brand); }
#catalogSidebar .product-categories li.is-current > a { background: var(--cm-tint); color: var(--cm-brand); font-weight: 800; }
#catalogSidebar .has-child {
    position: absolute; top: 5px; inset-inline-end: 4px; width: 30px; height: 30px; border-radius: 10px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; color: #9a8aa5; font-size: 11px; transition: background .15s, transform .2s;
}
#catalogSidebar .has-child::before { content: "\f078"; font-family: "Font Awesome 5 Free"; font-weight: 900; }
#catalogSidebar .has-child:hover { background: #f1e7f5; color: var(--cm-brand); }
#catalogSidebar li.is-open > .has-child { transform: rotate(180deg); color: var(--cm-brand); }
#catalogSidebar li > a { padding-inline-end: 40px !important; }
#catalogSidebar .product-categories ul.children { display: none; margin: 2px 0 6px; padding-inline-start: 12px; border-inline-start: 2px solid #f0e6f4; margin-inline-start: 14px; }
#catalogSidebar li.is-open > ul.children { display: block; }
#catalogSidebar ul.children li > a { font-size: 13px; font-weight: 500; padding: 7px 10px; }

/* price filter */
#catalogSidebar .livecount { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
#catalogSidebar .livecount span { font-size: 12px; color: #8a7a94; }
#catalogSidebar .price-range-field { flex: 1; min-width: 0; height: 40px; border-radius: 12px; border: 1.5px solid #ece4f0; background: #faf8fb; padding: 0 10px; text-align: center; font-weight: 700; color: #3b2d47; }
#catalogSidebar .price-range-field:focus { outline: none; border-color: var(--cm-brand); box-shadow: 0 0 0 3px rgba(145, 48, 117, .12); }
#catalogSidebar .filter-btn, #catalogSidebar .btn-primary {
    width: 100%; height: 44px; border: 0 !important; border-radius: 14px !important; font-weight: 800; font-size: 14px; color: #fff !important;
    background: linear-gradient(135deg, var(--cm-brand), #b0408f) !important; box-shadow: 0 8px 16px -10px rgba(145, 48, 117, .8);
}
#catalogSidebar .form-control { height: 42px; border-radius: 12px; border: 1.5px solid #ece4f0; background: #faf8fb; }
#catalogSidebar .form-control:focus { border-color: var(--cm-brand); box-shadow: 0 0 0 3px rgba(145, 48, 117, .12); }

/* mobile filter button + drawer */
.cm-filter-btn {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 14px;
    background: #fff; border: 1.5px solid #ece4f0; color: #3b2d47; font-size: 14px; font-weight: 800;
    box-shadow: 0 6px 16px -12px rgba(80, 20, 70, .5);
}
.cm-filter-btn i { color: var(--cm-brand); }
@media (max-width: 1279px) { #catalogSidebar { border-radius: 0; } }

/* empty state */
.cm-empty { background: #fff; border: 1px solid var(--cm-border); border-radius: 22px; padding: 48px 20px; text-align: center; }
.cm-empty i { font-size: 2rem; color: #d3c1dd; margin-bottom: 12px; display: block; }

@media (max-width: 767px) {
    .cm-hero-inner { padding: 16px 12px 14px; }
    .cm-title { font-size: 1.3rem; }
    .cm-toolbar { padding: 8px 10px; border-radius: 16px; }
    .cm-tools select { height: 38px; font-size: 13px; }
    .cm-views { display: none; }
    .cc-card { border-radius: 16px; }
    .cc-name { font-size: 13px; }
    .cc-price-now { font-size: 15px; }
}

/* the off-canvas filter drawer must not create a horizontal scrollbar */
@media (max-width: 1279px) { html, body { overflow-x: hidden; } }

/* legacy .dashboard-sidebar-btn styling turned the filter button into a floating tab: reset it */
.cm-filter-btn.dashboard-sidebar-btn {
    position: static !important; inset: auto !important; transform: none !important; float: none !important;
    width: auto !important; min-width: 0 !important; height: 44px !important; margin: 0 !important; padding: 0 18px !important;
    display: inline-flex !important; align-items: center; gap: 8px; border-radius: 14px !important;
    background: #fff !important; color: #3b2d47 !important; border: 1.5px solid #ece4f0 !important; font-size: 14px !important; font-weight: 800 !important;
    line-height: 1 !important; text-indent: 0 !important; white-space: nowrap;
}

@media (max-width: 640px) {
    /* two narrow columns: one full-width button per card (quick-buy stays on desktop / product page) */
    .cc-btn-dark { display: none; }
    .cm-page > div { padding-top: 16px !important; padding-bottom: 24px !important; }
}

/* ---------- Sidebar: latest products ---------- */
.cm-recent { padding: 10px 10px 4px; }
.cm-recent-title { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; padding: 0 4px 10px; font-size: 15px; font-weight: 800; color: #1f1633; border-bottom: 1px dashed #eadff0; }
.cm-recent-title::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: var(--cm-brand); }
.cm-recent-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; text-decoration: none; transition: background .15s; }
.cm-recent-item:hover { background: var(--cm-tint); }
.cm-recent-item img { width: 56px; height: 56px; flex: 0 0 56px; object-fit: contain; border-radius: 12px; border: 1.5px solid #e6d5ee; background: #fff; padding: 3px; }
.cm-recent-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cm-recent-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 1.4; color: #1f1633; text-align: start; }
.cm-recent-price { font-size: 13.5px; font-weight: 900; color: var(--cm-brand); align-self: flex-start; }
[dir="rtl"] .cm-recent-price { align-self: flex-end; }

.cm-title, .cm-hero .cm-crumbs { text-align: start !important; }

/* =====================================================================
   Layout v2: pills + sidebar/main grid, fluid from phone to ultra-wide
   ===================================================================== */
.cm-container { width: 100%; max-width: none; margin: 0 auto; padding: 18px 16px 40px; box-sizing: border-box; }
@media (min-width: 768px)  { .cm-container { padding: 22px 24px 48px; } }
@media (min-width: 1536px) { .cm-container { padding-inline: 32px; } }

/* category pills */
.cm-rail { position: relative; margin: 0 -16px 10px; }
.cm-rail-track {
    display: flex; gap: 8px; padding: 4px 16px 8px; overflow-x: auto; scroll-snap-type: x proximity;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cm-rail-track::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .cm-rail { margin-inline: 0; } .cm-rail-track { padding-inline: 2px; } }
.cm-pill {
    flex: 0 0 auto; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
    border-radius: 999px; background: #fff; border: 1.5px solid #ece4f0; color: #3b2d47; font-size: 13.5px; font-weight: 700;
    text-decoration: none; white-space: nowrap; transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.cm-pill small { font-size: 11px; font-weight: 800; color: #a2799a; background: #f6eef9; border-radius: 999px; padding: 2px 7px; }
.cm-pill:hover { border-color: var(--cm-brand); color: var(--cm-brand); }
.cm-pill.is-active { background: linear-gradient(135deg, var(--cm-brand), #b0408f); border-color: transparent; color: #fff; box-shadow: 0 10px 18px -12px rgba(145, 48, 117, .9); }
.cm-pill.is-active small { background: rgba(255, 255, 255, .25); color: #fff; }
.cm-rail-sub .cm-pill-sub { height: 34px; font-size: 12.5px; background: #faf8fb; }
.cm-rail-sub .cm-pill-sub.is-active { background: #1f1633; color: #fff; box-shadow: none; }

/* page grid */
.cm-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 8px; }
@media (min-width: 1280px) { .cm-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 28px; } }
@media (min-width: 1700px) { .cm-layout { grid-template-columns: 320px minmax(0, 1fr); } }
.cm-main { min-width: 0; }

/* fluid product grid: as many columns as fit */
.catalog-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)) !important; gap: 14px !important; }
@media (min-width: 640px)  { .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important; gap: 16px !important; } }
@media (min-width: 1536px) { .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; gap: 20px !important; } }
@media (max-width: 359px)  { .catalog-grid { grid-template-columns: 1fr !important; } }

/* real category tree */
#catalogSidebar .cm-tree { max-height: none; overflow: visible; }
#catalogSidebar .cm-tree > li { border-bottom: 1px solid #f6f0f8; }
#catalogSidebar .cm-tree > li:last-child { border-bottom: 0; }
#catalogSidebar .category-link { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; }
.cm-cat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cm-cat-count { flex: 0 0 auto; font-size: 11px; font-weight: 800; color: #a2799a; background: #f6eef9; border-radius: 999px; padding: 2px 8px; }
#catalogSidebar li.is-current > a .cm-cat-count { background: var(--cm-brand); color: #fff; }
#catalogSidebar li > a { padding-inline-end: 44px !important; }
#catalogSidebar .cm-tree { max-height: 460px; overflow-y: auto; }
@media (max-width: 1279px) { #catalogSidebar .cm-tree { max-height: none; } }

/* the old drawer wrapper classes */
.cm-page { min-height: 60vh; }

/* the grid follows the page language: in Arabic the first product sits on the right */
.catalog-grid[dir="rtl"] { direction: rtl; }
.catalog-grid[dir="ltr"] { direction: ltr; }

/* =====================================================================
   Sidebar v3: softer card, category rows, slim scrollbar, modern price slider
   ===================================================================== */
#catalogSidebar > .bg-white {
    background: linear-gradient(180deg, #fff 0%, #fdfbfe 100%) !important;
    border: 1px solid var(--cm-border) !important; border-radius: 24px !important;
    padding: 14px 10px 18px !important; box-shadow: 0 18px 40px -26px rgba(80, 20, 70, .45) !important;
}
#catalogSidebar .widget { padding: 6px 12px; }
#catalogSidebar .widget-title { border-bottom: 0; padding-bottom: 6px; margin-bottom: 8px; font-size: 16px; letter-spacing: .1px; }
#catalogSidebar .widget-title::before { width: 5px; height: 18px; background: linear-gradient(180deg, var(--cm-brand), #c75aa6); }

/* category rows */
#catalogSidebar .cm-tree { max-height: 440px; padding-inline-end: 6px; scrollbar-width: thin; scrollbar-color: #dccbe5 transparent; }
#catalogSidebar .cm-tree::-webkit-scrollbar { width: 6px; }
#catalogSidebar .cm-tree::-webkit-scrollbar-track { background: transparent; }
#catalogSidebar .cm-tree::-webkit-scrollbar-thumb { background: #dccbe5; border-radius: 99px; }
#catalogSidebar .cm-tree::-webkit-scrollbar-thumb:hover { background: var(--cm-brand); }
#catalogSidebar .cm-tree > li { border-bottom: 0; }
#catalogSidebar .product-categories li > a {
    position: relative; padding: 10px 14px; margin: 2px 0; border-radius: 14px;
    transition: background .18s, color .18s, transform .18s;
}
#catalogSidebar .product-categories li > a:hover { background: var(--cm-tint); color: var(--cm-brand); transform: translateX(2px); }
[dir="rtl"] #catalogSidebar .product-categories li > a:hover { transform: translateX(-2px); }
#catalogSidebar .product-categories li.is-current > a {
    background: linear-gradient(135deg, #f6eef9, #efdff5); color: var(--cm-brand); box-shadow: inset 0 0 0 1px #e6d0ef;
}
#catalogSidebar .product-categories li.is-current > a::before {
    content: ""; position: absolute; inset-block: 9px; inset-inline-start: 0; width: 3px; border-radius: 3px; background: var(--cm-brand);
}
#catalogSidebar .cm-cat-count { background: #f3eaf7; color: #8d5f85; min-width: 26px; text-align: center; transition: background .18s, color .18s; }
#catalogSidebar .product-categories li > a:hover .cm-cat-count { background: var(--cm-brand); color: #fff; }
#catalogSidebar .has-child { background: #faf6fc; }

/* price slider (jQuery UI) */
#catalogSidebar .price-filter-list { list-style: none; margin: 0; padding: 0; }
#catalogSidebar .price-range-block { margin-top: 18px; padding: 0 8px; text-align: initial; }
#catalogSidebar .price-range-block #slider-range { margin: 14px 0 22px; }
#catalogSidebar .ui-slider-horizontal { height: 6px; border-radius: 99px; }
#catalogSidebar .ui-widget.ui-widget-content { background: #eadff0; border-radius: 99px; }
#catalogSidebar .ui-widget-header, #catalogSidebar .ui-slider .ui-slider-range {
    background: linear-gradient(90deg, var(--cm-brand), #c75aa6); border-radius: 99px;
}
#catalogSidebar .ui-slider .ui-slider-handle {
    width: 22px; height: 22px; top: -8px; margin-left: -11px; border: 4px solid #fff; background: var(--cm-brand);
    box-shadow: 0 4px 12px -2px rgba(145, 48, 117, .55), 0 0 0 1px #e6d0ef; cursor: grab; transition: transform .15s, box-shadow .15s;
}
#catalogSidebar .ui-slider .ui-slider-handle:hover,
#catalogSidebar .ui-slider .ui-slider-handle.ui-state-active { transform: scale(1.15); box-shadow: 0 6px 16px -2px rgba(145, 48, 117, .7), 0 0 0 5px rgba(145, 48, 117, .14); cursor: grabbing; }
#catalogSidebar .livecount { gap: 10px; margin-top: 4px; direction: ltr; }
#catalogSidebar .livecount span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: #a595ae; }
#catalogSidebar .price-range-field {
    width: auto; height: 44px; border-radius: 14px; background: #fff; border: 1.5px solid #e9dff0; font-size: 15px;
    -moz-appearance: textfield; transition: border-color .15s, box-shadow .15s;
}
#catalogSidebar .price-range-field::-webkit-outer-spin-button,
#catalogSidebar .price-range-field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#catalogSidebar button.filter-btn.btn.btn-primary { margin: 16px 0 6px; transition: transform .15s, filter .15s, box-shadow .15s; }
#catalogSidebar .filter-btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 12px 22px -12px rgba(145, 48, 117, .85); }

/* =====================================================================
   Sidebar v4: searchable category list + friendlier price filter
   ===================================================================== */
#catalogSidebar .widget { padding: 8px 14px; }
#catalogSidebar .cm-cat-search { position: relative; margin: 0 0 10px; }
#catalogSidebar .cm-cat-search i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #a595ae; pointer-events: none; }
#catalogSidebar .cm-cat-search input {
    width: 100%; height: 42px; padding: 0 14px; padding-inline-start: 36px; border-radius: 999px; border: 1.5px solid #ece4f0;
    background: #faf8fb; font-size: 14px; color: #3b2d47; transition: border-color .15s, box-shadow .15s, background .15s;
}
#catalogSidebar .cm-cat-search input:focus { outline: none; background: #fff; border-color: var(--cm-brand); box-shadow: 0 0 0 3px rgba(145, 48, 117, .12); }
#catalogSidebar .cm-cat-empty { margin: 10px 0 0; text-align: center; font-size: 13px; color: #a595ae; }
#catalogSidebar .cm-tree { max-height: 320px; border: 0; background: none; padding-inline-end: 4px; }
@media (max-width: 1279px) { #catalogSidebar .cm-tree { max-height: 320px; } }
#catalogSidebar .cm-tree > li { border-bottom: 1px solid #f6f0f8; }
#catalogSidebar .cm-tree > li:last-child { border-bottom: 0; }
#catalogSidebar .product-categories li > a { min-height: 44px; }
#catalogSidebar .has-child { top: 7px; width: 32px; height: 32px; }
/* the chevron sits at the far edge; the count badge stays beside the name */
#catalogSidebar .category-link { padding-inline-end: 48px !important; }

/* price filter */
#catalogSidebar .price-range-block { margin-top: 6px; padding: 0 4px; }
#catalogSidebar .cm-price-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; direction: ltr; }
#catalogSidebar .cm-price-chips button {
    flex: 1 1 auto; height: 34px; padding: 0 10px; border-radius: 999px; border: 1.5px solid #ece4f0; background: #fff;
    font-size: 12.5px; font-weight: 700; color: #6b5a77; cursor: pointer; transition: all .15s;
}
#catalogSidebar .cm-price-chips button:hover { border-color: var(--cm-brand); color: var(--cm-brand); }
#catalogSidebar .cm-price-chips button.is-on { background: var(--cm-tint); border-color: var(--cm-brand); color: var(--cm-brand); }
#catalogSidebar .price-range-block #slider-range { margin: 20px 10px 26px; direction: ltr; }
#catalogSidebar .livecount { align-items: flex-end; gap: 8px; margin-top: 0; }
#catalogSidebar .cm-price-box { flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
#catalogSidebar .cm-price-box small { font-size: 11px; font-weight: 800; color: #a595ae; text-transform: uppercase; letter-spacing: .5px; padding-inline-start: 4px; }
#catalogSidebar .cm-price-box .price-range-field { width: 100%; height: 44px; }
#catalogSidebar .cm-price-dash { height: 44px; display: flex; align-items: center; font-size: 16px !important; color: #c9bad2 !important; }
#catalogSidebar .filter-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; }
#catalogSidebar .cm-price-reset { display: block; text-align: center; margin: 8px 0 4px; font-size: 13px; font-weight: 700; color: #8a7a94; text-decoration: none; }
#catalogSidebar .cm-price-reset:hover { color: var(--cm-brand); text-decoration: underline; }

/* wishlist / compare buttons on the card */
button.cc-icon { border: 0; padding: 0; cursor: pointer; }
.cc-icon:focus-visible { outline: 2px solid var(--cm-brand); outline-offset: 2px; }
.cc-icon.is-on { background: var(--cm-brand); color: #fff; }
.cc-icon.cc-wish.is-on i { animation: ccPop .35s ease; }
.cc-icon.is-busy { opacity: .6; pointer-events: none; }
@keyframes ccPop { 50% { transform: scale(1.35); } }
@media (min-width: 1024px) { .cc-card .cc-side:has(.is-on) { opacity: 1; transform: none; } }
