/* ==========================================================================
   iTradeAIMS Theme - Products Catalog & Single Showcase Styles
   ========================================================================== */

/* Shared Layout Containers */
.products-container,
.product-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.products-archive-main {
  min-height: 100vh;
}

/* ==========================================================================
   2. Product Catalog Layout with Left-Side Filter Sidebar
   ========================================================================== */
.products-archive-content {
  padding: 32px 0 80px;
}

.products-layout-container {
  max-width: 1440px;
  display: flex;
  align-items: flex-start;
  gap: 32px;
  position: relative;
}

/* Mobile Trigger Bar (hidden by default on desktop) */
.mobile-filter-bar {
  display: none;
}

.filter-backdrop {
  display: none;
}

/* Left-Side Filter Sidebar */
.products-filter-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-offset) + 24px);
  background: rgba(14, 19, 29, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 24px 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  max-height: calc(100vh - var(--header-offset) - 48px);
  overflow-y: auto;
  z-index: 10;
}

/* Custom scrollbar for sidebar */
.products-filter-sidebar::-webkit-scrollbar {
  width: 5px;
}
.products-filter-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

.sidebar-header-mobile {
  display: none;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Filter Widgets */
.filter-widget {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 20px;
}

.filter-widget:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-widget-label,
.filter-widget-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 12px;
}

/* Search Input */
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 12px;
  color: #64748b;
  pointer-events: none;
}

.product-search-input {
  width: 100%;
  padding: 10px 32px 10px 36px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.product-search-input:focus {
  outline: none;
  border-color: #00d2ff;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
  background: rgba(15, 23, 42, 1);
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.125rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}

.search-clear-btn:hover {
  color: #ffffff;
}

/* Checkbox Options */
.filter-options-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.filter-checkbox-label:hover {
  color: #ffffff;
}

.filter-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

.custom-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  transition: all 0.2s ease;
}

.filter-checkbox:checked ~ .custom-checkbox {
  background: linear-gradient(135deg, #0066ff, #00d2ff);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.35);
}

.filter-checkbox:checked ~ .custom-checkbox::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2.5px;
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.filter-name {
  flex-grow: 1;
  line-height: 1.35;
}

.filter-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 7px;
  border-radius: 9999px;
  min-width: 14px;
  text-align: center;
}

.filter-checkbox:checked ~ .filter-name {
  color: #ffffff;
  font-weight: 600;
}

.filter-checkbox:checked ~ .filter-count {
  color: #38bdf8;
  background: rgba(0, 210, 255, 0.12);
}

.filter-platform-item {
  padding: 3px 0;
}

.filter-platform-logo-wrap {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 26px;
}

.filter-platform-logo {
  max-height: 22px;
  max-width: 28px;
  width: auto;
  object-fit: contain;
  filter: brightness(0.92);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.filter-platform-text-svg {
  display: inline-block;
  vertical-align: middle;
  color: #cbd5e1;
  transition: color 0.15s ease;
}

.filter-checkbox-label:hover .filter-platform-logo {
  filter: brightness(1.1);
}

.filter-checkbox-label:hover .filter-platform-text-svg {
  color: #ffffff;
}

.filter-checkbox:checked ~ .filter-platform-logo-wrap .filter-platform-logo {
  filter: brightness(1.2) drop-shadow(0 2px 8px rgba(0, 102, 255, 0.35));
}

.filter-checkbox:checked ~ .filter-platform-logo-wrap .filter-platform-text-svg {
  color: #ffffff;
}


/* Right Catalog Column */
.products-catalog-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Catalog Toolbar */
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.catalog-results-count {
  font-size: 0.9375rem;
  color: #94a3b8;
}

.catalog-results-count .count-num {
  color: #ffffff;
  font-weight: 700;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  transition: opacity 0.2s ease;
}

@media (max-width: 1140px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.product-card.is-filtered-out {
  display: none !important;
}

/* Empty Match State */
.products-empty-filter-state {
  text-align: center;
  padding: 60px 24px;
  background: rgba(14, 19, 29, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  margin-top: 12px;
}

.products-empty-filter-state .empty-icon {
  color: #64748b;
  margin-bottom: 16px;
}

.products-empty-filter-state h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
}

.products-empty-filter-state p {
  font-size: 0.9375rem;
  color: #94a3b8;
  max-width: 420px;
  margin: 0 auto;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 122, 255, 0.4);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.6), 0 0 24px -6px rgba(0, 122, 255, 0.2);
}

