/* ماژول تجربه خرید — فاکتورک پرو. زبان طراحی واحد برای سبد، تسویه‌حساب و تشکر. */
body.fpro-cx {
  --fpro-cx-primary: #1d3f8f;
  --fpro-cx-on-primary: #fff;
  --fpro-cx-hover: color-mix(in srgb, var(--fpro-cx-primary) 86%, #000);
  --fpro-cx-tint: color-mix(in srgb, var(--fpro-cx-primary) 8%, #fff);
  --fpro-cx-ink: #101828;
  --fpro-cx-text: #344054;
  --fpro-cx-muted: #667085;
  --fpro-cx-line: #e6e9ef;
  --fpro-cx-soft: #f6f7fa;
  --fpro-cx-page: #f3f5f9;
  --fpro-cx-ok: #12805c;
  --fpro-cx-bad: #c4320a;
  --fpro-cx-radius: 18px;
  --fpro-cx-shadow: none;
  --fpro-cx-font: 'Estedad', Tahoma, sans-serif;
  margin: 0;
  background: var(--fpro-cx-page) !important;
}

/* ------------------------------------------------------------ پوسته */
/* استایل قالب بار نمی‌شود؛ این بخش پایه صفحه را می‌سازد. */
html {
  -webkit-text-size-adjust: 100%;
}

body.fpro-cx-canvas {
  color: var(--fpro-cx-text);
  font-family: var(--fpro-cx-font);
  font-size: 14px;
  line-height: 1.8;
}

/* هرچه افزونه‌ها بیرون از صفحه ما به body اضافه کنند پنهان است؛ اسکریپتشان اجرا می‌شود. */
body.fpro-cx-canvas > :not(.fpro-cx-topbar, .fpro-cx-app, .fpro-cx-toast, .select2-container, #wpadminbar, script, style, link, [role="dialog"], iframe) {
  display: none !important;
}

.fpro-cx-app img,
.fpro-cx-topbar img {
  max-width: 100%;
  height: auto;
}

/* سپر: اگر قالب یا افزونه‌ای عکس یا آیکن بدون اندازه داخل جدول‌ها گذاشت، صفحه به‌هم نریزد. */
.fpro-cx-app table img,
.fpro-cx-app .woocommerce-checkout-review-order-table img,
.fpro-cx-app .woocommerce-table img {
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
}

.fpro-cx-app svg:not([width]):not([class]) {
  max-width: 24px;
  max-height: 24px;
}

.fpro-cx-app .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.fpro-cx-app :is(input, select, textarea, button) {
  font: inherit;
}

.fpro-cx-app .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid var(--fpro-cx-line);
  border-radius: 11px;
  background: #fff;
  color: var(--fpro-cx-ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.fpro-cx-app {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 56px;
  color: var(--fpro-cx-text);
  font-family: var(--fpro-cx-font);
  font-size: 14px;
  line-height: 1.8;
  text-align: right;
}

.fpro-cx-app *,
.fpro-cx-app *::before,
.fpro-cx-app *::after {
  box-sizing: border-box;
}

.fpro-cx-app :is(h1, h2, h3, h4, p, a, th, td, label, span, strong, small, bdi, li, dt, dd, input, select, textarea, button, del) {
  font-family: var(--fpro-cx-font);
}

.fpro-cx-app .woocommerce {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

.fpro-cx-app :is(h1, h2, h3) {
  color: var(--fpro-cx-ink);
  text-transform: none;
  letter-spacing: 0;
}

.fpro-cx-app a {
  color: var(--fpro-cx-primary);
  text-decoration: none;
}

.fpro-cx-app a:hover {
  color: var(--fpro-cx-hover);
}

.fpro-cx-app .amount,
.fpro-cx-app .woocommerce-Price-amount {
  color: inherit !important;
  font-weight: inherit;
}

/* ترتیب فارسی مبلغ: اول عدد، بعد تومان. */
.fpro-cx-app .woocommerce-Price-amount bdi {
  direction: rtl;
  unicode-bidi: isolate;
}

/* حلقه فوکوس فقط برای کار با صفحه‌کلید؛ با موس و لمس خطی دور دکمه‌ها نمی‌آید. */
.fpro-cx-app :is(a, button, input[type="radio"], input[type="checkbox"]):focus {
  outline: 0;
}

.fpro-cx-app :is(a, button, input[type="radio"], input[type="checkbox"]):focus-visible {
  outline: 2px solid var(--fpro-cx-primary);
  outline-offset: 2px;
}

.fpro-cx-app input[type="radio"],
.fpro-cx-app input[type="checkbox"] {
  accent-color: var(--fpro-cx-primary);
}

/* هدر جدا: لوگو و برگشت */
.fpro-cx-topbar {
  border-bottom: 1px solid var(--fpro-cx-line);
  background: #fff;
}

.fpro-cx-topbar .fpro-cx-testbar {
  margin: 0;
  padding: 6px 14px;
  background: #fff4d6;
  color: #7a5200;
  font-family: var(--fpro-cx-font);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.fpro-cx-topbar-in {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
  max-width: 1200px;
  min-height: 68px;
  margin: 0 auto;
  padding: 10px 20px;
}

.fpro-cx-topbar a {
  text-decoration: none;
}

.fpro-cx-brand {
  display: inline-flex;
  align-items: center;
  color: var(--fpro-cx-ink);
  font-size: 16px;
  font-weight: 800;
}

.fpro-cx-brand img {
  display: block;
  width: auto;
  max-width: 170px;
  height: 42px;
  object-fit: contain;
}

.fpro-cx-back {
  flex: none;
  padding: 8px 16px;
  border: 1px solid var(--fpro-cx-line);
  border-radius: 11px;
  background: #fff;
  color: var(--fpro-cx-ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.fpro-cx-back:hover {
  border-color: var(--fpro-cx-primary);
  color: var(--fpro-cx-primary);
}

/* مرحله‌ها */
.fpro-cx-app .fpro-cx-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fpro-cx-app > .fpro-cx-steps {
  margin: 0 0 22px;
}

.fpro-cx-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--fpro-cx-muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.fpro-cx-steps li + li::before {
  content: "";
  width: 40px;
  height: 2px;
  border-radius: 2px;
  background: var(--fpro-cx-line);
}

.fpro-cx-steps li.is-done + li::before {
  background: var(--fpro-cx-primary);
}

.fpro-cx-app .fpro-cx-steps a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}

.fpro-cx-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e9ecf2;
  color: var(--fpro-cx-muted);
  font-size: 12px;
  font-weight: 800;
}

.fpro-cx-steps li.is-current,
.fpro-cx-steps li.is-done {
  color: var(--fpro-cx-ink);
}

.fpro-cx-steps li.is-current .fpro-cx-step-num,
.fpro-cx-steps li.is-done .fpro-cx-step-num {
  background: var(--fpro-cx-primary);
  color: var(--fpro-cx-on-primary);
}

/* چیدمان دو ستونی */
.fpro-cx-app .fpro-cx-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 20px;
  align-items: start;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.fpro-cx-app .fpro-cx-grid::before,
.fpro-cx-app .fpro-cx-grid::after {
  display: none;
}

.fpro-cx-grid > .woocommerce-NoticeGroup {
  grid-column: 1 / -1;
}

.fpro-cx-main,
.fpro-cx-customer {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.fpro-cx-app .fpro-cx-side {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
}

@media (min-width: 992px) {
  .fpro-cx-side {
    position: sticky;
    top: 20px;
  }

  body.admin-bar .fpro-cx-side {
    top: 52px;
  }

}

/* کارت */
.fpro-cx-app .fpro-cx-card {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--fpro-cx-line);
  border-radius: var(--fpro-cx-radius);
  background: #fff;
  box-shadow: var(--fpro-cx-shadow);
}

.fpro-cx-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.fpro-cx-app .fpro-cx-card h2,
.fpro-cx-app .fpro-cx-card-head h2,
.fpro-cx-app #order_review_heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.5;
  text-align: right;
}

.fpro-cx-app .cart_totals > h2,
.fpro-cx-app #order_review_heading {
  margin-bottom: 14px;
}

.fpro-cx-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--fpro-cx-tint);
  color: var(--fpro-cx-primary);
  font-size: 14px;
  font-weight: 800;
}

.fpro-cx-count {
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--fpro-cx-soft);
  color: var(--fpro-cx-muted);
  font-size: 12px;
  font-weight: 700;
}

