/* ============================================================
   Universal Pawnshop System (UPS) — Product landing page
   ต่อยอดจาก css/style.css ของเว็บหลัก (โทนน้ำเงิน-ขาว)
   ============================================================ */

/* ---------- Breadcrumb ---------- */
.crumb {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.crumb-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text-faint);
}

.crumb-inner a { color: var(--text-soft); }
.crumb-inner a:hover { color: var(--primary); }
.crumb-sep { color: #b9c2d8; }
.crumb-current { color: var(--text); font-weight: 500; }

/* ---------- Screenshot frame ---------- */
.shot {
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #cdd8ee;
  box-shadow: 0 12px 34px rgba(16, 28, 72, 0.16);
}

.shot-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  background: #f1f4fb;
  border-bottom: 1px solid #dde4f2;
}

.shot-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c4cee4;
}

.shot-name {
  margin-left: 6px;
  font-size: 12.5px;
  color: var(--text-faint);
}

.shot-zoom {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding-left: 10px;
  font-size: 12.5px;
  color: var(--blue);
  white-space: nowrap;
}

.shot-zoom .icon { width: 14px; height: 14px; }

.shot img { display: block; width: 100%; height: auto; }

.shot-link { display: block; }

.shot-caption {
  font-size: 13.5px;
  color: var(--text-faint);
  line-height: 1.6;
  margin-top: 10px;
}

/* ---------- Carousel (สไลด์ภาพหน้าจอใน hero) ----------
   สัดส่วนกรอบตั้งไว้กลาง ๆ ระหว่างภาพทั้งสอง + object-fit: contain
   ภาพจึงไม่ถูกครอบตัด และกรอบไม่กระตุกตอนเลื่อนสไลด์ */
.carousel {
  position: relative;
  aspect-ratio: 1.7;
  overflow: hidden;
  background: #f1f4fb;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.35s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  display: block;
  height: 100%;
  min-width: 0;
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7e0f0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(16, 28, 72, 0.18);
  transition: background 0.15s ease, color 0.15s ease;
}

.carousel-nav:hover { background: #ffffff; color: var(--blue); }
.carousel-nav:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.carousel-nav .icon { width: 20px; height: 20px; }

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 8px rgba(16, 28, 72, 0.15);
}

/* จุดยังเล็กเท่าเดิม แต่พื้นที่กดกว้างขึ้นด้วย padding (background วาดเฉพาะ content box) */
.carousel-dot {
  width: 9px;
  height: 9px;
  padding: 7px;
  box-sizing: content-box;
  background-clip: content-box;
  border: 0;
  border-radius: 50%;
  background-color: rgba(16, 28, 72, 0.3);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.carousel-dot:hover { background-color: rgba(16, 28, 72, 0.55); }
.carousel-dot.is-active { background-color: var(--primary); }
.carousel-dot:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }

/* ---------- Hero ---------- */
.p-hero { background: var(--navy); padding: 64px 0 72px; }

.p-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 52px;
}

.p-hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.p-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13.5px;
  color: #cfe0ff;
}

.p-hero-tag .icon { width: 15px; height: 15px; }

.p-hero-title {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 42px;
  line-height: 1.32;
  color: #ffffff;
  text-wrap: pretty;
}

.p-hero-en {
  font-size: 13px;
  letter-spacing: 2.6px;
  color: var(--hero-soft);
  font-weight: 600;
}

.p-hero-desc { font-size: 16.5px; line-height: 1.9; color: var(--hero-text); }

.p-hero-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.p-hero-points li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 16px;
  line-height: 1.7;
  color: #ffffff;
  text-wrap: pretty;
}

.p-hero-points .icon {
  width: 21px;
  height: 21px;
  margin-top: 3px;
  color: #7fb0ff;
}

.p-hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }

.p-hero-note { font-size: 13.5px; color: var(--hero-soft); }

.p-hero-shot { min-width: 0; }

/* ---------- Stats ---------- */
.p-stats { background: #ffffff; border-bottom: 1px solid var(--line); }

.p-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 40px 20px;
}

.p-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  padding: 0 8px;
}