.product-card-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-surface-elevated);
}

.product-card-img-link {
  display: block;
  width: 100%;
  height: 100%;
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-card-img {
  transform: scale(1.05);
}

.product-card-img-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  background: linear-gradient(135deg, #0e131d 0%, #151c2a 100%);
}

.fallback-brand {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
}

.product-card-title a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

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

.product-card-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.product-card-price .price-regular {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.85;
}

.product-card-price .price-val {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.product-card-price.is-free .price-val {
  color: #34d399;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.badge-sale {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 122, 255, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(0, 122, 255, 0.35);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product-card-price .price-period {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.product-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 0;
  flex: 1;
}

.product-card-excerpt p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Supported Platforms Top-Right Overlay */
.product-card-platforms-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
  pointer-events: none;
}

.card-platform-logo-overlay {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.btn-card-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-card-view:hover {
  color: #ffffff;
  transform: translateX(2px);
}

.btn-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent-primary);
  border-radius: 6px;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 10px var(--accent-primary-glow);
}

.btn-card-cta:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.4);
  transform: translateY(-1px);
}

/* Pagination */
.products-pagination {
  margin-top: 56px;
  display: flex;
  justify-content: center;
}

.products-pagination .nav-links {
  display: flex;
  gap: 8px;
}

.products-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.products-pagination .page-numbers:hover,
.products-pagination .page-numbers.current {
  color: #ffffff;
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Empty State */
.products-empty-state {
  text-align: center;
  padding: 80px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.empty-icon {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.products-empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.products-empty-state p {
  color: var(--text-secondary);
}

/* ==========================================================================
   3. Single Product Page
   ========================================================================== */
.single-product-main {
  min-height: calc(100vh - var(--header-offset));
  padding-top: var(--header-offset);
}

/* Breadcrumbs Bar */
.product-top-bar {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(14, 19, 29, 0.4);
}

.product-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.product-breadcrumbs a {
  color: var(--text-secondary);
}

.product-breadcrumbs a:hover {
  color: var(--text-primary);
}

.product-breadcrumbs .current {
  color: var(--text-primary);
  font-weight: 500;
}

/* Product Hero (2-Column Showcase) */
.product-hero-section {
  padding: 60px 0 80px;
}

.product-hero-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: start;
}

/* Left Media Column - Single Featured Product Image */
.product-single-image-card {
  position: relative;
  background: var(--bg-surface, #111827);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.6);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.product-single-image-card:hover {
  border-color: rgba(0, 102, 255, 0.35);
  box-shadow: 0 20px 50px -10px rgba(0, 102, 255, 0.15);
}

.product-single-image-viewport {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0f19;
  padding: 16px;
}

.product-single-image-viewport .product-main-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-single-image-card:hover .product-main-img {
  transform: scale(1.015);
}

.product-img-fallback-hero {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted, #94a3b8);
  background: linear-gradient(135deg, #0e131d 0%, #151c2a 100%);
}

.fallback-hero-brand {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Right Info Column */
.single-product-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.single-product-short-desc {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #cbd5e1;
  margin-bottom: 28px;
}

/* Quick Highlights */
.product-quick-highlights {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 36px;
}

.highlights-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.highlights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.highlights-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.highlights-list .check-icon {
  stroke: var(--accent-primary);
  flex-shrink: 0;
}

/* External CTA Button & Pricing Wrap */
.single-product-cta-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Simple Clean Product Pricing Line */
.single-product-pricing-simple {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 2px 0 4px;
}

.price-original-strikethrough {
  font-size: 1.25rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: line-through;
  letter-spacing: -0.01em;
  margin-right: 4px;
}

.price-active-val {
  font-size: 2.25rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1;
}

.price-currency-code {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-period-suffix {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #64748b;
  letter-spacing: -0.01em;
}

.price-free-val {
  font-size: 2.25rem;
  font-weight: 800;
  color: #34d399;
  letter-spacing: 0.01em;
}

.btn-product-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 36px;
  background-color: var(--accent-primary);
  color: #ffffff;
  font-size: 1.0625rem;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 6px 24px var(--accent-primary-glow);
  transition: all var(--transition-fast);
}

.btn-product-cta:hover {
  background-color: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 122, 255, 0.5);
  color: #ffffff;
}

/* 14 Days Money Back Guaranteed Badge */
.badge-money-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 14px;
  margin: 0 auto;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #34d399;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.badge-money-back:hover {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.15);
}

.badge-money-back svg {
  stroke: #34d399;
  flex-shrink: 0;
}

/* ==========================================================================
   4. Tabbed Content Area
   ========================================================================== */
.product-tabs-section {
  padding: 40px 0 80px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(14, 19, 29, 0.25);
}

.product-tabs-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
}

/* Tabs Bar */
.tabs-nav-scroller {
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(8, 11, 17, 0.5);
}

.tabs-nav {
  display: flex;
  padding: 0 16px;
  gap: 8px;
  min-width: max-content;
}

.tab-btn {
  position: relative;
  padding: 18px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.is-active {
  color: #ffffff;
  border-bottom-color: var(--accent-primary);
}

/* Tab Panels */
.tab-panels {
  padding: 40px;
}

.tab-panel {
  display: none;
  animation: fadeInTab 0.25s ease-in-out forwards;
}

.tab-panel.is-active {
  display: block;
}

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Prose inside tabs */
.prose-dark {
  color: #cbd5e1;
  font-size: 1.0625rem;
  line-height: 1.8;
  max-width: 860px;
}

.prose-dark p {
  margin-bottom: 20px;
}

.prose-dark h2,
.prose-dark h3 {
  color: var(--text-primary);
  margin: 32px 0 16px;
}

.prose-dark ul,
.prose-dark ol {
  margin: 0 0 24px 24px;
}

.prose-dark li {
  margin-bottom: 8px;
}

/* Product Doc Figures & High-Res Images */
.prose-dark p.lead {
  font-size: 1.1875rem;
  line-height: 1.8;
  color: #e2e8f0;
  font-weight: 400;
}

.prose-dark figure.product-doc-figure,
.prose-dark figure {
  margin: 32px 0 36px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.prose-dark figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.prose-dark figure figcaption {
  margin-top: 12px;
  padding: 8px 6px 2px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}


/* Features Tab Grid */
.product-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px 20px;
  transition: border-color var(--transition-fast);
}

.feature-item:hover {
  border-color: rgba(0, 122, 255, 0.3);
}

.feature-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 122, 255, 0.12);
  color: var(--accent-primary);
  flex-shrink: 0;
}

.feature-item-text {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
}

/* FAQs Tab Accordion */
.product-faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 860px;
}

