/*
 * Bonyad Commerce Foundation
 * Scope: WooCommerce transaction journey
 * Ownership: Astra child theme
 */

:root {
  --bonyad-commerce-surface: #ffffff;
  --bonyad-commerce-soft: #f8fafc;
  --bonyad-commerce-border: rgba(15, 23, 42, 0.12);
  --bonyad-commerce-text: #0f172a;
  --bonyad-commerce-muted: #64748b;
  --bonyad-commerce-accent: #0f766e;
  --bonyad-commerce-accent-soft: rgba(15, 118, 110, 0.10);
  --bonyad-commerce-danger: #b91c1c;
  --bonyad-commerce-radius: 24px;
  --bonyad-commerce-shadow: 0 18px 55px rgba(15, 23, 42, 0.08);
}

.bonyad-commerce-shell {
  direction: rtl;
  color: var(--bonyad-commerce-text);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 72px) clamp(16px, 4vw, 32px);
}

.bonyad-commerce-hero {
  border: 1px solid var(--bonyad-commerce-border);
  border-radius: var(--bonyad-commerce-radius);
  background:
    radial-gradient(circle at 90% 10%, rgba(15, 118, 110, 0.13), transparent 34%),
    linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: var(--bonyad-commerce-shadow);
  padding: clamp(24px, 4vw, 48px);
  margin-bottom: 28px;
}

.bonyad-commerce-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--bonyad-commerce-accent-soft);
  color: var(--bonyad-commerce-accent);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 14px;
  margin-bottom: 16px;
}

.bonyad-commerce-title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.bonyad-commerce-lede {
  max-width: 760px;
  color: var(--bonyad-commerce-muted);
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 2;
  margin: 0;
}

.bonyad-commerce-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

@media (min-width: 900px) {
  .bonyad-commerce-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    align-items: start;
  }
}

.bonyad-commerce-card {
  border: 1px solid var(--bonyad-commerce-border);
  border-radius: var(--bonyad-commerce-radius);
  background: var(--bonyad-commerce-surface);
  box-shadow: var(--bonyad-commerce-shadow);
  padding: clamp(18px, 3vw, 30px);
}

.bonyad-commerce-card h2,
.bonyad-commerce-card h3 {
  margin-top: 0;
}

.bonyad-commerce-note {
  border: 1px solid var(--bonyad-commerce-border);
  border-radius: 18px;
  background: var(--bonyad-commerce-soft);
  padding: 16px 18px;
  color: var(--bonyad-commerce-muted);
  line-height: 1.9;
}

.bonyad-commerce-course-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--bonyad-commerce-accent-soft);
  color: var(--bonyad-commerce-accent);
  font-weight: 800;
  padding: 7px 12px;
  margin-inline-end: 8px;
}

.bonyad-commerce-warning {
  border-color: rgba(185, 28, 28, 0.22);
  background: rgba(185, 28, 28, 0.06);
  color: var(--bonyad-commerce-danger);
}

.woocommerce .bonyad-commerce-shell .button,
.woocommerce .bonyad-commerce-shell button.button,
.woocommerce .bonyad-commerce-shell input.button {
  border-radius: 999px;
  font-weight: 800;
}

.bonyad-commerce-shell table.shop_table {
  border-radius: 18px;
  overflow: hidden;
}

.bonyad-commerce-shell .woocommerce-error,
.bonyad-commerce-shell .woocommerce-info,
.bonyad-commerce-shell .woocommerce-message {
  border-radius: 18px;
  line-height: 1.9;
}


/* Bonyad checkout spacious form v1 */
.woocommerce-checkout .bonyad-commerce-checkout,
.woocommerce-checkout form.checkout {
  direction: rtl;
}

.woocommerce-checkout form.checkout {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.woocommerce-checkout #customer_details {
  grid-column: 2;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .06);
  padding: 34px;
}

.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
  grid-column: 1;
}

.woocommerce-checkout #order_review_heading {
  margin: 0 0 14px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 22px;
  box-shadow: 0 16px 45px rgba(15, 23, 42, .05);
  font-size: 1.35rem;
}

.woocommerce-checkout #order_review {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .06);
  padding: 24px;
}

