.sp-app {
  --sp-accent: #f0254f;
  --sp-accent-dark: #c41e41;
  --sp-ink: #1f2933;
  --sp-mute: #6b7685;
  --sp-card: #f0f1f5;
  --sp-line: #dde1e8;
  --sp-warn: #c98a00;
  --sp-err: #b42318;
  --sp-ok: #067647;
  direction: rtl;
  text-align: right;
  color: var(--sp-ink);
  font-size: 14px;
  line-height: 1.9;
  max-width: 1320px;
  margin: 0 auto;
}
.sp-app *, .sp-app *::before, .sp-app *::after { box-sizing: border-box; }
.sp-app button, .sp-app input, .sp-app select, .sp-app textarea { font-family: inherit; font-size: inherit; }

/* چیدمان سه‌ستونه: کارت معرفی | فرم | خلاصه قیمت */
.sp-layout { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 24px; align-items: start; }
.sp-layout.is-woo { grid-template-columns: 1fr; gap: 16px; }

.sp-hero, .sp-box, .sp-sum { background: var(--sp-card); border-radius: 16px; }
.sp-hero { padding: 28px 20px; text-align: center; }
.sp-hero-title { margin: 0 0 18px; font-size: 24px; font-weight: 400; color: #2b3445; line-height: 1.6; }
.sp-hero-title b { font-weight: 800; }
.sp-hero img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.sp-hero-svg { width: 100%; max-width: 280px; color: var(--sp-accent); }

.sp-form { margin: 0; }
.sp-box { padding: 16px 16px 4px; margin-bottom: 16px; }
.sp-box:last-child { margin-bottom: 0; }
.sp-fld { margin-bottom: 14px; }
.sp-fld > label { display: block; font-size: 13px; margin-bottom: 5px; color: var(--sp-ink); }
.sp-req { color: var(--sp-err); }
.sp-help { color: var(--sp-mute); font-size: 12.5px; margin-top: 6px; line-height: 1.8; }
.sp-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* فیلدهای سفید و گرد مثل نمونه */
.sp-app input[type=text], .sp-app input[type=tel], .sp-app input[type=email], .sp-app input[type=number],
.sp-select, .sp-app textarea {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid transparent; border-radius: 10px;
  background: #fff; color: var(--sp-ink); box-shadow: none; margin: 0;
}
.sp-app textarea { height: auto; padding: 10px 14px; resize: vertical; }
.sp-select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-left: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231f2933' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center; background-size: 14px;
}
.sp-app input:focus, .sp-select:focus, .sp-app textarea:focus { outline: none; border-color: var(--sp-accent); }
.sp-app input[type=text].sp-w, .sp-app input[type=text].sp-l, .sp-qty { direction: ltr; text-align: right; }

.sp-design-wrap { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--sp-line); }
.sp-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; }
.sp-check input { width: 18px; height: 18px; accent-color: var(--sp-accent); margin: 0; }
.sp-dprice { font-style: normal; color: var(--sp-accent-dark); font-weight: 600; }
.sp-design-box { margin-top: 10px; }
.sp-design-box > label { display: block; font-size: 13px; margin-bottom: 5px; }
.sp-upload input[type=file] { width: 100%; padding: 14px; border: 2px dashed #c6ccd6; border-radius: 10px; background: #fff; }
.sp-contact { border-top: 1px solid var(--sp-line); margin-top: 14px; padding-top: 14px; }
.sp-contact { position: relative; }
.sp-hp { position: absolute !important; top: 0; right: 0; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; opacity: 0; overflow: hidden; pointer-events: none; }

.sp-msg { margin-top: 12px; font-weight: 600; }
.sp-msg:empty { display: none; }
.sp-step2 .sp-msg { margin-bottom: 12px; }
.sp-msg.err { color: var(--sp-err); background: #fef3f2; padding: 10px 14px; border-radius: 10px; }
.sp-msg.ok { color: var(--sp-ok); background: #ecfdf3; padding: 10px 14px; border-radius: 10px; }
.sp-msg.ok a { color: var(--sp-accent-dark); font-weight: 700; margin-right: 8px; }

/* ستون خلاصه قیمت */
.sp-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.sp-sum { padding: 20px; transition: opacity .15s; }
.sp-sum.loading { opacity: .6; }
.sp-cost { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.sp-cost-l { display: inline-flex; align-items: center; gap: 6px; color: #2b3445; }
.sp-cost b { font-size: 17px; font-weight: 800; }
.sp-cost small { font-size: 13px; font-weight: 700; }
.sp-badge { display: inline-block; font-size: 12px; background: #fff4e5; color: #b45309; border: 1px solid #f5d29a; border-radius: 999px; padding: 0 10px; font-weight: 700; margin-bottom: 8px; }
.sp-lines { list-style: none; margin: 0 0 8px; padding: 0; font-size: 13px; }
.sp-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed #d3d8e0; }
.sp-lines li span { color: var(--sp-mute); }
.sp-unit { color: var(--sp-mute); font-size: 12.5px; }
.sp-deliv { margin: 8px 0; background: #fff; padding: 7px 12px; border-radius: 10px; font-size: 13px; }
.sp-disc { margin: 12px 0 16px; color: #4a5565; font-size: 13px; line-height: 2; }
.sp-hint-box { background: #fff; color: var(--sp-mute); padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 8px; }
.sp-warn-box { background: #fffaeb; color: #b54708; padding: 10px 12px; border-radius: 10px; border: 1px solid #fedf89; font-size: 13px; margin-bottom: 8px; }

.sp-go {
  display: block; width: 100%; height: 48px; border: 0; border-radius: 10px; background: var(--sp-accent); color: #fff;
  font-weight: 700; font-size: 15px; cursor: pointer; transition: background .15s;
}
.sp-go:hover:not(:disabled) { background: var(--sp-accent-dark); }
.sp-go:disabled { opacity: .55; cursor: not-allowed; }
.sp-guide { display: block; text-align: center; margin-top: 16px; color: var(--sp-accent); text-decoration: underline; font-size: 14px; }
.sp-outline {
  display: block; width: 100%; height: 44px; border: 1px solid var(--sp-accent); border-radius: 10px; background: transparent;
  color: var(--sp-accent); cursor: pointer; font-weight: 500;
}
.sp-outline:hover { background: var(--sp-accent); color: #fff; }
.sidex-wrap, .sp-sidex { display: flex; flex-direction: column; gap: 16px; }
.sp-notice {
  border: 1px solid #f5c242; background: #fffaf0; color: var(--sp-warn); border-radius: 12px; padding: 16px 18px;
  font-weight: 700; font-size: 13.5px; line-height: 2.1;
}

.sp-done { text-align: center; padding: 40px 16px; background: var(--sp-card); border-radius: 16px; }
.sp-done-icon { width: 64px; height: 64px; line-height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #ecfdf3; color: var(--sp-ok); font-size: 34px; }
.sp-code { font-size: 17px; }

@media (max-width: 1000px) {
  .sp-layout { grid-template-columns: 1fr; }
  .sp-hero { display: none; }
  .sp-side { position: static; }
}

/* حالت ووکامرس (داخل صفحه محصول) */
.sp-woo { max-width: 100%; margin: 16px 0; font-size: 14px; }
.sp-woo .sp-side { position: static; }
.sp-from { font-size: 14px; color: #617080; }
