/* SAFETYMAN Quote — Blessmotive layout × brand dark/yellow */
:root {
  --yellow: #F5C400;
  --yellow-light: #FFD740;
  --yellow-dark: #C49A00;
  --yellow-glow: rgba(245, 196, 0, 0.35);
  --yellow-subtle: rgba(245, 196, 0, 0.12);
  --black: #0a0a0a;
  --black-2: #121212;
  --black-3: #1a1a1a;
  --black-4: #2a2a2a;
  --gray-muted: #a1a1aa;
  --gray: #71717a;
  --white: #fafafa;
  --text: #f4f4f5;
  --surface: #161616;
  --surface-elevated: #1e1e1e;
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(245, 196, 0, 0.35);
  --font-th: 'Noto Sans Thai', sans-serif;
  --font-en: 'Plus Jakarta Sans', sans-serif;
  --stripe: repeating-linear-gradient(-45deg, #F5C400 0px, #F5C400 10px, #0a0a0a 10px, #0a0a0a 20px);
  --radius: 14px;
  --radius-lg: 20px;
  --header-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--black);
  color: var(--text);
  font-family: var(--font-th);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.ico { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }

/* ── Header ── */
.quote-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.quote-header__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.quote-header__brand-link {
  display: flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none;
}
.quote-header__logo { width: 40px; height: 40px; border-radius: 10px; }
.quote-header__brand {
  font-family: var(--font-en); font-weight: 800; font-size: 1rem;
  letter-spacing: 0.06em; color: var(--yellow);
}
.quote-header__actions { display: flex; align-items: center; gap: 8px; }
.lang-toggle {
  min-width: 44px; min-height: 36px; padding: 0 10px;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--gray-muted);
  font-family: var(--font-en); font-size: 0.75rem; font-weight: 700;
  cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.lang-toggle:hover { border-color: var(--border-hover); color: var(--yellow); }
.quote-header__line, .quote-header__tel {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 12px; border-radius: 8px;
  font-size: 0.8rem; font-weight: 600; text-decoration: none;
  transition: opacity 0.2s, background 0.2s; cursor: pointer;
}
.quote-header__line { background: #06c755; color: #fff; }
.quote-header__line:hover { opacity: 0.9; color: #fff; }
.quote-header__tel { border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.quote-header__tel:hover { border-color: var(--border-hover); color: var(--yellow-light); }
.quote-header__tel-num { display: none; }
@media (min-width: 640px) { .quote-header__tel-num { display: inline; } }
.stripe-bar { height: 4px; background: var(--stripe); border: none; margin: 0; }

/* ── Page ── */
.quote-page {
  max-width: 1200px; margin: 0 auto;
  padding: 24px 20px calc(40px + var(--safe-bottom));
}

/* ── Hero (Blessmotive-style banner) ── */
.quote-hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1a1500 0%, #0a0a0a 45%, #141414 100%);
  border: 1px solid var(--border-hover);
  padding: 28px 24px; margin-bottom: 28px;
  display: grid; gap: 20px;
}
@media (min-width: 900px) {
  .quote-hero { grid-template-columns: 1fr auto; align-items: center; padding: 36px 40px; }
}
.quote-hero__glow {
  position: absolute; top: -40%; right: -10%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--yellow-glow), transparent 70%);
  pointer-events: none;
}
.quote-hero__eyebrow {
  margin: 0 0 8px; font-size: 0.82rem; font-weight: 600;
  color: var(--yellow); letter-spacing: 0.02em;
}
.quote-hero__title {
  margin: 0 0 10px; font-family: var(--font-en);
  font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 800; color: var(--white);
}
.quote-hero__lead { margin: 0; color: var(--gray-muted); font-size: 0.95rem; max-width: 520px; }
.quote-hero__pills { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; }
.quote-hero__pills span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: rgba(255,255,255,0.75);
}
.quote-hero__pills .ico { color: var(--yellow); width: 1rem; height: 1rem; }
.quote-hero__cta { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.quote-hero__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  font-size: 0.88rem; font-weight: 600; text-decoration: none;
  transition: opacity 0.2s, background 0.2s; cursor: pointer;
}
.quote-hero__btn--line { background: #06c755; color: #fff; }
.quote-hero__btn--tel { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid var(--border); }
.quote-hero__btn:hover { opacity: 0.92; color: #fff; }

/* ── 2-column layout ── */
.quote-layout {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .quote-layout { grid-template-columns: 220px 1fr 280px; align-items: start; }
}

.quote-sidebar { display: none; }
@media (min-width: 1024px) { .quote-sidebar { display: block; position: sticky; top: calc(var(--header-h) + 16px); } }

.m-stepper {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 8px; margin-bottom: 16px;
  scrollbar-width: none;
}
.m-stepper::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .m-stepper { display: none; } }

/* Vertical stepper */
.v-stepper { display: flex; flex-direction: column; gap: 6px; }
.v-stepper__item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid transparent; background: transparent;
  text-align: left; font-family: var(--font-th);
  cursor: default; transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.v-stepper__item--active {
  background: linear-gradient(135deg, var(--yellow-dark), var(--yellow));
  color: var(--black); border-color: var(--yellow);
  box-shadow: 0 8px 24px var(--yellow-glow);
}
.v-stepper__item--done {
  background: var(--surface-elevated); color: var(--yellow-light);
  border-color: var(--border-hover); cursor: pointer;
}
.v-stepper__item--done:hover { background: var(--yellow-subtle); }
.v-stepper__item--pending { color: var(--gray); background: rgba(255,255,255,0.02); }
.v-stepper__item:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.v-stepper__icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.v-stepper__item--active .v-stepper__icon { background: rgba(0,0,0,0.15); }
.v-stepper__item--done .v-stepper__icon { background: var(--yellow-subtle); color: var(--yellow); }
.v-stepper__item--pending .v-stepper__icon { background: var(--black-4); color: var(--gray); }
.v-stepper__label { font-size: 0.7rem; opacity: 0.75; }
.v-stepper__title { font-size: 0.88rem; font-weight: 600; }

/* Mobile pills */
.m-stepper__pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  font-size: 0.75rem; font-weight: 600; border: 1px solid var(--border);
  background: var(--surface); color: var(--gray);
}
.m-stepper__pill--active { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.m-stepper__pill--done { background: var(--yellow-subtle); color: var(--yellow); border-color: var(--border-hover); }
.m-stepper__num {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-en); font-size: 0.65rem;
  background: rgba(0,0,0,0.15);
}