.woocommerce-checkout .woocommerce-billing-fields h3 {
  font-size: clamp(1.55rem, 2vw, 2rem);
  margin: 0 0 10px;
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}

.woocommerce-checkout .form-row {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce-checkout #billing_company_field,
.woocommerce-checkout #billing_country_field,
.woocommerce-checkout #billing_address_1_field,
.woocommerce-checkout #billing_address_2_field {
  grid-column: 1 / -1;
}

.woocommerce-checkout .form-row label {
  display: block;
  margin-bottom: 8px;
  color: #111827;
  font-weight: 700;
  font-size: .98rem;
}

.woocommerce-checkout .form-row .required {
  color: #e62d5f;
  text-decoration: none;
}

.woocommerce-checkout .input-text,
.woocommerce-checkout select,
.woocommerce-checkout textarea,
.woocommerce-checkout .select2-container .select2-selection--single {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(15, 23, 42, .14) !important;
  border-radius: 14px !important;
  background: #fff;
  box-shadow: none !important;
  padding: 0 16px;
  font-size: 1rem;
  line-height: 56px;
}

.woocommerce-checkout textarea.input-text {
  min-height: 110px;
  line-height: 1.8;
  padding-top: 14px;
}

.woocommerce-checkout .select2-container .select2-selection__rendered {
  line-height: 56px !important;
  padding-right: 16px !important;
  padding-left: 38px !important;
}

.woocommerce-checkout .select2-container .select2-selection__arrow {
  height: 56px !important;
  left: 12px !important;
  right: auto !important;
}

.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-error {
  max-width: 1320px;
  margin: 0 auto 18px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: #fff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, .04);
}

.woocommerce-checkout table.shop_table {
  border-radius: 18px;
  overflow: hidden;
}

.woocommerce-checkout #payment {
  background: transparent;
}

.woocommerce-checkout #payment ul.payment_methods {
  border: 0;
  padding: 0;
}

.woocommerce-checkout #payment ul.payment_methods li {
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
}

.woocommerce-checkout #payment ul.payment_methods li.payment_method_WC_ZPal,
.woocommerce-checkout #payment ul.payment_methods li.payment_method_wc_zpal {
  border-color: rgba(230, 45, 95, .45);
  box-shadow: 0 12px 30px rgba(230, 45, 95, .08);
}

.woocommerce-checkout #place_order {
  width: 100%;
  min-height: 58px;
  border-radius: 14px;
  background: #e62d5f;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 800;
}

@media (max-width: 980px) {
  .woocommerce-checkout form.checkout {
    display: block;
    max-width: 720px;
  }

  .woocommerce-checkout #customer_details,
  .woocommerce-checkout #order_review,
  .woocommerce-checkout #order_review_heading {
    margin-bottom: 22px;
  }

  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: 1fr;
  }
}


/* Bonyad checkout spacious form v2 rescue */
body.woocommerce-checkout #secondary,
body.woocommerce-checkout .widget-area {
  display: none !important;
}

body.woocommerce-checkout #primary,
body.woocommerce-checkout .site-main,
body.woocommerce-checkout .ast-container {
  width: 100% !important;
  max-width: 1320px !important;
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.woocommerce-checkout form.checkout {
  direction: rtl;
  width: 100% !important;
  max-width: 1320px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px) !important;
  gap: 28px !important;
  align-items: start;
}

body.woocommerce-checkout #customer_details {
  grid-column: 1 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2 {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
}

body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout #order_review {
  grid-column: 2 !important;
  width: 100% !important;
  max-width: none !important;
}

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px 24px !important;
}

body.woocommerce-checkout .form-row {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  clear: none !important;
}

body.woocommerce-checkout #billing_company_field,
body.woocommerce-checkout #billing_country_field,
body.woocommerce-checkout #billing_address_1_field,
body.woocommerce-checkout #billing_address_2_field {
  grid-column: 1 / -1 !important;
}

@media (max-width: 980px) {
  body.woocommerce-checkout form.checkout {
    display: block !important;
    max-width: 720px !important;
  }

  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: 1fr !important;
  }
}

/* Bonyad checkout spacious form v3 staging polish */
body.woocommerce-checkout #secondary,
body.woocommerce-checkout aside,
body.woocommerce-checkout .widget-area,
body.woocommerce-checkout .sidebar-main {
  display: none !important;
}