.p-stat + .p-stat { border-left: 1px solid var(--line); }

.p-stat-num {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: var(--primary);
  line-height: 1.3;
}

.p-stat-label {
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.6;
  text-wrap: balance;
}

/* ---------- Generic section ---------- */
.p-section { padding: 80px 0; background: #ffffff; }
.p-section-tint { background: var(--tint); }
.p-section-navy { background: var(--navy); }

/* ---------- Why cards ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.why-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.why-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--tint-icon);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-title {
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--text);
  line-height: 1.5;
}

.why-desc { font-size: 15.5px; line-height: 1.85; color: var(--text-soft); }

/* ---------- Pain questions ---------- */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pain-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--text);
}

.pain-q {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tint-icon);
  color: var(--primary);
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pain-foot {
  margin-top: 26px;
  text-align: center;
  font-family: 'Prompt', sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: var(--primary);
}

/* ---------- Feature grid ---------- */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feat-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.feat-icon {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  background: var(--tint-icon);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feat-icon .icon-lg { width: 23px; height: 23px; }

.feat-title {
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  line-height: 1.5;
}

.feat-desc { font-size: 14.5px; line-height: 1.8; color: var(--text-soft); }

/* ---------- Deep dive rows ---------- */
.deep-list {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.deep-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 56px;
}

.deep-row-flip .deep-text { order: 2; }
.deep-row-flip .deep-shot { order: 1; }

.deep-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.deep-num {
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2.4px;
  color: var(--blue);
}

.deep-title {
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 27px;
  line-height: 1.45;
  color: var(--primary);
}

.deep-desc { font-size: 16px; line-height: 1.9; color: var(--text-soft); }

.deep-shot { min-width: 0; }

/* ---------- Compare table ---------- */
/* กว้างตามสัดส่วนภาพ (--ar = กว้าง/สูง ของภาพนั้น) ทำให้ทุกภาพในแถวสูงเท่ากันพอดี
   โดยไม่ต้องครอบตัดหรือใส่แถบขอบ — ถ้าเปลี่ยนภาพ ให้แก้ --ar ที่ inline style ของคอลัมน์ */
.compare-pair {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 40px;
}

.compare-col {
  flex: var(--ar, 1) 1 0;
  min-width: 0;
}

.compare-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 12px;
}

.compare-label-old { background: #e9edf5; color: #6a7590; }
.compare-label-new { background: var(--primary); color: #ffffff; }

.compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 15px;
}

.compare-table th,
.compare-table td {
  padding: 15px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  line-height: 1.75;
}

.compare-table thead th {
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 15.5px;
  background: var(--tint);
  color: var(--primary);
  border-bottom: 1px solid #d7e0f0;
}

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

.compare-table tbody th {
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  color: var(--text);
  width: 21%;
  white-space: nowrap;
}

.col-old { color: var(--text-faint); width: 37%; }
.col-new { color: var(--text); width: 42%; }

.compare-note {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--text-faint);
  line-height: 1.7;
}

/* ---------- Migration ---------- */
.migrate-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 60px;
}

.migrate-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.migrate-desc { font-size: 16px; line-height: 1.9; color: var(--text-soft); }

.migrate-card {
  background: var(--navy);
  border-radius: 14px;
  padding: 38px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.migrate-card-head {
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: #ffffff;
  line-height: 1.5;
}

.migrate-rows { display: flex; flex-direction: column; gap: 14px; }

.migrate-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  padding-bottom: 13px;
}

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

.migrate-row-label { font-size: 14.5px; color: var(--hero-soft); }

.migrate-row-value {
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: #ffffff;
  white-space: nowrap;
}

.migrate-card-note {
  font-size: 13px;
  color: var(--hero-soft);
  line-height: 1.7;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 24px;
  cursor: pointer;
  list-style: none;
  font-family: 'Prompt', sans-serif;
  font-weight: 500;
  font-size: 16.5px;
  color: var(--text);
  line-height: 1.6;
}

.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { color: var(--primary); }

.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--blue);
  transition: transform 0.18s ease;
}

.faq-item[open] .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  padding: 0 24px 21px;
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text-soft);
}

