/* --- Module: Products (CPT: yqs_product) --- */

/* --- Product Marketplace List (archive/taxonomy) --- */
.wqs-product-market-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  /* align-items: start; -> Removed to allow sidebar to stretch for sticky child support */
}

@media (max-width: 1024px) {
  .wqs-product-market-layout {
    grid-template-columns: 1fr;
  }
}

.wqs-product-market-panel {
  position: sticky;
  top: 92px;
  border: 1px solid var(--wqs-color-border);
  border-radius: var(--wqs-radius-lg);
  background: linear-gradient(180deg, var(--wqs-color-surface), var(--wqs-color-surface-alt));
  box-shadow: var(--wqs-shadow-sm);
  padding: 1.1rem;
  overflow: hidden;
}

.wqs-product-market-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(520px 220px at 10% 0%, rgb(var(--wqs-color-tint-rgb) / 0.14), transparent 60%),
    radial-gradient(520px 220px at 100% 10%, rgba(34, 211, 238, 0.10), transparent 58%);
  opacity: 0.9;
}

.wqs-product-market-panel > * {
  position: relative;
}

.wqs-product-market-panel-title {
  font-weight: 900;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.wqs-product-market-filter {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-right: 2px;
}

.wqs-product-filter {
  appearance: none;
  border: 1px solid var(--wqs-color-border);
  background: rgba(255,255,255,0.65);
  color: var(--wqs-color-text);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: var(--wqs-transition);
  position: relative;
}

.dark-mode .wqs-product-filter {
  background: rgba(15, 23, 42, 0.35);
  border-color: rgba(255,255,255,0.12);
  color: rgba(226, 232, 240, 0.92);
}

.wqs-product-filter:hover {
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.wqs-product-filter.is-active {
  background: rgb(var(--wqs-color-tint-rgb) / 0.14);
  border-color: rgb(var(--wqs-color-tint-rgb) / 0.28);
  color: var(--wqs-color-primary);
}

.wqs-product-filter.is-active::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--wqs-color-primary);
  transform: translateY(-50%);
  box-shadow: 0 0 0 4px rgb(var(--wqs-color-tint-rgb) / 0.12);
}

.wqs-product-filter.is-active {
  padding-left: 1.35rem;
}

.dark-mode .wqs-product-filter.is-active {
  background: rgb(var(--wqs-color-tint-rgb) / 0.18);
  border-color: rgb(var(--wqs-color-tint-rgb) / 0.28);
  color: rgba(226, 232, 240, 0.95);
}

.wqs-product-market-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .wqs-product-market-grid {
    grid-template-columns: 1fr;
  }
}

.wqs-product-market-card {
  border: 1px solid var(--wqs-color-border);
  border-radius: var(--wqs-radius-lg);
  background: var(--wqs-color-surface);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.wqs-product-market-card:hover {
  border-color: var(--wqs-color-primary);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  transform: translateY(-4px);
}

.wqs-product-market-cover {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--wqs-color-surface-alt);
  overflow: hidden;
}

.wqs-product-market-cover-cat {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--wqs-color-surface);
  color: var(--wqs-color-primary);
  border: 1px solid transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  line-height: 1.25;
}

.dark-mode .wqs-product-market-cover-cat {
  background: rgba(15, 23, 42, 0.85);
  color: var(--wqs-color-primary);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.wqs-product-market-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.00) 45%, rgb(0 0 0 / 0.22) 100%);
}

.wqs-product-market-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform .35s ease;
}

.wqs-product-market-card:hover .wqs-product-market-cover-img {
  transform: scale(1.06);
}

.wqs-product-market-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(520px 240px at 30% 20%, rgba(99,102,241,0.16), transparent 60%),
    radial-gradient(520px 240px at 90% 30%, rgba(34,211,238,0.12), transparent 55%),
    linear-gradient(180deg, var(--wqs-color-surface-alt), var(--wqs-color-surface));
}

.wqs-product-market-cover-placeholder span {
  font-size: 2rem;
  font-weight: 900;
  color: var(--wqs-color-primary);
  opacity: 0.9;
}

.wqs-product-market-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.wqs-product-market-cover-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 1rem 1rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  z-index: 5;
}

.wqs-product-market-title-overlay {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wqs-product-market-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.25;
}

.wqs-product-market-title a {
  color: inherit;
  text-decoration: none;
}

.wqs-product-market-title a:hover {
  color: var(--wqs-color-primary);
}