body.woocommerce-checkout .ast-container,
body.woocommerce-checkout .site-content .ast-container {
  display: block !important;
  max-width: 1320px !important;
  width: 100% !important;
  margin-inline: auto !important;
  padding-inline: 24px !important;
}

body.woocommerce-checkout #primary,
body.woocommerce-checkout .content-area,
body.woocommerce-checkout .site-main {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
}

body.woocommerce-checkout form.checkout.woocommerce-checkout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 390px !important;
  gap: 32px !important;
  align-items: start !important;
  direction: rtl;
}

body.woocommerce-checkout #customer_details,
body.woocommerce-checkout .col2-set {
  grid-column: 1 !important;
  width: 100% !important;
  max-width: none !important;
}

body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2 {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
}

body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout #order_review {
  grid-column: 2 !important;
  width: 100% !important;
  max-width: none !important;
}

body.woocommerce-checkout .woocommerce-billing-fields,
body.woocommerce-checkout #order_review {
  background: #fff !important;
  border: 1px solid rgba(15, 23, 42, .10) !important;
  border-radius: 20px !important;
  padding: 28px !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06) !important;
}

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px 22px !important;
}

body.woocommerce-checkout .form-row {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  clear: none !important;
}

body.woocommerce-checkout input.input-text,
body.woocommerce-checkout textarea,
body.woocommerce-checkout select {
  min-height: 48px !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
}

body.woocommerce-checkout #billing_address_1_field,
body.woocommerce-checkout #billing_address_2_field,
body.woocommerce-checkout #billing_company_field {
  grid-column: 1 / -1 !important;
}

@media (max-width: 980px) {
  body.woocommerce-checkout form.checkout.woocommerce-checkout {
    display: block !important;
  }

  body.woocommerce-checkout #order_review,
  body.woocommerce-checkout .woocommerce-billing-fields {
    margin-top: 24px !important;
  }

  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: 1fr !important;
  }
}

/* Bonyad commerce layout v4 staging rescue */
body.woocommerce-cart #secondary,
body.woocommerce-checkout #secondary,
body.woocommerce-order-received #secondary,
body.woocommerce-cart aside,
body.woocommerce-checkout aside,
body.woocommerce-order-received aside {
  display: none !important;
}

body.woocommerce-cart .ast-container,
body.woocommerce-checkout .ast-container,
body.woocommerce-order-received .ast-container {
  max-width: 1180px !important;
  width: 100% !important;
  margin-inline: auto !important;
  padding-inline: 24px !important;
}

body.woocommerce-cart #primary,
body.woocommerce-checkout #primary,
body.woocommerce-order-received #primary {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  margin: 0 auto !important;
}

/* Checkout: when only payment/order box is visible */
body.woocommerce-checkout form.checkout.woocommerce-checkout {
  max-width: 1120px !important;
  margin-inline: auto !important;
  justify-content: center !important;
}