.fpro-cx-hint {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--fpro-cx-soft);
  color: var(--fpro-cx-muted);
  font-size: 13px;
}

/* پیام‌ها */
.fpro-cx-app .woocommerce-notices-wrapper:empty {
  display: none;
}

.fpro-cx-app :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid var(--fpro-cx-line);
  border-inline-start: 4px solid var(--fpro-cx-primary);
  border-radius: 12px;
  background: #fff;
  color: var(--fpro-cx-ink);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  box-shadow: var(--fpro-cx-shadow);
}

.fpro-cx-app :is(.woocommerce-message, .woocommerce-info, .woocommerce-error)::before {
  display: none;
}

.fpro-cx-app .woocommerce-message {
  border-inline-start-color: var(--fpro-cx-ok);
}

.fpro-cx-app .woocommerce-error {
  display: block;
  border-inline-start-color: var(--fpro-cx-bad);
  background: #fff8f6;
}

.fpro-cx-app .woocommerce-error li {
  margin: 2px 0;
}

.fpro-cx-app :is(.woocommerce-message, .woocommerce-info) a {
  order: 2;
  font-weight: 700;
}

.fpro-cx-app :is(.woocommerce-message, .woocommerce-info) a.button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fpro-cx-primary);
  box-shadow: none;
}

/* فیلدها */
.fpro-cx-app .input-text,
.fpro-cx-app select,
.fpro-cx-app textarea,
.fpro-cx-app .select2-container .select2-selection--single {
  width: 100%;
  min-height: 46px;
  padding: 9px 14px;
  border: 1px solid #d5dae3;
  border-radius: 12px;
  background: #fff;
  color: var(--fpro-cx-ink);
  font-size: 14px;
  box-shadow: none;
}

.fpro-cx-app textarea,
.fpro-cx-app textarea.input-text {
  min-height: 84px;
  line-height: 1.8;
  resize: vertical;
}

.fpro-cx-app :is(.input-text, select, textarea):focus,
.fpro-cx-app .select2-container--focus .select2-selection--single,
.fpro-cx-app .select2-container--open .select2-selection--single {
  border-color: var(--fpro-cx-primary);
  box-shadow: none;
  outline: 0;
}

.fpro-cx-app .select2-container {
  width: 100% !important;
}

.fpro-cx-app .select2-container .select2-selection--single {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0;
}

.fpro-cx-app .select2-container .select2-selection--single .select2-selection__rendered {
  flex: 1;
  padding: 0 14px 0 34px;
  color: var(--fpro-cx-ink);
  line-height: 44px;
  text-align: right;
}

.fpro-cx-app .select2-container .select2-selection--single .select2-selection__arrow {
  top: 0;
  right: auto;
  left: 8px;
  height: 44px;
}

/* فلش سلکت: آیکون خود ماژول به جای مثلث */
.fpro-cx-app .select2-container .select2-selection__arrow {
  width: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 18px no-repeat;
}

.fpro-cx-app .select2-container .select2-selection__arrow b {
  display: none;
}

.fpro-cx-app select:not(.select2-hidden-accessible) {
  padding-left: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") left 10px center / 18px no-repeat;
  -webkit-appearance: none;
  appearance: none;
}

