:root{--c3-bg:#f5f7fb;--c3-card:#fff;--c3-border:#e7e9ee;--c3-primary:#2740ff;--c3-muted:#6b7280}
.c3-container{max-width:1200px;margin:24px auto;padding:0 16px}
.c3-grid{display:grid !important;grid-template-columns:320px 1fr !important;grid-template-areas:"summary content" !important;gap:20px;direction:ltr !important;align-items:flex-start}
.c3-summary{grid-area:summary;direction:rtl;background:#fff;border:1px solid var(--c3-border);border-radius:16px;padding:16px;position:sticky;top:16px;height:max-content}
.c3-summary-title{font-weight:800;margin:0 0 10px}
.c3-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0;font-size:14px}
.c3-total{font-weight:800;font-size:16px}
.c3-sep{height:1px;background:var(--c3-border);margin:8px 0}
.c3-coupon-wrap{display:none;background:#f7f9ff;border:1px dashed var(--c3-border);padding:10px;border-radius:12px;margin:10px 0}
.c3-coupon-row{display:flex;gap:8px}
.c3-coupon-row input.input-text{flex:1;height:42px;border:1px solid var(--c3-border);border-radius:10px;padding:0 10px}
.c3-coupon-row .button{height:42px;min-width:110px;border-radius:10px;border:1px solid var(--c3-primary);background:var(--c3-primary);color:#fff}
.c3-actions{display:flex;justify-content:space-between;gap:8px;margin-top:12px;direction:ltr}
.c3-actions .c3-btn{flex:0 1 48%;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;padding:12px 16px;border:1px solid var(--c3-border);text-decoration:none;cursor:pointer}
.c3-actions .c3-btn-ghost{background:#fff;color:#111;order:1}
.c3-actions .c3-btn-primary{background:var(--c3-primary);border-color:var(--c3-primary);color:#fff;order:0}
.c3-info-note{background:#f1f6ff;border:1px solid #cfe0ff;border-radius:12px;padding:12px;font-size:13px;color:#223}
.c3-content{grid-area:content;direction:rtl;display:flex;flex-direction:column;gap:12px}
.c3-steps{display:flex;gap:8px;border-radius: 15px;}
.c3-step{flex:1;background:#fff;border:1px solid var(--c3-border);border-radius:12px;padding:12px 10px;font-weight:600;opacity:.92;text-align:center;cursor:pointer;white-space:nowrap}
.c3-step.is-active{opacity:1;border-color:#c0c6ff;box-shadow:0 0 0 2px rgba(39,64,255,0.06);
    border-radius: 15px ;
    background: #7a36e4a8 ;
    color: #ffff ;
    font-weight: 800 ;}
.c3-panel{display:none;background:#fff;border:1px solid var(--c3-border);border-radius:16px;padding:16px}
.c3-panel.is-active{display:block}
#customer_details .col-1,#customer_details .col-2{float:none;width:100%;margin:0}
#customer_details{display:grid;grid-template-columns:1fr;gap:10px}
.woocommerce-form-coupon-toggle{display:none}
/* Hide Place Order by default; can be re-enabled via settings */
.woocommerce-checkout #place_order{display:none !important}
/* Hide Terms page content (keep checkbox/label) */
.woocommerce-terms-and-conditions{display:none !important}
.c3-cart .c3-card{display:grid;grid-template-columns:260px 1fr;gap:18px;border:1px solid var(--c3-border);border-radius:16px;background:#fff;padding:16px;margin-bottom:14px}
.c3-cart .c3-card-media img{width:260px;max-width:260px;height:auto;border-radius:12px;display:block}
.c3-cart .c3-card-title{margin:0 0 8px;font-size:18px}
.c3-cart .c3-card-actions{display:flex;align-items:center;gap:16px;margin-top:8px;flex-wrap:wrap}
.c3-cart .c3-price{font-weight:700}
.c3-cart .c3-qty{display:inline-flex;align-items:center;border:1px solid var(--c3-border);border-radius:10px;overflow:hidden}
.c3-cart .c3-qty-btn{background:#fff;border:none;width:36px;height:36px;font-size:18px;cursor:pointer}
.c3-cart .c3-qty-input{width:56px;text-align:center;border:none;height:36px}
.c3-cart .c3-remove{background:#fff;border:1px solid var(--c3-border);border-radius:10px;min-width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.c3-credits{border:1px solid var(--c3-border);border-radius:12px;padding:12px;margin-bottom:12px;background:#fbfcff}
.c3-credit-row{display:grid;grid-template-columns:1fr;grid-template-areas:"toggle" "amount" "actions";gap:8px;align-items:center;margin-bottom:10px}
.c3-credit-row label{grid-area:toggle;margin:0}
.c3-credit-amount{grid-area:amount;width:100%;height:42px;border:1px solid var(--c3-border);border-radius:10px;padding:0 10px}
.c3-credit-row .c3-credit-apply,.c3-credit-row .c3-credit-clear{grid-area:actions;height:42px;border:1px solid var(--c3-border);border-radius:10px;padding:0 12px}
.c3-credit-hint{font-size:12px;color:#555;margin:8px 0 0}
.c3-error{color:#ef4444;font-size:12px;margin-top:2px}
.c3-credit-amount.is-error{border-color:#ef4444;background:#fff5f5}
@media (max-width: 992px){
  .c3-grid{grid-template-columns:1fr !important;grid-template-areas:"content" "summary" !important}
  .c3-summary{position:static}
  .c3-steps{overflow-x:auto;white-space:nowrap;padding-bottom:4px;position:sticky;top:8px;background:#f5f7fb;z-index:5}
  .c3-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
}
@media (min-width:480px){
  .c3-credit-row{grid-template-columns:auto 1fr auto auto;grid-template-areas:"toggle amount actions actions"}
}
@media (max-width: 768px){
  .c3-container{padding:0 12px; padding-bottom:130px}
  .c3-cart .c3-card{grid-template-columns:110px 1fr;gap:12px;padding:12px}
  .c3-cart .c3-card-media img{width:110px;max-width:110px}
  .c3-summary{padding:12px}
  .c3-panel{padding:12px}
}
@media (max-width: 480px){
  .c3-actions{grid-template-columns:1fr;gap:8px}
  .c3-step{min-width:120px ;
    border-radius: 15px ;}
}
/*******************************************************************/
/* گرد کردن گوشه‌های همه دکمه‌های مراحل وقتی انتخاب نشده‌اند */
body .wd-page-wrapper .c3-steps > button:not(.is-active):not(.active):not([aria-selected="true"]),
body .wd-page-wrapper .c3-steps > a:not(.is-active):not(.active):not([aria-selected="true"]) {
  border-radius: 15px;background: #afafafb5; /* م.قدار دلخواه */
  overflow: hidden;
}

/* اختیاری: همان گردی در حالت hover/focus */
body .wd-page-wrapper .c3-steps > button:not(.is-active):not(.active):hover,
body .wd-page-wrapper .c3-steps > a:not(.is-active):not(.active):hover,
body .wd-page-wrapper .c3-steps > button:not(.is-active):not(.active):focus,
body .wd-page-wrapper .c3-steps > a:not(.is-active):not(.active):focus {
  border-radius: 15px !important;
}



/* ============== C3 Thankyou Polished Block ============== */
.c3-thanks{max-width:960px;margin:24px auto;padding:16px;border:1px solid rgba(0,0,0,.07);border-radius:14px;background:#fff}
.c3-thanks h2{margin:0 0 12px;font-weight:700;font-size:20px}
.c3-thanks .c3-meta{display:flex;flex-wrap:wrap;gap:12px;margin:10px 0 16px}
.c3-thanks .c3-meta .c3-pill{padding:6px 10px;border-radius:999px;background:rgba(0,0,0,.05);font-size:13px}
.c3-thanks .c3-items{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr;gap:8px}
.c3-thanks .c3-items li{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed rgba(0,0,0,.08)}
.c3-thanks .c3-thumb{width:48px;height:48px;flex:0 0 48px;overflow:hidden;border-radius:8px;border:1px solid rgba(0,0,0,.06);display:flex;align-items:center;justify-content:center}
.c3-thanks .c3-thumb img{max-width:100%;max-height:100%;display:block}
.c3-thanks .c3-title{font-weight:600}
.c3-thanks .c3-qty{margin-right:auto;opacity:.8;font-size:13px}
.c3-thanks .c3-total{font-weight:700}

/* Generic request-cancel button styling */
.button.cancel, .button.wc-request-cancel, .request-cancel, a.cancel-order{
  border-radius:10px;padding:10px 14px;box-shadow:0 6px 16px rgba(0,0,0,.12);
  transition:transform .2s ease, box-shadow .2s ease;
}
.button.cancel:hover, .button.wc-request-cancel:hover, .request-cancel:hover, a.cancel-order:hover{
  transform:translateY(-1px);box-shadow:0 8px 18px rgba(0,0,0,.16);
}
