html:has(#pmbForm) { scroll-behavior: smooth; }

/* ================= Hero ================= */
.pmb-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #050b2e 0%, #0d1650 42%, #1b2a7a 78%, var(--gold-dark) 165%);
  padding: 54px 0 46px;
  text-align: center;
}
.pmb-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 255, 255, .55) 0%, transparent 60%),
    radial-gradient(1.5px 1.5px at 28% 62%, rgba(255, 255, 255, .4) 0%, transparent 60%),
    radial-gradient(1.5px 1.5px at 46% 18%, rgba(255, 255, 255, .5) 0%, transparent 60%),
    radial-gradient(1.5px 1.5px at 68% 46%, rgba(255, 255, 255, .35) 0%, transparent 60%),
    radial-gradient(1.5px 1.5px at 82% 70%, rgba(255, 255, 255, .5) 0%, transparent 60%),
    radial-gradient(1.5px 1.5px at 92% 28%, rgba(255, 255, 255, .4) 0%, transparent 60%),
    radial-gradient(circle at 18% 30%, rgba(245, 185, 66, .16) 0%, transparent 42%),
    radial-gradient(circle at 84% 78%, rgba(245, 185, 66, .12) 0%, transparent 45%);
  pointer-events: none;
}
.pmb-hero-inner { position: relative; z-index: 1; }

.pmb-crumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .65);
  margin-bottom: 18px;
}
.pmb-crumb a { display: inline-flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, .92); }
.pmb-crumb a:hover { color: var(--gold); }
.pmb-crumb-sep { color: rgba(255, 255, 255, .35); }
.pmb-crumb-current { color: var(--gold); }

.pmb-eyebrow {
  display: inline-block;
  background: rgba(245, 185, 66, .16);
  border: 1px solid rgba(245, 185, 66, .42);
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.pmb-hero h1 {
  color: white;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.28;
  margin: 0 0 16px;
}
.pmb-hero h1 em { font-style: normal; color: var(--gold); }

.pmb-hero-sub {
  color: #d5dafa;
  font-size: 15px;
  line-height: 1.75;
  max-width: 580px;
  margin: 0 auto 30px;
}

.pmb-hero-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.pmb-hero-stat { display: flex; flex-direction: column; gap: 2px; }
.pmb-hero-stat strong { font-size: 24px; font-weight: 800; color: white; }
.pmb-hero-stat span { font-size: 12px; color: #aab2e0; font-weight: 600; }

.pmb-hero-cta {
  display: inline-flex;
  background: linear-gradient(120deg, var(--gold-dark) 0%, var(--gold) 100%);
  color: var(--gold-text);
  box-shadow: 0 10px 26px rgba(212, 160, 23, .38);
  transition: transform .15s ease, box-shadow .15s ease;
}
.pmb-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(212, 160, 23, .45);
}

/* ================= Trust strip ================= */
.pmb-trust { background: white; border-bottom: 1px solid var(--border); }
.pmb-trust-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 34px;
  padding: 18px 24px;
}
.pmb-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-text);
  white-space: nowrap;
}

/* ================= Layout ================= */
.pmb-page { background: var(--page-bg); padding: 40px 0 64px; }
.pmb-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 26px;
  align-items: start;
}
@media (max-width: 960px) {
  .pmb-layout { grid-template-columns: 1fr; }
  .pmb-sidebar { order: -1; }
}

