/* Jade product category / shop enhancements */

/* Accessibility helper */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Breadcrumb — on dark page-hero */
.jade-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  margin: 0 0 14px;
}
.page-hero .jade-breadcrumb,
.jade-products-hero .jade-breadcrumb,
html body.jade-design-active .page-hero .jade-breadcrumb {
  color: rgba(255, 255, 255, 0.62) !important;
}
.jade-breadcrumb a {
  color: rgba(255, 255, 255, 0.78) !important;
  text-decoration: none;
}
.jade-breadcrumb a:hover {
  color: var(--orange, #e87722) !important;
}
.jade-breadcrumb .sep {
  opacity: 0.55;
  color: rgba(255, 255, 255, 0.45) !important;
}
.jade-breadcrumb .current {
  color: #fff !important;
  font-weight: 600;
}

/* Hero row */
.jade-products-hero .jade-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}
.jade-products-hero .jade-hero-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.jade-hero-icon {
  flex: 0 0 auto;
  width: 110px;
  height: 110px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(232, 119, 34, 0.12), rgba(232, 119, 34, 0.04));
  border: 1px solid rgba(232, 119, 34, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--orange, #e87722);
}
.jade-hero-icon i {
  font-size: 34px;
}
.jade-hero-count {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text, #1f2937);
}
.jade-benefit-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.jade-benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9) !important;
}
.page-hero .jade-benefit-list li,
.jade-products-hero .jade-benefit-list li,
html body.jade-design-active .page-hero .jade-benefit-list li {
  color: rgba(255, 255, 255, 0.9) !important;
}
.jade-benefit-list i {
  color: var(--orange, #e87722);
  margin-top: 3px;
  flex: 0 0 auto;
}
.jade-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
/* Keep hero CTAs readable on dark background (incl. hover) */
.page-hero .jade-hero-actions .btn,
.jade-products-hero .jade-hero-actions .btn,
html body.jade-design-active .page-hero .jade-hero-actions .btn {
  text-decoration: none !important;
}
.page-hero .jade-hero-actions .btn-ghost,
.jade-products-hero .jade-hero-actions .btn-ghost,
html body.jade-design-active .page-hero .jade-hero-actions .btn-ghost {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  background: transparent !important;
}
.page-hero .jade-hero-actions .btn-ghost:hover,
.page-hero .jade-hero-actions .btn-ghost:focus,
.jade-products-hero .jade-hero-actions .btn-ghost:hover,
html body.jade-design-active .page-hero .jade-hero-actions .btn-ghost:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: #fff !important;
}
.page-hero .jade-hero-actions .btn-outline-orange,
html body.jade-design-active .page-hero .jade-hero-actions .btn-outline-orange {
  color: var(--orange, #e87722) !important;
}
.page-hero .jade-hero-actions .btn-outline-orange:hover,
html body.jade-design-active .page-hero .jade-hero-actions .btn-outline-orange:hover {
  color: #fff !important;
  background: var(--orange, #e87722) !important;
  border-color: var(--orange, #e87722) !important;
}

/* Filter bar — static (no sticky). Option C: floating back-to-filter */
.jade-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  position: relative;
  z-index: 5;
  background: rgba(248, 249, 251, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.jade-filter-bar .jade-product-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}
.jade-filter-bar .filter-chips,
.jade-filter-bar .jade-filter-chips-compact {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
  padding-bottom: 2px;
}
.jade-filter-bar .filter-chips::-webkit-scrollbar,
.jade-filter-bar .jade-filter-chips-compact::-webkit-scrollbar {
  display: none;
  height: 0;
}
.jade-filter-bar .filter-chips .chip,
.jade-filter-bar .jade-filter-chips-compact .chip {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 6px 10px;
  font-size: 12.5px;
  line-height: 1.2;
  max-width: none;
}
.jade-filter-bar .chip-count {
  opacity: 0.72;
  font-weight: 600;
  font-size: 0.9em;
  margin-left: 2px;
}
/* Chip count without parentheses — denser */
.jade-filter-bar .chip-count::before {
  content: none;
}
.jade-filter-tools {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 1 auto;
  min-width: 0;
}
/* Floating back-to-filter button — high z-index for mobile/header/chat widgets */
.jade-back-to-filter {
  position: fixed !important;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(24px, calc(16px + env(safe-area-inset-bottom, 0px)));
  z-index: 99999 !important;
  display: none !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: #e87722;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(232, 119, 34, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  pointer-events: auto !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
}
.jade-back-to-filter.is-visible {
  display: inline-flex !important;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.jade-back-to-filter:hover,
.jade-back-to-filter:focus {
  background: #d46a18;
  color: #fff !important;
  outline: none;
  box-shadow: 0 12px 32px rgba(232, 119, 34, 0.45);
}
.jade-back-to-filter i {
  font-size: 13px;
}
@media (max-width: 640px) {
  .jade-back-to-filter {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(20px, calc(12px + env(safe-area-inset-bottom, 0px)));
    padding: 12px 14px;
    min-height: 44px;
    min-width: 44px;
  }
}
.jade-filter-tools select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center;
  background-size: 10px;
  border-radius: 999px;
  padding: 8px 28px 8px 12px;
  font-size: 13px;
  color: var(--text, #1f2937);
  cursor: pointer;
  min-height: 36px;
}
.jade-filter-tools select:focus {
  outline: 2px solid rgba(232, 119, 34, 0.35);
  outline-offset: 1px;
}
.jade-result-count {
  font-size: 13px;
  color: var(--text-muted, #6b7280);
  white-space: nowrap;
}
.jade-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #6b7280;
  background: rgba(15, 23, 42, 0.06);
  font-size: 16px;
  line-height: 1;
}

/* Product thumbnail — square to match catalog photos */
html body.jade-design-active .product-card .product-img,
html body.jade-design-active .product-card-wrap .product-img,
html body.jade-design-active .jade-shop-main .product-img,
html body.jade-design-active .product-grid .product-img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  min-height: 0 !important;
  max-height: none !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Product card wrap + badge + actions */
.product-grid .product-card-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  height: 100%;
}
.product-grid .product-card-wrap:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.product-grid .product-card-wrap .product-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  text-decoration: none;
  color: inherit;
  border: 0;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  height: auto;
}
.product-grid .product-card-wrap .product-card:hover {
  transform: none;
  box-shadow: none;
}
.jade-product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: #e87722;
  box-shadow: 0 2px 8px rgba(232, 119, 34, 0.3);
}
.jade-badge-featured {
  background: #e87722;
}
.jade-badge-new {
  background: #0d9488;
}
.jade-badge-hot {
  background: #dc2626;
}
.jade-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.jade-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text, #1f2937);
  background: #fafafa;
  transition: background 0.15s ease, color 0.15s ease;
}
.jade-card-cta + .jade-card-cta {
  border-left: 1px solid rgba(15, 23, 42, 0.06);
}
.jade-card-cta:hover {
  background: #fff7ed;
  color: #c2410c;
}
.jade-card-cta-primary {
  color: #c2410c;
  background: #fff7ed;
}