/* پیشنهاد شهر */
.fpro-cx-app .fpro-cx-city {
  position: relative;
}

.fpro-cx-app .fpro-cx-suggest {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 30;
  max-height: 240px;
  margin: 4px 0 0;
  padding: 6px;
  border: 1px solid var(--fpro-cx-primary);
  border-radius: 12px;
  background: #fff;
  list-style: none;
  overflow-y: auto;
  scrollbar-width: thin;
}

.fpro-cx-app .fpro-cx-suggest li {
  margin: 0;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--fpro-cx-text);
  font-size: 14px;
  cursor: pointer;
}

.fpro-cx-app .fpro-cx-suggest li:hover,
.fpro-cx-app .fpro-cx-suggest li.is-active {
  background: var(--fpro-cx-primary);
  color: var(--fpro-cx-on-primary);
}

/* لیست بازشو بیرون از صفحه ما و مستقیم داخل body ساخته می‌شود. */
body.fpro-cx .select2-container--open .select2-dropdown {
  overflow: hidden;
  border: 1px solid var(--fpro-cx-primary);
  border-radius: 12px;
  background: #fff;
  font-family: var(--fpro-cx-font);
}

body.fpro-cx .select2-container--open .select2-dropdown--below {
  margin-top: 4px;
}

body.fpro-cx .select2-container--open .select2-dropdown--above {
  margin-top: -4px;
}

body.fpro-cx .select2-search--dropdown {
  padding: 8px;
  background: #fff;
}

body.fpro-cx .select2-search--dropdown .select2-search__field {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--fpro-cx-line);
  border-radius: 10px;
  background: var(--fpro-cx-soft);
  color: var(--fpro-cx-ink);
  font: inherit;
  font-size: 14px;
  outline: 0;
}

body.fpro-cx .select2-results__options {
  max-height: 260px;
  padding: 0 6px 6px;
  scrollbar-width: thin;
}

body.fpro-cx .select2-results__option {
  margin: 0;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--fpro-cx-text);
  font-size: 14px;
  line-height: 1.6;
  text-align: right;
}

body.fpro-cx .select2-container--default .select2-results__option[aria-selected="true"],
body.fpro-cx .select2-container--default .select2-results__option--selected {
  background: var(--fpro-cx-tint);
  color: var(--fpro-cx-primary);
  font-weight: 700;
}

body.fpro-cx .select2-container--default .select2-results__option--highlighted[aria-selected],
body.fpro-cx .select2-container--default .select2-results__option--highlighted {
  background: var(--fpro-cx-primary);
  color: var(--fpro-cx-on-primary);
}

.fpro-cx-app .form-row {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
}

.fpro-cx-app .form-row > label {
  display: block;
  margin: 0 0 5px;
  color: var(--fpro-cx-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.fpro-cx-app .form-row .optional {
  color: var(--fpro-cx-muted);
  font-size: 11px;
  font-weight: 400;
}

.fpro-cx-app .form-row .required {
  color: var(--fpro-cx-bad);
  text-decoration: none;
}

.fpro-cx-app .fpro-cx-hide {
  display: none !important;
}

.fpro-cx-app :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-additional-fields__field-wrapper) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fpro-cx-app :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-additional-fields__field-wrapper) > .form-row {
  grid-column: 1 / -1;
}

.fpro-cx-app :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper) > .form-row-first,
.fpro-cx-app :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper) > .form-row-last {
  grid-column: auto;
}

.fpro-cx-app .woocommerce-invalid :is(.input-text, select),
.fpro-cx-app .woocommerce-invalid .select2-selection--single {
  border-color: var(--fpro-cx-bad);
}

/* تیترهای قالب ووکامرس؛ عنوان کارت جایشان را گرفته است. */
.fpro-cx-billing .woocommerce-billing-fields > h3 {
  display: none;
}

.fpro-cx-app .fpro-cx-billing .woocommerce-billing-fields,
.fpro-cx-app .woocommerce-shipping-fields,
.fpro-cx-app .woocommerce-additional-fields {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.fpro-cx-app .woocommerce-shipping-fields:empty {
  display: none;
}

/* کارت توضیحات: برچسب فیلد کافی است؛ اگر توضیحات خاموش باشد کارت نمی‌ماند. */
.fpro-cx-app .woocommerce-additional-fields > h3 {
  display: none;
}

.fpro-cx-app .fpro-cx-extra:not(:has(.form-row, .faktorak-checkout-map)) {
  display: none;
}

/* فیلد چند انتخابی */
.fpro-cx-app .fpro-cf-multi {
  display: grid;
  gap: 8px;
}

.fpro-cx-app .fpro-cf-multi-title {
  font-size: 13px;
  font-weight: 700;
}

.fpro-cx-app .fpro-cf-multi label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.fpro-cx-app .fpro-cf-multi input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
}

/* دفترچه آدرس */
.fpro-cx-book {
  margin-bottom: 16px;
}

.fpro-cx-book-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.fpro-cx-app button.fpro-cx-addr {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 92px;
  margin: 0;
  padding: 12px 14px;
  border: 1.5px solid var(--fpro-cx-line);
  border-radius: 14px;
  background: #fff;
  color: var(--fpro-cx-text);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  text-align: right;
  box-shadow: none;
  cursor: pointer;
}

.fpro-cx-app button.fpro-cx-addr:hover {
  border-color: #c3cad6;
}

.fpro-cx-app button.fpro-cx-addr.is-on {
  border-color: var(--fpro-cx-primary);
  background: var(--fpro-cx-tint);
}

.fpro-cx-addr strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fpro-cx-ink);
  font-size: 14px;
  font-weight: 800;
}