body.woocommerce-checkout form.checkout.woocommerce-checkout:not(:has(#customer_details .form-row)) {
  display: block !important;
  max-width: 620px !important;
}

body.woocommerce-checkout form.checkout.woocommerce-checkout:not(:has(#customer_details .form-row)) #order_review,
body.woocommerce-checkout form.checkout.woocommerce-checkout:not(:has(#customer_details .form-row)) #order_review_heading {
  width: 100% !important;
  max-width: 620px !important;
  margin-inline: auto !important;
}

/* Cart */
body.woocommerce-cart .woocommerce {
  max-width: 980px !important;
  margin-inline: auto !important;
}

body.woocommerce-cart .woocommerce-cart-form {
  width: 100% !important;
  max-width: 780px !important;
  margin: 0 auto 32px !important;
}

body.woocommerce-cart table.shop_table {
  width: 100% !important;
  table-layout: auto !important;
  background: #fff !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}

body.woocommerce-cart .cart-collaterals {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
}

body.woocommerce-cart .cart_totals {
  float: none !important;
  width: 100% !important;
  max-width: 460px !important;
  background: #fff !important;
  border: 1px solid rgba(15, 23, 42, .10) !important;
  border-radius: 18px !important;
  padding: 24px !important;
}

/* Order received */
body.woocommerce-order-received .woocommerce {
  max-width: 920px !important;
  margin-inline: auto !important;
}

body.woocommerce-order-received .woocommerce-order-overview,
body.woocommerce-order-received table.shop_table {
  width: 100% !important;
}

/* Bonyad checkout layout v5 final staging polish */
body.woocommerce-checkout form.checkout.woocommerce-checkout {
  width: 100% !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(560px, 1fr) minmax(360px, 420px) !important;
  gap: 32px !important;
  direction: rtl !important;
}

body.woocommerce-checkout #customer_details {
  grid-column: 1 !important;
  min-width: 0 !important;
}

body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout #order_review {
  grid-column: 2 !important;
  min-width: 0 !important;
}

body.woocommerce-checkout #order_review_heading {
  margin: 0 0 14px !important;
  padding: 18px 22px !important;
  background: #fff !important;
  border: 1px solid rgba(15,23,42,.10) !important;
  border-radius: 16px !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}

body.woocommerce-checkout .woocommerce-billing-fields {
  padding: 34px !important;
}

body.woocommerce-checkout .woocommerce-billing-fields h3,
body.woocommerce-checkout #order_review_heading {
  color: #0f172a !important;
}

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
  grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
  gap: 20px 24px !important;
}

body.woocommerce-checkout .form-row label {
  font-size: 14px !important;
  font-weight: 700 !important;
  margin-bottom: 8px !important;
  color: #0f172a !important;
}

body.woocommerce-checkout input.input-text,
body.woocommerce-checkout textarea,
body.woocommerce-checkout select {
  width: 100% !important;
  min-height: 52px !important;
  font-size: 15px !important;
  background: #fff !important;
  border: 1px solid rgba(15,23,42,.16) !important;
}

body.woocommerce-checkout #order_review {
  padding: 26px !important;
  position: sticky !important;
  top: 24px !important;
}

body.woocommerce-checkout #order_review table.shop_table {
  width: 100% !important;
  table-layout: auto !important;
  margin-bottom: 22px !important;
}

body.woocommerce-checkout #payment {
  background: transparent !important;
}

body.woocommerce-checkout #place_order {
  width: 100% !important;
  min-height: 54px !important;
  border-radius: 14px !important;
  font-size: 17px !important;
  font-weight: 800 !important;
}

@media (max-width: 1050px) {
  body.woocommerce-checkout form.checkout.woocommerce-checkout {
    display: block !important;
    max-width: 760px !important;
  }

  body.woocommerce-checkout #order_review {
    position: static !important;
    margin-top: 24px !important;
  }

  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: 1fr !important;
  }
}

/* Bonyad checkout structural layout v6 */
body.woocommerce-checkout .bonyad-commerce-checkout {
  max-width: 1240px !important;
  width: 100% !important;
  margin-inline: auto !important;
  padding-inline: 24px !important;
}

body.woocommerce-checkout .bonyad-commerce-checkout-stage {
  max-width: 1180px !important;
  margin: 0 auto !important;
}

body.woocommerce-checkout .bonyad-checkout-form-v6 {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

body.woocommerce-checkout .bonyad-checkout-layout-v6 {
  display: grid !important;
  grid-template-columns: minmax(620px, 1fr) minmax(360px, 420px) !important;
  gap: 32px !important;
  align-items: start !important;
  direction: rtl !important;
}

body.woocommerce-checkout .bonyad-checkout-fields-panel,
body.woocommerce-checkout .bonyad-checkout-summary-panel {
  background: #fff !important;
  border: 1px solid rgba(15, 23, 42, .10) !important;
  border-radius: 22px !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .06) !important;
}

body.woocommerce-checkout .bonyad-checkout-fields-panel {
  grid-column: 1 !important;
  padding: 34px !important;
}

body.woocommerce-checkout .bonyad-checkout-summary-panel {
  grid-column: 2 !important;
  padding: 26px !important;
  position: sticky !important;
  top: 24px !important;
}

body.woocommerce-checkout #customer_details,
body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2 {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
}