.wqs-product-market-excerpt {
  color: var(--wqs-color-text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wqs-product-market-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--wqs-color-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wqs-product-market-footer .wqs-btn {
  min-width: 104px;
  justify-content: center;
}

.wqs-product-market-meta-sep { margin: 0 0.35rem; opacity: 0.7; }
.wqs-product-market-meta-ver { font-weight: 800; color: var(--wqs-color-text); }
.dark-mode .wqs-product-market-meta-ver { color: rgba(226, 232, 240, 0.92); }

.wqs-product-market-meta {
  color: var(--wqs-color-text-muted);
  font-size: 0.85rem;
}

.wqs-product-market-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--wqs-color-border);
  border-radius: var(--wqs-radius-lg);
  background: var(--wqs-color-surface);
  padding: 2rem;
  text-align: center;
}

.wqs-product-market-layout.is-loading .wqs-product-market-main {
  opacity: 0.65;
  pointer-events: none;
}

.wqs-product-market-layout.is-loading {
  cursor: progress;
}

.wqs-product-market-pagination button.page-numbers {
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.wqs-product-market-pagination button.page-numbers:disabled {
  cursor: default;
  opacity: 0.6;
}

.wqs-product-archive-header {
    position: relative;
    padding: 2.5rem 1.5rem;
    border-radius: var(--wqs-radius-lg);
    border: 1px solid var(--wqs-color-border);
    background: linear-gradient(135deg, rgb(var(--wqs-color-tint-rgb) / 0.12), rgb(34 211 238 / 0.06));
    box-shadow: var(--wqs-shadow-sm);
}

.wqs-product-archive-header .wqs-category-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.wqs-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Product list page: more "app marketplace" than blog */
.wqs-product-index .wqs-product-grid {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.wqs-product-index .wqs-product-archive-header {
  text-align: left;
  padding: 2.75rem 2rem;
  background: radial-gradient(900px 280px at 10% 10%, rgba(99,102,241,0.18), transparent 60%),
        radial-gradient(800px 260px at 90% 30%, rgba(34,211,238,0.14), transparent 55%),
        linear-gradient(180deg, var(--wqs-color-surface), var(--wqs-color-surface-alt));
}

.wqs-product-index .wqs-product-archive-header .wqs-category-chips {
  justify-content: flex-start;
}

/* New app-style card */
.wqs-product-app-card {
  position: relative;
  border: 1px solid var(--wqs-color-border);
  border-radius: var(--wqs-radius-lg);
  background: linear-gradient(180deg, var(--wqs-color-surface), var(--wqs-color-surface-alt));
  box-shadow: var(--wqs-shadow-sm);
  padding: 1.25rem;
  overflow: hidden;
  transition: var(--wqs-transition);
}

.wqs-product-app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px 180px at 20% 0%, rgba(99,102,241,0.14), transparent 55%),
        radial-gradient(420px 180px at 90% 10%, rgba(34,211,238,0.10), transparent 55%);
  opacity: 0.9;
}

.wqs-product-app-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--wqs-shadow-md);
  transform: translateY(-3px);
}

.wqs-product-app-head {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.9rem;
  align-items: start;
}

.wqs-product-app-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  text-decoration: none;
}

.dark-mode .wqs-product-app-icon {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(255,255,255,0.12);
}

.wqs-product-app-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wqs-product-app-icon-fallback {
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--wqs-color-primary);
}

.wqs-product-app-badges {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.wqs-product-app-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255,255,255,0.6);
  color: var(--wqs-color-text);
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
}

.dark-mode .wqs-product-app-badge {
  background: rgba(15, 23, 42, 0.35);
  border-color: rgba(255,255,255,0.12);
  color: rgba(226, 232, 240, 0.9);
}

.wqs-product-app-badge.is-muted {
  color: var(--wqs-color-text-muted);
  font-weight: 700;
}

.wqs-product-app-title {
  position: relative;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.25;
}

.wqs-product-app-title a {
  color: inherit;
  text-decoration: none;
}

.wqs-product-app-title a:hover {
  color: var(--wqs-color-primary);
}