/* Empty state */
.jade-empty-state {
  text-align: center;
  padding: 48px 20px;
  background: #fff;
  border-radius: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
}
.jade-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 119, 34, 0.1);
  color: #e87722;
  font-size: 26px;
}
.jade-empty-state h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.jade-empty-state p {
  margin: 0 0 18px;
  color: var(--text-muted, #6b7280);
}
.jade-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* FAQ */
.jade-faq-list {
  display: grid;
  gap: 10px;
  max-width: 860px;
}
.jade-faq-item {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 0 16px;
}
.jade-faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  font-size: 15px;
  padding: 14px 0;
  position: relative;
  padding-right: 28px;
}
.jade-faq-item summary::-webkit-details-marker {
  display: none;
}
.jade-faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #e87722;
  font-weight: 700;
  font-size: 18px;
}
.jade-faq-item[open] summary::after {
  content: '−';
}
.jade-faq-a {
  padding: 0 0 14px;
  color: var(--text-muted, #4b5563);
  font-size: 14px;
  line-height: 1.55;
}

/* Related posts */
.jade-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.jade-related-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.jade-related-card:hover {
  border-color: rgba(232, 119, 34, 0.35);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}
.jade-related-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #eef1f4 center / cover no-repeat;
  background-color: #e8ecf0;
}
.jade-related-thumb.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(232, 119, 34, 0.55);
  font-size: 28px;
  background: linear-gradient(145deg, #f3f4f6, #e8ecf0);
}
.jade-related-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
  flex: 1 1 auto;
}
.jade-related-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}
.jade-related-card p {
  margin: 0;
  color: var(--text-muted, #6b7280);
  font-size: 14px;
  flex: 1 1 auto;
}
.jade-related-card .product-link {
  font-size: 13px;
  font-weight: 650;
  color: #c2410c;
}

/* Mobile */
@media (max-width: 900px) {
  .jade-related-grid {
    grid-template-columns: 1fr;
  }
  .jade-products-hero .jade-hero-row {
    flex-direction: column;
  }
  .jade-hero-icon {
    display: none;
  }
  .jade-filter-tools {
    width: 100%;
    margin-left: 0;
  }
}

/* Pack select + compact clear (icon only — no layout break) */
.jade-pack-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  max-width: 100%;
}
.jade-pack-filter {
  display: inline-flex;
  min-width: 0;
}
.jade-filter-tools select[name="spack"],
.jade-filter-tools select[data-jade-pack] {
  min-width: 6.75rem;
  max-width: 9.5rem;
}
.jade-pack-control.is-active select[name="spack"],
.jade-pack-control.is-active select[data-jade-pack] {
  border-color: rgba(232, 119, 34, 0.45);
  background-color: #fff8f1;
  color: #c45f12;
  font-weight: 600;
  padding-right: 26px;
}
.jade-pack-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #6b7280;
  text-decoration: none;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.jade-pack-clear:hover,
.jade-pack-clear:focus {
  background: #fff1e6;
  color: #c45f12;
  border-color: rgba(232, 119, 34, 0.35);
  outline: none;
}
.jade-pack-clear i {
  font-size: 12px;
}
@media (max-width: 900px) {
  .jade-filter-tools {
    flex-wrap: wrap;
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr !important;
  }
  .jade-card-cta {
    padding: 12px 8px;
    font-size: 14px;
  }
  .jade-filter-bar {
    border-radius: 12px;
    padding: 10px;
  }
}