/* ================= Form cards ================= */
.pmb-card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.pmb-card-head {
  background: linear-gradient(120deg, #0d1650 0%, #1b2a7a 100%);
  color: white;
  padding: 15px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pmb-card-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(245, 185, 66, .22);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.pmb-card-head h3 { margin: 0; font-size: 16px; color: white; display: inline; }
.pmb-card-sub-inline { font-size: 12px; font-weight: 600; opacity: .75; }
.pmb-card-sub { font-size: 12px; opacity: .8; display: block; margin-top: 1px; }
.pmb-card-body { padding: 22px; }

.pmb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .pmb-row { grid-template-columns: 1fr; } }

.pmb-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.pmb-field:last-child { margin-bottom: 0; }
.pmb-field-full { grid-column: 1 / -1; }
.pmb-field label { font-size: 12.5px; font-weight: 700; color: var(--navy-text); }
.pmb-req { color: var(--red); }
.pmb-hint { font-size: 11.5px; color: var(--text-muted); }

.pmb-field input,
.pmb-field select,
.pmb-field textarea {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 10px 13px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--navy-text);
  background: var(--page-bg);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.pmb-field select { cursor: pointer; }
.pmb-field select:disabled { opacity: .55; cursor: not-allowed; }
.pmb-field textarea { resize: vertical; min-height: 56px; }
.pmb-field input:focus,
.pmb-field select:focus,
.pmb-field textarea:focus {
  outline: none;
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, .16);
  background: white;
}

/* ================= Box size cards ================= */
.pmb-size-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 640px) { .pmb-size-grid { grid-template-columns: 1fr; } }

.pmb-size-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  padding: 18px 12px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--page-bg);
  cursor: pointer;
  transition: all .18s ease;
}
.pmb-size-card:hover { border-color: var(--gold-dark); }
.pmb-size-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.pmb-size-card input:checked ~ .pmb-size-icon,
.pmb-size-card:has(input:checked) {
  border-color: var(--gold-dark);
}
.pmb-size-card:has(input:checked) {
  background: linear-gradient(160deg, #fff7e6, #fef3d9);
  box-shadow: 0 6px 18px rgba(212, 160, 23, .18);
}
.pmb-size-icon { font-size: 26px; }
.pmb-size-card strong { font-size: 19px; color: var(--navy-text); font-weight: 800; }
.pmb-size-label { font-size: 12.5px; font-weight: 700; color: var(--blue); }
.pmb-size-card small { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* ================= Progress bar ================= */
.pmb-progress-wrap { margin-bottom: 20px; }
.pmb-progress-track {
  height: 12px;
  border-radius: 8px;
  background: var(--bg-tint);
  overflow: hidden;
}
.pmb-progress-fill {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold) 100%);
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}
.pmb-progress-fill.is-full { background: linear-gradient(90deg, var(--green) 0%, #10B981 100%); }
.pmb-progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy-text);
}
#pmbRemainingLabel { color: var(--text-muted); font-weight: 600; }

