:root {
  --navy: #07166a;
  --navy-2: #0b247f;
  --ink: #111827;
  --muted: #657085;
  --line: #e3e8f3;
  --surface: #ffffff;
  --soft: #f5f7fb;
  --accent: #5d2de1;
  --ok: #168a55;
  --warn: #b15f00;
  --sold: #7a8190;
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 82px;
  padding: 10px clamp(16px, 4vw, 54px);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 14px 36px rgba(4, 12, 58, .22);
}

.brand {
  flex: 0 0 auto;
  width: 158px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
}

.nav-links a,
.line-button {
  border-radius: 8px;
  padding: 12px 15px;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.nav-links a {
  background: rgba(255, 255, 255, .08);
}

.nav-links a:hover,
.line-button:hover {
  background: rgba(255, 255, 255, .18);
}

.line-button {
  background: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: clamp(22px, 4vw, 54px);
  align-items: center;
  padding: clamp(30px, 6vw, 76px) clamp(16px, 4vw, 54px) 24px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
}

.hero-copy {
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #7ea6ff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.contact h2 {
  margin: 0;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 680px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.04;
}

.hero-text {
  max-width: 620px;
  margin: 20px 0 0;
  color: #dce5ff;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
}

.primary-action {
  background: var(--accent);
  color: #fff;
}

.secondary-action {
  border: 1px solid rgba(255,255,255,.44);
  color: #fff;
}

.hero-visual {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: #000;
  box-shadow: 0 28px 70px rgba(3, 8, 38, .36);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 1.45 / 1;
  object-fit: cover;
}

.stock-panel,
.accessories,
.contact {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2,
.contact h2 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
}

.stock-count {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.stock-updated {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.tools {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink);
  font: inherit;
  background: #fff;
}

.filter-row {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.series-row {
  display: none;
  margin-top: -4px;
}

.series-row.show {
  display: flex;
}

.chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 15px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.chip.active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.phone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.phone-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20, 32, 72, .08);
}

.phone-image {
  position: relative;
  background: #f0f3f9;
}

.phone-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center center;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  background: var(--ok);
}

.badge.reserve {
  background: var(--warn);
}

.badge.sold {
  background: var(--sold);
}

.phone-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.phone-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.phone-title h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.price {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 20px;
  font-weight: 950;
  white-space: nowrap;
}

.cash-note {
  margin: -4px 0 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.specs span {
  border: 1px solid #e7ebf5;
  border-radius: 999px;
  padding: 6px 9px;
  color: #3d4658;
  font-size: 13px;
  font-weight: 800;
  background: #f8faff;
}

.note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: auto;
}

.card-actions a,
.card-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.ask {
  background: var(--accent);
  color: #fff;
}

.detail {
  background: #eef2ff;
  color: var(--navy);
}

.service-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto;
}

.service-item {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  font-weight: 950;
  background: var(--navy);
}

.service-item h3,
.accessory-strip h3 {
  margin: 16px 0 8px;
}

.service-item p,
.accessory-strip p,
.contact p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.service-link {
  display: block;
}

.service-link strong {
  display: inline-flex;
  margin-top: 14px;
  color: var(--accent);
  font-weight: 950;
}

.accessories .section-heading a {
  color: var(--accent);
  font-weight: 950;
}

.accessory-strip article {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.accessory-strip img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.accessory-strip div {
  padding: 20px 22px 20px 0;
}

.contact {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 30px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
}

.contact p {
  color: #dbe4ff;
}

.contact p + p {
  margin-top: 6px;
}

.mobile-cta {
  display: none;
}

.detail-page {
  background: #f6f8fc;
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
  padding: clamp(26px, 5vw, 68px) clamp(16px, 4vw, 54px);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
}

.product-media {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: #000;
  box-shadow: 0 24px 64px rgba(3, 8, 38, .35);
}

.product-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center center;
}

.product-summary {
  max-width: 680px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: #dce5ff;
  font-weight: 900;
}

.product-summary h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.08;
  letter-spacing: 0;
}

.product-price {
  margin: 18px 0 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 950;
}

.product-cash-note {
  margin: 8px 0 0;
  color: #dce5ff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.6;
}

.product-note {
  max-width: 620px;
  margin: 16px 0 0;
  color: #dce5ff;
  font-size: 18px;
  line-height: 1.75;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.product-gallery {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery-grid a {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20, 32, 72, .08);
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center center;
  transition: transform .18s ease;
}

.gallery-grid a:hover img {
  transform: scale(1.035);
}

.detail-specs {
  width: min(980px, calc(100% - 32px));
  margin: 34px auto;
}

.detail-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20, 32, 72, .08);
}

.detail-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-row span {
  color: var(--muted);
  font-weight: 900;
}

.detail-row strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.55;
}

.guide-page {
  background: #f6f8fc;
}

.guide-hero,
.guide-article {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

.guide-hero {
  padding: clamp(34px, 7vw, 84px) 0 26px;
}

.guide-hero h1,
.guide-article h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.08;
}

.guide-hero p:not(.eyebrow),
.guide-lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.guide-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 8px auto 42px;
}

.esim-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(22px, 5vw, 56px);
  align-items: center;
  padding: clamp(34px, 7vw, 84px) clamp(16px, 4vw, 54px);
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
}

.esim-copy {
  max-width: 760px;
}

.esim-copy h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: 0;
}

.esim-copy p:not(.eyebrow) {
  max-width: 680px;
  margin: 18px 0 0;
  color: #dce5ff;
  font-size: 18px;
  line-height: 1.8;
}