.faq-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item[open] {
  border-color: rgba(0, 122, 255, 0.35);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  display: flex;
  align-items: center;
  color: var(--accent-primary);
  transition: transform var(--transition-smooth);
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 24px 20px;
  color: #cbd5e1;
  line-height: 1.7;
}

.faq-answer-inner p {
  margin: 0 0 12px;
}

.faq-answer-inner p:last-child {
  margin-bottom: 0;
}

/* Supported Platforms Tab */
.product-platforms-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.platform-logo-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-elevated, #161b26);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 24px 36px;
  min-width: 160px;
  height: 96px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.platform-logo-card:hover {
  border-color: rgba(0, 102, 255, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 102, 255, 0.18);
  background: rgba(26, 34, 52, 0.95);
}

.platform-card-logo {
  max-height: 48px;
  max-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

@media (max-width: 640px) {
  .product-platforms-grid {
    gap: 14px;
  }

  .platform-logo-card {
    flex: 1 1 calc(50% - 14px);
    min-width: 130px;
    padding: 16px 20px;
    height: 80px;
  }

  .platform-card-logo {
    max-height: 38px;
    max-width: 110px;
  }
}

/* Native Comments Tab */
.product-comments-wrap {
  max-width: 800px;
}

.product-comments-wrap .comments-title {
  font-size: 1.35rem;
  margin-bottom: 24px;
}

.product-comments-wrap .comment-list {
  list-style: none;
  margin-bottom: 40px;
  padding: 0;
}

.product-comments-wrap .comment-body {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.product-comments-wrap .comment-form input[type="text"],
.product-comments-wrap .comment-form input[type="email"],
.product-comments-wrap .comment-form textarea {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.product-comments-wrap .comment-form input[type="submit"] {
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.product-comments-wrap .comment-form input[type="submit"]:hover {
  background: var(--accent-primary-hover);
}

/* ==========================================================================
   5. Similar Products Section
   ========================================================================== */
.similar-products-section {
  padding: 80px 0 120px;
}

.similar-products-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

.similar-products-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.similar-products-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .products-layout-container {
    flex-direction: column;
    gap: 0;
  }

  /* Show mobile filter bar */
  .mobile-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 24px;
    padding: 12px 18px;
    background: rgba(14, 19, 29, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  }

  .btn-mobile-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.2), rgba(0, 210, 255, 0.2));
    border: 1px solid rgba(0, 210, 255, 0.35);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 9999px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .btn-mobile-filter:hover {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.35), rgba(0, 210, 255, 0.35));
    border-color: #00d2ff;
  }

  .active-filter-badge {
    background: #00d2ff;
    color: #080b11;
    font-size: 0.75rem;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .mobile-products-count {
    font-size: 0.875rem;
    color: #94a3b8;
  }

  /* Drawer Backdrop */
  .filter-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1090;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .filter-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  /* Off-canvas Filter Drawer */
  .products-filter-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 86vw;
    height: 100vh;
    max-height: 100vh;
    background: #0b101c;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    padding: 24px 20px;
  }

  .products-filter-sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-header-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .sidebar-title-mobile {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
  }

  .btn-sidebar-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: all 0.2s ease;
  }

  .btn-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
  }
}

