/* ============================================
   CATEGORY / SHOP PAGE
   Built entirely on the existing design system:
   fonts (--font-main / --font-head), colors, radii,
   shadows and the --primary / brand-purple (#0c8b82)
   already used across product cards.
   ============================================ */

:root {
  --brand-purple: #0c8b82;
  --brand-purple-tint: #eefaf7;
}

/* --------------------------------------------
   CATEGORY HERO
-------------------------------------------- */
.cat-hero {
  background: linear-gradient(120deg, var(--dark-navy) 55%, var(--dark-bg) 100%);
  overflow: hidden;
}
.cat-hero-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  min-height: 420px;
  padding: 56px 0;
}
.cat-hero-left {
  flex: 0 0 52%;
  max-width: 52%;
}
.cat-hero-title {
  font-family: var(--font-head);
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  color: #fff;
  margin: 18px 0 14px;
}
.cat-hero-title span { color: #4ecdc4; display: block; }
.cat-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.72);
  max-width: 460px;
  line-height: 1.75;
  margin-bottom: 28px;
}
.cat-hero-btns { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.cat-hero-badges { display: flex; gap: 10px; flex-wrap: wrap; }

.cat-hero-right {
  flex: 0 0 44%;
  max-width: 44%;
  position: relative;
}
.cat-hero-img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cat-hero-img-wrap img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}
.cat-hero-right .hero-stat-badge {
  position: absolute;
  bottom: -22px;
  left: -30px;
  transform: none;
}

/* --------------------------------------------
   STATS STRIP
-------------------------------------------- */
.cat-stats {
  background: var(--white);
  border-bottom: 1px solid #f1f5f9;
  padding: 30px 0;
}
.cat-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cat-stat-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 20px;
  border-right: 1px solid #e2e5ee;
}
.cat-stat-item:last-child { border-right: none; }
.cat-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: var(--icon-bg, var(--brand-purple-tint));
  color: var(--icon-color, var(--brand-purple));
}
.cat-stat-item strong {
  display: block;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}
.cat-stat-item span {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --------------------------------------------
   SHOP LAYOUT: sidebar + product area
-------------------------------------------- */
.shop-section { padding: 50px 0; background: var(--white); }
.shop-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 32px;
  align-items: start;
}

/* --- Filters sidebar --- */
.filters-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: sticky;
  top: 100px;
}
.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.filters-head h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
}
.filters-clear {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
}
.filters-clear:hover { text-decoration: underline; }

.filter-group {
  padding: 18px 0;
  border-bottom: 1px solid #f1f5f9;
}
.filter-group:first-of-type { padding-top: 0; }
.filter-group:last-of-type { border-bottom: none; }
.filter-group-title {
  font-family: var(--font-head);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Price range dual slider */
.price-range-wrap { padding: 6px 2px 2px; }
.price-slider {
  position: relative;
  height: 20px;
  margin-bottom: 10px;
}
.price-slider input[type="range"] {
  position: absolute;
  width: 100%;
  top: 8px;
  height: 4px;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
.price-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}
.price-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  cursor: pointer;
  margin-top: -6px;
}
.price-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  cursor: pointer;
}
.price-slider-track {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 4px;
  background: var(--border);
}
.price-slider-range {
  position: absolute;
  top: 8px;
  height: 4px;
  border-radius: 4px;
  background: var(--primary);
}
.price-range-values {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.price-range-values strong { color: var(--text-dark); }

.filters-apply {
  width: 100%;
  margin-top: 4px;
}

/* Mobile filter toggle */
.filters-mobile-toggle { display: none; }
.filters-backdrop { display: none; }
.filters-close { display: none; border: none; cursor: pointer; }

/* --- Toolbar --- */
.shop-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.shop-search {
  flex: 1;
  position: relative;
}
.shop-search .cu-input { padding-left: 42px; border-radius: 30px; }
.shop-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}
.shop-sort {
  min-width: 190px;
}
.shop-sort select.cu-input {
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-dark);
}
.view-toggle {
  display: flex;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 4px;
  flex-shrink: 0;
}
.view-toggle button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  transition: all var(--transition);
}
.view-toggle button.active {
  background: var(--primary);
  color: #fff;
}

