/* ============================================================================
   D54-Series 2 (basic-meter.php) — professional product page
   ============================================================================ */

.d54-page {
  --d54-font-display: 'Sora', 'Inter', sans-serif;
  --d54-font-body: 'Inter', 'Segoe UI', sans-serif;
  --d54-section-y: clamp(3.5rem, 7vw, 5.5rem);
  background: var(--clr-white);
  font-family: var(--d54-font-body);
}

.d54-page h1,
.d54-page h2,
.d54-page h3 {
  font-family: var(--d54-font-display);
  color: var(--clr-black);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.d54-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(520px, calc(100vh - var(--header-h, 80px)), 900px);
  display: flex;
  align-items: flex-start;
  padding-top: clamp(5.5rem, 10vh, 9rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  background: var(--clr-bg, #fff);
}

.d54-hero-wordmark {
  position: absolute;
  top: clamp(4%, 8vh, 10%);
  left: 0;
  right: 0;
  font-family: var(--d54-font-display);
  font-size: clamp(5rem, 16vw, 14rem);
  font-weight: 900;
  text-transform: uppercase;
  color: rgba(229, 26, 26, 0.04);
  letter-spacing: -0.05em;
  line-height: 0.8;
  z-index: 1;
  pointer-events: none;
  text-align: center;
  user-select: none;
}

.d54-hero-media-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.d54-hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
}

.d54-hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.88) 30%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0.08) 70%,
    rgba(255, 255, 255, 0) 85%
  );
}

.d54-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.d54-hero-content {
  max-width: 36rem;
  text-align: left;
}

.d54-hero-title {
  margin: 0.75rem 0 0;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-transform: none;
}

.d54-hero-lead {
  margin: 1.25rem 0 0;
  max-width: 34ch;
  font-size: clamp(1rem, 0.35vw + 0.92rem, 1.125rem);
  line-height: 1.75;
  color: var(--clr-text-body);
}

.d54-hero-actions {
  margin-top: 2rem;
}

.d54-hero-actions .btn {
  min-height: 48px;
  border-radius: var(--radius-sm);
}

/* ── Product overview (split layout) ──────────────────────────────────────── */

.d54-intro {
  padding: var(--d54-section-y) 0;
  border-bottom: 1px solid var(--clr-border-light);
}

.d54-intro-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.d54-intro-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 36rem;
}

.d54-intro-title {
  margin: 0.5rem 0 0;
  font-size: clamp(1.75rem, 4vw, 2.625rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.d54-intro-lead {
  margin: 1.35rem 0 0;
  max-width: 42ch;
  font-size: clamp(1rem, 0.35vw + 0.94rem, 1.125rem);
  line-height: 1.75;
  color: var(--clr-text-body);
}

.d54-intro .product-doc-actions {
  justify-content: flex-start;
  margin-top: 2rem;
}

.d54-intro .product-doc-actions .btn {
  min-height: 48px;
  min-width: 11.5rem;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.75rem;
}

.d54-intro-visual {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.35rem);
}

.d54-intro-media {
  overflow: hidden;
  border: 1px solid var(--clr-border-light);
  border-radius: 0 clamp(2rem, 5vw, 3.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  box-shadow: 0 12px 36px -12px rgba(0, 0, 0, 0.14);
  background: #f5f5f5;
}

.d54-intro-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
}

.d54-intro-copy .d54-highlights {
  margin-top: 2rem;
}

/* Key specs panel */
.d54-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1rem;
}