.fpro-cx-addr strong i {
  padding: 0 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--fpro-cx-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.fpro-cx-addr small {
  color: var(--fpro-cx-muted);
  font-size: 12px;
}

.fpro-cx-app button.fpro-cx-addr.is-new {
  justify-content: center;
  border-style: dashed;
}

.fpro-cx-app button.fpro-cx-addr.is-new strong {
  color: var(--fpro-cx-primary);
}

.fpro-cx-app button.fpro-cx-book-edit {
  display: inline-block;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fpro-cx-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.fpro-cx-app button.fpro-cx-book-edit[hidden],
.fpro-cx-app .fpro-cx-book-label[hidden] {
  display: none;
}

.fpro-cx-app .fpro-cx-book-label {
  margin-top: 14px;
}

/* آدرس انتخاب شد: فرم و نقشه جمع می‌شوند ولی فیلدها با سفارش ارسال می‌شوند. */
.fpro-cx-billing.is-folded .woocommerce-billing-fields__field-wrapper,
.fpro-cx-billing.is-folded .faktorak-checkout-map {
  display: none;
}

/* نقشه فاکتورک */
.fpro-cx-app .faktorak-checkout-map {
  margin: 16px 0 0;
  padding: 14px;
  border: 1px solid var(--fpro-cx-line);
  border-radius: 16px;
  background: var(--fpro-cx-soft);
}

.fpro-cx-app .fb-map-message {
  margin-bottom: 10px;
  color: var(--fpro-cx-ink);
  font-size: 13px !important;
  font-weight: 700;
}

.fpro-cx-app #fb-map {
  height: 320px;
  border: 1px solid var(--fpro-cx-line);
  border-radius: 12px;
  overflow: hidden;
  z-index: 0;
}

.fpro-cx-app #fb-map .leaflet-bar {
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: none;
}

.fpro-cx-app #fb-map .leaflet-bar a {
  width: 34px;
  height: 34px;
  border: 0;
  border-bottom: 1px solid var(--fpro-cx-line);
  background: #fff;
  color: var(--fpro-cx-ink);
  font-size: 16px;
  line-height: 34px;
}

.fpro-cx-app #fb-map .leaflet-bar a:last-child {
  border-bottom: 0;
}

.fpro-cx-app #fb-map .leaflet-bar a:hover {
  background: var(--fpro-cx-tint);
  color: var(--fpro-cx-primary);
}

.fpro-cx-app #fb-map .leaflet-control-geocoder {
  display: flex;
  align-items: center;
  margin: 10px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.fpro-cx-app #fb-map .leaflet-control-geocoder-form input {
  width: 190px;
  height: 36px;
  min-height: 0;
  padding: 4px 12px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--fpro-cx-ink);
  font-size: 13px;
  outline: 0;
}

.fpro-cx-app #fb-map .leaflet-control-geocoder-icon {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 0;
  background-color: #fff;
}

.fpro-cx-app #fb-map .leaflet-control-attribution {
  border-radius: 8px 0 0 0;
  font-size: 10px;
}

.fpro-cx-app .fb-map-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.fpro-cx-app .fb-map-actions .button {
  min-height: 40px;
  margin: 0;
  padding: 6px 14px;
  border: 1px solid var(--fpro-cx-line);
  border-radius: 10px;
  background: #fff;
  color: var(--fpro-cx-ink);
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

.fpro-cx-app .fb-map-actions .fb-map-confirm:not(:disabled) {
  border-color: var(--fpro-cx-primary);
  background: var(--fpro-cx-primary);
  color: var(--fpro-cx-on-primary);
}

.fpro-cx-app .fb-map-actions .button:disabled {
  border-color: var(--fpro-cx-line);
  background: #fff;
  color: #98a2b3;
  cursor: not-allowed;
  opacity: 1;
}

.fpro-cx-app .fb-map-status {
  color: var(--fpro-cx-muted);
  font-size: 12px;
}

.fpro-cx-app .fb-map-status.is-saved,
.fpro-cx-app .fb-map-status.is-success {
  color: var(--fpro-cx-ok);
  font-weight: 700;
}

.fpro-cx-app .fb-map-address {
  margin-top: 8px;
  color: var(--fpro-cx-muted);
  font-size: 12px;
}

/* انتخاب روش ارسال و پرداخت */
.fpro-cx-ship-table,
.fpro-cx-ship-table tbody,
.fpro-cx-ship-table tr,
.fpro-cx-ship-table th,
.fpro-cx-ship-table td {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.fpro-cx-ship-table th {
  display: none;
}

.fpro-cx-app ul#shipping_method,
.fpro-cx-app #payment ul.payment_methods {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

.fpro-cx-app #payment ul.payment_methods::before,
.fpro-cx-app #payment ul.payment_methods::after {
  display: none;
}

.fpro-cx-app ul#shipping_method li,
.fpro-cx-app #payment ul.payment_methods li.wc_payment_method {
  position: relative;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--fpro-cx-line);
  border-radius: 14px;
  background: #fff;
  line-height: 1.7;
  text-indent: 0;
}

.fpro-cx-app ul#shipping_method li:hover,
.fpro-cx-app #payment ul.payment_methods li.wc_payment_method:hover {
  border-color: #c3cad6;
}

.fpro-cx-app ul#shipping_method li:has(> input:checked),
.fpro-cx-app #payment ul.payment_methods li.wc_payment_method:has(> input:checked) {
  border-color: var(--fpro-cx-primary);
  background: var(--fpro-cx-tint);
}

.fpro-cx-app ul#shipping_method li > input,
.fpro-cx-app #payment ul.payment_methods li > input.input-radio {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 18px;
  height: 18px;
  margin: 0;
}

.fpro-cx-app ul#shipping_method li > label,
.fpro-cx-app #payment ul.payment_methods li > label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 10px 44px 10px 14px;
  color: var(--fpro-cx-ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.fpro-cx-app #payment ul.payment_methods li > label img {
  max-height: 26px;
  margin: 0 auto 0 0;
}