/* ── Step panels (one at a time) ── */
.step-panel { display: none; }
.step-panel--active { display: block; animation: fadeUp 0.3s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}
@media (min-width: 640px) { .step-card { padding: 28px 28px; } }

.step-title {
  margin: 0 0 6px; font-family: var(--font-en);
  font-size: 1.35rem; font-weight: 800; color: var(--white);
}
.step-desc { margin: 0 0 20px; color: var(--gray-muted); font-size: 0.9rem; }

.step-nav {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 10px; margin-top: 24px;
}
.step-nav--submit .btn--primary { flex: 1; min-width: 180px; }

/* ── Live summary (sticky right) ── */
.quote-summary-col { display: none; }
@media (min-width: 1024px) {
  .quote-summary-col {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }
}

.quote-content { min-width: 0; }
.live-summary {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.live-summary__head {
  padding: 16px 18px; border-bottom: 1px solid var(--border);
  font-family: var(--font-en); font-weight: 700; font-size: 0.95rem; color: var(--white);
}
.live-summary__empty {
  padding: 24px 18px; font-size: 0.85rem; color: var(--gray);
  line-height: 1.5;
}
.live-summary__body { padding: 12px 18px 16px; }
.live-summary__row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.82rem;
}
.live-summary__row:last-child { border-bottom: none; }
.live-summary__row span:first-child { color: var(--gray-muted); flex-shrink: 0; }
.live-summary__row span:last-child { color: var(--white); font-weight: 500; text-align: right; }
.live-summary__items { margin-top: 8px; }
.live-summary__item {
  display: flex; gap: 10px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.8rem;
}
.live-summary__item img {
  width: 40px; height: 40px; object-fit: contain;
  border-radius: 8px; background: var(--black-3);
}
.live-summary__item-name { flex: 1; color: var(--white); font-weight: 500; line-height: 1.3; }
.live-summary__item-qty { color: var(--yellow); font-family: var(--font-en); font-weight: 700; }
.live-summary__foot {
  padding: 12px 18px; background: var(--yellow-subtle);
  border-top: 1px solid var(--border-hover);
  font-size: 0.75rem; color: var(--gray-muted); text-align: center;
}

/* ── Form ── */
.form-grid {
  display: grid; grid-template-columns: 1fr; gap: 14px;
}
@media (min-width: 600px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-field--full { grid-column: 1 / -1; }
.form-field label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--gray-muted); margin-bottom: 6px; }
.form-field label .req { color: var(--yellow); }
.form-field input, .form-field textarea, .search-input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(0,0,0,0.35);
  color: var(--white); font-family: var(--font-th); font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-field input:focus, .form-field textarea:focus, .search-input:focus {
  outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-glow);
}
.form-field textarea { min-height: 88px; resize: vertical; }
.form-error {
  grid-column: 1 / -1; color: #fca5a5; font-size: 0.85rem;
  padding: 10px 14px; background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25); border-radius: 10px;
  display: none;
}
.form-error--show { display: block; }
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px; border-radius: 10px; border: none;
  font-family: var(--font-th); font-size: 0.92rem; font-weight: 600;
  cursor: pointer; transition: box-shadow 0.2s, opacity 0.2s, background 0.2s;
  text-decoration: none;
}
.btn:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn--primary {
  background: linear-gradient(135deg, var(--yellow-light), var(--yellow) 50%, var(--yellow-dark));
  color: var(--black); box-shadow: 0 4px 20px var(--yellow-glow);
}
.btn--primary:hover:not(:disabled) { box-shadow: 0 6px 28px var(--yellow-glow); }
.btn--secondary { background: var(--black-3); color: var(--text); border: 1px solid var(--border); }
.btn--line { background: #06c755; color: #fff; }
.btn--ghost { background: transparent; color: var(--gray-muted); border: 1px solid var(--border); min-height: 44px; }
.btn--ghost:hover:not(:disabled) { border-color: var(--border-hover); color: var(--white); }
.btn-text {
  margin-top: 16px; background: none; border: none;
  color: var(--gray-muted); font-size: 0.85rem; cursor: pointer;
  text-decoration: underline; font-family: var(--font-th);
}
.btn-text:hover { color: var(--yellow); }

.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(0,0,0,0.15);
  border-top-color: var(--black); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Products ── */
.product-toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.search-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2371717a' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px center; padding-left: 44px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(0,0,0,0.3); color: var(--gray-muted);
  font-size: 0.8rem; cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.chip:hover { color: var(--white); }
.chip--active { border-color: var(--yellow); background: var(--yellow-subtle); color: var(--yellow); }

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }

