/* Category (product listing) page: front/category.blade.php, includes/catalog.blade.php, includes/filter.blade.php,
   includes/product/catalog-product.blade.php */
.cp-hero, .cp-listing, .cp-shapeband, .cp-promos { --cp-accent: #07a8a9; --cp-ink: #1d2340; --cp-muted: #6b7191; --cp-line: #e6e9f2; --cp-soft: #eef8f8; }
.cp-crumbs, .cp-hero, .cp-listing, .cp-shapeband, .cp-promos { font-family: inherit; }
.cp-hero *, .cp-listing *, .cp-shapeband *, .cp-promos *, .cp-hero *::before, .cp-listing *::before { box-sizing: border-box; }
.cp-hero a, .cp-listing a, .cp-shapeband a, .cp-promos a { text-decoration: none; }
.cp-hero ul, .cp-shapeband ul, .cp-promos ul { margin: 0; padding: 0; list-style: none; }

/* breadcrumb (same pattern as the product page) */
.cp-crumbs { background: #fff !important; padding: 14px 0 6px; border: 0; }
.cp-crumbs .pages { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.cp-crumbs .pages li a { color: #4a5070; }
.cp-crumbs .pages li a:hover { color: #07a8a9; }
.cp-crumbs .pages li a::after { content: none !important; }
.cp-crumbs .pages li + li::before { content: "»"; margin: 0 9px; color: #9aa0bd; }

/* ---------- top banner ---------- */
.cp-hero { padding: 6px 0 18px; color: var(--cp-ink); }
/* the theme's base .sub-categori rule adds 70px of top/bottom padding; this page has its
   own hero/toolbar spacing above the listing, so trim that down instead of stacking both */
.cp-listing { padding: 14px 0 50px; }
/* NOTE: don't add overflow-x:hidden here or on .cp-content/#ajaxContent - it makes this
   element a scroll container, which changes what #cp-filters's "position: sticky" measures
   its offset against and silently pushes the sidebar down (found and reverted: it was never
   fixing a real overflow, since there wasn't one, but it did break the sticky sidebar). */
.cp-content, #ajaxContent { min-width: 0; }
/* flex row children default to min-width:auto, which lets a wide grid inside push this
   column (and the row) wider than intended instead of shrinking to fit */
.cp-listing .row > [class*="col-"] { min-width: 0; }
.cp-hero-in { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 190px; padding: 26px 34px; overflow: hidden; border-radius: 20px; background: linear-gradient(100deg, #e9f6f6 0%, #dcefee 60%, #eef8f8 100%); }
.cp-hero-txt { max-width: 640px; }
.cp-hero-txt h1 { margin: 0 0 6px; font-size: 32px; line-height: 1.15; font-weight: 700; color: var(--cp-ink); text-transform: none; }
.cp-hero-tag { margin: 0; font-size: 16px; font-weight: 600; color: #2b2b2f; }
.cp-hero-sub { margin: 8px 0 8px; max-width: 480px; font-size: 14.5px; line-height: 1.55; color: #4a5070; }
/* ".cp-hero ul" above (a class + element selector) is more specific than ".cp-hero-feats"
   alone, so it was silently winning and cancelling this margin-top - scoped with the extra
   ".cp-hero" ancestor class so it actually wins the cascade. */
.cp-hero .cp-hero-feats { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 16px; }
.cp-hero-feats li { display: flex; align-items: center; gap: 9px; }
.cp-hero-i { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--cp-accent); }
.cp-hero-feats b, .cp-hero-feats small { display: block; }
.cp-hero-feats b { font-size: 13px; font-weight: 700; color: var(--cp-ink); }
.cp-hero-feats small { font-size: 12px; color: var(--cp-muted); }
.cp-hero-img { flex: 0 1 42%; align-self: stretch; max-height: 220px; width: 100%; max-width: 420px; object-fit: cover; border-radius: 14px; }
.cp-hero-art { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 190px; height: 190px; margin-right: -20px; border-radius: 50%; background: rgba(255, 255, 255, .6); color: rgba(7, 168, 169, .35); }
.cp-hero-art svg { width: 120px; height: auto; }

/* ---------- toolbar (title + count, sort, view, mobile filter button) ----------
   sticky right below the site's own sticky header (144px tall) so it - and the filter
   sidebar below it, offset past both - stay in view while the product grid scrolls. */
.cp-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; position: sticky; top: 0; z-index: 20; background: #fff; padding: 14px 0; margin-top: -14px; }
.cp-toolbar-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cp-toolbar-title h1 { margin: 0; font-size: 24px; font-weight: 700; color: var(--cp-ink, #1d2340); text-transform: none; }
.cp-toolbar-title span { font-size: 14.5px; color: var(--cp-muted, #6b7191); }
.cp-toolbar-tools { display: flex; align-items: center; gap: 14px; }
.cp-toolbar-tools .filter-list { display: flex; margin: 0; padding: 0; list-style: none; }
.cp-toolbar-tools .item-short-area { display: flex; align-items: center; gap: 8px; }
.cp-toolbar-tools .item-short-area p { margin: 0; font-size: 14px; color: var(--cp-muted, #6b7191); white-space: nowrap; }
/* the real <select id="sortby"> stays in the DOM (filter()/change-handler JS still reads/sets it)
   but is visually replaced by this custom dropdown, since a native option list can't be
   restyled (rounded corners, hover colour, etc.) consistently across browsers */
.cp-select-native { display: none; }
.cp-select { position: relative; display: inline-block; }
.cp-select-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 168px; height: 42px; padding: 0 14px; border: 1.5px solid var(--cp-line, #e6e9f2); border-radius: 10px; background: #fff; font-size: 14px; color: var(--cp-ink, #1d2340); cursor: pointer; }
.cp-select-btn i { font-size: 11px; color: #9aa0bd; transition: transform .15s; }
.cp-select.is-open .cp-select-btn { border-color: var(--cp-accent, #07a8a9); }
.cp-select.is-open .cp-select-btn i { transform: rotate(180deg); }
.cp-select-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--cp-line, #e6e9f2); border-radius: 12px; box-shadow: 0 14px 32px rgba(29, 35, 64, .16); display: none; }
.cp-select.is-open .cp-select-menu { display: block; }
.cp-select-menu li { padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--cp-ink, #1d2340); cursor: pointer; }
.cp-select-menu li:hover { background: var(--cp-soft, #eef8f8); }
.cp-select-menu li.is-selected { background: var(--cp-soft, #eef8f8); color: var(--cp-accent, #07a8a9); font-weight: 600; }
.cp-filters-open { display: none; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 1.5px solid var(--cp-line, #e6e9f2); border-radius: 10px; background: #fff; color: var(--cp-ink, #1d2340); font-size: 14px; font-weight: 600; cursor: pointer; }

/* ---------- filter sidebar ---------- */
.cp-filters { position: sticky; top: var(--cp-toolbar-h, 70px); padding: 18px; border: 1px solid var(--cp-line); border-radius: 16px; background: #fff; }
.cp-filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cp-filters-head h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--cp-ink); }
.cp-filters-head-right { display: flex; align-items: center; gap: 14px; }
.cp-clear { font-size: 13px; font-weight: 600; color: var(--cp-accent); }
.cp-clear:hover { text-decoration: underline; }
.cp-search { position: relative; margin-bottom: 16px; }
.cp-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #9aa0bd; font-size: 13px; }
.cp-search input { width: 100%; height: 42px; padding: 0 12px 0 34px; border: 1.5px solid var(--cp-line); border-radius: 10px; font-size: 13.5px; background: #fff; }
.cp-search input:focus { outline: 0; border-color: var(--cp-accent); }

.cp-group { border-bottom: 1px solid var(--cp-line); padding: 14px 0; }
.cp-group:first-of-type { padding-top: 0; }
.cp-group-t { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; border: 0; background: none; font-size: 14.5px; font-weight: 600; color: var(--cp-ink); cursor: pointer; }
.cp-group-t i { font-size: 11px; color: #9aa0bd; transition: transform .15s; }
.cp-group-t[aria-expanded="false"] i { transform: rotate(180deg); }
.cp-group-b { margin-top: 12px; display: flex; flex-direction: column; gap: 9px; }
.cp-group-b.cp-scroll { max-height: 216px; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--cp-line) transparent; }
.cp-group-b.cp-scroll::-webkit-scrollbar { width: 5px; }
.cp-group-b.cp-scroll::-webkit-scrollbar-thumb { background: var(--cp-line); border-radius: 3px; }
.cp-group-b.cp-scroll::-webkit-scrollbar-track { background: transparent; }
.cp-check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: #4a5070; cursor: pointer; font-weight: 400; }
.cp-check input[type="checkbox"] { display: inline-block; width: 16px; height: 16px; margin: 0; accent-color: var(--cp-accent); flex: 0 0 auto; cursor: pointer; }
.cp-swatch { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); flex: 0 0 auto; }
.cp-check.is-hidden { display: none; }
.cp-navlink { display: block; padding: 6px 4px; font-size: 13.5px; color: #4a5070; border-radius: 6px; transition: color .15s, background-color .15s, padding-left .15s; }
.cp-navlink:hover { color: var(--cp-accent); background: var(--cp-soft); padding-left: 10px; }

.cp-price-vals { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.cp-price-vals input { width: 0; flex: 1 1 0; height: 38px; padding: 0 10px; border: 1.5px solid var(--cp-line); border-radius: 8px; font-size: 13px; }
.cp-price-vals span { font-size: 12.5px; color: var(--cp-muted); }
.cp-filters #slider-range.ui-slider { height: 5px; margin: 6px 4px 0; border: 0; background: var(--cp-line); border-radius: 4px; }
.cp-filters #slider-range .ui-slider-range { background: var(--cp-accent); border-radius: 4px; }
.cp-filters #slider-range .ui-slider-handle { top: -7px; width: 18px; height: 18px; margin-left: -9px; border: 3px solid var(--cp-accent); border-radius: 50%; background: #fff; cursor: pointer; outline: none; }

.cp-shapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cp-shape { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border: 1.5px solid var(--cp-line); border-radius: 10px; color: var(--cp-ink); font-size: 11.5px; text-align: center; }
.cp-shape svg { width: 34px; height: auto; }
.cp-shape:hover { border-color: var(--cp-accent); color: var(--cp-accent); }

.cp-apply.filter-btn { display: block; width: 100%; height: 46px; margin-top: 4px; border: 0; border-radius: 999px; background: var(--cp-accent); color: #fff; font-size: 14.5px; font-weight: 700; cursor: pointer; }
.cp-apply.filter-btn:hover { filter: brightness(.95); }

/* mobile filter drawer */
.cp-filters-close { display: none; }
@media (max-width: 991.98px) {
  .cp-filters-open { display: inline-flex; }
  #cp-filters { position: fixed; z-index: 100002; top: 0; left: 0; bottom: 0; width: min(86vw, 360px); max-height: none; overflow-y: auto; border-radius: 0; transform: translateX(-105%); transition: transform .25s ease-out; }
  #cp-filters.is-open { transform: none; }
  .cp-filters-scrim { display: none; position: fixed; inset: 0; z-index: 100001; background: rgba(15, 20, 40, .5); }
  .cp-filters-scrim.is-open { display: block; }
  .cp-filters-close { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f4f6fb; color: var(--cp-ink); }
  body.cp-filters-lock { overflow: hidden; }
}

/* ---------- product grid ----------
   Cards reuse the site's one shared product card (includes/home-product.blade.php,
   the .hp-card component from the home page) so every listing page looks the same -
   only the grid around it and its colour variables are page-specific. */
.cp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cp-grid .hp-card { width: auto; min-width: 0; height: 100%; --hp-accent: var(--cp-accent, #07a8a9); --hp-ink: var(--cp-ink, #1d2340); --hp-muted: var(--cp-muted, #6b7191); --hp-line: var(--cp-line, #e6e9f2); }
.cp-grid .hp-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid #dde1ea; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 4px rgba(29, 35, 64, .05); transition: border-color .15s; }
.cp-grid .hp-card:hover { border-color: var(--cp-accent, #07a8a9); }
.cp-grid .hp-img { position: relative; display: flex; align-items: center; justify-content: center; height: 190px; background: #f7f9fc; }
.cp-grid .hp-img img { width: 100%; height: 100%; object-fit: contain; padding: 16px; mix-blend-mode: multiply; }
.cp-grid .hp-off { position: absolute; left: 10px; top: 10px; padding: 4px 9px; border-radius: 999px; background: #e8f7ee; color: #17784a; font-size: 11.5px; font-weight: 700; }
.cp-grid .hp-wish { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: #4a5070; box-shadow: 0 2px 8px rgba(29, 35, 64, .14); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cp-grid .hp-wish:hover { color: #e0245e; }
.cp-grid .hp-body { display: flex; flex-direction: column; gap: 4px; padding: 14px; flex: 1; }
.cp-grid .hp-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--cp-ink, #1d2340); }
.cp-grid .hp-name:hover { color: var(--cp-accent, #07a8a9); }
.cp-grid .hp-cat { font-size: 12.5px; color: var(--cp-muted, #6b7191); }
.cp-grid .hp-rate { font-size: 12.5px; font-weight: 600; color: #b26a00; }
.cp-grid .hp-rate i { color: #f5a300; font-size: 11px; }
.cp-grid .hp-rate em { font-style: normal; font-weight: 400; color: var(--cp-muted, #6b7191); }
.cp-grid .hp-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.cp-grid .hp-price strong { font-size: 18px; font-weight: 700; color: var(--cp-ink, #1d2340); }
.cp-grid .hp-price del { font-size: 13px; color: #9aa0bd; }
.cp-grid .hp-add { display: flex; align-items: center; justify-content: center; width: 100%; height: 42px; margin-top: 10px; border: 0; border-radius: 999px; background: var(--cp-accent, #07a8a9); color: #fff !important; font-size: 14px; font-weight: 700; cursor: pointer; transition: filter .15s; }
.cp-grid .hp-add:hover { filter: brightness(.93); }
.cp-grid .hp-add.is-out { background: #e9ecf6; color: #6b7191 !important; cursor: not-allowed; }

.cp-empty { display: flex; flex-direction: column; align-items: center; padding: 60px 20px; color: #9aa0bd; text-align: center; }
.cp-empty svg { color: var(--cp-accent, #07a8a9); margin-bottom: 14px; }
.cp-empty h4 { margin: 0; font-size: 18px; color: var(--cp-ink, #1d2340); }

/* infinite scroll (replaces numbered pagination) */
.cp-infinite-loader { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 24px 0 4px; font-size: 13.5px; color: var(--cp-muted, #6b7191); }
.cp-spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid var(--cp-line, #e6e9f2); border-top-color: var(--cp-accent, #07a8a9); border-radius: 50%; animation: cpSpin .7s linear infinite; }
@keyframes cpSpin { to { transform: rotate(360deg); } }
.cp-infinite-end { margin: 24px 0 4px; text-align: center; font-size: 13.5px; color: var(--cp-muted, #6b7191); }
@media (prefers-reduced-motion: reduce) { .cp-spinner { animation-duration: 1.4s; } }

/* ---------- shape band ---------- */
.cp-shapeband { margin: 40px 0; padding: 30px; border-radius: 20px; background: var(--cp-soft); }
.cp-shapeband-in { display: flex; align-items: center; gap: 40px; }
.cp-shapeband-txt { flex: 0 0 260px; }
.cp-shapeband-txt h2 { margin: 0 0 8px; font-size: 24px; font-weight: 700; color: var(--cp-ink); text-transform: none; }
.cp-shapeband-txt p { margin: 0 0 16px; font-size: 14px; color: #4a5070; }
.cp-shapeband-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; background: #0f2a4a; color: #fff; font-size: 14px; font-weight: 600; }
.cp-shapeband-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.cp-shapeband-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 14px; background: #fff; color: var(--cp-ink); text-align: center; }
.cp-shapeband-item span { display: flex; align-items: center; justify-content: center; width: 100%; height: 46px; }
.cp-shapeband-item svg { width: 42px; height: auto; }
.cp-shapeband-item b { font-size: 12.5px; font-weight: 600; }
.cp-shapeband-item:hover { color: var(--cp-accent); }

/* ---------- promo cards ---------- */
.cp-promos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0 0 40px; }
.cp-promo { position: relative; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--cp-soft); color: var(--cp-ink); min-height: 240px; }
.cp-promo img, .cp-promo-ph { display: block; width: 100%; height: 130px; object-fit: cover; background: linear-gradient(135deg, #e6f2f2, #d7ecec); }
.cp-promo-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 18px 20px; }
.cp-promo-txt b { font-size: 16px; font-weight: 700; }
.cp-promo-txt small { font-size: 13px; color: #4a5070; line-height: 1.4; }
.cp-promo-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--cp-accent); }
.cp-promo-2 { padding: 20px; justify-content: center; }
.cp-promo-2 ul { display: flex; flex-direction: column; gap: 16px; }
.cp-promo-2 li { display: flex; align-items: center; gap: 12px; }
.cp-promo2-i { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--cp-accent); }
.cp-promo-2 b { display: block; font-size: 14px; font-weight: 700; }
.cp-promo-2 small { display: block; font-size: 12.5px; color: #4a5070; }

/* brands strip: now the shared includes/brands-marquee.blade.php partial + assets/front/css/marquee.css */

/* ---------- responsive ---------- */
@media (min-width: 1360px) { .cp-crumbs .container, .cp-listing .container, .cp-hero .container, .cp-extras.container { max-width: 1320px; } }
/* Bootstrap's own .container width steps at fixed points (960/1140/1320px) rather than scaling
   smoothly with the viewport, so the floating WhatsApp button (fixed right:22px, see
   layouts/front.blade.php) overlaps the grid's right edge in three separate narrow bands - right
   after each step, until the growing viewport reopens a natural gap on its own. Measured the
   worst overlap in each band and reserved just enough clearance for it, instead of one flat
   value across the whole 992-1560px range (which overshot badly in the upper part of each band). */
@media (min-width: 992px) and (max-width: 1199.98px) { .cp-listing .col-lg-9 { padding-right: 70px; } }
@media (min-width: 1200px) and (max-width: 1359.98px) { .cp-listing .col-lg-9 { padding-right: 60px; } }
@media (min-width: 1360px) and (max-width: 1519.98px) { .cp-listing .col-lg-9 { padding-right: 75px; } }
@media (max-width: 991.98px) {
  .cp-hero-in { flex-direction: column; align-items: flex-start; min-height: 0; padding: 22px; }
  .cp-hero-img, .cp-hero-art { align-self: center; margin: 14px 0 0; }
  .cp-hero-txt h1 { font-size: 26px; }
  .cp-promos { grid-template-columns: 1fr; }
  .cp-shapeband-in { flex-direction: column; align-items: stretch; gap: 20px; }
  .cp-shapeband-txt { flex: none; }
}
@media (max-width: 767.98px) {
  .cp-toolbar { align-items: flex-start; }
  .cp-toolbar-title h1 { font-size: 20px; }
  .cp-toolbar-tools { width: 100%; justify-content: space-between; }
  .cp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cp-grid .hp-add { height: 38px; font-size: 13px; }
  .cp-hero-feats { gap: 12px 16px; }
}
