
/* Parya Shop v11 — final checkout layout + mandatory phone / optional email */

/* Never hide email, even if an old class is reintroduced by a checkout-field plugin. */
body.woocommerce-checkout .parya-hidden-email-field,
body.woocommerce-checkout #billing_email_field{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
}

/* In wizard step 1 there is no order-summary column yet, so use the full canvas. */
body.woocommerce-checkout form.checkout[data-wizard-step="1"]{
  display:block!important;
  width:100%!important;
  max-width:1040px!important;
  margin:0 auto!important;
}
body.woocommerce-checkout form.checkout[data-wizard-step="1"] #customer_details{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:18px!important;
  width:100%!important;
  max-width:none!important;
}
body.woocommerce-checkout form.checkout[data-wizard-step="1"] #customer_details>.col-1,
body.woocommerce-checkout form.checkout[data-wizard-step="1"] #customer_details>.col-2{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:24px!important;
  border:1px solid #f0e4e9!important;
  border-radius:24px!important;
  background:#fff!important;
  box-shadow:0 14px 42px rgba(75,39,55,.055)!important;
}
body.woocommerce-checkout form.checkout[data-wizard-step="1"] .parya-checkout-wizard-nav{
  width:100%!important;
  max-width:none!important;
  margin:18px 0 0!important;
}

/* Billing fields: real desktop form, not a narrow vertical strip. */
body.woocommerce-checkout .woocommerce-billing-fields>h3{
  margin:0 0 20px!important;
  font-size:22px!important;
  line-height:1.5!important;
}
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
}
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row{
  width:100%!important;
  float:none!important;
  margin:0!important;
  padding:0!important;
}
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-wide{
  grid-column:auto!important;
}
body.woocommerce-checkout #billing_address_1_field,
body.woocommerce-checkout #billing_address_2_field{
  grid-column:1/-1!important;
}
body.woocommerce-checkout #billing_phone_field,
body.woocommerce-checkout #billing_email_field{
  grid-column:auto!important;
  padding:14px!important;
  min-height:108px!important;
  border-radius:18px!important;
}
body.woocommerce-checkout #billing_phone_field{
  border:1px solid #f4c9d7!important;
  background:linear-gradient(180deg,#fff8fb,#fff)!important;
}
body.woocommerce-checkout #billing_email_field{
  border:1px solid #ebe1e6!important;
  background:#fff!important;
}

/* Explicit field labels; WooCommerce itself will add required/optional status. */
body.woocommerce-checkout #billing_phone_field>label,
body.woocommerce-checkout #billing_email_field>label{
  display:block!important;
  margin:0 0 7px!important;
  font-size:11px!important;
  font-weight:900!important;
  line-height:1.7!important;
}
body.woocommerce-checkout #billing_phone_field>label:before{
  content:"ضروری";
  display:inline-flex;
  align-items:center;
  margin-left:7px;
  padding:2px 7px;
  border-radius:999px;
  background:#ffe8ef;
  color:#d94e79;
  font-size:8px;
  font-weight:900;
}
body.woocommerce-checkout #billing_email_field>label:after{
  content:"اختیاری";
  display:inline-flex;
  align-items:center;
  margin-right:7px;
  padding:2px 7px;
  border-radius:999px;
  background:#f5f1f3;
  color:#81757c;
  font-size:8px;
  font-weight:800;
}
body.woocommerce-checkout #billing_phone_field .optional{display:none!important}
body.woocommerce-checkout #billing_phone_field .required{display:inline!important;color:#e34f77!important}
body.woocommerce-checkout #billing_email_field .required{display:none!important}
body.woocommerce-checkout #billing_email_field .optional{display:none!important}

body.woocommerce-checkout #billing_phone_field input,
body.woocommerce-checkout #billing_email_field input{
  display:block!important;
  width:100%!important;
  min-height:50px!important;
  margin:0!important;
  padding:10px 13px!important;
  border:1px solid #eadde3!important;
  border-radius:13px!important;
  outline:none!important;
  background:#fff!important;
}
body.woocommerce-checkout #billing_phone_field input:focus,
body.woocommerce-checkout #billing_email_field input:focus{
  border-color:#ef8fab!important;
  box-shadow:0 0 0 4px #fff0f5!important;
}

/* Shipping / notes area */
body.woocommerce-checkout .woocommerce-shipping-fields,
body.woocommerce-checkout .woocommerce-additional-fields{
  width:100%!important;
}
body.woocommerce-checkout .woocommerce-additional-fields textarea{
  min-height:130px!important;
  resize:vertical!important;
}
body.woocommerce-checkout #ship-to-different-address{
  margin:0!important;
  padding:16px 18px!important;
  border:1px solid #f0e4e9!important;
  border-radius:16px!important;
  background:#fffafd!important;
  font-size:14px!important;
}

/* Wizard CTA */
body.woocommerce-checkout .parya-checkout-wizard-nav{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
}
body.woocommerce-checkout .parya-checkout-wizard-nav button{
  min-height:48px!important;
  padding:0 20px!important;
  border-radius:14px!important;
  font-size:12px!important;
  box-shadow:none!important;
}

@media(max-width:760px){
  body.woocommerce-checkout form.checkout[data-wizard-step="1"]{
    max-width:none!important;
  }
  body.woocommerce-checkout form.checkout[data-wizard-step="1"] #customer_details>.col-1,
  body.woocommerce-checkout form.checkout[data-wizard-step="1"] #customer_details>.col-2{
    padding:16px!important;
    border-radius:20px!important;
  }
  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper{
    grid-template-columns:1fr!important;
    gap:12px!important;
  }
  body.woocommerce-checkout #billing_address_1_field,
  body.woocommerce-checkout #billing_address_2_field,
  body.woocommerce-checkout #billing_phone_field,
  body.woocommerce-checkout #billing_email_field{
    grid-column:1!important;
  }
}
