/* ═══════════════════════════════════════════════════════
   DreamCycles — Category Page Styles
   Sidebar filters, product grid, fitment badges, loading states
   ═══════════════════════════════════════════════════════ */

/* ── Sidebar ────────────────────────────────────────── */
.dc-sidebar-sticky {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.dc-sidebar-sticky::-webkit-scrollbar {
  width: 4px;
}
.dc-sidebar-sticky::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

.sidebar-filters .widget-facet .facet-title {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}
.sidebar-filters .widget-facet .facet-title:hover {
  color: var(--primary);
}
.sidebar-filters .widget-facet .facet-title .icon-arrDown {
  transition: transform 0.3s;
  font-size: 10px;
}
.sidebar-filters .widget-facet .facet-title[aria-expanded="false"] .icon-arrDown {
  transform: rotate(-90deg);
}

/* Brand list */
.brand-filter-list {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.brand-filter-list label {
  padding: 4px 0;
  transition: color 0.15s;
}
.brand-filter-list label:hover {
  color: var(--primary);
}
.show-more-brands {
  font-size: 13px;
  text-decoration: none;
}

/* Fitment section */
.facet-fitment .fitment-active {
  border-left: 3px solid #198754;
}

/* Price inputs */
.facet-price .price-val input[type="number"] {
  font-size: 14px;
  line-height: 22px;
  outline: none;
  -moz-appearance: textfield;
}
.facet-price .price-val input[type="number"]::-webkit-outer-spin-button,
.facet-price .price-val input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cursor-pointer { cursor: pointer; }


/* ── Product Grid ───────────────────────────────────── */
.dc-product-grid .col {
  display: flex;
}
.dc-product-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.dc-product-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.dc-product-card .card-product-wrapper {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #fafafa;
}
.dc-product-card .card-product-wrapper .product-img {
  display: block;
  width: 100%;
  height: 100%;
}
.dc-product-card .card-product-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.35s ease, transform 0.35s ease;
  padding: 12px;
}
.dc-product-card .card-product-wrapper .img-hover {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
}
.dc-product-card .card-product-wrapper:hover .img-product {
  opacity: 0;
}
.dc-product-card .card-product-wrapper:hover .img-hover {
  opacity: 1;
  transform: scale(1.04);
}

.dc-product-card .card-product-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
}

/* Brand name */
.dc-brand-name {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--secondary);
  margin-bottom: 2px;
}

/* Title */
.dc-product-card .title {
  font-size: 14px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--main);
}
.dc-product-card .title:hover {
  color: var(--primary);
}

/* Price */
.dc-product-card .price {
  font-size: 16px;
  font-weight: 600;
  margin-top: 2px;
}

/* Variants badge */
.dc-variants-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--secondary);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 100px;
  width: fit-content;
}

/* Stock line */
.dc-stock-line {
  font-size: 12px;
  margin-top: auto;
  padding-top: 4px;
}
.dc-in-stock {
  color: #198754;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dc-in-stock svg { color: #198754; }
.dc-out-of-stock {
  color: #dc3545;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dc-out-of-stock svg { color: #dc3545; }

/* CTA area */
.dc-card-cta {
  margin-top: 10px;
}
.dc-card-cta .btn-main-product {
  width: 100%;
  text-align: center;
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s;
}


/* ── Fitment Badges ─────────────────────────────────── */
.dc-fitment-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
.dc-fitment-badge.dc-fits-ride {
  background: #198754;
  color: #fff;
  animation: dc-badge-pulse 1.5s ease-out 1;
}
.dc-fitment-badge.dc-no-fit {
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0; /* hide text, just show icon */
}
.dc-fitment-badge.dc-no-fit svg {
  font-size: initial;
}
.dc-fitment-badge.dc-no-info {
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 0; /* icon only on image overlay */
}
.dc-fitment-badge.dc-no-info svg {
  font-size: initial;
}

@keyframes dc-badge-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Non-fitting product — sorted to end by SQL */
.dc-product-card.dc-no-fit {
  order: 2;
}
.dc-product-card.dc-no-info {
  order: 1;
}
.dc-product-card.dc-fits-ride {
  order: 0;
}

/* Fitment indicator line inside card info */
.dc-fitment-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}
.dc-fitment-line.fits {
  color: #198754;
}
.dc-fitment-line.no-fit {
  color: #999;
}
.dc-fitment-line.no-info {
  color: #6c757d;
}

/* Sale badge */
.dc-product-card .on-sale-wrap {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}
.dc-product-card .on-sale-item {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
}


/* ── Loading Overlay ────────────────────────────────── */
.dc-listing-loader {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 8px;
  min-height: 200px;
}
#productListingAjax {
  position: relative;
}

/* ── No Results ─────────────────────────────────────── */
.dc-no-results {
  padding: 60px 20px;
}
.dc-no-results h5 {
  color: var(--main);
}

/* ── Meta Filter Bar ────────────────────────────────── */
.meta-filter-shop #sortBySelect {
  border-color: var(--line);
  border-radius: 8px;
  font-size: 13px;
  padding: 6px 12px;
}

/* ── Mobile Enhancements ────────────────────────────── */
@media (max-width: 991.98px) {
  .dc-product-grid {
    --bs-columns: 2;
  }
}
@media (max-width: 575.98px) {
  .dc-product-grid {
    --bs-columns: 1;
  }
  .dc-product-card .card-product-info {
    padding: 10px 12px 14px;
  }
  .dc-fitment-badge {
    top: 6px;
    right: 6px;
    padding: 3px 7px;
    font-size: 10px;
  }
}

/* Off-canvas mobile filter */
#filterDrawer .sidebar-filters .widget-facet .facet-title {
  font-size: 15px;
}
#filterDrawer .canvas-body {
  flex: 1;
  min-height: 0;
}

/* Pagination within AJAX container */
#productListingAjax .navSplitPagesLinks {
  margin-top: 20px;
  text-align: center;
}
#productListingAjax .navSplitPagesLinks a,
#productListingAjax .navSplitPagesLinks strong {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  color: var(--main);
  transition: all 0.2s;
}
#productListingAjax .navSplitPagesLinks a:hover {
  border-color: var(--primary);
  color: var(--primary);
}
#productListingAjax .navSplitPagesLinks strong {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
