/* ==========================================================================
   category-single.css — SEO Category Landing Page
   Sidebar (Filters/Categories/Subcategories/Segments/Brands/Countries/
   States/Cities) + subcategory product rows + View All + All Categories.
   Product cards reuse listings.css's .lst-card entirely — only grid
   layout is scoped here (.cs-products-grid) to keep 3-per-row previews.
   ========================================================================== */

:root {
  --cs-pr:     #892C36;
  --cs-pr-dk:  #6F1F29;
  --cs-pr-lt:  #fdf2f3;
  --cs-border: #e5e7eb;
  --cs-bg:     #f5f6f8;
  --cs-t1:     #111827;
  --cs-t2:     #6b7280;
  --cs-t3:     #9ca3af;
}

/* ── Page layout: sidebar + main ── */
.cs-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  max-width: 1440px;
  margin: 20px auto 60px;
  padding: 0 20px;
  align-items: start;
}

/* ── Sidebar ── */
.cs-sidebar {
  background: #fff;
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  padding: 16px;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.cs-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cs-sidebar-head h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--cs-t1);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cs-remove-filters {
  font-size: 12px;
  color: var(--cs-pr);
  text-decoration: none;
  font-weight: 600;
}
.cs-remove-filters:hover { text-decoration: underline; }

.cs-filter-group {
  border-top: 1px solid var(--cs-border);
  padding: 10px 0;
}
.cs-filter-group:first-of-type { border-top: none; }
.cs-filter-group summary {
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--cs-t1);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
}
.cs-filter-group summary::-webkit-details-marker { display: none; }
.cs-filter-group summary i:first-child { color: var(--cs-pr); font-size: 15px; }
.cs-filter-group summary::after {
  content: '\ea4e'; /* remixicon arrow-down-s-line */
  font-family: 'remixicon';
  margin-left: auto;
  color: var(--cs-t3);
  transition: transform .18s;
}
.cs-filter-group[open] summary::after { transform: rotate(180deg); }

.cs-filter-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.cs-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--cs-t2);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.cs-check:hover { background: var(--cs-pr-lt); color: var(--cs-pr); }
.cs-check i { font-size: 15px; color: var(--cs-t3); flex-shrink: 0; }
.cs-check.is-active { color: var(--cs-pr); font-weight: 700; background: var(--cs-pr-lt); }
.cs-check.is-active i { color: var(--cs-pr); }

/* ── Mobile filter toggle (hidden on desktop) ── */
.cs-mobile-filter-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: #fff;
  border: 1.5px solid var(--cs-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--cs-t1);
  cursor: pointer;
}

/* ── Main column ── */
.cs-main { min-width: 0; }

.cs-breadcrumb {
  font-size: 13px;
  color: var(--cs-t3);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.cs-breadcrumb a { color: var(--cs-t3); text-decoration: none; }
.cs-breadcrumb a:hover { color: var(--cs-pr); }
.cs-breadcrumb span { color: var(--cs-t1); font-weight: 600; }

/* ── Page H1 (real, keyword-optimized heading) ── */
.cs-page-h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--cs-t1);
  margin: 0 0 16px;
  line-height: 1.3;
}
@media (max-width: 560px) {
  .cs-page-h1 { font-size: 18px; }
}

/* ── Subcategory row ── */
.cs-row { margin-bottom: 34px; }
.cs-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cs-row-head h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--cs-t1);
}
.cs-row-desc {
  font-size: 13px;
  color: var(--cs-t2);
  margin-top: 4px;
  max-width: 620px;
  line-height: 1.5;
}
.cs-view-all {
  background: var(--cs-pr);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s;
}
.cs-view-all:hover { background: var(--cs-pr-dk); }

.cs-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}

/* ── Card layout fix ──────────────────────────────────────────────
   listings.css's .lst-card wasn't fully flex-column here, so cards
   with short descriptions left the seller link floating mid-card
   instead of pinned to the bottom — this made the grid look uneven/
   "broken" when card text lengths differed. Force a consistent
   flex column with the seller-link action row always at the bottom,
   and clamp the description to a fixed number of lines so every
   card in a row is the same height. */
.cs-products-grid .lst-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.cs-products-grid .lst-card-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cs-products-grid .lst-product-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 3.9em;
}

/* ── Seller footer redesign ──────────────────────────────────────
   Was a plain underlined blue link that wrapped to 2 lines on long
   seller names, breaking the card's visual rhythm. Redesigned as a
   proper footer bar: separator line, circular icon chip, single-line
   truncated name, no underline — matches the polished look of the
   rest of the card instead of looking like raw unstyled HTML. */
.cs-products-grid .lst-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--cs-border);
}
.cs-products-grid .lst-seller-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-decoration: none !important;
  color: var(--cs-t1) !important;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-products-grid .lst-seller-link:hover { color: var(--cs-pr) !important; }
.cs-products-grid .lst-seller-link i {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cs-pr-lt);
  color: var(--cs-pr);
  border-radius: 50%;
  font-size: 13px;
}
.cs-products-grid .lst-card-img {
  aspect-ratio: 260 / 180;
  overflow: hidden;
}
.cs-products-grid .lst-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Empty state ── */
.cs-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--cs-t3);
  background: #fff;
  border: 1px solid var(--cs-border);
  border-radius: 10px;
}
.cs-empty i { font-size: 2.6rem; display: block; margin-bottom: 10px; opacity: .4; }
.cs-empty p { font-size: 14px; }

/* ── Pagination (filtered/paginated views) ──────────────────────
   Sits below the products grid when a subcategory/segment filter
   returns more than one page of results. Mirrors .cs-view-all's
   pill styling for the active Previous/Next links so it reads as
   part of the same design system, with a plain muted center label
   for the current page position. */
.cs-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 8px 0 34px;
  flex-wrap: wrap;
}
.cs-page-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cs-pr);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s, transform .18s;
}
.cs-page-link:hover { background: var(--cs-pr-dk); transform: translateY(-1px); }
.cs-page-info {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cs-t2);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .cs-pagination { gap: 10px; }
  .cs-page-link { padding: 8px 16px; font-size: 12px; }
  .cs-page-info { font-size: 12px; order: -1; flex-basis: 100%; text-align: center; }
}

/* ── SEO block ── */
.cs-seo {
  margin-top: 20px;
  padding: 28px 30px;
  background: #fff;
  border: 1px solid var(--cs-border);
  border-radius: 12px;
}
.cs-seo h2 { font-size: 1.15rem; font-weight: 800; color: var(--cs-t1); margin-bottom: 8px; }
.cs-seo p { font-size: 13.5px; color: var(--cs-t2); line-height: 1.75; max-width: 760px; }

/* ── All Categories button ── */
.cs-all-cat-wrap { text-align: center; margin-top: 34px; }
.cs-all-cat-btn {
  display: inline-block;
  background: var(--cs-pr);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 14px 40px;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(137,44,54,.25);
  transition: background .18s, transform .18s;
}
.cs-all-cat-btn:hover { background: var(--cs-pr-dk); transform: translateY(-2px); }

/* ── Responsive ── */
@media (max-width: 992px) {
  .cs-page { grid-template-columns: 1fr; }
  .cs-mobile-filter-toggle { display: flex; }
  .cs-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 82%;
    max-width: 320px;
    z-index: 999;
    border-radius: 0;
    max-height: 100vh;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,.15);
  }
  .cs-sidebar.is-open { transform: translateX(0); }
  .cs-products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cs-page { padding: 0 12px; margin: 12px auto 40px; }
  .cs-products-grid { grid-template-columns: 1fr; }
  .cs-row-head h2 { font-size: 15px; }
}