body.woocommerce-checkout .woocommerce-billing-fields,
body.woocommerce-checkout .woocommerce-shipping-fields {
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(240px, 1fr)) !important;
  gap: 20px 24px !important;
}

body.woocommerce-checkout .form-row {
  float: none !important;
  width: auto !important;
  clear: none !important;
  margin: 0 !important;
}

body.woocommerce-checkout .form-row-wide,
body.woocommerce-checkout #billing_company_field,
body.woocommerce-checkout #billing_address_1_field,
body.woocommerce-checkout #billing_address_2_field,
body.woocommerce-checkout #billing_email_field {
  grid-column: 1 / -1 !important;
}

body.woocommerce-checkout .form-row label {
  font-size: 14px !important;
  font-weight: 800 !important;
  margin-bottom: 8px !important;
}

body.woocommerce-checkout input.input-text,
body.woocommerce-checkout textarea,
body.woocommerce-checkout select {
  width: 100% !important;
  min-height: 52px !important;
  border-radius: 14px !important;
  font-size: 15px !important;
  padding: 10px 14px !important;
}

body.woocommerce-checkout #order_review_heading {
  margin: 0 0 18px !important;
  font-size: 20px !important;
  font-weight: 900 !important;
}

body.woocommerce-checkout #order_review {
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.woocommerce-checkout #order_review table.shop_table {
  width: 100% !important;
  margin-bottom: 22px !important;
}

body.woocommerce-checkout #payment {
  background: transparent !important;
}

body.woocommerce-checkout #place_order {
  width: 100% !important;
  min-height: 54px !important;
  border-radius: 14px !important;
  font-size: 17px !important;
  font-weight: 900 !important;
}

@media (max-width: 1050px) {
  body.woocommerce-checkout .bonyad-checkout-layout-v6 {
    display: block !important;
  }

  body.woocommerce-checkout .bonyad-checkout-summary-panel {
    position: static !important;
    margin-top: 24px !important;
  }

  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: 1fr !important;
  }
}

/* Bonyad checkout layout v7 desktop breakpoint fix */
@media (min-width: 821px) {
  body.woocommerce-checkout .bonyad-commerce-checkout,
  body.woocommerce-checkout .bonyad-commerce-checkout-stage,
  body.woocommerce-checkout form.checkout.woocommerce-checkout.bonyad-checkout-form-v6 {
    width: 100% !important;
    max-width: 1180px !important;
    margin-inline: auto !important;
  }

  body.woocommerce-checkout .bonyad-checkout-layout-v6 {
    display: grid !important;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr) !important;
    gap: 32px !important;
    align-items: start !important;
  }

  body.woocommerce-checkout .bonyad-checkout-fields-panel {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.woocommerce-checkout .bonyad-checkout-summary-panel {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    position: sticky !important;
    top: 24px !important;
  }

  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  body.woocommerce-checkout .bonyad-checkout-layout-v6 {
    display: block !important;
  }

  body.woocommerce-checkout .bonyad-checkout-summary-panel {
    position: static !important;
    margin-top: 24px !important;
  }

  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: 1fr !important;
  }
}

/* Bonyad checkout layout v8 launch-safe single column */
body.woocommerce-checkout .bonyad-commerce-checkout,
body.woocommerce-checkout .bonyad-commerce-checkout-stage,
body.woocommerce-checkout form.checkout.woocommerce-checkout.bonyad-checkout-form-v6 {
  width: 100% !important;
  max-width: 860px !important;
  margin-inline: auto !important;
}

body.woocommerce-checkout .bonyad-checkout-layout-v6 {
  display: block !important;
  width: 100% !important;
  max-width: 860px !important;
  margin-inline: auto !important;
}

body.woocommerce-checkout .bonyad-checkout-fields-panel,
body.woocommerce-checkout .bonyad-checkout-summary-panel {
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 auto 28px !important;
  padding: 34px !important;
}

body.woocommerce-checkout .bonyad-checkout-summary-panel {
  position: static !important;
}

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
  gap: 20px 24px !important;
}

body.woocommerce-checkout .form-row-wide,
body.woocommerce-checkout #billing_company_field,
body.woocommerce-checkout #billing_address_1_field,
body.woocommerce-checkout #billing_address_2_field,
body.woocommerce-checkout #billing_email_field,
body.woocommerce-checkout #order_comments_field {
  grid-column: 1 / -1 !important;
}