.wqs-product-app-desc {
  position: relative;
  margin-top: 0.9rem;
  color: var(--wqs-color-text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wqs-product-app-meta {
  position: relative;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--wqs-color-divider);
  color: var(--wqs-color-text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wqs-product-app-actions {
  position: relative;
  margin-top: 0.9rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.wqs-product-app-actions .wqs-btn { white-space: nowrap; }

.wqs-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--wqs-color-border);
    border-radius: var(--wqs-radius-lg);
    background: var(--wqs-color-surface);
    box-shadow: var(--wqs-shadow-sm);
    transition: var(--wqs-transition);
    overflow: hidden;
}


/* Single product helpers */
.wqs-product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wqs-product-side-card {
  border: 1px solid rgba(0,0,0,.06);
}
.wqs-product-card:hover {
    border-color: var(--wqs-color-primary);
    box-shadow: var(--wqs-shadow-md);
  transform: translateY(-3px);
}

.wqs-product-cover {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--wqs-color-surface-alt);
    border-bottom: 1px solid var(--wqs-color-border);
    overflow: hidden;
}

.wqs-product-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.00) 30%, rgb(0 0 0 / 0.18) 100%);
}

.wqs-product-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wqs-product-cover svg {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.7;
}

.wqs-product-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wqs-product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.wqs-product-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgb(var(--wqs-color-tint-rgb) / 0.10);
    color: var(--wqs-color-primary);
    border: 1px solid rgb(var(--wqs-color-tint-rgb) / 0.16);
}

.wqs-product-title {
    font-size: 1.1rem;
    line-height: 1.3;
    margin: 0;
  font-weight: 800;
}

.wqs-product-title a {
    text-decoration: none;
}

.wqs-product-title a:hover {
    color: var(--wqs-color-primary);
}

.wqs-product-excerpt {
    margin-top: 0.75rem;
    color: var(--wqs-color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wqs-product-meta {
    margin-top: auto;
    padding-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--wqs-color-text-muted);
    font-size: 0.85rem;
}

.wqs-product-cta {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wqs-product-side-card .wqs-btn { white-space: nowrap; }

/* --- Single Product Page V2 (SaaS Style) --- */

/* Hero Section */
.wqs-product-hero-v2 {
  background: var(--wqs-color-bg);
  color: var(--wqs-color-text);
  padding: 4rem 0 5rem;
  position: relative;
  overflow: hidden;
  margin-top: -20px;
}

/* Abstract Background Pattern (SaaS style) - Light Mode */
.wqs-product-hero-v2::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 500px at 50% -20%, rgb(var(--wqs-color-tint-rgb) / 0.12), transparent 70%),
    radial-gradient(800px 600px at 90% 40%, rgba(34, 211, 238, 0.08), transparent 60%);
  z-index: 0;
}

.wqs-product-hero-v2::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 6rem 6rem;
  mask-image: radial-gradient(ellipse at 50% 0%, black 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 60%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

/* Dark Mode Overrides */
.dark-mode .wqs-product-hero-v2 {
  background: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 100%);
  color: #fff;
}

.dark-mode .wqs-product-hero-v2::before {
  background:
    radial-gradient(1000px 500px at 50% -20%, rgba(99, 102, 241, 0.15), transparent 70%),
    radial-gradient(800px 600px at 90% 40%, rgba(56, 189, 248, 0.08), transparent 60%);
}

.dark-mode .wqs-product-hero-v2::after {
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

.wqs-product-hero-v2 .wqs-container { position: relative; z-index: 2; }

/* Grid Layout */
.wqs-product-hero-grid {
  display: grid;
  grid-template-columns: 1fr 500px;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 1024px) {
  .wqs-product-hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
}

/* Breadcrumb */
.wqs-product-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--wqs-color-text-muted);
  margin-bottom: 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 1024px) {
    .wqs-product-breadcrumb { justify-content: center; }
}

.wqs-product-breadcrumb a { color: inherit; text-decoration: none; transition: .2s; }
.wqs-product-breadcrumb a:hover { color: var(--wqs-color-primary); }
.dark-mode .wqs-product-breadcrumb a:hover { color: #fff; }
.wqs-product-breadcrumb span { opacity: 0.4; }

/* Typography */
.wqs-product-hero-v2 .wqs-product-title {
  font-size: 3rem; /* ~48px */
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 1rem 0;
  color: var(--wqs-color-text) !important; /* Force override */
  text-shadow: none;
}

.dark-mode .wqs-product-hero-v2 .wqs-product-title {
  color: #fff !important;
  text-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .wqs-product-hero-v2 .wqs-product-title { font-size: 2.25rem; }
}

.wqs-product-one-liner {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--wqs-color-text-muted);
  margin-bottom: 2rem;
  max-width: 100%; /* Align with title effectively by filling grid col */
}

.dark-mode .wqs-product-one-liner {
  color: #cbd5e1; /* Slate 300 */
}

@media (max-width: 1024px) {
    .wqs-product-one-liner { margin-left: auto; margin-right: auto; max-width: 600px; }
}

