/* ============================================
   PURCHASE PAGE — Onyx Visual
   ============================================ */

/* ============================================
   PRODUCT DETAIL (Section 2)
   ============================================ */

.product-detail {
  background: var(--bg-secondary);
}

.product-detail__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
  align-items: center;
}

@media (min-width: 1024px) {
  .product-detail__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-16);
  }
}

/* Product image frame */
.product-detail__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail__frame {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 9 / 16;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 80px rgba(59, 130, 246, 0.08),
    0 24px 48px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
}

/* LED screen simulation */
.product-detail__screen {
  position: absolute;
  inset: 6px;
  border-radius: var(--radius-md);
  background: linear-gradient(170deg,
    rgba(59, 130, 246, 0.10),
    rgba(6, 182, 212, 0.06),
    rgba(59, 130, 246, 0.03));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  animation: screen-pulse 6s ease infinite;
}

@keyframes screen-pulse {
  0%, 100% {
    background: linear-gradient(170deg, rgba(59,130,246,0.10), rgba(6,182,212,0.06), rgba(59,130,246,0.03));
  }
  50% {
    background: linear-gradient(170deg, rgba(6,182,212,0.12), rgba(59,130,246,0.08), rgba(6,182,212,0.04));
  }
}

/* Pixel grid overlay */
.product-detail__screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 4px 4px;
  pointer-events: none;
}

.product-detail__screen-icon {
  opacity: 0.3;
  position: relative;
  z-index: 1;
}

.product-detail__screen-name {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 1.25rem;
  color: var(--text-primary);
  opacity: 0.5;
  position: relative;
  z-index: 1;
}

.product-detail__screen-dims {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

/* Ambient glow */
.product-detail__glow {
  position: absolute;
  width: 130%;
  height: 130%;
  top: -15%;
  left: -15%;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* Content side */
.product-detail__content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.product-detail__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  width: fit-content;
}

.product-detail__badge svg {
  width: 14px;
  height: 14px;
}

.product-detail__name {
  margin-top: var(--sp-1);
}

.product-detail__ref {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  letter-spacing: 0.03em;
}

.product-detail__description {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.product-detail__price-block {
  padding: var(--sp-5) var(--sp-6);
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.product-detail__price {
  font-family: var(--font-heading);
  font-weight: var(--fw-extrabold);
  font-size: 1.75rem;
  color: var(--text-primary);
}

.product-detail__price span {
  font-size: 0.875rem;
  font-weight: var(--fw-regular);
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.product-detail__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.product-detail__highlight-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.product-detail__highlight-tag svg {
  width: 14px;
  height: 14px;
  color: var(--accent-primary);
}

/* ============================================
   KEY FEATURES (Section 3)
   ============================================ */

.key-features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 640px) {
  .key-features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .key-features__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-8);
  }
}

.feature-card {
  padding: var(--sp-6);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.feature-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-5);
  transition: all var(--transition-base);
}

.feature-card:hover .feature-card__icon {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-primary);
}

.feature-card__icon svg {
  width: 22px;
  height: 22px;
  color: var(--accent-primary);
}

.feature-card__title {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: 1.0625rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

.feature-card__text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   FULL SPECIFICATIONS TABLE (Section 4)
   ============================================ */

.specs-section {
  background: var(--bg-secondary);
}

.specs-table-wrapper {
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-base);
}

.specs-table tr:last-child {
  border-bottom: none;
}

.specs-table tr:nth-child(even) {
  background: rgba(59, 130, 246, 0.015);
}

.specs-table tr:hover {
  background: rgba(59, 130, 246, 0.04);
}

.specs-table td {
  padding: var(--sp-4) var(--sp-6);
  font-size: 0.9375rem;
  vertical-align: top;
}

.specs-table td:first-child {
  color: var(--text-muted);
  font-weight: var(--fw-medium);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: 40%;
}

.specs-table td:last-child {
  color: var(--text-primary);
  font-weight: var(--fw-medium);
}

/* Category header rows */
.specs-table__category {
  background: var(--bg-tertiary) !important;
}

.specs-table__category td {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  padding: var(--sp-3) var(--sp-6);
}

/* ============================================
   WHO IS THIS FOR (Section 5)
   ============================================ */

.who-for__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}

@media (min-width: 640px) {
  .who-for__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .who-for__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6);
  }
}

/* Last 2 cards centered on desktop (5 total) */
@media (min-width: 1024px) {
  .who-for__grid .who-for-card:nth-child(4) {
    grid-column: 1 / 2;
    justify-self: end;
    max-width: calc((var(--container-max) - var(--sp-6) * 2) / 3);
    width: 100%;
  }
  .who-for__grid .who-for-card:nth-child(5) {
    grid-column: 2 / 3;
    justify-self: start;
    max-width: calc((var(--container-max) - var(--sp-6) * 2) / 3);
    width: 100%;
  }
}

.who-for-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.who-for-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.who-for-card__icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.who-for-card__icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
}

.who-for-card__title {
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}

.who-for-card__text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   ROI CALCULATOR (Section 6)
   ============================================ */

.roi-section {
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.roi-section__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 50% 40% at 30% 60%, rgba(59,130,246,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 70% 30%, rgba(6,182,212,0.04) 0%, transparent 50%);
}

.roi__inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
}

.roi__card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--sp-10);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

@media (max-width: 639px) {
  .roi__card {
    padding: var(--sp-6);
  }
}

.roi__intro {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-8);
  text-align: center;
}

.roi__form {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
}

@media (min-width: 640px) {
  .roi__form {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }
}

.roi__field label {
  display: block;
  font-family: var(--font-heading);
  font-weight: var(--fw-semibold);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

.roi__field input {
  width: 100%;
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 1.25rem;
  color: var(--text-primary);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  -moz-appearance: textfield;
}

.roi__field input::-webkit-inner-spin-button,
.roi__field input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.roi__field input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.roi__field input::placeholder {
  color: var(--text-muted);
  font-weight: var(--fw-regular);
  font-size: 0.9375rem;
}

.roi__field-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--sp-2);
}

/* Result box */
.roi__result {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  text-align: center;
  transition: all 0.4s ease;
}

.roi__result-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

.roi__result-value {
  font-family: var(--font-heading);
  font-weight: var(--fw-extrabold);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--accent-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--sp-2);
  min-height: 44px;
  line-height: 1.2;
}

.roi__result-note {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-6);
}

.roi__result-note strong {
  color: var(--text-primary);
}

/* ============================================
   PURCHASE FINAL CTA (Section 7)
   ============================================ */

.purchase-final-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.purchase-final-cta__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(59,130,246,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 30% 80%, rgba(6,182,212,0.05) 0%, transparent 50%);
}

.purchase-final-cta__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 41, 59, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 41, 59, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, black 0%, transparent 100%);
}

.purchase-final-cta__content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
}

.purchase-final-cta__title {
  margin-bottom: var(--sp-4);
}

.purchase-final-cta__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-8);
}

.purchase-final-cta__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.purchase-final-cta__note {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

.purchase-final-cta__note svg {
  width: 16px;
  height: 16px;
  color: var(--success);
}