body.woocommerce-checkout input.input-text,
body.woocommerce-checkout textarea,
body.woocommerce-checkout select {
  min-height: 54px !important;
  font-size: 15px !important;
  border-radius: 14px !important;
}

body.woocommerce-checkout #order_review_heading {
  font-size: 22px !important;
  margin-bottom: 18px !important;
}

body.woocommerce-checkout #place_order {
  width: 100% !important;
  min-height: 56px !important;
  border-radius: 14px !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

@media (max-width: 760px) {
  body.woocommerce-checkout .bonyad-checkout-fields-panel,
  body.woocommerce-checkout .bonyad-checkout-summary-panel {
    padding: 24px !important;
  }

  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: 1fr !important;
  }
}

/* Bonyad checkout v9 restore payment panel */
body.woocommerce-checkout aside.bonyad-checkout-summary-panel,
body.woocommerce-checkout .bonyad-checkout-summary-panel,
body.woocommerce-checkout #order_review,
body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout #payment {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Bonyad checkout v9 restore payment panel */
body.woocommerce-checkout aside.bonyad-checkout-summary-panel,
body.woocommerce-checkout .bonyad-checkout-summary-panel,
body.woocommerce-checkout #order_review,
body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout #payment {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Bonyad checkout v10 payment badge is label, not button */
body.woocommerce-checkout .bonyad-commerce-hero .bonyad-commerce-eyebrow {
  cursor: default !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

/* Bonyad checkout v11 restore order and payment panel */
body.woocommerce-checkout section.bonyad-checkout-summary-panel,
body.woocommerce-checkout .bonyad-checkout-summary-panel,
body.woocommerce-checkout .woocommerce-checkout-review-order,
body.woocommerce-checkout #order_review,
body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout #payment,
body.woocommerce-checkout .wc_payment_methods,
body.woocommerce-checkout .place-order,
body.woocommerce-checkout #place_order {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.woocommerce-checkout .bonyad-checkout-summary-panel {
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 auto 28px !important;
}

/* Bonyad account learning endpoint */
body.woocommerce-account .bonyad-account-learning {
  width: min(760px, calc(100vw - 32px));
  margin: 32px auto 72px;
  direction: rtl;
}

body.woocommerce-account .bonyad-account-learning__hero,
body.woocommerce-account .bonyad-account-learning__card {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

body.woocommerce-account .bonyad-account-learning__hero {
  padding: 28px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(224, 247, 250, 0.82), rgba(255, 255, 255, 0.96));
}

body.woocommerce-account .bonyad-account-learning__hero h2 {
  margin: 12px 0;
  font-size: clamp(24px, 4vw, 36px);
}

body.woocommerce-account .bonyad-account-learning__hero p {
  margin: 0;
  color: #475569;
  line-height: 2;
}

body.woocommerce-account .bonyad-account-learning__grid {
  display: grid;
  gap: 16px;
}

body.woocommerce-account .bonyad-account-learning__card {
  padding: 22px;
}

body.woocommerce-account .bonyad-account-learning__card h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

body.woocommerce-account .bonyad-account-learning__status {
  margin: 0 0 18px;
  color: #64748b;
}

body.woocommerce-account .bonyad-account-learning__button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px !important;
  border-radius: 999px !important;
}

/* Bonyad account learning v2 clean layout */
body.woocommerce-account #secondary,
body.woocommerce-account .widget-area {
  display: none !important;
}

body.woocommerce-account #primary,
body.woocommerce-account.ast-right-sidebar #primary,
body.woocommerce-account.ast-left-sidebar #primary {
  width: 100% !important;
  max-width: 1100px !important;
  float: none !important;
  margin: 0 auto !important;
  padding-inline: 16px !important;
}

body.woocommerce-account .woocommerce {
  display: grid !important;
  grid-template-columns: minmax(150px, 220px) minmax(0, 760px);
  gap: 28px;
  align-items: start;
  justify-content: center;
  direction: rtl;
}