/* ================= Add item ================= */
.pmb-add-item {
  background: var(--page-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.pmb-row-add { grid-template-columns: 1fr auto; align-items: end; }
@media (max-width: 560px) { .pmb-row-add { grid-template-columns: 1fr; } }
.pmb-add-btn {
  white-space: nowrap;
  height: 40px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 700;
}

.pmb-warn-box {
  display: none;
  gap: 8px;
  align-items: flex-start;
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 12.5px;
  color: #DC2626;
  font-weight: 600;
}
.pmb-warn-box.show { display: flex; }

/* ================= Box items list ================= */
.pmb-box-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.pmb-box-empty {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 18px 10px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  margin: 0;
}
.pmb-box-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
}
.pmb-box-item-emoji { font-size: 22px; flex-shrink: 0; }
.pmb-box-item-info { flex: 1; min-width: 0; }
.pmb-box-item-info strong { display: block; font-size: 13px; color: var(--navy-text); }
.pmb-box-item-info small { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.pmb-box-item-price { font-size: 13px; font-weight: 800; color: var(--navy-text); white-space: nowrap; }
.pmb-box-item-remove {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--page-bg);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s ease;
}
.pmb-box-item-remove:hover { color: var(--red); border-color: var(--red); background: #FEF2F2; }

/* ================= Estimated total ================= */
.pmb-total-box {
  background: linear-gradient(120deg, #0d1650 0%, #1b2a7a 100%);
  color: white;
  border-radius: 13px;
  padding: 16px 20px;
}
.pmb-total-label { font-size: 12.5px; font-weight: 700; opacity: .8; }
.pmb-total-val { font-size: 28px; font-weight: 800; line-height: 1.3; }
.pmb-total-box small { font-size: 11px; opacity: .7; }

/* ================= Submit ================= */
.pmb-submit {
  width: 100%;
  padding: 15px 24px;
  background: linear-gradient(120deg, var(--gold-dark) 0%, var(--gold) 100%);
  color: var(--gold-text);
  font-size: 15px;
  box-shadow: 0 10px 24px rgba(212, 160, 23, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.pmb-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(212, 160, 23, .42); }
.pmb-submit-note { text-align: center; font-size: 11.5px; color: var(--text-muted); margin: 10px 0 0; }

/* ================= Sidebar ================= */
.pmb-sidebar-card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  margin-bottom: 20px;
}
.pmb-sidebar-head {
  padding: 13px 18px;
  font-size: 13.5px;
  font-weight: 800;
  color: white;
}
.pmb-sidebar-head-navy { background: linear-gradient(120deg, #0d1650, #1b2a7a); }
.pmb-sidebar-head-gold { background: linear-gradient(120deg, var(--gold-dark), var(--gold)); color: var(--gold-text); }
.pmb-sidebar-head-teal { background: linear-gradient(120deg, #0f766e, #14b8a6); }
.pmb-sidebar-body { padding: 16px 18px; }

.pmb-how-list { display: flex; flex-direction: column; gap: 0; }
.pmb-how-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-tint);
}
.pmb-how-item:last-child { border-bottom: none; }
.pmb-how-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.pmb-how-item strong { font-size: 13px; color: var(--navy-text); }
.pmb-how-item p { font-size: 12px; color: var(--text-muted); margin: 3px 0 0; line-height: 1.5; }

.pmb-rules-list { display: flex; flex-direction: column; gap: 10px; }
.pmb-rules-list li {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--navy-text);
  padding-left: 20px;
  position: relative;
}
.pmb-rules-list li::before {
  content: '●';
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 9px;
}
.pmb-rules-list li.pmb-rule-ok::before { color: var(--green); }
.pmb-rules-list li.pmb-rule-info::before { color: var(--blue); }
.pmb-rules-list li.pmb-rule-warn::before { color: var(--gold-dark); }

.pmb-help-body p { margin: 0 0 8px; font-size: 12.5px; color: var(--navy-text); }
.pmb-help-body p:last-child { margin-bottom: 0; }

/* ================= Success modal ================= */
.pmb-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 11, 46, .65);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.pmb-overlay.show { opacity: 1; visibility: visible; }
.pmb-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 20px;
  padding: 30px 30px 26px;
  box-shadow: 0 24px 60px rgba(5, 11, 46, .4);
  text-align: center;
  transform: translateY(24px) scale(.96);
  opacity: 0;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .25s ease;
}
.pmb-overlay.show .pmb-modal { transform: translateY(0) scale(1); opacity: 1; }
.pmb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--navy-text);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.pmb-close:hover { background: var(--border); transform: rotate(90deg); }
.pmb-modal-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, #0d1650 0%, var(--gold-dark) 100%);
  box-shadow: 0 10px 26px rgba(212, 160, 23, .35);
}
.pmb-modal h2 { margin: 0 0 8px; font-size: 19px; color: var(--navy-text); }
.pmb-modal-ref {
  display: inline-block;
  background: var(--bg-tint);
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.pmb-modal p { margin: 0 0 20px; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
#pmbModalName { color: var(--navy-text); font-weight: 600; }
.pmb-modal-done { background: #0d1650; color: white; }

@media (max-width: 560px) {
  .pmb-hero { padding: 40px 0 34px; }
  .pmb-card-body { padding: 18px; }
  .pmb-box-item { flex-wrap: wrap; }
}
