:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-soft: #faf8f4;
  --ink: #1c1917;
  --ink-muted: #57534e;
  --border: #e7e2d9;
  --accent: #d97706;
  --accent-dark: #b45309;
  --accent-soft: #fef3c7;
  --green: #16a34a;
  --green-hover: #15803d;
  --green-soft: #dcfce7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 6px 24px rgba(28, 25, 23, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  padding-bottom: 92px;
}

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

button,
input,
textarea {
  font-family: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 21px;
  flex-shrink: 0;
}

.brand-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-muted);
}

.btn-outline-sm {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.btn-outline-sm:hover {
  background: var(--surface-soft);
  border-color: var(--accent);
}

/* Intro */
.main-content {
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.intro-banner {
  text-align: center;
  padding: 6px 4px 2px;
}

.intro-badge {
  display: inline-block;
  margin: 0 0 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 999px;
}

.intro-heading {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.intro-desc {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14.5px;
}

/* Step Cards */
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.step-header-split {
  justify-content: space-between;
  flex-wrap: wrap;
}

.step-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.step-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.step-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

/* Step 1: 2 Big Product Cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.product-card {
  position: relative;
  text-align: left;
  border: 2.5px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: #d6ccc0;
}

.product-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.14);
}

.selected-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.15s, transform 0.15s;
}

.product-card.active .selected-pill {
  opacity: 1;
  transform: scale(1);
}

.product-img-wrap {
  aspect-ratio: 5 / 4;
  background: #e6c697;
  overflow: hidden;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.product-body {
  padding: 14px;
}

.tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.tag-amber {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.tag-red {
  background: var(--red-soft);
  color: var(--red);
}

.product-name {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.product-meta {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink-muted);
}

.product-price-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}

.price-big {
  font-size: 18px;
  font-weight: 800;
  color: var(--green);
}

.price-note {
  font-size: 12.5px;
  color: var(--ink-muted);
}

.product-bonus {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-muted);
  background: var(--surface-soft);
  padding: 7px 9px;
  border-radius: 10px;
}

/* ETA Box */
.eta-box {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 13px 14px;
}

.eta-icon {
  font-size: 24px;
  line-height: 1;
  margin-top: 2px;
}

.eta-label {
  margin: 0;
  font-size: 12.5px;
  color: #166534;
  font-weight: 600;
}

.eta-date {
  margin: 2px 0 3px;
  font-size: 16px;
  font-weight: 800;
  color: #14532d;
}

.eta-small {
  margin: 0;
  font-size: 12px;
  color: #166534;
  opacity: 0.85;
}

/* Step 2: Design Tabs & Live Preview */
.design-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.design-tab {
  border: 2px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.design-tab.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.preview-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 640px) {
  .preview-layout {
    grid-template-columns: 1fr;
  }
}

.shirt-stage {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: #e6c697;
  user-select: none;
  touch-action: none;
}

.shirt-base {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.print-area {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.design-placeholder {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  width: 44%;
  padding: 10px 8px;
  border: 2px dashed rgba(255, 255, 255, 0.78);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}

.design-overlay {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  width: 36%;
  max-height: 46%;
  object-fit: contain;
  pointer-events: auto;
  cursor: grab;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.28));
}

.design-overlay:active {
  cursor: grabbing;
}

.upload-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}

.btn-upload:hover {
  background: var(--accent-dark);
}

.file-status {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
  word-break: break-word;
}

.adjust-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.adjust-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
}

.slider-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.slider-row input[type='range'] {
  width: 100%;
  accent-color: var(--accent);
}

.adjust-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-mini {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-mini-danger {
  color: var(--red);
  border-color: #fecaca;
  background: #fef2f2;
}

.tip-box {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-muted);
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 10px 12px;
  border-radius: 10px;
}

/* Panel Custom Design */
.free-design-box {
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.free-design-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.mini-badge {
  background: #fff;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.free-design-text {
  margin: 0 0 8px;
  font-size: 14px;
}

.free-design-rule {
  margin: 0 0 12px;
  font-size: 13px;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 8px 10px;
  border-radius: 10px;
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.text-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  resize: vertical;
}

.text-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Step 3: Size Picker & Pricing */
.btn-size-chart {
  border: 1.5px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.tier-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tier-pill {
  flex: 1 1 130px;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.3;
}

.tier-pill.active-tier {
  background: var(--green-soft);
  border-color: var(--green);
  color: #14532d;
}

.tier-pill strong {
  display: block;
  font-size: 14px;
}

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

@media (max-width: 480px) {
  .size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.size-cell {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.size-cell.has-qty {
  border-color: var(--green);
  background: #f0fdf4;
}

.size-label {
  font-size: 15px;
  font-weight: 800;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.12s, transform 0.08s;
}

.qty-btn:active {
  transform: scale(0.93);
}

.qty-btn.plus {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.qty-val {
  min-width: 24px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.size-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn-link-muted {
  border: none;
  background: none;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 0;
}

.total-qty-pill {
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
}

.nudge-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.nudge-box.warn {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #991b1b;
}

.nudge-box.save {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  color: #92400e;
}

.nudge-box.good {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  color: #166534;
}

/* Summary Box */
.summary-box {
  margin-top: 14px;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

.summary-total {
  font-size: 18px;
  font-weight: 800;
}

.summary-total strong {
  color: var(--green);
  font-size: 21px;
}

.summary-deposit {
  font-size: 13.5px;
  color: var(--ink-muted);
  background: #fff;
  border: 1px dashed #d6ccc0;
  padding: 8px 10px;
  border-radius: 9px;
}

.summary-deposit strong {
  color: var(--ink);
}

/* Step 4: 4 Checkboxes + WhatsApp CTA */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.check-item:has(input:checked) {
  border-color: var(--green);
  background: #f0fdf4;
}

.check-item input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--green);
  flex-shrink: 0;
  cursor: pointer;
}

.check-box {
  display: none;
}

.check-text {
  font-size: 13.5px;
  line-height: 1.45;
}

.lock-hint {
  margin: 14px 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  text-align: center;
}

.lock-hint.ready {
  color: var(--green);
}

.btn-whatsapp {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  background: var(--green);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.28);
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
}

.btn-whatsapp:hover:not(:disabled) {
  background: var(--green-hover);
}

.btn-whatsapp:active:not(:disabled) {
  transform: scale(0.99);
}

.btn-whatsapp:disabled {
  background: #cbd5e1;
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
}

.wa-icon {
  font-size: 20px;
}

/* Footer */
.site-footer {
  text-align: center;
  color: var(--ink-muted);
  font-size: 12.5px;
  padding: 6px 0 10px;
}

/* Floating Help Button & Popover */
.help-fab {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 40;
  border: none;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  padding: 12px 16px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 0.15s;
}

.help-fab:hover {
  transform: translateY(-2px);
}

.help-popover {
  position: fixed;
  right: 16px;
  bottom: 72px;
  z-index: 45;
  width: min(350px, calc(100vw - 32px));
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  padding: 14px;
}

.help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

.icon-close {
  border: none;
  background: var(--surface-soft);
  color: var(--ink);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.help-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.help-pill {
  border: 1.5px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 8px;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
}

.help-pill.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.help-answer {
  background: var(--surface-soft);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}

.help-answer ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(28, 25, 23, 0.58);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-card {
  width: min(500px, 100%);
  max-height: 88vh;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25);
}

.modal-card-lg {
  width: min(640px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.modal-body {
  padding: 14px 16px 18px;
  overflow-y: auto;
}

.modal-note {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-muted);
}

.table-wrap {
  overflow-x: auto;
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.size-table th,
.size-table td {
  border-bottom: 1px solid var(--border);
  padding: 9px 8px;
  text-align: center;
}

.size-table th {
  background: var(--surface-soft);
  font-weight: 800;
  font-size: 12.5px;
}

.catalog-gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.catalog-item {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-soft);
}

.catalog-item figcaption {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  border-bottom: 1px solid var(--border);
}

.catalog-item img {
  width: 100%;
  height: auto;
}