.product-card {
  background: rgba(0,0,0,0.35); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.product-card--in-cart { border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow-glow); }
.product-card__img-wrap {
  aspect-ratio: 1; background: var(--black-3);
  display: flex; align-items: center; justify-content: center;
}
.product-card__img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.product-card__placeholder { width: 40px; height: 40px; color: var(--gray); opacity: 0.5; }
.product-card__body { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.product-card__name { font-size: 0.82rem; font-weight: 600; line-height: 1.35; color: var(--white);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.product-card__meta { font-family: var(--font-en); font-size: 0.68rem; color: var(--gray); }
.product-card__actions { margin-top: auto; padding-top: 6px; }
.btn-add {
  width: 100%; min-height: 36px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--black-4); color: var(--white); font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s, color 0.2s;
}
.btn-add:hover { background: var(--yellow); color: var(--black); border-color: var(--yellow); }

.qty-control { display: flex; border-radius: 8px; overflow: hidden; border: 1px solid var(--yellow-dark); }
.qty-control button {
  width: 36px; height: 36px; border: none; background: var(--yellow);
  color: var(--black); font-size: 1.1rem; font-weight: 700; cursor: pointer;
}
.qty-control span {
  flex: 1; text-align: center; font-family: var(--font-en); font-weight: 700;
  background: var(--black-3); display: flex; align-items: center; justify-content: center;
}

.skeleton-card {
  aspect-ratio: 0.85; border-radius: var(--radius);
  background: linear-gradient(90deg, var(--black-3) 25%, var(--black-4) 50%, var(--black-3) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.load-error { grid-column: 1 / -1; text-align: center; padding: 32px; border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-cart-msg { text-align: center; color: var(--gray-muted); padding: 20px; }

/* ── Tables ── */
.preview-table-wrap { overflow-x: auto; margin-bottom: 16px; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.preview-table th {
  text-align: left; padding: 10px 12px; background: var(--black-3);
  color: var(--gray-muted); font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
}
.preview-table td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.preview-table__img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: var(--black-3); }
.preview-table__name { font-weight: 600; color: var(--white); max-width: 200px; }
.btn-remove { background: none; border: none; color: #f87171; font-size: 0.78rem; cursor: pointer; padding: 4px 8px; }

.preview-doc { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.preview-doc__label {
  padding: 14px 16px; font-family: var(--font-en); font-size: 0.68rem;
  font-weight: 700; letter-spacing: 0.1em; color: var(--yellow);
  text-transform: uppercase; border-bottom: 1px solid var(--border);
}
.summary-remarks {
  padding: 12px 16px; font-size: 0.85rem; color: var(--gray-muted);
  border-top: 1px solid var(--border); font-style: italic;
}
.price-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; background: var(--yellow-subtle);
  border: 1px solid var(--border-hover); border-radius: 10px;
  font-size: 0.85rem; color: var(--gray-muted); margin-bottom: 8px;
}
.price-note .ico { color: var(--yellow); flex-shrink: 0; margin-top: 2px; }

/* ── Trust cards ── */
.quote-trust-cards {
  display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 32px;
}
@media (min-width: 640px) { .quote-trust-cards { grid-template-columns: repeat(3, 1fr); } }
.trust-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.trust-card__icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--yellow-subtle); color: var(--yellow);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.trust-card p { margin: 0; font-size: 0.85rem; font-weight: 500; color: var(--gray-muted); }

/* ── Success ── */
.success-screen { padding: 40px 0; }
.success-box { max-width: 480px; margin: 0 auto; text-align: center; }
.success-box__icon {
  width: 80px; height: 80px; margin: 0 auto 20px;
  border-radius: 50%; background: rgba(34,197,94,0.12);
  border: 2px solid rgba(34,197,94,0.35); color: #4ade80;
  display: flex; align-items: center; justify-content: center;
}
.success-box__icon svg { width: 40px; height: 40px; }
.success-box__title { font-family: var(--font-en); font-size: 1.75rem; font-weight: 800; margin: 0 0 8px; }
.success-box__ref { font-family: var(--font-en); font-size: 2rem; font-weight: 800; color: var(--yellow); margin: 12px 0; }
.success-box__msg { color: var(--gray-muted); margin: 0 0 24px; line-height: 1.6; }
.success-box__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