.d54-highlights--panel {
  padding: clamp(1rem, 2.5vw, 1.35rem);
  background: var(--clr-bg-alt, #f9f9f9);
  border: 1px solid var(--clr-border-light);
  border-radius: var(--radius-2xl, 12px);
}

.d54-highlight {
  text-align: left;
  padding: 0.35rem 0;
  position: relative;
}

.d54-highlight::after {
  display: none;
}

.d54-highlight strong {
  display: block;
  font-family: var(--d54-font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 800;
  color: var(--clr-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.d54-highlight span {
  display: block;
  font-size: clamp(0.78rem, 0.2vw + 0.72rem, 0.875rem);
  color: var(--clr-text-light);
  line-height: 1.45;
}

/* ── Shared section headers ───────────────────────────────────────────────── */

.d54-section-head {
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.d54-section-head--center {
  text-align: center;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.d54-section-head--center .section-label {
  justify-content: center;
}

.d54-section-head--center p {
  margin: 0.75rem auto 0;
  max-width: 36rem;
  font-size: clamp(0.98rem, 0.3vw + 0.92rem, 1.05rem);
  line-height: 1.7;
  color: var(--clr-text-body);
}

.d54-section-head h2 {
  margin: 0.4rem 0 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.d54-compare-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.d54-section-copy p {
  margin: 0.65rem 0 0;
  max-width: 42rem;
  font-size: clamp(0.98rem, 0.3vw + 0.92rem, 1.05rem);
  line-height: 1.7;
  color: var(--clr-text-body);
}

.d54-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  font-family: var(--d54-font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--clr-primary);
  background: var(--clr-primary-bg);
  border: 1px solid var(--clr-primary-border);
  border-radius: var(--radius-pill, 999px);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Compare block ────────────────────────────────────────────────────────── */

.d54-compare {
  padding: var(--d54-section-y) 0;
}

.d54-choose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
}

.d54-choose-col {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--clr-bg-alt, #f9f9f9);
  border: 1px solid var(--clr-border-light);
  border-radius: var(--radius-2xl, 12px);
}

.d54-choose-col h3 {
  font-size: clamp(1.05rem, 1.5vw, 1.15rem);
  font-weight: 650;
  margin: 0 0 0.85rem;
}

.d54-choose-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.d54-choose-col li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.65rem;
  font-size: clamp(0.92rem, 0.25vw + 0.86rem, 0.98rem);
  line-height: 1.65;
  color: var(--clr-text-body);
}

.d54-choose-col li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--clr-primary);
}

/* Comparison table */
.d54-table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--clr-border-light);
  border-radius: var(--radius-xl, 8px);
  background: var(--clr-white);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.d54-table-scroll-hint {
  display: none;
  margin: 0;
  padding: 0.65rem 1rem;
  font-family: var(--d54-font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--clr-text-light);
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
  border-bottom: 1px solid var(--clr-border-light);
}

.d54-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: clamp(0.88rem, 0.2vw + 0.84rem, 0.94rem);
}

.d54-table thead th {
  text-align: left;
  padding: 1rem 1.15rem;
  font-family: var(--d54-font-display);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clr-text-light);
  border-bottom: 2px solid var(--clr-border);
  background: #f3f3f5;
}

.d54-table thead th:first-child {
  width: 28%;
}

.d54-table tbody th,
.d54-table tbody td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--clr-border-light);
  color: var(--clr-text-body);
  vertical-align: top;
  line-height: 1.6;
  text-align: left;
}

.d54-table tbody th {
  font-family: var(--d54-font-display);
  font-weight: 650;
  color: var(--clr-black);
  width: 28%;
}

.d54-table tbody tr:last-child th,
.d54-table tbody tr:last-child td {
  border-bottom: none;
}

.d54-table tbody tr:nth-child(odd) th,
.d54-table tbody tr:nth-child(odd) td {
  background: var(--clr-white);
}

.d54-table tbody tr:nth-child(even) th,
.d54-table tbody tr:nth-child(even) td {
  background: #f6f7f9;
}

.d54-table tbody tr:hover th,
.d54-table tbody tr:hover td {
  background: #fef5f5;
}

.d54-table tbody td strong {
  color: var(--clr-black);
  font-weight: 650;
}

@media (max-width: 768px) and (min-width: 641px) {
  .d54-table-scroll-hint {
    display: block;
  }

  .d54-table-wrap:focus-within {
    outline: 2px solid var(--clr-primary-border);
    outline-offset: 2px;
  }
}

@media (max-width: 640px) {
  .d54-table-wrap {
    overflow: visible;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .d54-table-scroll-hint {
    display: none;
  }

  .d54-table {
    min-width: 0;
    display: block;
  }

  .d54-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .d54-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  .d54-table tbody tr {
    display: block;
    border: 1px solid var(--clr-border-light);
    border-radius: var(--radius-xl, 8px);
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  }

  .d54-table tbody tr:nth-child(odd),
  .d54-table tbody tr:nth-child(even) {
    background: var(--clr-white);
  }

  .d54-table tbody th {
    display: block;
    width: auto;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    background: #f3f3f5 !important;
    border-bottom: 1px solid var(--clr-border-light);
  }

  .d54-table tbody td {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 0.65rem 0.85rem;
    align-items: start;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--clr-border-light);
    background: var(--clr-white) !important;
  }

  .d54-table tbody td:last-child {
    border-bottom: none;
  }

  .d54-table tbody td::before {
    content: attr(data-label);
    font-family: var(--d54-font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--clr-primary);
    line-height: 1.4;
    padding-top: 0.1rem;
  }

  .d54-table tbody tr:hover th,
  .d54-table tbody tr:hover td {
    background: inherit;
  }
}