/* Actions Container (Button + Meta) */
.wqs-product-hero-actions-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (max-width: 1024px) {
    .wqs-product-hero-actions-container {
        flex-direction: column;
        justify-content: center;
        gap: 1.5rem;
    }
}

/* CTA Group */
.wqs-product-hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Meta MD5 code */
.wqs-product-hero-meta-inline .wqs-ph-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.88em;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--wqs-color-border);
    color: var(--wqs-color-text);
    user-select: all;
    white-space: nowrap;
    line-height: 1.2;
}

.dark-mode .wqs-product-hero-meta-inline .wqs-ph-code {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

/* Override button for hero */
.wqs-product-hero-cta-group .wqs-btn-lg {
    padding: 0 1.75rem;
    font-size: 1rem;
    border-radius: 999px; /* Pill button styling for modern feel */
    height: 48px;
    font-weight: 600;
    box-shadow: var(--wqs-shadow-sm);
}

/* Light mode primary button */
.wqs-product-hero-cta-group .wqs-btn-primary {
  /* Use global primary in light mode */
  border: 1px solid transparent;
}

/* Light mode outline button (for demo) */
.wqs-product-hero-cta-group .wqs-btn-outline {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.15);
    color: var(--wqs-color-text);
}
.wqs-product-hero-cta-group .wqs-btn-outline:hover {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.25);
}

/* Dark mode overrides: Reset Primary to Global Defaults */
.dark-mode .wqs-product-hero-cta-group .wqs-btn-primary {
  /* No special overrides, inherit global green/black text styles from wqs-styles.css */
  border: 1px solid transparent; 
}

/* Dark mode overrides: Outline button specific for dark hero */
.dark-mode .wqs-product-hero-cta-group .wqs-btn-outline {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    color: #e2e8f0;
}
.dark-mode .wqs-product-hero-cta-group .wqs-btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
    transform: translateY(-1px);
}

/* Disabled button */
.wqs-btn-disabled {
    opacity: 0.7 !important;
    background: rgba(0,0,0,0.05) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    color: var(--wqs-color-text-muted) !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

.dark-mode .wqs-btn-disabled {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #94a3b8 !important; 
}

/* Inline Meta Data */
.wqs-product-hero-meta-inline {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.9rem;
    color: var(--wqs-color-text-muted);
    background: var(--wqs-color-surface-alt);
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--wqs-color-border);
}

.dark-mode .wqs-product-hero-meta-inline {
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(4px);
}

.wqs-ph-item {
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.wqs-ph-label {
    opacity: 0.6;
    font-size: 0.85em;
    text-transform: uppercase;
}

.wqs-ph-value {
    color: var(--wqs-color-text);
    font-weight: 600;
}

.dark-mode .wqs-ph-value {
    color: #e2e8f0;
    font-weight: 500;
}

.wqs-ph-sep {
    width: 1px;
    height: 12px;
    background: var(--wqs-color-border);
}

.dark-mode .wqs-ph-sep {
    background: rgba(255,255,255,0.15);
}

/* Media (Right Column) */
.wqs-product-cover-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--wqs-shadow-lg);
  aspect-ratio: 16 / 10;
  background: var(--wqs-color-surface-alt);
  transform: perspective(1000px) rotateY(-4deg);
  transition: transform 0.5s ease;
}

.dark-mode .wqs-product-cover-wrap {
  box-shadow: 
    0 0 0 1px rgba(255,255,255,0.1),
    0 25px 50px -12px rgba(0, 0, 0, 0.5);
  background: #1e293b;
}