body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content {
  width: auto !important;
  float: none !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li:last-child a {
  border-bottom: 0;
}

body.woocommerce-account .bonyad-account-learning {
  width: 100%;
  max-width: 760px;
  margin: 0 auto 72px;
  direction: rtl;
}

body.woocommerce-account .bonyad-account-learning__hero {
  padding: 30px;
  margin-bottom: 18px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(224, 247, 250, 0.82), rgba(255, 255, 255, 0.96));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

body.woocommerce-account .bonyad-account-learning__hero h2 {
  margin: 12px 0;
  font-size: clamp(24px, 4vw, 36px);
}

body.woocommerce-account .bonyad-account-learning__hero p {
  margin: 0;
  color: #475569;
  line-height: 2;
}

body.woocommerce-account .bonyad-account-learning__grid {
  display: grid;
  gap: 14px;
}

body.woocommerce-account .bonyad-account-learning__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.05);
}

body.woocommerce-account .bonyad-account-learning__card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.6;
}

body.woocommerce-account .bonyad-account-learning__status {
  margin: 0;
  color: #64748b;
}

body.woocommerce-account .bonyad-account-learning__button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  white-space: nowrap;
  padding: 0 20px !important;
  border-radius: 999px !important;
}

@media (max-width: 780px) {
  body.woocommerce-account .woocommerce {
    grid-template-columns: 1fr;
  }

  body.woocommerce-account .bonyad-account-learning__card {
    display: block;
  }

  body.woocommerce-account .bonyad-account-learning__button {
    margin-top: 16px;
  }
}

/* Bonyad account v3 remove account sidebars and center content */
body.woocommerce-account aside,
body.woocommerce-account #secondary,
body.woocommerce-account .secondary,
body.woocommerce-account .ast-sidebar,
body.woocommerce-account .sidebar-main,
body.woocommerce-account .widget-area,
body.woocommerce-account .widget_product_categories,
body.woocommerce-account .wc-block-product-categories,
body.woocommerce-account .wp-block-woocommerce-product-categories,
body.woocommerce-account .widget {
  display: none !important;
  visibility: hidden !important;
}

body.woocommerce-account .site-content,
body.woocommerce-account .site-content .ast-container,
body.woocommerce-account .ast-container,
body.woocommerce-account .ast-separate-container .ast-article-single {
  width: 100% !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
  padding-inline: 16px !important;
}

body.woocommerce-account #primary,
body.woocommerce-account .content-area,
body.woocommerce-account.ast-right-sidebar #primary,
body.woocommerce-account.ast-left-sidebar #primary {
  width: 100% !important;
  max-width: 1180px !important;
  float: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

body.woocommerce-account .entry-content,
body.woocommerce-account .woocommerce {
  width: 100% !important;
  max-width: 1000px !important;
  margin-inline: auto !important;
}

