/* ============================================
   CATEGORY / SHOP PAGE
   Built entirely on the existing design system:
   fonts (--font-main / --font-head), colors, radii,
   shadows and the --primary / brand-purple (#5b21b6)
   already used across product cards.
   ============================================ */

:root {
  --brand-purple: #5b21b6;
  --brand-purple-tint: #f5f3ff;
}

/* --------------------------------------------
   CATEGORY HERO
-------------------------------------------- */
.cat-hero {
  background: linear-gradient(120deg, rgba(0,24,50,0.90) 55%, rgba(11,21,35,0.80) 100%), url('../images/peptides_banner.png') center/cover no-repeat;
  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 h2,
.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; }

/* --- 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: 15px 0 10px;
}
.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 h2,
.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); }
.why-choose-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}
.why-item { text-align: center; }
.why-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--brand-purple-tint);
  color: var(--brand-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 16px;
}
.why-item strong {
  display: block;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.why-item span {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------
   RESEARCH / ABOUT STRIP
-------------------------------------------- */
.research-strip { background: var(--white); }
.research-strip-inner {
  display: flex;
  align-items: center;
  gap: 56px;
}
.research-strip-left { flex: 0 0 46%; max-width: 46%; }
.research-strip-right {
  flex: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.research-strip-right img { width: 100%; height: 320px; object-fit: cover; display: block; }
.research-strip-tags {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.research-strip-tags .feat-item { border-right: none; padding-right: 0; max-width: none; }

/* --------------------------------------------
   BOTTOM CTA BANNER
-------------------------------------------- */
.custom-cta {
  background: linear-gradient(100deg, var(--primary-dark), var(--primary) 55%, #8b5cf6);
  padding: 34px 0;
}
.custom-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.custom-cta-left { display: flex; align-items: center; gap: 20px; }
.custom-cta-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  flex-shrink: 0;
}
.custom-cta-text h4 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.custom-cta-text p { font-size: 13.5px; color: rgba(255,255,255,0.8); margin: 0; }
.btn-cta-white {
  background: #fff;
  color: var(--primary);
  padding: 13px 28px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform var(--transition);
  white-space: nowrap;
}
.btn-cta-white:hover { transform: translateY(-2px); color: var(--primary); }

/* --------------------------------------------
   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%; }
}

/* ======================================================
   SIDEBAR CATEGORY LIST (replaces decorative filters)
====================================================== */
.filter-cat-list { display: flex; flex-direction: column; gap: 2px; }
.filter-cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.filter-cat-link:hover { background: var(--light-bg); color: var(--primary); }
.filter-cat-link.is-active {
  background: #f0eeff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--primary);
}
.filter-cat-count {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--light-gray);
  border-radius: 999px;
  padding: 2px 8px;
}
.filter-cat-link.is-active .filter-cat-count { background: #e2daf8; color: var(--primary); }
.cu-checkbox input[disabled] ~ .cu-checkbox-text { color: var(--text-muted); }

/* Compare-strip thumbs: consistent size, clamp long dose labels */
a.compare-thumb { color: inherit; }
.compare-thumb strong,
.compare-thumb span {
  max-width: 96px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  text-align: center;
}

/* ======================================================
   CARD COMMERCE ACTIONS — add-to-cart from every listing,
   eye icon quick-view link, linked image/title, dose select
====================================================== */
.product-img-link { display: block; }
.product-name a { color: inherit; transition: color var(--transition); }
.product-name a:hover { color: var(--primary); }

.pa-card-variant-wrap { display: block; margin: 2px 0 8px; }
.pa-card-variant {
  width: 100%;
  padding: 8px 30px 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  background: var(--light-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236a3de8' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.pa-card-variant:focus { outline: none; border-color: var(--primary); }

.pa-card-actions { display: flex; gap: 8px; margin-top: 10px; }
.pa-card-view {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  background: var(--white);
  transition: all var(--transition);
}
.pa-card-view:hover { border-color: var(--primary); color: var(--primary); background: #f0eeff; }
.pa-card-add {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.pa-card-add:hover { background: var(--primary-dark); transform: translateY(-1px); }
.pa-card-add.is-loading { opacity: 0.7; pointer-events: none; }
.pa-card-add.is-disabled { background: var(--light-gray); color: var(--text-muted); cursor: not-allowed; }

/* ======================================================
   CARD DOSE PILLS (radio-style, replaces the select)
====================================================== */
.pa-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 8px;
}
.pa-card-pill {
  padding: 5px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-body, #444);
  background: var(--light-gray, #f4f5f8);
  border: 1.5px solid var(--border, #e2e5ee);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.4;
}
.pa-card-pill:hover { border-color: var(--primary, #6a3de8); color: var(--primary, #6a3de8); background: #f0edfd; }
.pa-card-pill.is-active {
  background: var(--primary, #6a3de8);
  border-color: var(--primary, #6a3de8);
  color: #fff;
  box-shadow: 0 3px 10px rgba(106, 61, 232, 0.28);
}

/* Homepage best-sellers grid uses the same premium card */
.products-grid-home {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
@media (max-width: 1100px) { .products-grid-home { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .products-grid-home { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .products-grid-home { grid-template-columns: 1fr; } }
.explore-all-row { text-align: center; margin: 28px 0 8px; }
.explore-all-btn { display: inline-flex; width: auto; padding: 13px 28px; }
