/**
 * Vatech Asia - Side-by-Side Product Comparison Stylesheet
 * 
 * Features:
 * - Feature-first information hierarchy
 * - Two-way sticky positioning (top column headers & left specification labels)
 * - Persistent floating horizontal scrollbar visible at any vertical scroll depth
 * - Interactive collapsible accordions for Features & Technical Specifications
 * - Full Width / Fixed Width layout toggle
 * - Series filtering for Extraoral systems (Green X vs Essential)
 * - Mobile Head-to-Head comparator view
 */

/* ==========================================================================
   GLOBAL LAYOUT & HERO
   ========================================================================== */
.compare-page {
  position: relative;
  background-color: var(--color-bg-light, #ffffff);
  color: var(--color-text-primary, #111111);
  overflow-x: clip;
  min-height: 100vh;
  transition: all 0.3s ease;
}

.compare-container {
  max-width: var(--container-max-width, 1440px);
  margin: 0 auto;
  padding: 0 var(--container-padding, clamp(20px, 4vw, 64px));
  transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Full Width Expanded Mode */
.compare-page.is-full-width .compare-container {
  max-width: 100% !important;
  padding-left: clamp(16px, 2.5vw, 40px);
  padding-right: clamp(16px, 2.5vw, 40px);
}

.compare-hero {
  background: linear-gradient(180deg, #f7f9fb 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: clamp(100px, 12vh, 140px);
  padding-bottom: clamp(32px, 5vh, 48px);
}

.compare-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--color-text-muted, #8E959E);
  margin-bottom: 24px;
}

.compare-breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-secondary, #555555);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.compare-breadcrumb-link:hover {
  color: var(--color-brand-red, #db072f);
}

.compare-breadcrumb-sep {
  opacity: 0.4;
}

.compare-breadcrumb-current {
  color: var(--color-text-primary, #111111);
  font-weight: 600;
}

.compare-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand-red, #db072f);
  margin-bottom: 12px;
}

.compare-headline {
  font-family: var(--font-display, inherit);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--color-text-primary, #111111);
  margin: 0 0 16px 0;
}

.compare-narrative {
  max-width: 820px;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.6;
  color: var(--color-text-secondary, #555555);
  margin: 0 0 32px 0;
}

/* ==========================================================================
   CATEGORY SWITCHER TABS
   ========================================================================== */
.compare-tabs-wrap {
  position: relative;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.compare-tabs-wrap::-webkit-scrollbar {
  display: none;
}

.compare-tabs {
  display: inline-flex;
  gap: 12px;
  padding: 4px;
  background-color: rgba(0, 0, 0, 0.04);
  border-radius: 999px;
  min-width: min-content;
}

.compare-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-secondary, #555555);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.compare-tab-btn:hover {
  color: var(--color-text-primary, #111111);
  background-color: rgba(255, 255, 255, 0.6);
}

.compare-tab-btn.is-active {
  background-color: #ffffff;
  color: var(--color-brand-red, #db072f);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.compare-tab-count {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ==========================================================================
   TOOLBAR & INTERACTIVE CONTROLS
   ========================================================================== */
.compare-main-section {
  padding: clamp(32px, 5vh, 60px) 0 clamp(80px, 10vh, 120px);
}

.compare-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.compare-toolbar-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compare-series-filters {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.compare-series-filters.is-hidden {
  display: none !important;
}

.compare-filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted, #8E959E);
  margin-right: 4px;
}

.compare-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-secondary, #555555);
  background-color: var(--color-brand-gray, #f7f8f8);
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}

.compare-filter-pill:hover {
  background-color: #ededed;
  color: var(--color-text-primary, #111111);
}

.compare-filter-pill.is-active {
  background-color: #111111;
  color: #ffffff;
  border-color: #111111;
}

.compare-filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.compare-category-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted, #8E959E);
  margin: 0;
}

.compare-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compare-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-primary, #111111);
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition: all 0.2s ease;
}

.compare-action-btn:hover {
  background-color: var(--color-brand-gray, #f7f8f8);
  border-color: rgba(0, 0, 0, 0.28);
}

.compare-action-btn.is-active {
  background-color: #111111;
  color: #ffffff;
  border-color: #111111;
}

.compare-action-btn.is-active i {
  color: var(--color-brand-green-x, #85bb5a);
}

/* ==========================================================================
   MOBILE HEAD-TO-HEAD PICKER BAR
   ========================================================================== */
.compare-mobile-picker {
  display: none;
  background-color: var(--color-brand-gray, #f7f8f8);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.compare-mobile-picker-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary, #555555);
  margin-bottom: 12px;
}

.compare-mobile-selectors {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compare-mobile-select-wrap {
  flex: 1;
}

.compare-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background-color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-primary, #111111);
}

.compare-mobile-swap-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.compare-mobile-swap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.compare-mobile-swap-btn:hover,
.compare-mobile-swap-btn:active {
  background-color: #f7f8f8;
  border-color: rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

.compare-mobile-swap-btn.is-animating .compare-swap-icon-wrap {
  transform: rotate(180deg);
}

.compare-swap-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--color-brand-red, #db072f);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.compare-vs-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-brand-red, #db072f);
  line-height: 1;
}

@media (max-width: 900px) {
  .compare-mobile-picker {
    display: block;
  }
}

/* ==========================================================================
   PANES & TABLE STRUCTURE
   ========================================================================== */
.compare-pane {
  display: none;
}

.compare-pane.is-active {
  display: block;
  animation: fadeInPane 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.compare-table-wrapper {
  position: relative;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background-color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.compare-table-wrapper::-webkit-scrollbar {
  display: none;
}

/* ==========================================================================
   PERSISTENT STICKY FLOATING HORIZONTAL SCROLLBAR
   ========================================================================== */
.compare-floating-scrollbar {
  position: sticky;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-top: none;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08);
  scrollbar-width: thin;
  scrollbar-color: #b0b8c1 #f1f3f5;
}

.compare-floating-scrollbar-inner {
  height: 1px;
}

.compare-floating-scrollbar::-webkit-scrollbar {
  height: 10px;
}

.compare-floating-scrollbar::-webkit-scrollbar-track {
  background: #f1f3f5;
  border-radius: 999px;
  margin: 0 4px;
}

.compare-floating-scrollbar::-webkit-scrollbar-thumb {
  background: #b0b8c1;
  border-radius: 999px;
}

.compare-floating-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #808b96;
}

@media (max-width: 900px) {
  .compare-floating-scrollbar {
    display: none !important;
  }
  .compare-table-wrapper {
    scrollbar-width: thin;
  }
  .compare-table-wrapper::-webkit-scrollbar {
    display: block;
    height: 6px;
  }
}

.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 0.9rem;
}

/* Column Width Specifications */
.compare-table--extraoral {
  min-width: 1560px;
}
.compare-table--extraoral .compare-col-label {
  width: 260px;
}
.compare-table--extraoral .compare-col-product {
  width: 220px;
}

.compare-table--sensors {
  min-width: 800px;
}
.compare-table--sensors .compare-col-label {
  width: 280px;
}
.compare-table--sensors .compare-col-product {
  width: 320px;
}

.compare-table--xray {
  min-width: 980px;
}
.compare-table--xray .compare-col-label {
  width: 260px;
}
.compare-table--xray .compare-col-product {
  width: 280px;
}

.compare-table--software {
  min-width: 1300px;
}
.compare-table--software .compare-col-label {
  width: 260px;
}
.compare-table--software .compare-col-product {
  width: 250px;
}

.compare-table--psp {
  width: 100%;
}

/* ==========================================================================
   TWO-WAY STICKY HEADERS
   ========================================================================== */
/* Sticky Top Column Headers */
.compare-table thead th {
  position: sticky;
  top: 72px; /* Clears standard site navbar */
  z-index: 10;
  background-color: #ffffff;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  padding: 24px 18px 20px;
  vertical-align: top;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

/* Top-Left Corner Header (Sticky Both X and Y) */
.compare-table thead th.compare-col-label {
  position: sticky;
  top: 72px;
  left: 0;
  z-index: 20;
  background-color: #ffffff;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

/* Sticky Left Specification Column */
.compare-table tbody th.compare-row-th {
  position: sticky;
  left: 0;
  z-index: 5;
  background-color: #ffffff;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  padding: 16px 20px;
  text-align: left;
  vertical-align: middle;
  font-weight: 600;
  color: var(--color-text-primary, #111111);
}

/* ==========================================================================
   SECTION HEADER ROWS (STICKY LABEL + SPANNING CONTENT)
   ========================================================================== */
.compare-section-header-tr {
  background: linear-gradient(90deg, #f4f6f8 0%, #fafbfc 100%);
}

/* Sticky First Column Section Header Cell (Fixed horizontally like .compare-row-th) */
.compare-section-label-th {
  position: sticky;
  left: 0;
  z-index: 6;
  background-color: #f4f6f8;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px 16px;
  text-align: left;
  vertical-align: middle;
}

/* Spanning Products Section Header Cell */
.compare-section-content-th {
  background: linear-gradient(90deg, #f4f6f8 0%, #fafbfc 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px 20px;
  text-align: left;
  vertical-align: middle;
}

.compare-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.compare-section-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background-color: var(--color-brand-red, #db072f);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.compare-section-title {
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-primary, #111111);
  line-height: 1.25;
  flex-grow: 1;
}

.compare-section-subtitle {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-secondary, #555555);
  letter-spacing: 0.02em;
}

/* Interactive Accordion Headers */
.compare-accordion-header {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.compare-accordion-header:hover .compare-section-label-th {
  background-color: #edf2f7;
}

.compare-accordion-header:hover .compare-section-content-th {
  background: linear-gradient(90deg, #edf2f7 0%, #f4f7fa 100%);
}

.compare-accordion-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--color-text-primary, #111111);
  font-size: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.compare-accordion-header:hover .compare-accordion-indicator {
  background-color: rgba(0, 0, 0, 0.12);
}

/* When collapsed, rotate arrow indicator -90deg */
.compare-accordion-header[aria-expanded="false"] .compare-accordion-indicator {
  transform: rotate(-90deg);
}

/* Collapsed rows hidden */
tr.is-collapsed-row {
  display: none !important;
}

.compare-tech-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted, #8E959E);
  background-color: rgba(0, 0, 0, 0.05);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ==========================================================================
   PRODUCT CARD (THEAD INNER)
   ========================================================================== */
.compare-product-card-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.compare-product-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.compare-product-thumb-wrap {
  width: 120px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.compare-product-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.compare-product-card-top:hover .compare-product-thumb {
  transform: scale(1.06);
}

.compare-product-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-primary, #111111);
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.compare-product-modality {
  font-size: 0.78rem;
  color: var(--color-text-muted, #8E959E);
  line-height: 1.35;
  margin: 0 0 16px 0;
  min-height: 32px;
}

.compare-product-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.compare-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.compare-btn-primary {
  background-color: #111111;
  color: #ffffff;
}

.compare-btn-primary:hover {
  background-color: var(--color-brand-red, #db072f);
}

.compare-btn-secondary {
  background-color: var(--color-brand-gray, #f7f8f8);
  color: var(--color-text-primary, #111111);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.compare-btn-secondary:hover {
  background-color: #ededed;
}

/* ==========================================================================
   TBODY CELLS & SPACING
   ========================================================================== */
.compare-table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background-color 0.15s ease;
}

.compare-table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.015);
}

.compare-table tbody tr:hover th.compare-row-th {
  background-color: #fafafa;
}

.compare-td {
  padding: 16px 18px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  line-height: 1.45;
  color: var(--color-text-secondary, #555555);
}

.compare-td--center {
  text-align: center;
}

.compare-th-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-primary, #111111);
}

.compare-th-hint {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-muted, #8E959E);
  margin-top: 2px;
}

/* BEST FIT CONTENT CELL: ENHANCED TOP PADDING */
.compare-row[data-row-key="positioning"] .compare-td {
  padding-top: 28px;
  vertical-align: top;
}

.compare-row[data-row-key="positioning"] .compare-row-th {
  padding-top: 28px;
  vertical-align: top;
}

.compare-positioning-text {
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 4px 0 0 0;
  color: var(--color-text-primary, #111111);
}

.compare-advantage-text {
  font-size: 0.84rem;
  line-height: 1.45;
  font-weight: 500;
  margin: 0;
  color: #1b4b2f;
  background-color: #f0f7f3;
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 3px solid var(--color-brand-green, #00965e);
}

.compare-standouts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compare-standouts-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.35;
}

.compare-standouts-list li i {
  margin-top: 3px;
  flex-shrink: 0;
}

/* Feature Badges */
.compare-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.compare-badge--check {
  background-color: #eaf6f0;
  color: #008754;
}

.compare-badge--dash {
  background-color: #f1f3f5;
  color: #8E959E;
}

.compare-badge--fov {
  background-color: #111111;
  color: #ffffff;
  font-size: 0.82rem;
}

.compare-badge--fov.is-flagship-fov {
  background: linear-gradient(135deg, #00965e 0%, #111111 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 150, 94, 0.25);
}

.compare-badge--endo {
  background-color: #eaf6f0;
  color: #00965e;
  border: 1px solid rgba(0, 150, 94, 0.3);
}

.compare-badge--smart {
  background-color: #fff3e6;
  color: #ed6d1d;
  border: 1px solid rgba(237, 109, 29, 0.3);
}

.compare-badge--green {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.compare-badge--gray {
  background-color: #f1f3f5;
  color: #495057;
}

.compare-feature-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-primary, #111111);
}

.compare-feature-val-small {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--color-text-secondary, #555555);
}

.compare-tech-val {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--color-text-secondary, #555555);
}

.is-fast-highlight {
  color: #00965e;
  font-weight: 700;
}

/* ==========================================================================
   PSP SPOTLIGHT CARD & LAYOUT
   ========================================================================= */
.compare-psp-container {
  max-width: 1040px;
  margin: 0 auto;
}

.compare-psp-spotlight-card {
  background-color: #f7f9fb;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: clamp(24px, 4vw, 40px);
}

.compare-psp-spotlight-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
}

.compare-psp-thumb-wrap {
  width: 100%;
  height: 240px;
}

.compare-psp-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.compare-psp-title {
  font-family: var(--font-display, inherit);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.compare-psp-modality {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-brand-red, #db072f);
  margin: 0 0 16px 0;
}

.compare-psp-positioning {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-secondary, #555555);
  margin-bottom: 20px;
}

.compare-psp-highlights-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-primary, #111111);
  margin: 0 0 8px 0;
}

@media (max-width: 768px) {
  .compare-psp-spotlight-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .compare-psp-thumb-wrap {
    height: 180px;
  }
}

/* ==========================================================================
   BOTTOM CONSULTATION CARD
   ========================================================================== */
.compare-bottom-card {
  margin-top: clamp(60px, 8vh, 90px);
  background: linear-gradient(135deg, #111111 0%, #1e1e1e 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: clamp(32px, 6vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.compare-bottom-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-brand-green-x, #85bb5a);
}

.compare-bottom-title {
  font-family: var(--font-display, inherit);
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.compare-bottom-desc {
  max-width: 760px;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.compare-bottom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.compare-bottom-actions .btn-primary {
  background-color: var(--color-brand-red, #db072f);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease;
}

.compare-bottom-actions .btn-primary:hover {
  background-color: var(--color-brand-red-hover, #b80526);
}

.compare-bottom-actions .btn-secondary {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.compare-bottom-actions .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   MOBILE DEDICATED OPTIMIZATIONS (<= 900px)
   Purely scoped to mobile & small tablet viewports; desktop remains untouched.
   ========================================================================== */
@media (max-width: 900px) {
  /* Hero & Container Adjustments */
  .compare-hero {
    padding-top: clamp(80px, 10vh, 100px);
    padding-bottom: 24px;
  }

  .compare-breadcrumb {
    margin-bottom: 16px;
    font-size: 0.8rem;
  }

  .compare-headline {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    margin-bottom: 12px;
  }

  .compare-narrative {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
  }

  /* Category Tabs: Smooth horizontal touch scroll with scroll snap */
  .compare-tabs-wrap {
    padding: 2px 0 6px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .compare-tabs {
    padding: 3px;
    gap: 6px;
  }

  .compare-tab-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
    scroll-snap-align: center;
  }

  .compare-main-section {
    padding: 24px 0 60px;
  }

  /* Toolbar: Hide Full Width toggle; sleek scrollable series chips */
  .compare-toolbar {
    margin-bottom: 16px;
    padding-bottom: 14px;
    gap: 12px;
  }

  .compare-toolbar-right {
    display: none !important; /* Full Width toggle not needed on mobile */
  }

  .compare-toolbar-left {
    width: 100%;
    gap: 8px;
  }

  .compare-series-filters {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
  }

  .compare-series-filters::-webkit-scrollbar {
    display: none;
  }

  .compare-filter-label {
    font-size: 0.78rem;
    margin-right: 2px;
    flex-shrink: 0;
  }

  .compare-filter-pill {
    padding: 5px 12px;
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  .compare-category-desc {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  /* Sticky Head-to-Head Picker Bar */
  .compare-mobile-picker {
    display: block;
    position: sticky;
    top: 68px; /* Clears mobile site header */
    z-index: 25;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
  }

  .compare-mobile-picker.is-pinned {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.12);
  }

  .compare-mobile-picker-header {
    font-size: 0.72rem;
    margin-bottom: 8px;
    color: var(--color-text-secondary, #555555);
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .compare-mobile-selectors {
    gap: 8px;
  }

  .compare-select {
    padding: 8px 10px;
    font-size: 16px; /* Prevents iOS Safari input auto-zoom */
    min-height: 42px;
    border-radius: 8px;
    line-height: 1.2;
  }

  /* Reset table container to 100% width with zero artificial overflow */
  .compare-table,
  .compare-table--extraoral,
  .compare-table--sensors,
  .compare-table--xray,
  .compare-table--software {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: auto !important;
  }

  .compare-table-wrapper {
    border-radius: 12px;
    overflow-x: hidden; /* Zero horizontal panning in 50/50 mode */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  }

  .compare-table thead,
  .compare-table tbody {
    display: block;
    width: 100%;
  }

  /* THEAD Product Cards */
  .compare-table thead tr.compare-tr-header {
    display: flex;
    width: 100%;
    background: #ffffff;
  }

  .compare-table thead th.compare-col-label {
    display: none !important; /* Hide empty label placeholder */
  }

  .compare-table thead th.compare-col-product {
    display: block;
    width: 50% !important;
    max-width: 50% !important;
    box-sizing: border-box;
    position: static !important;
    padding: 14px 10px 12px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: none;
    top: auto;
    left: auto;
    z-index: 1;
  }

  .compare-table thead th.compare-col-product.is-mobile-col-2,
  .compare-table thead th.compare-col-product:last-of-type {
    border-right: none;
  }

  .compare-product-card-top {
    align-items: center;
    text-align: center;
  }

  .compare-product-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    margin-bottom: 6px;
  }

  .compare-product-thumb-wrap {
    height: 72px !important;
    margin-bottom: 8px;
  }

  .compare-product-thumb {
    max-height: 72px !important;
    width: auto;
    object-fit: contain;
  }

  .compare-product-name {
    font-size: 0.92rem;
    line-height: 1.15;
    min-height: 2.3em;
    margin-bottom: 2px;
  }

  .compare-product-modality {
    font-size: 0.7rem;
    line-height: 1.25;
    min-height: auto;
    margin-bottom: 8px;
  }

  .compare-product-actions {
    gap: 6px;
    width: 100%;
  }

  .compare-btn {
    padding: 7px 8px;
    font-size: 0.74rem;
    border-radius: 6px;
    min-height: 34px;
  }

  /* SECTION HEADERS */
  .compare-table tbody tr.compare-section-header-tr {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #f1f4f8;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
  }

  .compare-table tbody tr.compare-section-header-tr th.compare-section-label-th {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box;
    position: static !important;
    background: transparent !important;
    border: none !important;
    padding: 10px 12px 2px;
    z-index: 1;
  }

  .compare-table tbody tr.compare-section-header-tr th.compare-section-content-th {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box;
    background: transparent !important;
    border: none !important;
    padding: 2px 12px 10px;
  }

  .compare-section-title-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
  }

  .compare-section-step {
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    border-radius: 4px;
  }

  .compare-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .compare-section-subtitle {
    font-size: 0.74rem;
    color: var(--color-text-muted, #8E959E);
  }

  .compare-accordion-indicator {
    margin-left: auto;
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
  }

  /* SPEC DATA ROWS (Stacked Spec Title + 50/50 Data Cells) */
  .compare-table tbody tr.compare-row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
  }

  .compare-table tbody tr.compare-row th.compare-row-th {
    display: block;
    width: 100% !important;
    position: static !important; /* Not sticky on mobile */
    background: #f8fafc !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding: 8px 12px;
    text-align: left;
    z-index: 1;
  }

  .compare-th-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-text-primary, #111111);
  }

  .compare-th-hint {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--color-text-muted, #8E959E);
    margin-top: 1px;
  }

  .compare-table tbody tr.compare-row td.compare-td {
    display: block;
    width: 50% !important;
    max-width: 50% !important;
    box-sizing: border-box;
    padding: 10px 8px;
    border-bottom: none;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.78rem;
  }

  .compare-table tbody tr.compare-row td.compare-td.is-mobile-col-2,
  .compare-table tbody tr.compare-row td.compare-td:last-of-type {
    border-right: none;
  }

  /* Typography & Micro-Components inside Cells */
  .compare-badge-pill {
    font-size: 0.7rem;
    padding: 4px 8px;
    white-space: normal;
    line-height: 1.25;
  }

  .compare-standouts-list {
    font-size: 0.72rem;
    gap: 4px;
  }

  .compare-standouts-list li {
    gap: 6px;
    line-height: 1.3;
  }

  .compare-positioning-text {
    font-size: 0.76rem;
    line-height: 1.45;
    margin: 0;
  }

  .compare-advantage-text {
    font-size: 0.74rem;
    padding: 6px 8px;
    line-height: 1.35;
    border-radius: 6px;
  }

  .compare-feature-val {
    font-size: 0.8rem;
  }

  .compare-feature-val-small {
    font-size: 0.74rem;
    line-height: 1.35;
  }

  .compare-tech-val {
    font-size: 0.75rem;
    line-height: 1.35;
  }

  /* Single Product / PSP View on Mobile */
  .compare-psp-spotlight-card {
    padding: 20px 16px;
    border-radius: 12px;
  }

  .compare-psp-spotlight-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .compare-psp-thumb-wrap {
    height: 160px;
  }

  .compare-table--psp {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
  }

  .compare-table--psp thead {
    display: none !important;
  }

  .compare-table--psp tbody tr.compare-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .compare-table--psp tbody tr.compare-row th.compare-row-th {
    width: 100% !important;
    position: static !important;
    background: #f8fafc;
    padding: 8px 12px;
    border-right: none;
  }

  .compare-table--psp tbody tr.compare-row td.compare-td {
    width: 100% !important;
    max-width: 100% !important;
    border-right: none;
    padding: 10px 12px;
  }

  /* Bottom CTA Card on Mobile */
  .compare-bottom-card {
    margin-top: 48px;
    padding: 28px 20px;
    border-radius: 16px;
    gap: 18px;
  }

  .compare-bottom-title {
    font-size: 1.35rem;
    line-height: 1.25;
  }

  .compare-bottom-desc {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .compare-bottom-actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .compare-bottom-actions .btn-primary,
  .compare-bottom-actions .btn-secondary {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 12px 20px;
    font-size: 0.88rem;
  }
}

/* Small Smartphone Viewports (<= 480px) */
@media (max-width: 480px) {
  .compare-container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .compare-hero {
    padding-top: 80px;
    padding-bottom: 20px;
  }

  .compare-headline {
    font-size: 1.65rem;
  }

  .compare-tab-btn {
    padding: 7px 12px;
    font-size: 0.78rem;
  }

  .compare-mobile-picker {
    top: 60px;
    padding: 8px 10px;
  }

  .compare-select {
    font-size: 15px;
    padding: 6px 8px;
  }

  .compare-product-name {
    font-size: 0.88rem;
  }

  .compare-btn {
    padding: 6px 6px;
    font-size: 0.7rem;
  }
}