@media (max-width: 991px) {
  .product-hero-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .product-media-card {
    max-width: 600px;
    margin: 0 auto;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tab-panels {
    padding: 28px 20px;
  }
}

@media (max-width: 640px) {
  .single-product-title {
    font-size: 1.75rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-features-grid {
    grid-template-columns: 1fr;
  }

  .btn-product-cta {
    width: 100%;
  }

  .tabs-nav {
    padding: 0 8px;
  }

  .tab-btn {
    padding: 14px 16px;
    font-size: 0.875rem;
  }
}

/* ==========================================================================
   Sticky Bottom Purchase Bar (Single Product)
   ========================================================================== */
.product-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 990;
  background: rgba(14, 19, 29, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -8px 36px rgba(0, 0, 0, 0.55);
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  padding: 12px 0 max(12px, env(safe-area-inset-bottom));
}

.product-sticky-bar.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.product-sticky-bar-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sticky-bar-product-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sticky-bar-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  background: #111722;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticky-bar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sticky-bar-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.sticky-bar-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.sticky-bar-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 0.875rem;
  line-height: 1.1;
}

.sticky-price-val {
  font-weight: 800;
  color: #38bdf8;
  font-size: 0.9375rem;
}

.sticky-price-currency {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sticky-price-period {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sticky-price-free {
  font-weight: 800;
  color: #34d399;
  font-size: 0.9375rem;
  text-transform: uppercase;
}

.sticky-bar-action {
  flex-shrink: 0;
}

.btn-sticky-cta {
  padding: 11px 24px;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 8px;
  white-space: nowrap;
  width: auto;
}

/* Mobile Responsiveness (Compact 1-row layout) */
@media (max-width: 640px) {
  .product-sticky-bar {
    padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  }

  .product-sticky-bar-container {
    padding: 0 16px;
    gap: 12px;
  }

  .sticky-bar-product-info {
    gap: 10px;
  }

  .sticky-bar-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
  }

  .sticky-bar-title {
    font-size: 0.875rem;
    max-width: 155px;
  }

  .sticky-price-val {
    font-size: 0.875rem;
  }

  .btn-sticky-cta {
    padding: 10px 18px;
    font-size: 0.875rem;
  }
}

@media (max-width: 380px) {
  .sticky-bar-title {
    max-width: 115px;
  }

  .btn-sticky-cta {
    padding: 9px 14px;
    font-size: 0.8125rem;
  }
}