body.woocommerce-account .woocommerce {
  display: grid !important;
  grid-template-columns: 220px minmax(0, 760px) !important;
  gap: 32px !important;
  justify-content: center !important;
  align-items: start !important;
  direction: rtl !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation {
  display: block !important;
  visibility: visible !important;
}

body.woocommerce-account .woocommerce-MyAccount-content {
  display: block !important;
  visibility: visible !important;
  min-width: 0 !important;
}

body.woocommerce-account .woocommerce-MyAccount-content > p:first-child {
  margin-top: 0;
}

@media (max-width: 840px) {
  body.woocommerce-account .woocommerce {
    grid-template-columns: 1fr !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation {
    max-width: 760px;
    margin-inline: auto;
  }
}

/* Bonyad placement quiz mobile polish v1 START */

/* فقط صفحه آزمون تعیین سطح HSK 1 */
body.single-sfwd-quiz.postid-10159,
body.sfwd-quiz-template-default.postid-10159,
body.postid-10159 {
  background: #ffffff !important;
}

/* حذف سایدبار در صفحه آزمون */
body.postid-10159 #secondary,
body.postid-10159 .secondary,
body.postid-10159 .widget-area,
body.postid-10159 aside {
  display: none !important;
}

/* مرکز کردن محتوای آزمون */
body.postid-10159 .site-content .ast-container,
body.postid-10159 .ast-container {
  display: block !important;
  width: 100% !important;
  max-width: 1040px !important;
  margin-inline: auto !important;
  padding-inline: 18px !important;
}

body.postid-10159 #primary,
body.postid-10159 .content-area,
body.postid-10159 .site-main {
  float: none !important;
  width: 100% !important;
  max-width: 920px !important;
  margin: 0 auto !important;
  padding-top: 32px !important;
}

/* عنوان آزمون */
body.postid-10159 .entry-header {
  text-align: center !important;
  margin: 0 auto 28px !important;
  padding: 32px 12px 8px !important;
}

body.postid-10159 .entry-title {
  color: #0f172a !important;
  font-size: clamp(28px, 4vw, 42px) !important;
  font-weight: 850 !important;
  line-height: 1.6 !important;
  margin: 0 0 10px !important;
  direction: rtl !important;
  text-align: center !important;
}

body.postid-10159 .entry-meta,
body.postid-10159 .posted-on,
body.postid-10159 .byline {
  color: #982633 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-align: center !important;
}

/* محتوای اصلی آزمون */
body.postid-10159 .entry-content {
  width: 100% !important;
  max-width: 820px !important;
  margin: 0 auto 130px !important;
  padding: 0 0 60px !important;
  direction: rtl !important;
  text-align: right !important;
  font-size: 17px !important;
  line-height: 2 !important;
}

/* جعبه LearnDash / Quiz */
body.postid-10159 .learndash-wrapper,
body.postid-10159 .wpProQuiz_content {
  direction: rtl !important;
  text-align: right !important;
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 22px !important;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08) !important;
  padding: 28px !important;
  margin: 18px auto 72px !important;
  max-width: 820px !important;
}

/* دکمه‌های آزمون */
body.postid-10159 .wpProQuiz_button,
body.postid-10159 .learndash-wrapper .ld-button,
body.postid-10159 .learndash-wrapper a.ld-button,
body.postid-10159 input[type="button"],
body.postid-10159 input[type="submit"],
body.postid-10159 button {
  min-height: 48px !important;
  border-radius: 12px !important;
  padding: 12px 22px !important;
  font-weight: 800 !important;
}

body.postid-10159 .wpProQuiz_button,
body.postid-10159 .learndash-wrapper .ld-button,
body.postid-10159 .learndash-wrapper a.ld-button {
  background: #982633 !important;
  border-color: #982633 !important;
  color: #ffffff !important;
}

/* سوالات */
body.postid-10159 .wpProQuiz_questionList,
body.postid-10159 .wpProQuiz_list {
  padding-right: 0 !important;
  margin-right: 0 !important;
}

body.postid-10159 .wpProQuiz_questionListItem {
  line-height: 2 !important;
  margin: 10px 0 !important;
}

/* فاصله فوتر از آزمون */
body.postid-10159 .elementor-location-footer,
body.postid-10159 footer {
  clear: both !important;
  margin-top: 160px !important;
}

/* موبایل */
@media (max-width: 767px) {
  body.postid-10159 .site-content .ast-container,
  body.postid-10159 .ast-container {
    padding-inline: 14px !important;
  }

  body.postid-10159 #primary,
  body.postid-10159 .content-area,
  body.postid-10159 .site-main {
    max-width: 100% !important;
    padding-top: 18px !important;
  }

  body.postid-10159 .entry-header {
    padding: 22px 4px 8px !important;
    margin-bottom: 20px !important;
  }

  body.postid-10159 .entry-title {
    font-size: 28px !important;
    line-height: 1.7 !important;
    text-align: center !important;
  }

  body.postid-10159 .entry-content {
    font-size: 16px !important;
    line-height: 2 !important;
    margin-bottom: 170px !important;
    padding-bottom: 72px !important;
  }

  body.postid-10159 .learndash-wrapper,
  body.postid-10159 .wpProQuiz_content {
    border-radius: 18px !important;
    padding: 18px !important;
    margin: 16px auto 86px !important;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08) !important;
  }

  body.postid-10159 .wpProQuiz_button,
  body.postid-10159 .learndash-wrapper .ld-button,
  body.postid-10159 .learndash-wrapper a.ld-button {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  body.postid-10159 .elementor-location-footer,
  body.postid-10159 footer {
    margin-top: 190px !important;
  }
}

/* Bonyad placement quiz mobile polish v1 END */
