:root {
  --ink: #211812;
  --muted: #75695d;
  --paper: #f7f1e5;
  --paper-2: #fffaf0;
  --line: #d8c8aa;
  --gold: #9f7b3f;
  --dark: #15100d;
  --green: #06c755;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans Thai", "Noto Sans", Arial, sans-serif;
}

a {
  color: inherit;
}

.funnel-header,
.funnel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 241, 229, 0.94);
}

.funnel-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--muted);
}

.brand-link {
  text-decoration: none;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 22px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.page-wrap {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: start;
}

.product-media {
  display: grid;
  gap: 14px;
}

.product-media img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.thumb-row img {
  aspect-ratio: 1 / 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.payment-received-badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 0 18px;
  padding: 10px 18px;
  border: 1px solid rgba(6, 199, 85, 0.44);
  background: rgba(6, 199, 85, 0.12);
  color: #056a2c;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.email-status {
  width: fit-content;
  margin: 16px 0 28px;
  padding: 10px 14px;
  border: 1px solid rgba(159, 123, 63, 0.28);
  background: rgba(255, 250, 240, 0.72);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.price-panel,
.checkout-panel,
.info-panel,
.faq-panel {
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 20px;
}

.price-panel {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.price-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 800;
}

.price-line strong {
  font-size: 28px;
}

.deposit {
  color: var(--gold);
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.detail {
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.72);
  padding: 14px;
}

.detail span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.detail strong {
  display: block;
  margin-top: 4px;
}

.section-title {
  margin: 0 0 18px;
  font-size: 24px;
}

.customer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
}

.field.full {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 12px;
  font: inherit;
  border-radius: 0;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.payment-box {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

#payment-element,
#oto-payment-element {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(216, 200, 170, 0.82);
  background: #fff;
}

.order-bump {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #b99a62;
  background: #fff7e8;
  cursor: pointer;
}

.order-bump input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--gold);
}

.order-bump strong,
.order-bump small {
  display: block;
}

.order-bump small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.payment-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.payment-summary strong {
  color: var(--gold);
}

.thank-you-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.oto-panel {
  margin-top: 34px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid #9f7b3f;
  background: #15100d;
  color: #fff8ea;
}

.oto-progress {
  margin: 0 auto 28px;
  max-width: 980px;
  text-align: center;
}

.oto-progress-top {
  display: block;
  margin-bottom: 10px;
  color: #25d96b;
  font-weight: 800;
}

.oto-progress-top strong {
  color: #25d96b;
  font-size: clamp(20px, 3vw, 32px);
}

.oto-progress-track {
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(37, 217, 107, 0.18);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.oto-progress-track span {
  display: block;
  width: 90%;
  height: 100%;
  background: #25d96b;
  border-radius: inherit;
  box-shadow: 0 0 18px rgba(37, 217, 107, 0.42);
}

.oto-progress p {
  max-width: none;
  margin: 12px 0 0;
  color: rgba(255, 248, 234, 0.72);
  font-weight: 700;
}

.oto-pill {
  display: table;
  margin: 6px auto 20px;
  padding: 10px 22px;
  border: 1px solid rgba(159, 123, 63, 0.78);
  border-radius: 999px;
  background: rgba(159, 123, 63, 0.12);
  color: #d8b46c;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.oto-panel h2 {
  margin: 0 auto 10px;
  max-width: 920px;
  color: #fff;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  text-align: center;
}

.oto-price {
  margin: 10px 0 14px;
  color: var(--gold);
  font-size: 34px;
  font-weight: 800;
}

.oto-subtitle {
  max-width: 850px;
  margin: 8px auto 24px;
  color: rgba(255, 248, 234, 0.78);
  font-weight: 700;
  text-align: center;
}

.oto-offer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  align-items: stretch;
  margin: 20px 0;
  padding: 18px;
  border: 1px solid rgba(185, 154, 98, 0.55);
  background: #fff8ea;
  color: var(--ink);
}

.oto-offer-card h3 {
  margin: 0 0 10px;
  font-size: 26px;
}

.oto-panel p {
  max-width: 760px;
  line-height: 1.75;
}

.oto-price-box {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.oto-price-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.oto-price-box del {
  color: var(--muted);
  font-size: 22px;
  font-weight: 800;
}

.oto-price-box strong {
  color: var(--gold);
  font-size: 38px;
  line-height: 1;
}

.oto-reasons {
  margin: 18px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--gold);
  background: #fff8ea;
  color: var(--ink);
}

.oto-reasons strong {
  display: block;
  margin-bottom: 8px;
}

.oto-reasons ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
}

