/* Trang chi tiết sim */
.page-detail {
  padding-bottom: 3rem;
}

.topbar--compact {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.topbar__inner--compact {
  padding: 0.65rem 0;
  gap: 0.75rem;
}

.back-link {
  margin-right: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--gold);
}

.detail-hotline {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.detail-page {
  padding: 1rem 0 2.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 120px);
}

.detail-loading {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a:hover {
  color: var(--gold-dark);
}

.breadcrumb span[aria-current] {
  color: var(--text);
  font-weight: 600;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}

.detail-main {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.detail-card--sim .detail-body {
  padding-bottom: 1.35rem;
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Hero — premium card header */
.detail-hero {
  position: relative;
  padding: 1.5rem 1.75rem 1.35rem;
  background: linear-gradient(155deg, #0a0f1c 0%, #121a2e 45%, #1a2744 100%);
  color: #fff;
  overflow: hidden;
}

.detail-hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.04) 0%, transparent 40%);
  pointer-events: none;
}

.detail-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f59e0b, #fbbf24, #f59e0b, transparent);
  opacity: 0.7;
}

.detail-hero__glow {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.detail-hero--viettel .detail-hero__glow {
  background: radial-gradient(circle, rgba(225, 29, 72, 0.2) 0%, transparent 70%);
}

.detail-hero--mobifone .detail-hero__glow {
  background: radial-gradient(circle, rgba(5, 150, 105, 0.2) 0%, transparent 70%);
}

.detail-hero--vinaphone .detail-hero__glow {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 70%);
}

.detail-hero__row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.detail-hero__row--top {
  margin-bottom: 1.1rem;
}

.detail-hero__main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.detail-hero__label {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
}