.fpro-cx-app #payment,
.fpro-cx-app #payment .form-row {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.fpro-cx-app #payment div.payment_box {
  margin: 0 12px 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--fpro-cx-muted);
  font-size: 13px;
}

.fpro-cx-app #payment div.payment_box::before {
  display: none;
}

.fpro-cx-app #payment div.payment_box p:last-child {
  margin-bottom: 0;
}

/* تعداد */
.fpro-cx-qty {
  display: inline-flex;
  align-items: center;
  height: 38px;
  border: 1px solid var(--fpro-cx-line);
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}

.fpro-cx-app .fpro-cx-qty-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--fpro-cx-ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
}

.fpro-cx-app .fpro-cx-qty-btn:hover {
  background: var(--fpro-cx-tint);
  color: var(--fpro-cx-primary);
}

.fpro-cx-app .fpro-cx-qty input.qty {
  width: 38px;
  min-width: 0;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--fpro-cx-ink);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  box-shadow: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.fpro-cx-app .fpro-cx-qty input.qty::-webkit-inner-spin-button,
.fpro-cx-app .fpro-cx-qty input.qty::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.fpro-cx-single {
  color: var(--fpro-cx-muted);
  font-size: 13px;
}

/* کالاهای سبد */
.fpro-cx-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto minmax(110px, auto) 38px;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--fpro-cx-line);
}

.fpro-cx-item-img a {
  display: block;
}

.fpro-cx-app .fpro-cx-item-img img {
  display: block;
  width: 92px;
  height: 92px;
  border-radius: 14px;
  background: var(--fpro-cx-soft);
  object-fit: cover;
}

.fpro-cx-app .fpro-cx-item-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}

.fpro-cx-app .fpro-cx-item-name a {
  color: var(--fpro-cx-ink);
}

.fpro-cx-app .fpro-cx-item-name a:hover {
  color: var(--fpro-cx-primary);
}

.fpro-cx-app .variation {
  margin: 0 0 4px;
  color: var(--fpro-cx-muted);
  font-size: 12px;
}

.fpro-cx-app .variation :is(dt, dd, p) {
  display: inline;
  margin: 0;
  font-weight: 400;
}

.fpro-cx-item-price {
  color: var(--fpro-cx-muted);
  font-size: 13px;
}

.fpro-cx-item-price del {
  margin-inline-start: 6px;
  color: #98a2b3;
  font-size: 12px;
}

.fpro-cx-item-total {
  color: var(--fpro-cx-ink);
  font-size: 15px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.fpro-cx-app .fpro-cx-item-remove a.remove,
.fpro-cx-app a.fpro-cx-ritem-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: transparent;
  color: var(--fpro-cx-muted) !important;
}

.fpro-cx-app .fpro-cx-item-remove a.remove:hover,
.fpro-cx-app a.fpro-cx-ritem-remove:hover {
  background: #fff1ee;
  color: var(--fpro-cx-bad) !important;
}

/* پایین لیست سبد */
.fpro-cx-cart-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--fpro-cx-line);
}

.fpro-cx-app .fpro-cx-coupon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  float: none;
  margin: 0;
  padding: 0;
}

.fpro-cx-app .fpro-cx-cart-foot .fpro-cx-coupon {
  flex: 1 1 280px;
  max-width: 380px;
}

.fpro-cx-app .fpro-cx-coupon .input-text {
  flex: 1 1 140px;
  width: auto;
  min-height: 44px;
  margin: 0;
}

.fpro-cx-app .fpro-cx-ghost {
  flex: none;
  min-height: 44px;
  padding: 6px 16px;
  border: 1px solid var(--fpro-cx-line);
  border-radius: 12px;
  background: #fff;
  color: var(--fpro-cx-ink);
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}

.fpro-cx-app .fpro-cx-ghost:hover {
  border-color: var(--fpro-cx-primary);
  background: #fff;
  color: var(--fpro-cx-primary);
}

.fpro-cx-app a.fpro-cx-link {
  font-size: 13px;
  font-weight: 700;
}

/* تعداد خودکار به‌روز می‌شود؛ دکمه برای اسکریپت و حالت بدون جاوااسکریپت است. */
.fpro-cx-app button.fpro-cx-update {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.fpro-cx-coupon-msg {
  flex: 1 1 100%;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}

.fpro-cx-coupon-msg.is-ok {
  color: var(--fpro-cx-ok);
}

.fpro-cx-coupon-msg.is-error {
  color: var(--fpro-cx-bad);
}

.fpro-cx-coupon.is-busy,
.fpro-cx-review.is-busy {
  opacity: .55;
  pointer-events: none;
}

/* جمع‌ها */
.fpro-cx-app table.fpro-cx-totals,
.fpro-cx-app table.fpro-cx-review {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  background: transparent;
}

.fpro-cx-app :is(table.fpro-cx-totals, table.fpro-cx-review) :is(th, td) {
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--fpro-cx-text);
  font-size: 13px;
  font-weight: 400;
  text-align: right;
  vertical-align: top;
}

.fpro-cx-app :is(table.fpro-cx-totals, table.fpro-cx-review) tr > td:last-child:not(.product-name) {
  color: var(--fpro-cx-ink);
  font-weight: 700;
  text-align: left;
}

.fpro-cx-app :is(table.fpro-cx-totals, table.fpro-cx-review) tr.cart-discount td {
  color: var(--fpro-cx-ok);
}

.fpro-cx-app :is(table.fpro-cx-totals, table.fpro-cx-review) tr.order-total :is(th, td) {
  padding-top: 14px;
  border-top: 1px dashed var(--fpro-cx-line);
}

.fpro-cx-app :is(table.fpro-cx-totals, table.fpro-cx-review) tr.order-total th {
  color: var(--fpro-cx-ink);
  font-size: 14px;
  font-weight: 800;
}

