/* Spec selector (sellphone-spec-selector) – scoped for checkout redesign */
.spec-selector-wrap *,
.spec-selector-wrap *::before,
.spec-selector-wrap *::after { box-sizing: border-box; }

.spec-selector-wrap {
  --spec-green:        #1a9e5a;
  --spec-green-dark:   #0d6b3e;
  --spec-green-pale:   #f0faf5;
  --spec-green-border: #c6e9d7;
  --spec-orange:       #f47c20;
  --spec-text:         #111827;
  --spec-muted:        #6b7280;
  --spec-border:       #e5e7eb;
  --spec-bg:           #fff;
  --spec-r:            10px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Progress bar */
.spec-selector-wrap .progress-wrap {
  background: #fff;
  border-bottom: 1px solid var(--spec-border);
  padding: 0 24px;
  margin-bottom: 0;
}

.spec-selector-wrap .progress-steps {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
}

.spec-selector-wrap .prog-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px 0;
  position: relative;
}

.spec-selector-wrap .prog-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.spec-selector-wrap .prog-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--spec-border);
  background: #fff;
  color: var(--spec-muted);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .25s;
}
.spec-selector-wrap .prog-dot.active { background: var(--spec-green-dark); border-color: var(--spec-green-dark); color: #fff; }
.spec-selector-wrap .prog-dot.done   { background: var(--spec-green-dark); border-color: var(--spec-green-dark); color: #fff; }

.spec-selector-wrap .prog-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--spec-muted);
  transition: color .25s;
}
.spec-selector-wrap .prog-label.active { color: var(--spec-green-dark); font-weight: 700; }
.spec-selector-wrap .prog-label.done   { color: var(--spec-green); }

.spec-selector-wrap .prog-underline {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--spec-border);
}
.spec-selector-wrap .prog-underline-fill {
  height: 100%;
  background: var(--spec-green-dark);
  width: 0%;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}

/* Page grid */
.spec-selector-wrap .spec-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 860px) {
  .spec-selector-wrap .spec-page { grid-template-columns: 1fr; gap: 24px; }
  .spec-selector-wrap .device-card { position: static; }
}