.esim-panel {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255,255,255,.1);
  box-shadow: 0 28px 70px rgba(3, 8, 38, .28);
}

.esim-panel span,
.esim-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 34px;
  border-radius: 999px;
  color: #fff;
  font-weight: 950;
  background: var(--accent);
}

.esim-panel ul {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding-left: 20px;
  color: #edf3ff;
  line-height: 1.7;
}

.esim-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto;
}

.esim-steps article,
.esim-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20, 32, 72, .08);
}

.esim-steps article {
  padding: 24px;
}

.esim-steps h2 {
  margin: 18px 0 8px;
  font-size: 24px;
}

.esim-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.esim-note {
  width: min(980px, calc(100% - 32px));
  margin: 34px auto 58px;
}

.light-action {
  border-color: var(--line);
  color: var(--navy);
}

.guide-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20, 32, 72, .08);
}

.guide-card span {
  width: max-content;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  font-weight: 950;
  background: var(--navy);
}

.guide-card h2 {
  margin: 18px 0 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.guide-card strong {
  margin-top: auto;
  color: var(--accent);
}

.guide-article {
  padding: clamp(28px, 6vw, 72px) 0 46px;
}

.guide-block,
.guide-help,
.guide-sources {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20, 32, 72, .06);
}

.guide-block h2,
.guide-help h2,
.guide-sources h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 26px;
}

.guide-block p,
.guide-help p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.guide-checklist,
.guide-steps {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.85;
}

.guide-note {
  margin-top: 14px !important;
  color: #3d4658 !important;
  font-weight: 800;
}

.guide-action {
  margin-top: 18px;
}

.guide-warning {
  border-color: #ffd7a8;
  background: #fff8ef;
}

.guide-warning h2 {
  color: #8a4b00;
}

.guide-image-strip {
  margin: 20px 0;
}

.reset-shot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
  padding: 12px;
  border-radius: 8px;
  background: #0b0f1a;
}

.reset-shot-grid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #111827;
}

.guide-image-strip figcaption {
  margin-top: 12px;
  color: var(--muted);
  text-align: center;
  font-size: 15px;
  line-height: 1.7;
}

.guide-help {
  background: var(--navy);
  color: #fff;
}

.guide-help h2,
.guide-help p {
  color: #fff;
}

.guide-help .primary-action {
  margin-top: 18px;
}

.guide-sources {
  display: grid;
  gap: 8px;
}

.guide-sources a {
  color: var(--accent);
  font-weight: 800;
  line-height: 1.55;
}

.photo-step-list {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.photo-step {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(240px, .95fr);
  gap: 22px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20, 32, 72, .06);
}

.photo-step.no-photo {
  grid-template-columns: 1fr;
}

.step-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.step-number {
  width: max-content;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  padding: 7px 12px;
  font-weight: 900;
  font-size: 14px;
}

.step-copy h2 {
  margin: 14px 0 10px;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
}

.step-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.photo-slot {
  display: grid;
  place-items: center;
  min-height: 0;
  width: min(100%, 340px);
  justify-self: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #667085;
  text-align: center;
  font-weight: 900;
  line-height: 1.5;
  padding: 0;
}

.photo-slot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.multi-photo-slot {
  gap: 12px;
  align-content: start;
}

.placeholder-slot {
  min-height: 360px;
  border: 1px dashed #cbd6ea;
  border-radius: 8px;
  background: #f8fafc;
  color: #667085;
  padding: 18px;
}

@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    gap: 10px;
    min-height: auto;
  }

  .brand {
    width: 132px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .line-button {
    margin-left: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 28px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  }

  .hero h1 {
    max-width: 7em;
  }

  .phone-grid,
  .service-band,
  .esim-hero,
  .esim-steps,
  .product-hero,
  .gallery-grid,
  .guide-list {
    grid-template-columns: 1fr 1fr;
  }

  .phone-title {
    display: grid;
  }

  .price {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: 72px;
  }

  .site-header {
    padding: 10px 12px 12px;
  }

  .nav-links a,
  .line-button {
    padding: 10px 12px;
    font-size: 15px;
  }

  .hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .stock-panel,
  .accessories,
  .contact,
  .service-band,
  .esim-steps,
  .esim-note {
    width: calc(100% - 24px);
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

  .stock-count {
    white-space: normal;
  }

  .phone-grid,
  .service-band,
  .esim-hero,
  .esim-steps,
  .product-hero,
  .gallery-grid,
  .guide-list {
    grid-template-columns: 1fr;
  }

  .esim-hero {
    padding: 28px 14px;
  }

  .esim-copy h1 {
    font-size: 42px;
  }

  .esim-copy .hero-actions,
  .esim-note .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .photo-step {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }

  .photo-slot {
    width: min(100%, 360px);
    justify-self: center;
  }

  .guide-image-strip {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .reset-shot-grid {
    width: max-content;
    grid-template-columns: repeat(5, 156px);
  }

  .product-summary h1 {
    font-size: 38px;
  }

  .product-actions {
    display: grid;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px;
  }

  .phone-card {
    border-radius: 8px;
  }

  .phone-title {
    grid-template-columns: 1fr auto;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .accessory-strip article {
    grid-template-columns: 1fr;
  }

  .accessory-strip div {
    padding: 0 18px 20px;
  }

  .contact {
    display: grid;
    padding: 22px;
  }

  .contact-actions {
    display: grid;
  }

  .mobile-cta {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 -10px 24px rgba(18, 28, 58, .18);
  }

  .mobile-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 8px;
    color: #fff;
    font-weight: 950;
    background: var(--navy);
  }

  .mobile-cta a + a {
    background: var(--accent);
  }
}