.fpro-cx-app :is(table.fpro-cx-totals, table.fpro-cx-review) tr.order-total td {
  color: var(--fpro-cx-primary);
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

/* ردیف‌های جمع سبد؛ ارسال تمام‌عرض است و گزینه‌هایش کارت می‌شوند. */
.fpro-cx-app table.fpro-cx-totals,
.fpro-cx-app table.fpro-cx-totals tbody {
  display: block;
}

.fpro-cx-app table.fpro-cx-totals tr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.fpro-cx-app table.fpro-cx-totals tr.order-total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--fpro-cx-line);
}

.fpro-cx-app table.fpro-cx-totals tr.order-total :is(th, td) {
  padding-top: 7px;
  border-top: 0;
}

.fpro-cx-app .fpro-cx-totals tr.woocommerce-shipping-totals {
  display: block;
}

.fpro-cx-app .fpro-cx-totals tr.woocommerce-shipping-totals :is(th, td) {
  display: block;
  width: 100%;
}

.fpro-cx-app .fpro-cx-totals tr.woocommerce-shipping-totals th {
  padding-bottom: 2px;
}

.fpro-cx-app .fpro-cx-totals tr.woocommerce-shipping-totals td {
  font-weight: 400;
  text-align: right;
}

.fpro-cx-app .fpro-cx-totals ul#shipping_method li > label {
  min-height: 42px;
  padding: 6px 40px 6px 12px;
  font-size: 13px;
}

.fpro-cx-app .fpro-cx-totals ul#shipping_method li > input {
  top: 12px;
  right: 12px;
}

/* آدرس فقط در تسویه‌حساب گرفته می‌شود. */
.fpro-cx-app .fpro-cx-totals .woocommerce-shipping-destination,
.fpro-cx-app .fpro-cx-totals .woocommerce-shipping-calculator {
  display: none;
}

.fpro-cx-app table.fpro-cx-totals tr.fpro-cx-ship-later td {
  color: var(--fpro-cx-muted);
  font-weight: 400;
}

/* پیام شناور تسویه‌حساب: پایین صفحه، با تصویر کالا */
.fpro-cx-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: min(460px, calc(100vw - 24px));
  padding: 10px 14px;
  border: 1px solid var(--fpro-cx-line);
  border-radius: 14px;
  background: #fff;
  color: var(--fpro-cx-ink);
  font-family: var(--fpro-cx-font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .14);
  transform: translateX(-50%);
}

.fpro-cx-toast img {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
}

.fpro-cx-toast span {
  flex: 1;
  min-width: 0;
}

.fpro-cx-toast.is-error {
  border-color: #f3c0c0;
  color: var(--fpro-cx-bad);
}

.fpro-cx-toast a {
  flex: none;
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--fpro-cx-tint);
  color: var(--fpro-cx-primary);
  font-weight: 800;
  text-decoration: none;
}

/* دکمه‌های اصلی */
.fpro-cx-app a.checkout-button,
.fpro-cx-app .fpro-cx-submit,
.fpro-cx-app #place_order,
.fpro-cx-app a.fpro-cx-btn,
.fpro-cx-app .fpro-cx-mbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin: 0;
  padding: 10px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--fpro-cx-primary) !important;
  color: var(--fpro-cx-on-primary) !important;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}

.fpro-cx-app a.checkout-button,
.fpro-cx-app .fpro-cx-submit,
.fpro-cx-app #place_order {
  width: 100%;
}

.fpro-cx-app a.checkout-button:hover,
.fpro-cx-app .fpro-cx-submit:hover,
.fpro-cx-app #place_order:hover,
.fpro-cx-app a.fpro-cx-btn:hover,
.fpro-cx-app .fpro-cx-mbar-btn:hover {
  background: var(--fpro-cx-hover) !important;
  color: var(--fpro-cx-on-primary) !important;
}

.fpro-cx-app a.fpro-cx-btn {
  min-height: 48px;
  padding: 8px 24px;
  font-size: 14px;
}

.fpro-cx-app a.fpro-cx-btn.is-ghost {
  border: 1px solid var(--fpro-cx-line);
  background: #fff !important;
  color: var(--fpro-cx-ink) !important;
  box-shadow: none;
}

.fpro-cx-app a.fpro-cx-btn.is-ghost:hover {
  border-color: var(--fpro-cx-primary);
  color: var(--fpro-cx-primary) !important;
}

.fpro-cx-app .wc-proceed-to-checkout {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
}

/* دکمه پیش‌فاکتور فاکتورک رنگش را با important می‌گیرد. */
.fpro-cx-app .wc-proceed-to-checkout .faktorak-scope {
  margin: 0;
}

.fpro-cx-app .wc-proceed-to-checkout .faktorak-scope a.faktorak-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 14px;
  border: 1px solid var(--fpro-cx-line);
  border-radius: 14px;
  background: #fff;
  color: var(--fpro-cx-ink) !important;
  font-size: 13px;
  font-weight: 700;
}

.fpro-cx-app .wc-proceed-to-checkout .faktorak-scope a.faktorak-btn:hover {
  border-color: var(--fpro-cx-primary);
  background: #fff;
  color: var(--fpro-cx-primary) !important;
}

/* خلاصه سفارش تسویه‌حساب */
.fpro-cx-app #order_review {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.fpro-cx-app .wd-table-wrapper {
  overflow: visible;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.fpro-cx-app table.fpro-cx-review td.product-name {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--fpro-cx-line);
}

.fpro-cx-app table.fpro-cx-review tbody tr + tr td.product-name {
  padding-top: 12px;
}

.fpro-cx-app table.fpro-cx-review tfoot tr:first-child :is(th, td) {
  padding-top: 12px;
}

.fpro-cx-ritem {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: start;
}

.fpro-cx-app .fpro-cx-ritem-img img {
  display: block;
  width: 62px;
  height: 62px;
  border-radius: 12px;
  background: var(--fpro-cx-soft);
  object-fit: cover;
}