/* Mobile: reduce scrolling – compact layout */
@media (max-width: 768px) {
  .spec-selector-wrap .progress-wrap {
    padding: 0 12px;
    margin-bottom: 0;
  }
  .spec-selector-wrap .prog-step {
    padding: 8px 4px 0;
  }
  .spec-selector-wrap .prog-inner {
    margin-bottom: 6px;
    gap: 4px;
  }
  .spec-selector-wrap .prog-dot {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
  .spec-selector-wrap .prog-label {
    font-size: 11px;
  }
  .spec-selector-wrap .prog-underline {
    height: 2px;
  }

  .spec-selector-wrap .spec-page {
    padding: 16px 12px 32px;
    gap: 16px;
  }

  .spec-selector-wrap .device-card .img-area {
    padding: 12px 12px 0;
  }
  .spec-selector-wrap .device-title {
    font-size: 16px;
    margin-bottom: 8px;
  }
  .spec-selector-wrap .badge-row {
    margin-bottom: 8px;
  }
  .spec-selector-wrap .img-area img {
    max-height: 140px;
    object-fit: contain;
  }
  .spec-selector-wrap .stats-row .stat {
    padding: 10px 12px;
    font-size: 12px;
  }
  .spec-selector-wrap .stat strong {
    font-size: 14px;
  }
  .spec-selector-wrap .card-info {
    padding: 0 12px 12px;
  }
  .spec-selector-wrap .price-box {
    padding: 10px 12px;
    margin-top: 10px;
  }
  .spec-selector-wrap .price-num {
    font-size: 32px;
  }
  .spec-selector-wrap .price-sym {
    font-size: 18px;
  }

  .spec-selector-wrap .quiz {
    padding-top: 0;
  }
  .spec-selector-wrap .q-title {
    font-size: 20px;
    margin-bottom: 4px;
  }
  .spec-selector-wrap .q-sub {
    font-size: 13px;
    margin-bottom: 12px;
  }
  .spec-selector-wrap .opt-list {
    margin-bottom: 12px;
  }
  .spec-selector-wrap .opt {
    padding: 12px 14px;
    gap: 12px;
  }
  .spec-selector-wrap .opt-radio {
    width: 18px;
    height: 18px;
  }
  .spec-selector-wrap .opt-dot {
    width: 8px;
    height: 8px;
  }
  .spec-selector-wrap .opt-name {
    font-size: 15px;
  }
  .spec-selector-wrap .opt-desc {
    font-size: 12px;
    margin-top: 2px;
  }
  .spec-selector-wrap .opt-tag {
    font-size: 10px;
    padding: 2px 8px;
  }

  .spec-selector-wrap .req-box {
    padding: 12px 14px;
    margin-bottom: 12px;
  }
  .spec-selector-wrap .req-title {
    font-size: 13px;
    margin-bottom: 8px;
  }
  .spec-selector-wrap .req-list li {
    font-size: 12px;
    gap: 6px;
  }
  .spec-selector-wrap .back-only {
    margin-top: 8px;
    font-size: 13px;
  }

  .spec-selector-wrap .reveal-price {
    font-size: 44px;
    margin-bottom: 4px;
  }
  .spec-selector-wrap .reveal-price sup {
    font-size: 24px;
  }
  .spec-selector-wrap .reveal-lbl {
    font-size: 14px;
    margin-bottom: 6px;
  }
  .spec-selector-wrap .reveal-sub {
    font-size: 13px;
    margin-bottom: 16px;
  }
  .spec-selector-wrap .timer-row {
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 18px;
  }
  .spec-selector-wrap .sell-btn {
    padding: 16px;
    font-size: 16px;
    margin-bottom: 16px;
  }
  .spec-selector-wrap .microcopy {
    gap: 14px;
    font-size: 12px;
    margin-bottom: 18px;
  }
}

/* Device card (left) */
.spec-selector-wrap .device-card {
  position: sticky;
  top: 24px;
  border: 1px solid var(--spec-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.spec-selector-wrap .device-card .img-area {
  padding: 20px 20px 0;
}

.spec-selector-wrap .device-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--spec-text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.spec-selector-wrap .badge-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.spec-selector-wrap .badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--spec-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.spec-selector-wrap .badge.green { color: var(--spec-green-dark); }

.spec-selector-wrap .img-area img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.spec-selector-wrap .card-info { padding: 0 20px 20px; }

.spec-selector-wrap .price-box {
  background: var(--spec-green-pale);
  border: 1px solid var(--spec-green-border);
  border-radius: var(--spec-r);
  padding: 14px 16px;
  margin-top: 16px;
}

.spec-selector-wrap .price-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--spec-green);
  margin-bottom: 5px;
}

.spec-selector-wrap .price-row { display: flex; align-items: baseline; gap: 3px; }
.spec-selector-wrap .price-sym { font-size: 24px; font-weight: 700; color: var(--spec-green-dark); }
.spec-selector-wrap .price-num { font-size: 48px; font-weight: 800; line-height: 1; color: var(--spec-green-dark); }
.spec-selector-wrap .price-sub { font-size: 13px; color: var(--spec-muted); margin-top: 4px; }

.spec-selector-wrap .price-track {
  margin-top: 10px;
  height: 5px;
  background: #cde8d8;
  border-radius: 4px;
  overflow: hidden;
}
.spec-selector-wrap .price-fill {
  height: 100%;
  background: var(--spec-green);
  border-radius: 4px;
  width: 0%;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}

.spec-selector-wrap .stats-row {
  display: flex;
  border-top: 1px solid var(--spec-border);
  border-bottom: 1px solid var(--spec-border);
}
.spec-selector-wrap .stat {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.spec-selector-wrap .stat:first-child { border-right: 1px solid var(--spec-border); }
.spec-selector-wrap .stat strong { font-size: 16px; font-weight: 800; }
.spec-selector-wrap .stars { color: #f59e0b; font-size: 14px; }

/* Quiz (right) */
.spec-selector-wrap .quiz { padding-top: 4px; }

.spec-selector-wrap .step-panel { display: none; }
.spec-selector-wrap .step-panel.active {
  display: block;
  animation: specFadeUp .22s ease forwards;
}

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

.spec-selector-wrap .q-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; line-height: 1.2; }
.spec-selector-wrap .q-sub   { font-size: 15px; color: var(--spec-muted); margin-bottom: 24px; }
.spec-selector-wrap .q-sub a { color: var(--spec-green); text-decoration: none; }
.spec-selector-wrap .q-sub a:hover { text-decoration: underline; }

/* Option list */
.spec-selector-wrap .opt-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
  border: 1px solid var(--spec-border);
  border-radius: var(--spec-r);
  overflow: hidden;
}

.spec-selector-wrap .opt {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: none;
  border-bottom: 1px solid var(--spec-border);
  background: #fff;
  cursor: pointer;
  transition: background .12s;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.spec-selector-wrap .opt:last-child { border-bottom: none; }
.spec-selector-wrap .opt:hover    { background: var(--spec-green-pale); }
.spec-selector-wrap .opt.selected { background: #e8f7f1; }

.spec-selector-wrap .opt-radio {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color .12s;
}
.spec-selector-wrap .opt.selected .opt-radio { border-color: var(--spec-green-dark); }

.spec-selector-wrap .opt-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--spec-green-dark);
  opacity: 0; transform: scale(0);
  transition: opacity .12s, transform .12s;
}
.spec-selector-wrap .opt.selected .opt-dot { opacity: 1; transform: scale(1); }

.spec-selector-wrap .opt-text { flex: 1; }
.spec-selector-wrap .opt-name { font-size: 17px; font-weight: 600; color: var(--spec-text); }
.spec-selector-wrap .opt-desc { font-size: 14px; color: var(--spec-muted); margin-top: 3px; line-height: 1.4; }

.spec-selector-wrap .opt-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--spec-green-dark);
  background: var(--spec-green-pale);
  border: 1px solid var(--spec-green-border);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.spec-selector-wrap .opt-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--spec-green-dark);
  white-space: nowrap;
}