/* --- Product grid (list view variant) --- */
.shop-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.shop-products-grid.is-list { grid-template-columns: 1fr; }
.shop-products-grid.is-list .product-card {
  display: flex;
  align-items: center;
  gap: 24px;
  text-align: left;
  padding: 18px 24px;
}
.shop-products-grid.is-list .product-img { width: 110px; height: 110px; margin: 0; flex-shrink: 0; }
.shop-products-grid.is-list .product-card-body { flex: 1; }
.shop-products-grid.is-list .product-props { display: flex; gap: 16px; margin-bottom: 0; flex-wrap: wrap; }
.shop-products-grid.is-list .product-props li { margin-bottom: 0; }
.shop-products-grid.is-list .product-card-foot {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.shop-products-grid.is-list .btn-view-details { width: auto; padding: 10px 22px; }

/* Stock pill on product card */
.stock-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #ecfdf5;
  color: #059669;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
  z-index: 2;
}
.product-card { position: relative; }
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.product-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: #f8f9ff;
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 20px;
}
.product-tag i { color: var(--brand-purple); font-size: 9px; }
.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.product-price {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 800;
  color: var(--text-dark);
}

.load-more-wrap { text-align: center; margin-top: 40px; }
.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--brand-purple);
  color: var(--brand-purple);
  background: #fff;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-load-more:hover { background: var(--brand-purple-tint); }

/* --------------------------------------------
   COMPARE BAR
-------------------------------------------- */
.compare-bar {
  background: linear-gradient(120deg, var(--dark-navy) 60%, var(--dark-bg) 100%);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.compare-bar-text p:first-child {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 6px;
}
.compare-bar-text h3 {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.compare-bar-text span {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 18px;
}
.compare-thumbs {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.compare-thumb {
  background: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  width: 96px;
}
.compare-thumb img { width: 44px; height: 44px; object-fit: contain; margin: 0 auto 6px; }
.compare-thumb strong { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-dark); }
.compare-thumb span { display: block; font-size: 10px; color: var(--text-muted); }
.compare-vs {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
}

/* --------------------------------------------
   WHY CHOOSE (centered icon row)
-------------------------------------------- */
.why-choose { background: var(--light-bg); }

/* Bottom CTA banner base (inner/buttons styled in products.css .custom-cta .cta-inner) */
.custom-cta {
  background: linear-gradient(100deg, var(--primary-dark), var(--primary) 55%, #3aa8d4);
  padding: 34px 0;
}

/* --------------------------------------------
   RESPONSIVE
-------------------------------------------- */
@media (max-width: 1200px) {
  .shop-products-grid { grid-template-columns: repeat(3, 1fr); }
  .why-choose-grid { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .cat-stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .cat-stat-item:nth-child(2) { border-right: none; }
}

@media (max-width: 992px) {
  .cat-hero-inner { flex-direction: column; padding: 44px 0 36px; }
  .cat-hero-left, .cat-hero-right { max-width: 100%; flex: 0 0 100%; }
  .cat-hero-right { margin-top: 60px; }
  .cat-hero-img-wrap img { height: 260px; }
  .cat-hero-right .hero-stat-badge { left: 20px; bottom: -24px; }

  .shop-layout { grid-template-columns: 1fr; }
  .filters-card {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 300px;
    max-width: 84vw;
    z-index: 1200;
    border-radius: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
  }
  .filters-card.is-open { transform: translateX(0); }
  .filters-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    z-index: 1100;
  }
  .filters-backdrop.is-open { display: block; }
  .filters-mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    flex-shrink: 0;
  }
  .filters-close {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--light-bg) !important;
  }

  .shop-products-grid { grid-template-columns: repeat(2, 1fr); }
  .why-choose-grid { grid-template-columns: repeat(3, 1fr); }
  .research-strip-inner { flex-direction: column; }
  .research-strip-left, .research-strip-right { max-width: 100%; flex: 0 0 100%; }
}

@media (max-width: 768px) {
  .cat-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-stat-item { border-right: none; padding: 6px 0; }
  .shop-toolbar { flex-wrap: wrap; }
  .shop-search { flex: 1 1 100%; order: 1; }
  .shop-sort { order: 2; flex: 1; min-width: 0; }
  .view-toggle { order: 3; }
  .shop-products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .why-choose-grid { grid-template-columns: repeat(2, 1fr); }
  .compare-bar { padding: 28px 22px; }
  .compare-thumbs { gap: 8px; }
  .compare-thumb { width: 78px; padding: 8px; }
  .custom-cta-inner { flex-direction: column; text-align: center; }
  .custom-cta-left { flex-direction: column; }
}

@media (max-width: 576px) {
  .cat-hero-title { font-size: 26px; }
  .cat-hero-sub { font-size: 13.5px; }
  .cat-stats-grid { grid-template-columns: 1fr 1fr; }
  .shop-products-grid { grid-template-columns: 1fr; }
  .shop-products-grid.is-list .product-card { flex-direction: column; align-items: flex-start; }
  .why-choose-grid { grid-template-columns: 1fr 1fr; }
  .shop-toolbar { gap: 10px; }
  .compare-thumbs { justify-content: center; width: 100%; }
}