.wqs-product-hero-grid:hover .wqs-product-cover-wrap {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

@media (max-width: 1024px) {
    .wqs-product-hero-media {
        margin: 0 auto;
        width: 100%;
        max-width: 600px;
    }
    .wqs-product-cover-wrap { transform: none; }
    .wqs-product-hero-grid:hover .wqs-product-cover-wrap { transform: scale(1.02); }
}

.wqs-product-cover-img {
    width: 100%;
    height: 100%;
    object-fit: contain;     /* Changed from cover to contain for full image visibility */
    background: var(--wqs-color-surface-alt); /* Fill potential gaps */
    display: block;
}

.dark-mode .wqs-product-cover-img {
    background: #0f172a;
}

/* Inner glow for the image */
.wqs-product-cover-glow {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
    pointer-events: none;
    border-radius: 12px;
}

.dark-mode .wqs-product-cover-glow {
    box-shadow: inset 0 0 60px rgba(0,0,0,0.6);
}



/* Body Section */
.wqs-product-body-section {
  background: var(--wqs-color-bg);
  padding: 3rem 0 6rem;
  min-height: 600px;
}

.wqs-product-body-section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.wqs-product-body-section {
  position: relative;
}

.wqs-product-body-section > .wqs-container {
  position: relative;
  z-index: 1;
}

html:not(.dark-mode) .wqs-product-body-section::before {
  background:
    radial-gradient(900px 420px at 20% 0%, rgb(37 99 235 / 0.10), transparent 60%),
    radial-gradient(780px 420px at 90% 10%, rgb(124 58 237 / 0.08), transparent 60%);
  opacity: 0.9;
}

html.dark-mode .wqs-product-body-section::before {
  background:
    radial-gradient(900px 420px at 15% 0%, rgb(var(--wqs-color-tint-rgb) / 0.18), transparent 60%),
    radial-gradient(780px 420px at 95% 10%, rgba(34, 211, 238, 0.12), transparent 60%);
  opacity: 0.7;
}

.wqs-product-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start; /* Vital for sticky sidebar */
}

/* Sidebar & TOC
   Product pages reuse the global TOC module styles from wqs-styles.css:
   - .wqs-article-sidebar (sticky)
   - .wqs-toc-card / .wqs-toc-heading
   - .wqs-toc-link.is-active
*/

/* Article Overrides for Product Details */
.wqs-product-details.wqs-prose {
  max-width: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

/* Modernized: Seamless "No-Card" Look */
.wqs-product-content-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  position: relative;
  overflow: visible; /* Changed from hidden to allow sticky elements or popouts if needed */
}

/* Removed pseudo-element decorations for the cleaner look */
/* .wqs-product-content-card::before { ... } - Removed */

/* --- Product Navigation (Next/Prev) --- */
.wqs-product-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--wqs-color-border);
}

@media (max-width: 640px) {
  .wqs-product-nav-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.wqs-product-nav-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  padding: 1rem;
  border-radius: var(--wqs-radius-lg);
  border: 1px solid var(--wqs-color-border);
  background: var(--wqs-color-surface);
  transition: var(--wqs-transition);
  group: pointer;
}

.wqs-product-nav-card:hover {
  border-color: var(--wqs-color-primary);
  transform: translateY(-2px);
  box-shadow: var(--wqs-shadow);
}

.wqs-product-nav-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--wqs-radius);
  background: var(--wqs-color-surface-alt);
  object-fit: cover;
  flex-shrink: 0;
}

.wqs-product-nav-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.wqs-product-nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wqs-color-text-muted);
  font-weight: 600;
}

.wqs-product-nav-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--wqs-color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.wqs-product-nav-card:hover .wqs-product-nav-title {
  color: var(--wqs-color-primary);
}

/* --- Sidebar & TOC Customization (Seamless) --- */
.wqs-product-layout .wqs-toc-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-left: 1px solid var(--wqs-color-border);
  border-radius: 0;
  padding-left: 1.5rem;
}

.wqs-product-layout .wqs-toc-heading {
  margin-top: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--wqs-color-text-muted);
  margin-bottom: 1rem;
}

.wqs-product-content-card > * { position: relative; }

/* Dark mode: ensure primary button text isn't black on product pages */
.dark-mode .wqs-product-template .wqs-btn-primary,
.dark-mode .wqs-product-market .wqs-btn-primary {
  color: #ffffff;
  background: #00c96e;
  box-shadow: 0 16px 40px rgba(0, 201, 110, 0.20);
}

.dark-mode .wqs-product-template .wqs-btn-primary:hover,
.dark-mode .wqs-product-market .wqs-btn-primary:hover {
  background: #00e07a;
}

.wqs-product-details .wqs-article-body.wqs-prose {
  max-width: none;
}

.wqs-product-details .wqs-article-body.wqs-prose > :first-child { margin-top: 0; }
.wqs-product-details .wqs-article-body.wqs-prose > :last-child { margin-bottom: 0; }
/* If you prefer card style for content, uncomment:
.wqs-product-details {
  background: #fff;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
}
*/

/* Responsive */
@media (max-width: 1024px) {
  .wqs-product-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .wqs-product-cover-wrap {
    transform: none;
    max-width: 600px;
    margin: 0 auto;
  }
  .wqs-product-layout {
    grid-template-columns: 1fr;
  }
  .wqs-product-sidebar {
    display: none; 
  }
}