.fpro-cx-app .fpro-cx-ritem-name {
  display: block;
  color: var(--fpro-cx-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.fpro-cx-ritem-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.fpro-cx-ritem-total {
  color: var(--fpro-cx-ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.fpro-cx-ritem .fpro-cx-qty {
  height: 32px;
}

.fpro-cx-app .fpro-cx-ritem .fpro-cx-qty-btn {
  width: 28px;
  font-size: 15px;
}

.fpro-cx-app .fpro-cx-ritem .fpro-cx-qty input.qty {
  width: 30px;
  font-size: 13px;
}

.fpro-cx-review-card .fpro-cx-coupon {
  margin-top: 14px;
}

.fpro-cx-app .fpro-cx-place {
  margin-top: 14px;
}

.fpro-cx-app .fpro-cx-place .woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 12px;
  color: var(--fpro-cx-muted);
  font-size: 12px;
}

.fpro-cx-app .fpro-cx-place .woocommerce-terms-and-conditions-wrapper:not(:has(*)) {
  display: none;
}

.fpro-cx-mbar {
  display: none;
}

body.fpro-cx-main-seen .fpro-cx-app .fpro-cx-mbar {
  display: none;
}

/* سبد خالی: پیام‌های قالب کنار می‌روند؛ بدون کارت و پس‌زمینه. */
.fpro-cx-empty > :not(.fpro-cx-empty-card, .woocommerce-notices-wrapper) {
  display: none;
}

.fpro-cx-app .fpro-cx-empty-card {
  max-width: 420px;
  margin: 8vh auto;
  padding: 0;
  text-align: center;
}

.fpro-cx-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--fpro-cx-tint);
  color: var(--fpro-cx-primary);
}

.fpro-cx-empty-icon svg {
  width: 52px;
  height: 52px;
}

.fpro-cx-app .fpro-cx-empty-card h2 {
  margin: 20px 0 6px;
  font-size: 22px;
  font-weight: 800;
}

.fpro-cx-app .fpro-cx-empty-card p {
  margin: 0 0 22px;
  color: var(--fpro-cx-muted);
  font-size: 14px;
}

/* پیشنهادهای مرتبط */
.fpro-cx-cross {
  margin-top: 28px;
}

.fpro-cx-app .fpro-cx-cross h2 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 800;
}

.fpro-cx-cross-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.fpro-cx-app a.fpro-cx-cross-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--fpro-cx-line);
  border-radius: 14px;
  background: #fff;
  color: var(--fpro-cx-text);
  font-size: 13px;
}

.fpro-cx-app a.fpro-cx-cross-item:hover {
  border-color: var(--fpro-cx-primary);
}

.fpro-cx-app .fpro-cx-cross-item img {
  display: block;
  width: 100%;
  border-radius: 10px;
}

.fpro-cx-cross-item strong {
  color: var(--fpro-cx-ink);
  font-weight: 700;
}

/* صفحه تشکر */
.fpro-cx-app .fpro-cx-thanks {
  display: grid;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}

.fpro-cx-app .fpro-cx-thanks > * {
  min-width: 0;
  margin-bottom: 0;
}

.fpro-cx-app .fpro-cx-hero {
  padding: 30px 24px;
  text-align: center;
}

.fpro-cx-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e6f6ef;
  color: var(--fpro-cx-ok);
}

.fpro-cx-hero.is-wait .fpro-cx-hero-icon {
  background: #fff6e5;
  color: #9a5b00;
}

.fpro-cx-hero.is-failed .fpro-cx-hero-icon {
  background: #fff1ee;
  color: var(--fpro-cx-bad);
}

.fpro-cx-app .fpro-cx-hero-title {
  margin: 12px 0 4px;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.5;
}

.fpro-cx-app .fpro-cx-hero-text {
  margin: 0;
  color: var(--fpro-cx-muted);
}

.fpro-cx-app .fpro-cx-hero-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 20px 0;
  padding: 0;
}

.fpro-cx-hero-facts > div {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--fpro-cx-soft);
}

.fpro-cx-app .fpro-cx-hero-facts dt {
  margin: 0;
  color: var(--fpro-cx-muted);
  font-size: 12px;
  font-weight: 400;
}

.fpro-cx-app .fpro-cx-hero-facts dd {
  margin: 2px 0 0;
  color: var(--fpro-cx-ink);
  font-size: 14px;
  font-weight: 700;
}

.fpro-cx-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.fpro-cx-app .fpro-cx-thanks :is(.woocommerce-order-details, .woocommerce-customer-details) {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--fpro-cx-line);
  border-radius: var(--fpro-cx-radius);
  background: #fff;
  box-shadow: var(--fpro-cx-shadow);
}

.fpro-cx-app .fpro-cx-thanks :is(.woocommerce-order-details__title, .woocommerce-column__title) {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 800;
  text-align: right;
}

.fpro-cx-app .fpro-cx-thanks table.order_details {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  background: transparent;
}

.fpro-cx-app .fpro-cx-thanks table.order_details :is(th, td) {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--fpro-cx-line);
  background: transparent;
  color: var(--fpro-cx-text);
  font-size: 13px;
  text-align: right;
  vertical-align: middle;
}

.fpro-cx-app .fpro-cx-thanks table.order_details :is(td:last-child, th:last-child) {
  text-align: left;
}

.fpro-cx-app .fpro-cx-thanks table.order_details td.product-name {
  color: var(--fpro-cx-ink);
  font-weight: 700;
}

.fpro-cx-app .fpro-cx-pay-note {
  color: var(--fpro-cx-ink, #101828);
  font-size: 14px;
  line-height: 1.9;
}

.fpro-cx-app .fpro-cx-pay-note > :first-child {
  margin-top: 0;
}

.fpro-cx-app .fpro-cx-pay-note > :last-child {
  margin-bottom: 0;
}

.fpro-cx-oimg {
  display: inline-block;
  margin-inline-end: 10px;
  vertical-align: middle;
}

.fpro-cx-app .fpro-cx-oimg img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.fpro-cx-app .fpro-cx-thanks .woocommerce-customer-details address {
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--fpro-cx-soft);
}