/* ---------- Closing CTA ---------- */
.p-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: 76px 20px;
}

.p-cta-title {
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 32px;
  color: #ffffff;
  line-height: 1.4;
}

.p-cta-desc {
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--hero-text);
  max-width: 720px;
}

.p-cta-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 8px; }

.p-cta-note { font-size: 14px; color: var(--hero-soft); }

/* ---------- Background music toggle ---------- */
.bgm-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #d7e0f0;
  border-radius: 999px;
  padding: 11px 18px;
  background: #ffffff;
  color: var(--primary);
  font-family: 'Prompt', sans-serif;
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 28, 72, 0.16);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bgm-toggle:hover { border-color: #b9caea; background: var(--tint); }

.bgm-toggle.is-on {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.bgm-toggle .icon { width: 19px; height: 19px; }
.bgm-toggle .bgm-icon-on { display: none; }
.bgm-toggle.is-on .bgm-icon-on { display: block; }
.bgm-toggle.is-on .bgm-icon-off { display: none; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1024px) {
  .p-hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .p-hero-title { font-size: 34px; }
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deep-row { grid-template-columns: 1fr; gap: 26px; }
  .deep-row-flip .deep-text { order: 1; }
  .deep-row-flip .deep-shot { order: 2; }
  .deep-list { gap: 48px; }
  .migrate-inner { grid-template-columns: 1fr; gap: 32px; }
  .p-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
  .p-stat:nth-child(odd) { border-left: 0; }
}

@media (max-width: 860px) {
  .crumb-inner { font-size: 12.5px; padding: 10px 20px; }

  .p-hero { padding: 40px 0 48px; }
  .p-hero-title { font-size: 26px; line-height: 1.42; }
  .p-hero-en { font-size: 11px; letter-spacing: 2px; }
  .p-hero-desc { font-size: 15px; }
  .p-hero-points li { font-size: 15px; }
  .p-hero-cta { flex-direction: column; width: 100%; }
  .p-hero-cta .btn { width: 100%; }

  .p-stats-grid { padding: 26px 16px; gap: 20px 12px; }
  .p-stat-num { font-size: 24px; }
  .p-stat-label { font-size: 12.5px; }

  .p-section { padding: 48px 0; }

  .why-grid { grid-template-columns: 1fr; gap: 14px; }
  .why-card { padding: 22px 20px; }
  .why-title { font-size: 17.5px; }
  .why-desc { font-size: 14.5px; }

  .pain-grid { grid-template-columns: 1fr; gap: 12px; }
  .pain-item { padding: 16px 18px; font-size: 14.5px; }
  .pain-foot { font-size: 15.5px; margin-top: 20px; }

  .feat-grid { grid-template-columns: 1fr; gap: 14px; }
  .feat-card { padding: 20px 18px; }

  .deep-title { font-size: 21px; }
  .deep-desc { font-size: 15px; }

  .compare-pair { flex-direction: column; gap: 20px; margin-bottom: 28px; }
  .compare-col { flex: 0 0 auto; width: 100%; }
  .compare-table { font-size: 14px; }
  .compare-table th, .compare-table td { padding: 12px 14px; }

  .migrate-card { padding: 28px 24px; }
  .migrate-row-value { font-size: 16px; }

  .faq-item > summary { padding: 16px 18px; font-size: 15.5px; }
  .faq-answer { padding: 0 18px 18px; font-size: 14.5px; }

  .p-cta-inner { padding: 48px 20px; }
  .p-cta-title { font-size: 24px; }
  .p-cta-desc { font-size: 15px; }
  .p-cta-buttons { flex-direction: column; width: 100%; }
  .p-cta-buttons .btn { width: 100%; }

  .bgm-toggle { right: 14px; bottom: 14px; padding: 10px 15px; font-size: 13.5px; }

  /* บนมือถือคงขนาดปุ่มไว้ไม่ต่ำกว่า 44px เพื่อให้แตะง่าย */
  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }
  .carousel-nav { width: 44px; height: 44px; }
  .carousel-dots { bottom: 9px; }
}