.oto-form {
  margin-top: 18px;
  max-width: 460px;
}

.oto-panel .payment-box {
  border-top-color: rgba(216, 180, 108, 0.45);
}

.oto-panel .field {
  color: #fff8ea;
}

.oto-panel .status,
.oto-panel .oto-card-note,
.oto-panel .oto-skip-link {
  color: rgba(255, 248, 234, 0.72);
}

.button.oto-buy-button {
  width: min(100%, 760px);
  min-height: 72px;
  margin: 22px auto 0;
  padding: 0 28px;
  border-color: #16a34a;
  background: #22c55e;
  color: #fff;
  font-size: clamp(18px, 2.2vw, 22px);
  box-shadow: 0 14px 28px rgba(34, 197, 94, 0.28);
}

.button.oto-buy-button::after {
  content: "→";
  margin-left: 12px;
  font-size: 1.2em;
}

.button.oto-buy-button:hover {
  background: #16a34a;
}

.oto-card-note {
  width: min(100%, 760px);
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.oto-skip-link {
  display: block;
  width: min(100%, 760px);
  margin: 14px 0 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  margin-left: auto;
  margin-right: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--dark);
  background: var(--dark);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

#pay-button {
  width: 100%;
  min-height: 68px;
  margin-top: 16px;
  border: 0;
  background: #06c755;
  color: #07170d;
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(6, 199, 85, 0.24);
}

#pay-button::after {
  content: "→";
  margin-left: 12px;
  font-size: 1.2em;
}

#pay-button:hover {
  background: #12d965;
}

#pay-button:disabled {
  background: #8bdca9;
  color: rgba(7, 23, 13, 0.74);
  box-shadow: none;
  opacity: 1;
}

.button.line {
  border-color: var(--green);
  background: var(--green);
}

.button.secondary {
  background: transparent;
  color: var(--dark);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

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

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.faq-item strong {
  display: block;
  margin-bottom: 4px;
}

.social-proof-widget {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 30;
  width: min(360px, calc(100vw - 36px));
  padding: 14px 38px 14px 14px;
  border: 1px solid rgba(159, 123, 63, 0.38);
  background: rgba(255, 250, 240, 0.96);
  box-shadow: 0 14px 32px rgba(33, 24, 18, 0.16);
  color: var(--ink);
}

.social-proof-close {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.social-proof-live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.social-proof-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
  flex: 0 0 auto;
}

.social-proof-event {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.preorder-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 28px 0 36px;
}

.preorder-category-tile {
  min-height: 220px;
  display: grid;
  grid-template-rows: 132px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(21, 17, 13, .08);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.preorder-category-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(178, 139, 76, .72);
  box-shadow: 0 18px 44px rgba(21, 17, 13, .14);
}

.preorder-category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

.preorder-category-tile span {
  display: grid;
  gap: 3px;
  padding: 14px;
}

.preorder-category-tile strong {
  font-size: 20px;
  line-height: 1.2;
}

.preorder-category-tile small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.preorder-category-tile b {
  width: fit-content;
  margin-top: 4px;
  color: var(--gold);
  font-size: 13px;
}

.preorder-section {
  scroll-margin-top: 92px;
  margin-top: 42px;
}

.preorder-section.is-collapsed .preorder-extra-card {
  display: none;
}

.preorder-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.preorder-section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
}

.preorder-section-head a {
  color: var(--gold);
  font-weight: 800;
  white-space: nowrap;
}

.preorder-expand-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 22px;
}

.preorder-expand-panel[hidden] {
  display: none;
}

.preorder-expand-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.preorder-expand-button {
  width: min(100%, 420px);
  min-height: 60px;
  border: 0;
  background: #0f7a43;
  color: #fffaf0;
  box-shadow: 0 18px 38px rgba(15, 122, 67, .28);
  font: 900 18px/1.2 "Noto Sans Thai", system-ui, sans-serif;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.preorder-expand-button:hover {
  transform: translateY(-2px);
  background: #0b8f4b;
  box-shadow: 0 22px 44px rgba(15, 122, 67, .34);
}

.product-card {
  border: 1px solid var(--line);
  background: var(--paper-2);
  text-decoration: none;
  display: grid;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #fff;
}

.product-card-content {
  padding: 14px;
}

.product-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  background: #efe2c7;
  color: #72552a;
  font-weight: 800;
  font-size: 12px;
}

@media (max-width: 860px) {
  .funnel-header,
  .funnel-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-grid,
  .oto-offer-card,
  .customer-form {
    grid-template-columns: 1fr;
  }

  .details,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preorder-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .details,
  .product-grid {
    grid-template-columns: 1fr;
  }
}