.fpro-cx-app .fpro-cx-thanks .woocommerce-order-details .button {
  border: 0;
  border-radius: 10px;
  background: var(--fpro-cx-primary) !important;
  color: var(--fpro-cx-on-primary) !important;
  font-weight: 700;
  text-transform: none;
  box-shadow: none;
}

/* دکمه فاکتور بالای صفحه هست. */
.fpro-cx-app .fpro-cx-thanks .faktorak-user-invoice-buttons,
.fpro-cx-app .fpro-cx-thanks tr:has(.order-actions-button.faktorak_invoice):not(:has(.order-actions-button:not(.faktorak_invoice))) {
  display: none;
}

/* ------------------------------------------------------------ تبلت و موبایل */
@media (max-width: 991px) {
  .fpro-cx-app .fpro-cx-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* نوار ثابت پایین: مبلغ و دکمه همیشه در دسترس است. */
  .fpro-cx-mbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1100; /* بالاتر از دکمه‌های نقشه */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--fpro-cx-line);
    background: #fff;
    box-shadow: 0 -8px 24px -12px rgba(16, 24, 40, .2);
  }

  .fpro-cx-mbar-total {
    display: grid;
    min-width: 0;
    line-height: 1.5;
  }

  .fpro-cx-mbar-total small {
    color: var(--fpro-cx-muted);
    font-size: 11px;
  }

  .fpro-cx-mbar-total strong {
    color: var(--fpro-cx-primary);
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
  }

  .fpro-cx-app .fpro-cx-mbar-btn {
    flex: none;
    min-height: 46px;
    padding: 8px 22px;
    font-size: 14px;
  }

  .fpro-cx-app {
    padding-bottom: 104px;
  }

  /* بالای نوار ثابت پایین */
  .fpro-cx-toast {
    bottom: 84px;
  }
}

@media (max-width: 680px) {
  .fpro-cx-app {
    padding: 22px 12px 104px;
  }

  .fpro-cx-app .fpro-cx-card,
  .fpro-cx-app .fpro-cx-thanks :is(.woocommerce-order-details, .woocommerce-customer-details) {
    padding: 16px;
  }

  .fpro-cx-topbar-in {
    min-height: 58px;
    padding: 8px 14px;
  }

  .fpro-cx-brand img {
    height: 34px;
  }

  .fpro-cx-cross-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fpro-cx-app #fb-map {
    height: 260px;
  }

  .fpro-cx-steps li {
    gap: 6px;
    font-size: 12px;
  }

  .fpro-cx-steps li + li::before {
    width: 14px;
  }

  .fpro-cx-app .fpro-cx-steps a {
    gap: 6px;
  }

  .fpro-cx-step-num {
    width: 24px;
    height: 24px;
  }

  /* کالا: تصویر و نام بالا، تعداد و مبلغ پایین */
  .fpro-cx-item {
    grid-template-columns: 76px minmax(0, 1fr) 36px;
    gap: 10px 12px;
    align-items: start;
  }

  .fpro-cx-app .fpro-cx-item-img img {
    width: 76px;
    height: 76px;
  }

  .fpro-cx-item-img {
    grid-row: 1;
  }

  .fpro-cx-item-info {
    grid-column: 2;
    grid-row: 1;
  }

  .fpro-cx-item-remove {
    grid-column: 3;
    grid-row: 1;
  }

  .fpro-cx-item-qty {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .fpro-cx-item-total {
    grid-column: 2 / 4;
    grid-row: 2;
    align-self: center;
  }

  .fpro-cx-app .fpro-cx-cart-foot .fpro-cx-coupon {
    flex-basis: 100%;
    max-width: none;
  }

  .fpro-cx-app :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper) {
    gap: 12px;
  }

  .fpro-cx-app .fpro-cx-hero-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fpro-cx-hero-actions a.fpro-cx-btn {
    flex: 1 1 100%;
  }
}

/* هنگام ثبت: به‌جای لایه سفید ووکامرس فرم می‌ماند و دکمه وضعیت را نشان می‌دهد.
   ووکامرس با کلاس processing جلوی ارسال دوباره را می‌گیرد. */
.fpro-cx-app form.checkout .blockUI {
  display: none !important;
}

.fpro-cx-app form.checkout.processing {
  pointer-events: none;
}

.fpro-cx-app form.checkout.processing :is(#place_order, .fpro-cx-mbar-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0;
}

.fpro-cx-app form.checkout.processing :is(#place_order, .fpro-cx-mbar-btn)::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: fpro-cx-spin .8s linear infinite;
}

.fpro-cx-app form.checkout.processing :is(#place_order, .fpro-cx-mbar-btn)::after {
  content: "در حال ثبت سفارش…";
  font-size: 15px;
}

@keyframes fpro-cx-spin {
  to {
    transform: rotate(360deg);
  }
}

/* هنگام محاسبه دوباره، عددهای قدیمی کم‌رنگ می‌شوند و ثبت سفارش تا پایان آن بسته است. */
.fpro-cx-app form.checkout.fpro-cx-updating :is(.fpro-cx-ship, #order_review) {
	opacity: .5;
	pointer-events: none;
}

.fpro-cx-app form.checkout.fpro-cx-updating :is(#place_order, .fpro-cx-mbar-btn) {
	opacity: .6;
	pointer-events: none;
}

.fpro-cx-app form.checkout.fpro-cx-updating #order_review_heading::after {
	content: "در حال محاسبه…";
	margin-inline-start: 8px;
	color: #6b7280;
	font-size: 12px;
	font-weight: 500;
}
