/* ── Products / category listing page ── */
body.page-products {
  background: #f8faf6;
}

.sp-products-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f7eb 0%, #fff 55%, #faf8f3 100%);
  border-bottom: 1px solid rgba(46, 125, 50, 0.12);
  padding: clamp(1.25rem, 4vw, 2.5rem) 0 clamp(1.5rem, 3vw, 2rem);
}

.sp-products-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(129, 199, 132, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(174, 213, 129, 0.18) 0%, transparent 40%);
  pointer-events: none;
}

.sp-products-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.25rem;
}

.sp-products-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
}

.sp-products-breadcrumb a {
  color: #2e7d32;
  text-decoration: none;
}

.sp-products-breadcrumb a:hover {
  text-decoration: underline;
}

.sp-products-breadcrumb li + li::before {
  content: '/';
  margin-right: 0.35rem;
  color: #94a3b8;
}

.sp-products-hero h1 {
  margin: 0;
  font-size: clamp(1.65rem, 5vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a !important;
  line-height: 1.15;
}

.sp-products-hero-desc {
  margin: 0.5rem 0 0;
  max-width: 36rem;
  font-size: clamp(0.92rem, 2.5vw, 1.05rem);
  line-height: 1.55;
  color: #475569;
}

.sp-products-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.sp-products-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(46, 125, 50, 0.1);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.15);
}

.sp-products-hero-photo {
  width: clamp(72px, 18vw, 110px);
  height: clamp(72px, 18vw, 110px);
  border-radius: 50%;
  background: #fff;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 32px rgba(46, 125, 50, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.sp-products-hero-photo img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.sp-products-main {
  padding: 1.25rem 0 5rem;
}

.sp-category-pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.25rem 0 1rem;
  margin-bottom: 0.5rem;
}

.sp-category-pills::-webkit-scrollbar {
  display: none;
}

.sp-category-pill {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem 0.55rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
  white-space: nowrap;
}

.sp-category-pill img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  background: #f8faf6;
}

.sp-category-pill:hover {
  border-color: #81c784;
  color: #2e7d32;
}

.sp-category-pill.is-active {
  background: linear-gradient(135deg, #43a047, #2e7d32);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(46, 125, 50, 0.28);
}

.sp-category-pill.is-active img {
  background: rgba(255, 255, 255, 0.95);
}

.sp-products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid #e8efe3;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.sp-products-count {
  font-size: 0.9rem;
  color: #64748b;
}

.sp-products-count strong {
  color: #0f172a;
  font-weight: 800;
}

.sp-products-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sp-products-sort label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  margin: 0;
}

.sp-products-sort select {
  min-height: 42px;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}

.sp-products-sort select:focus {
  outline: none;
  border-color: #43a047;
  box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.15);
}

.sp-products-empty {
  text-align: center;
  padding: clamp(2.5rem, 8vw, 4rem) 1.5rem;
  background: #fff;
  border-radius: 18px;
  border: 1px dashed #cfe8cf;
}

.sp-products-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  color: #43a047;
  font-size: 1.75rem;
}

.sp-products-empty h3 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.sp-products-empty p {
  margin: 0 0 1.25rem;
  color: #64748b;
}

.sp-products-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.sp-products-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.25rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.sp-products-btn--primary {
  background: linear-gradient(135deg, #43a047, #2e7d32);
  color: #fff;
  box-shadow: 0 8px 20px rgba(46, 125, 50, 0.25);
}

.sp-products-btn--ghost {
  background: #fff;
  color: #2e7d32;
  border: 1px solid #cfe8cf;
}

.sp-products-btn:hover {
  transform: translateY(-1px);
}

.sp-products-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 2.5rem;
}

.sp-products-pagination a,
.sp-products-pagination span {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.65rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  transition: all 0.15s;
}

.sp-products-pagination a:hover {
  border-color: #81c784;
  color: #2e7d32;
}

.sp-products-pagination .is-current {
  background: linear-gradient(135deg, #43a047, #2e7d32);
  color: #fff;
  border-color: transparent;
  font-weight: 800;
}

body.page-products .sp-shop-categories {
  margin-bottom: 0.5rem;
}

.sp-products-suggested {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e8efe3;
}

.sp-products-suggested-head {
  margin-bottom: 1.25rem;
}

.sp-products-suggested-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.sp-products-suggested-head p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #64748b;
}

@media (max-width: 767px) {
  .sp-products-hero-inner {
    grid-template-columns: 1fr;
  }

  .sp-products-hero-photo {
    order: -1;
    width: 64px;
    height: 64px;
  }

  .sp-products-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .sp-products-sort {
    width: 100%;
  }

  .sp-products-sort select {
    flex: 1;
    width: 100%;
  }
}