.detail-hero__row--main {
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.detail-hero__net {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
}

.detail-hero__net-ring {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: auto;
  height: 26px;
  padding: 0 0.5rem;
  font-size: 0.52rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid;
  border-radius: 999px;
}

.detail-hero__info {
  min-width: 0;
  text-align: left;
}

.detail-hero__number {
  font-size: clamp(1.6rem, 5.5vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.detail-hero__type {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

.detail-hero__price-box {
  flex-shrink: 0;
  text-align: right;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}

.detail-hero__price-note {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
}

.detail-hero__price-wrap {
  text-align: right;
  flex-shrink: 0;
}

.detail-hero__old {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: line-through;
  margin-bottom: 0.1rem;
}

.detail-hero__price {
  margin: 0;
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  font-weight: 800;
  color: #fbbf24;
  line-height: 1.2;
  white-space: nowrap;
}

.detail-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
}

.detail-status__pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.detail-status--available {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.detail-status--available .detail-status__pulse {
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.35);
  animation: pulse 2s ease infinite;
}

.detail-status--held {
  background: rgba(251, 191, 36, 0.15);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.detail-status--held .detail-status__pulse {
  background: #fbbf24;
}

.detail-status--sold {
  background: rgba(248, 113, 113, 0.15);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.detail-status--sold .detail-status__pulse {
  background: #f87171;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.detail-hero__cta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.8rem 1.15rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ea580c 100%);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.detail-hero__cta svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.detail-hero__cta:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.5);
}

.detail-body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.info-block {
  margin-bottom: 1.25rem;
}

.detail-section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 1.1rem;
  letter-spacing: -0.02em;
}

.detail-section-title__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #2563eb;
  border-radius: 10px;
  flex-shrink: 0;
}

/* Thông tin sim — grid tiles */
.info-specs {
  margin: 0;
}

.info-specs--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  background: transparent;
  border: none;
  overflow: visible;
}

.info-spec--tile {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.info-spec--tile:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.info-spec--tile dt {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.info-spec--tile dd {
  margin: 0;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.info-spec--highlight {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
  border-color: rgba(245, 158, 11, 0.25);
}

.info-spec--highlight .info-spec__val--price {
  font-size: 1.35rem;
  align-items: flex-start;
}

.info-spec__val--number {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.03em;
}

.info-spec__val--price {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ea580c;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.info-spec__old {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: line-through;
}

.info-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  line-height: 1.2;
}

.info-badge--viettel { background: #ffe4e6; color: var(--viettel); }
.info-badge--vinaphone { background: #dbeafe; color: var(--vina); }
.info-badge--mobifone { background: #d1fae5; color: var(--mobi); }
.info-badge--gmobile { background: #ede9fe; color: #7c3aed; }
.info-badge--vietnamobile { background: #cffafe; color: #0891b2; }

.info-status {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
}

.info-status.detail-status--available {
  background: #dcfce7;
  color: #15803d;
}

.info-status.detail-status--held {
  background: #fef3c7;
  color: #b45309;
}

.info-status.detail-status--sold {
  background: #fee2e2;
  color: #b91c1c;
}

.info-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
}

.info-share__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.info-share__btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.35rem 0.5rem 0.35rem 0.65rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.info-share__btn:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.info-share__url {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-share__copy {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-dark);
  padding: 0.25rem 0.55rem;
  background: var(--gold-soft);
  border-radius: 6px;
}

/* Cam kết — grid đẹp hơn */
.detail-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0;
}

.perk-mini {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 0.78rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.perk-mini__ico {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #b45309;
  border-radius: 10px;
}

.perk-mini:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  border-color: var(--border-strong);
}

.perk-mini strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.15rem;
}

.perk-mini > div > span {
  display: block;
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.74rem;
}

/* Form đặt hàng — card riêng, tách khỏi thông tin sim */
.order-section {
  position: static;
  border-top: 3px solid var(--gold);
}

.order-section__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.15rem 1.5rem;
  background: linear-gradient(135deg, #fffbeb 0%, #fff 60%);
  border-bottom: 1px solid var(--border);
}

.order-section__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.order-section__head h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0;
}

.order-section__head p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.15rem 0 0;
}

.order-form {
  padding: 1.35rem 1.5rem 0;
}

.order-form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem 1rem;
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-error {
  display: block;
  color: #dc2626;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.order-hold-form {
  padding: 0.65rem 1.5rem 1.35rem;
  border-top: 1px dashed var(--border);
  margin-top: 0.25rem;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.form-group label .req {
  color: var(--viettel);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.form-group textarea {
  min-height: 72px;
  resize: vertical;
}

.order-summary {
  margin: 1rem 1.5rem 0;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.order-summary__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.order-summary__row:last-child {
  margin-bottom: 0;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-strong);
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
}

.order-summary__row:last-child span:last-child {
  color: #ea580c;
}

.order-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.5rem 0;
}

.btn-order {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: 0.2s;
}

.btn-order--primary {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.btn-order--primary:hover {
  filter: brightness(1.05);
}

.btn-order--hold {
  background: #fff;
  border: 1.5px solid var(--navy);
  color: var(--navy);
}

.btn-order--hold:hover {
  background: var(--border-light);
}

.btn-order:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Sim liên quan */
.related {
  margin-top: 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.related__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--navy);
}

.related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.related__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: 0.2s;
}

.related__item:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

.related__ring {
  width: auto;
  height: 28px;
  flex-shrink: 0;
  padding: 0 0.45rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  display: inline-grid;
  place-items: center;
  font-size: 0.48rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.related__num {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e3a8a;
}

.related__price {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ea580c;
}

/* 404 */
.detail-404 {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.detail-404 h1 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.detail-404 p {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.detail-404 .btn-order--primary {
  display: inline-block;
  width: auto;
  padding: 0.65rem 1.5rem;
}

@media (max-width: 900px) {
  .detail-grid {
    max-width: none;
  }

  .order-form__grid {
    grid-template-columns: 1fr;
  }

  .order-section__head,
  .order-form,
  .order-summary,
  .order-actions,
  .order-hold-form {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .order-summary {
    margin-left: 1.15rem;
    margin-right: 1.15rem;
  }

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

  .detail-perks {
    grid-template-columns: 1fr;
  }

  .info-specs--grid {
    grid-template-columns: 1fr;
  }

  .detail-hero__main {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .detail-hero__price-box {
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
  }

  .detail-hero__price-note {
    width: 100%;
  }

  .detail-hero__old {
    display: inline;
    margin: 0;
  }

  .detail-body {
    padding: 1.25rem 1.15rem 1.5rem;
  }

  .detail-hero {
    padding: 1.25rem 1.15rem 1.15rem;
  }

  .detail-status {
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 768px) {
  .topbar__inner--compact .logo__text {
    display: none;
  }

  .detail-hotline {
    font-size: 0.78rem;
  }
}