.spec-selector-wrap .opt.flash::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(26,158,90,.12);
  animation: specFlashOut .3s ease forwards;
}
@keyframes specFlashOut { from{opacity:1} to{opacity:0} }

/* Requirements box */
.spec-selector-wrap .req-box {
  background: #fafafa;
  border: 1px solid var(--spec-border);
  border-radius: var(--spec-r);
  padding: 18px 20px;
  margin-bottom: 24px;
  display: none;
}
.spec-selector-wrap .req-box.show { display: block; animation: specFadeUp .2s ease; }

.spec-selector-wrap .req-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }

.spec-selector-wrap .req-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.spec-selector-wrap .req-list li {
  font-size: 13px;
  color: var(--spec-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.spec-selector-wrap .req-list li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--spec-muted);
  flex-shrink: 0;
  margin-top: 7px;
}

/* Buttons */
.spec-selector-wrap .btn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spec-selector-wrap .btn-back {
  padding: 12px 24px;
  background: #f3f4f6;
  border: 1px solid var(--spec-border);
  border-radius: var(--spec-r);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--spec-muted);
  cursor: pointer;
  transition: background .12s;
}
.spec-selector-wrap .btn-back:hover { background: #e5e7eb; }

.spec-selector-wrap .btn-next {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 32px;
  background: var(--spec-orange);
  border: none;
  border-radius: var(--spec-r);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background .12s;
}
.spec-selector-wrap .btn-next:hover  { background: #e06810; }
.spec-selector-wrap .btn-next:active { background: #c95e08; }

.spec-selector-wrap .back-only {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--spec-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  margin-top: 12px;
}
.spec-selector-wrap .back-only:hover { color: var(--spec-text); }

/* Price reveal step (Get Paid) – centered, clean layout */
.spec-selector-wrap .step-panel-reveal {
  text-align: center;
  padding: 24px 0 32px;
}
.spec-selector-wrap .step-panel-reveal .reveal-block {
  max-width: 420px;
  margin: 0 auto;
}
.spec-selector-wrap .reveal-lbl {
  font-size: 15px;
  color: var(--spec-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.spec-selector-wrap .reveal-price {
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 6px;
  color: #16a34a;
}

.spec-selector-wrap .reveal-price span {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  color: #16a34a;
}
.spec-selector-wrap .reveal-price sup {
  font-size: 28px;
  vertical-align: top;
  margin-right: 2px;
  color: #16a34a;
}
.spec-selector-wrap .reveal-sub {
  font-size: 14px;
  color: var(--spec-muted);
  margin-bottom: 20px;
}
.spec-selector-wrap .timer-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff8f2;
  border: 1px solid #fdba74;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  color: var(--spec-muted);
  margin-bottom: 24px;
}
.spec-selector-wrap .timer-row .timer-icon {
  flex-shrink: 0;
  color: var(--spec-orange);
}
.spec-selector-wrap .timer-row strong {
  color: var(--spec-orange);
  font-weight: 700;
}
.spec-selector-wrap .sell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 20px;
  padding: 18px 24px;
  background: var(--spec-orange) !important;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background .2s;
}
.spec-selector-wrap .sell-btn svg {
  flex-shrink: 0;
}
.spec-selector-wrap .sell-btn:hover  { background: #e06810; }
.spec-selector-wrap .sell-btn:active { background: #c95e08; }
.spec-selector-wrap .microcopy {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--spec-muted);
  margin-bottom: 24px;
}
.spec-selector-wrap .microcopy .micro-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.spec-selector-wrap .microcopy .micro-item svg {
  flex-shrink: 0;
  color: var(--spec-muted);
}
.spec-selector-wrap .step-panel-reveal .back-only {
  display: block;
  margin: 0 auto;
  font-size: 14px;
  color: var(--spec-muted);
}
.spec-selector-wrap .step-panel-reveal .back-only:hover {
  color: var(--spec-text);
}

/* Condition-only flow (e.g. watch: no carrier/storage choice – only Other / .) */
.spec-condition-only #specStep1,
.spec-condition-only #specStep2 {
  display: none !important;
}

/* Hide legacy checkout UI when spec selector is active */
.spec-selector-wrap .carrier-container,
.spec-selector-wrap .capacity-container,
.spec-selector-wrap .processor-container,
.spec-selector-wrap .ram-container,
.spec-selector-wrap .device_quest6 .seltab,
.spec-selector-wrap .device_quest6 .furdetails { display: none !important; }