/* ── Model cards ──────────────────────────────────────────────────────────── */

.d54-models {
  padding: var(--d54-section-y) 0;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.d54-model-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

.d54-model-card {
  background: var(--clr-white);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-2xl, 12px);
  padding: clamp(1.35rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.d54-model-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.07);
}

.d54-model-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.d54-model-card-head h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.d54-model-media {
  background: #f5f5f5;
  border-radius: var(--radius-xl, 8px);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.15rem;
  overflow: hidden;
}

.d54-model-media img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  padding: 1rem;
}

.d54-model-card > p {
  margin: 0 0 1rem;
  font-size: clamp(0.92rem, 0.25vw + 0.86rem, 0.98rem);
  line-height: 1.65;
}

.d54-model-features {
  margin: 0 0 1.15rem;
  padding: 0;
  list-style: none;
}

.d54-model-features li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.5rem;
  font-size: clamp(0.88rem, 0.2vw + 0.84rem, 0.94rem);
  line-height: 1.6;
  color: var(--clr-text-body);
}

.d54-model-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--clr-primary);
}

.d54-spec-rows {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--clr-border-light);
}

.d54-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--clr-border-light);
  font-size: clamp(0.86rem, 0.2vw + 0.82rem, 0.92rem);
}

.d54-spec-row:last-child {
  border-bottom: none;
}

.d54-spec-row span {
  color: var(--clr-text-light);
  flex-shrink: 0;
}

.d54-spec-row strong {
  font-family: var(--d54-font-display);
  color: var(--clr-black);
  text-align: right;
  font-weight: 650;
}

.d54-model-card .btn {
  margin-top: 1.25rem;
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius-sm);
}

/* ── Shared platform specs ────────────────────────────────────────────────── */

.d54-platform {
  padding: var(--d54-section-y) 0;
}

.d54-platform-panel {
  border: 1px solid var(--clr-border-light);
  border-radius: var(--radius-2xl, 12px);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--clr-white);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.03);
}

.d54-platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2.5rem;
  margin-top: 1.25rem;
}

/* ── Bottom CTA ───────────────────────────────────────────────────────────── */

.d54-cta {
  padding: var(--d54-section-y) 0 clamp(3.5rem, 7vw, 5rem);
}

.d54-cta-inner {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 2.75rem);
  background: var(--clr-black);
  color: var(--clr-white);
  border-radius: var(--radius-2xl, 12px);
}

.d54-cta-inner h2 {
  color: var(--clr-white);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
}

.d54-cta-inner p {
  color: rgba(255, 255, 255, 0.72);
  margin: 0 auto 1.35rem;
  max-width: 38ch;
  font-size: clamp(0.92rem, 0.25vw + 0.86rem, 0.98rem);
  line-height: 1.65;
}

.d54-cta-inner .product-doc-actions {
  justify-content: center;
  margin-top: 0;
}

.d54-cta-inner .product-doc-actions .btn {
  min-height: 48px;
  border-radius: var(--radius-sm);
}

.d54-cta-inner .btn-outline {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--clr-white);
}

.d54-cta-inner .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--clr-white);
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .d54-choose-grid,
  .d54-model-grid,
  .d54-platform-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .d54-intro-split {
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 2.75rem);
  }

  .d54-intro-copy {
    max-width: none;
  }

  .d54-intro-lead {
    max-width: none;
  }

  .d54-hero {
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: 2.5rem;
  }

  .d54-hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.94) 0%,
      rgba(255, 255, 255, 0.82) 45%,
      rgba(255, 255, 255, 0.4) 100%
    );
  }

  .d54-hero-actions {
    flex-direction: column;
  }

  .d54-hero-actions .btn {
    width: 100%;
  }

  .d54-compare-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .d54-intro .product-doc-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .d54-intro .product-doc-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .d54-cta-inner .product-doc-actions {
    flex-direction: column;
  }

  .d54-cta-inner .product-doc-actions .btn {
    width: 100%;
  }
}

@media (max-width: 400px) {
  .d54-highlights {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .d54-model-card {
    transition: none;
  }

  .d54-table tbody tr:hover th,
  .d54-table tbody tr:hover td {
    background: inherit;
  }
}
