/* ==========================================================================
   Cart & Checkout – بازطراحی ظاهر و رسپانسیو
   این فایل بعد از style.css لود می‌شود و فقط روی صفحات سبد خرید و تسویه حساب فعال است.
   رنگ اصلی از متغیرهای قالب (--primary-bgcolor / --primary-color) خوانده می‌شود.
   ========================================================================== */

:root {
    --cc-brand: var(--primary-bgcolor, #16a34a);
    --cc-on-brand: var(--primary-color, #fff);
    --cc-brand-soft: #eef7f0;
    --cc-text: #1f2937;
    --cc-muted: #6b7280;
    --cc-border: #e8ebef;
    --cc-surface: #fff;
    --cc-danger: #dc2626;
    --cc-radius: 16px;
    --cc-radius-sm: 12px;
    --cc-shadow: 0 2px 14px rgba(17, 24, 39, .06);
}
@supports (background: color-mix(in srgb, red 10%, white)) {
    :root { --cc-brand-soft: color-mix(in srgb, var(--cc-brand) 9%, #fff); }
}

/* ---------- مراحل خرید ---------- */
.checkout-steps {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    list-style: none;
    margin: 8px auto 26px;
    padding: 0;
    max-width: 640px;
    counter-reset: none;
}
.checkout-steps li {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    text-align: center;
    color: var(--cc-muted);
    font-size: 13px;
}
.checkout-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 17px;
    inset-inline-start: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 2px;
    background: var(--cc-border);
}
.checkout-steps li.is-done:not(:last-child)::after { background: var(--cc-brand); }
.checkout-steps .step-num {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff;
    border: 2px solid var(--cc-border);
    font-weight: 700; font-size: 14px;
    position: relative; z-index: 1;
}
.checkout-steps li.is-active { color: var(--cc-text); font-weight: 700; }
.checkout-steps li.is-active .step-num { background: var(--cc-brand); border-color: var(--cc-brand); color: var(--cc-on-brand); }
.checkout-steps li.is-done .step-num { background: var(--cc-brand-soft); border-color: var(--cc-brand); color: var(--cc-brand); }
.checkout-steps li.is-done { color: var(--cc-brand); }

/* ==========================================================================
   صفحه سبد خرید
   ========================================================================== */
.woocommerce-cart .woocommerce-cart-page { padding: 10px 0 40px; }

.woocommerce-cart .custom-tab {
    display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 22px;
    border-bottom: 1px solid var(--cc-border);
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.woocommerce-cart .custom-tab li { margin: 0; flex: 0 0 auto; }
.woocommerce-cart .custom-tab li a {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 18px; border-radius: 12px 12px 0 0;
    background: transparent; color: var(--cc-muted);
    font-weight: 600; font-size: 14px; white-space: nowrap;
    border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.woocommerce-cart .custom-tab li a i { margin: 0; }
.woocommerce-cart .custom-tab li a.active {
    background: var(--cc-brand-soft); color: var(--cc-brand);
    border-bottom-color: var(--cc-brand);
}
.woocommerce-cart .custom-tab li a:hover:not(.active) { background: #f3f4f6; color: var(--cc-text); }

.woocommerce-cart .cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 24px;
    align-items: start;
}
.woocommerce-cart .mb-cart-title {
    display: flex; align-items: center; justify-content: space-between;
    background: none; box-shadow: none; padding: 0; margin: 0 0 14px !important; border-radius: 0;
}
.woocommerce-cart .cart-heading { font-size: 20px; font-weight: 800; margin: 0; color: var(--cc-text); }
.woocommerce-cart .cart-items-count { color: var(--cc-muted); font-size: 14px; margin: 0; }

.woocommerce-cart .mb-cart-holder {
    background: transparent; padding: 0; box-shadow: none; border-radius: 0;
    display: flex; flex-direction: column; gap: 12px;
}
.woocommerce-cart .mb-cart-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 6px 18px;
    align-items: center;
    padding: 16px;
    background: var(--cc-surface);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
    position: relative;
    transition: opacity .25s, transform .25s, box-shadow .2s;
}
.woocommerce-cart .mb-cart-item:hover { box-shadow: 0 6px 22px rgba(17, 24, 39, .09); }
.woocommerce-cart .mb-cart-item:last-child { border-bottom: 1px solid var(--cc-border); }
.woocommerce-cart .mb-cart-item.removing { opacity: 0; transform: scale(.97); }

.woocommerce-cart .cart-pro-img {
    display: block; width: 96px; height: 96px; margin: 0;
    border-radius: var(--cc-radius-sm); overflow: hidden; background: #f3f4f6;
}
.woocommerce-cart .cart-pro-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.woocommerce-cart .cart-item-info { min-width: 0; }
.woocommerce-cart .cart-title,
.woocommerce-cart .cart-title a {
    font-size: 15px; font-weight: 700; line-height: 1.7; color: var(--cc-text); text-decoration: none;
}
.woocommerce-cart .cart-title a:hover { color: var(--cc-brand); }
.woocommerce-cart .cart-title dl.variation {
    display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 4px 0 0; font-size: 12px; color: var(--cc-muted); font-weight: 400;
}
.woocommerce-cart .cart-title dl.variation dt { float: none; margin: 0; font-weight: 400; }
.woocommerce-cart .cart-title dl.variation dd { margin: 0; }
.woocommerce-cart .cart-title dl.variation dd p { margin: 0; display: inline; }
.woocommerce-cart .mb-cart-item .details .next-shop a.send-to-next-purchase,
.woocommerce-cart .cart-title a.send-to-next-purchase {
    display: table; margin: 8px 0 0; padding: 4px 12px;
    border: 1px dashed #c7ccd4; border-radius: 999px; background: transparent;
    color: var(--cc-muted); font-size: 12px; font-weight: 500;
}
.woocommerce-cart .cart-title a.send-to-next-purchase:hover {
    border-color: var(--cc-brand); color: var(--cc-brand); background: var(--cc-brand-soft);
}
.woocommerce-cart .mb-cart-item .price {
    margin: 4px 0 0; font-size: 15px; font-weight: 800; color: var(--cc-text);
}
.woocommerce-cart-page .woocommerce-Price-amount { color: inherit; font-weight: inherit; }

.woocommerce-cart .cart-item-actions {
    display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}

/* کنترل تعداد */
.woocommerce-cart .quantity-controls {
    display: inline-flex; align-items: center; position: static;
    border: 1px solid var(--cc-border); border-radius: var(--cc-radius-sm);
    background: #fff; overflow: hidden; height: 42px;
}
.woocommerce-cart .quantity-controls .qty-btn,
.woocommerce-cart .quantity-controls .qty-btn.plus,
.woocommerce-cart .quantity-controls .qty-btn.minus {
    position: static; width: 40px; height: 100%; border: 0; border-radius: 0;
    background: transparent; color: var(--cc-brand); font-size: 20px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center; padding: 0;
    transition: background .15s;
}
.woocommerce-cart .quantity-controls .qty-btn:hover { background: var(--cc-brand-soft); }
.woocommerce-cart .quantity-controls .qty-input {
    width: 44px; height: 100%; margin: 0; padding: 0; border: 0 !important; background: transparent;
    text-align: center; font-weight: 700; font-size: 15px; color: var(--cc-text);
    pointer-events: none; -moz-appearance: textfield; appearance: textfield;
}
.woocommerce-cart .quantity-controls .qty-input::-webkit-outer-spin-button,
.woocommerce-cart .quantity-controls .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* حذف + تایید */
.woocommerce-cart .remove-item-container { position: relative; min-height: 34px; display: flex; justify-content: flex-end; }
.woocommerce-cart .mb-cart-item .remove,
.woocommerce-cart .mb-cart-item .remove:hover {
    position: static; width: auto; height: auto; line-height: 1.4;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border: 0; border-radius: 10px; background: transparent;
    color: var(--cc-danger) !important; font-size: 13px; font-weight: 600; text-decoration: none;
}
.woocommerce-cart .mb-cart-item .remove:hover { background: #fef2f2; }
.woocommerce-cart .confirm-remove {
    display: none; position: static; padding: 0; align-items: center; gap: 6px;
}
.woocommerce-cart .remove-item-container.is-confirming .confirm-remove { display: flex; }
.woocommerce-cart .remove-item-container.is-confirming .remove { display: none; }
.woocommerce-cart .confirm-text { font-size: 12px; color: var(--cc-muted); }
.woocommerce-cart .confirm-yes,
.woocommerce-cart .confirm-no {
    border: 0; border-radius: 8px; padding: 6px 14px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.woocommerce-cart .confirm-yes { background: var(--cc-danger); color: #fff; }
.woocommerce-cart .confirm-yes:hover { background: #b91c1c; }
.woocommerce-cart .confirm-no { background: #eef0f3; color: var(--cc-text); }
.woocommerce-cart .confirm-no:hover { background: #e2e5ea; }

.woocommerce-cart .cart-item-updating { opacity: .55; pointer-events: none; }
.woocommerce-cart .cart-item-updating::after { background: transparent; }

.woocommerce-cart .cart-continue {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
    color: var(--cc-brand); font-weight: 600; font-size: 14px; text-decoration: none;
}
.woocommerce-cart .cart-continue:hover { text-decoration: underline; }

/* خلاصه سفارش */
.woocommerce-cart .cart-summary {
    position: sticky; top: 96px;
    background: var(--cc-surface); border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius); box-shadow: var(--cc-shadow);
    padding: 22px; width: 100% !important;
}
.woocommerce-cart .summary-title { font-size: 17px; font-weight: 800; margin: 0 0 14px; color: var(--cc-text); }
.woocommerce-cart .summary-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 0; border-bottom: 1px dashed var(--cc-border); font-size: 14px; color: var(--cc-muted);
}
.woocommerce-cart .summary-row .cart-items-count { color: var(--cc-text); font-weight: 600; }
.woocommerce-cart .summary-total { border-bottom: 0; padding: 16px 0 6px; color: var(--cc-text); font-weight: 700; font-size: 15px; }
.woocommerce-cart .summary-total .cart-total-amount { font-size: 19px; font-weight: 800; color: var(--cc-brand); }
.woocommerce-cart .summary-total .totals { padding: 0; }

.woocommerce-cart .cart-coupon {
    margin: 10px 0 4px; padding: 0; background: transparent; display: block;
    border: 1px dashed #cfd5dc; border-radius: var(--cc-radius-sm);
}
.woocommerce-cart .cart-coupon summary {
    list-style: none; cursor: pointer; padding: 12px 14px; font-size: 13px; font-weight: 600; color: var(--cc-text);
    display: flex; align-items: center; gap: 8px;
}
.woocommerce-cart .cart-coupon summary::-webkit-details-marker { display: none; }
.woocommerce-cart .cart-coupon summary i { color: var(--cc-brand); }
.woocommerce-cart .cart-coupon .coupon-fields { display: flex; gap: 8px; padding: 0 12px 12px; }
.woocommerce-cart .cart-coupon .coupon-fields input {
    flex: 1 1 auto; min-width: 0; width: auto; margin: 0; height: 44px; padding: 0 12px;
    border: 1px solid var(--cc-border); border-radius: 10px; font-size: 14px;
}
.woocommerce-cart .cart-coupon .coupon-fields button {
    flex: 0 0 auto; height: 44px; padding: 0 18px; border-radius: 10px; font-size: 14px; font-weight: 700;
}

.woocommerce-cart .summary-checkout { margin-top: 16px; }
.woocommerce-cart .summary-checkout .checkout-button,
.woocommerce-cart .checkout-button {
    display: flex !important; align-items: center; justify-content: center; width: 100%;
    min-height: 52px; padding: 12px 20px !important; border-radius: var(--cc-radius-sm) !important;
    font-size: 15px !important; font-weight: 800 !important; text-align: center; text-decoration: none;
    background: var(--cc-brand) !important; color: var(--cc-on-brand) !important;
    border: 1px solid var(--cc-brand) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.woocommerce-cart .checkout-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.woocommerce-cart .summary-note { margin: 14px 0 0; font-size: 12px; color: var(--cc-muted); line-height: 1.9; }
.woocommerce-cart .summary-note i { margin-inline-end: 4px; }

/* تب «سبد خرید بعدی» و سبد خالی */
.woocommerce-cart .mb-next-purchase-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; margin: 10px 0 !important; }
.woocommerce-cart .mb-shop-next-purchase-item {
    border: 1px solid var(--cc-border); box-shadow: var(--cc-shadow); border-radius: var(--cc-radius);
    background: #fff; gap: 14px; flex-wrap: wrap;
}
.woocommerce-cart .mb-shop-next-purchase-item img { border-radius: 10px; object-fit: cover; }
.woocommerce-cart .cart-empty { padding: 10px 0 50px; }
.woocommerce-cart .cart-empty .custom-tab { justify-content: center; }
.woocommerce-cart .cart-empty .tab-box { width: 100%; }

/* ==========================================================================
   صفحه تسویه حساب
   ========================================================================== */
.woocommerce-checkout .woocommerce-form-coupon-toggle,
.woocommerce-checkout .woocommerce-form-login-toggle { margin-bottom: 14px; }
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-message {
    border-radius: var(--cc-radius-sm); border: 1px solid var(--cc-border); border-top-width: 3px;
    background: #fff; box-shadow: var(--cc-shadow); font-size: 14px; padding: 14px 18px 14px 18px;
}
.woocommerce-checkout .woocommerce-error { border-radius: var(--cc-radius-sm); font-size: 14px; }

.checkout-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 24px;
    margin: 0 0 40px;
    align-items: start;
}
.checkout-left, .checkout-right { min-width: 0; }
.checkout-right { position: sticky; top: 96px; }

.checkout-card {
    background: var(--cc-surface); border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius); box-shadow: var(--cc-shadow);
    padding: 24px; margin-bottom: 18px;
}
.checkout-card h3 {
    display: flex; align-items: center; gap: 10px; margin: 0 0 20px;
    font-size: 17px; font-weight: 800; color: var(--cc-text);
}
.checkout-card h3 i {
    width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--cc-brand-soft); color: var(--cc-brand); font-size: 14px;
}

/* فیلدها: دو ستونه در دسکتاپ، تک‌ستونه در موبایل */
.checkout-card .woocommerce-billing-fields__field-wrapper,
.checkout-card .woocommerce-shipping-fields__field-wrapper,
.checkout-card .woocommerce-additional-fields__field-wrapper {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px;
}
.checkout-card .form-row {
    float: none !important; width: 100% !important; margin: 0 0 16px !important; padding: 0 !important;
    grid-column: span 1;
}
.checkout-card .form-row-wide,
.checkout-card #billing_address_1_field,
.checkout-card #shipping_address_1_field,
.checkout-card #order_comments_field { grid-column: 1 / -1; }
.checkout-card .form-row label {
    display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--cc-text); line-height: 1.6;
}
.checkout-card .form-row .required { color: var(--cc-danger); text-decoration: none; }
.checkout-card .form-row .optional { color: var(--cc-muted); font-weight: 400; font-size: 12px; }
.checkout-card .woocommerce-input-wrapper { display: block; }
.checkout-card input.input-text,
.checkout-card select,
.checkout-card textarea,
.checkout-card .select2-container--default .select2-selection--single {
    width: 100%; height: 48px; padding: 0 14px; font-size: 14px; color: var(--cc-text);
    background: #fff; border: 1px solid var(--cc-border) !important; border-radius: 10px !important;
    box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.checkout-card textarea { height: auto !important; min-height: 110px; padding: 12px 14px !important; }
.checkout-card input.input-text:focus,
.checkout-card select:focus,
.checkout-card textarea:focus,
.checkout-card .select2-container--open .select2-selection--single,
.checkout-card .select2-container--focus .select2-selection--single {
    outline: 0; border-color: var(--cc-brand) !important;
    box-shadow: 0 0 0 3px var(--cc-brand-soft);
}
.checkout-card .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px; padding: 0 !important; color: var(--cc-text);
}
.checkout-card .select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px; }
.checkout-card .woocommerce-invalid input.input-text,
.checkout-card .woocommerce-invalid .select2-selection { border-color: var(--cc-danger) !important; }
/* حداقل اندازه 16px روی موبایل تا iOS هنگام فوکوس زوم نکند */
@media (max-width: 767px) {
    .checkout-card input.input-text, .checkout-card select, .checkout-card textarea { font-size: 16px; }
}
.checkout-card #ship-to-different-address { margin: 0 0 16px; }
.checkout-card #ship-to-different-address label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; cursor: pointer; }
.checkout-card #ship-to-different-address input { width: 18px; height: 18px; margin: 0; accent-color: var(--cc-brand); }

/* خلاصه سفارش */
.checkout-summary { padding: 22px; }
.checkout-order-review { background: transparent; border-radius: 0; box-shadow: none; padding: 0; margin: 0; }

.review-items { list-style: none; margin: 0 0 6px; padding: 0; }
.review-items .review-item {
    display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
    padding: 14px 0; border-bottom: 1px solid var(--cc-border); transition: opacity .2s;
}
.review-items .review-item:first-child { padding-top: 0; }
.review-items .review-item.is-updating { opacity: .5; pointer-events: none; }
.review-items .product-thumbnail { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #f3f4f6; }
.review-items .product-thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; display: block; }
.review-item-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.review-item-info .product-title { font-size: 13px; font-weight: 700; line-height: 1.7; color: var(--cc-text); }
.review-item-info dl.variation { margin: 0; font-size: 12px; color: var(--cc-muted); display: flex; flex-wrap: wrap; gap: 0 10px; }
.review-item-info dl.variation dt, .review-item-info dl.variation dd { margin: 0; float: none; font-weight: 400; }
.review-item-info dl.variation dd p { margin: 0; }
.review-item-info .product-total { font-size: 14px; font-weight: 800; color: var(--cc-text); }
.review-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.review-order-table .quantity-control, /* سازگاری با استایل قدیمی */
.review-items .quantity-control {
    position: static; display: inline-flex; align-items: center; height: 36px;
    border: 1px solid var(--cc-border); border-radius: 10px; background: #fff; overflow: hidden;
}
.review-items .quantity-control .qty-btn,
.review-items .quantity-control button.qty-btn.plus,
.review-items .quantity-control button.qty-btn.minus {
    position: static; width: 32px; height: 100%; border: 0; border-radius: 0; background: transparent;
    color: var(--cc-brand); font-size: 18px; line-height: 1; cursor: pointer; padding: 0;
}
.review-items .quantity-control .qty-btn:hover { background: var(--cc-brand-soft); }
.review-items .quantity-control input.qty-input {
    width: 34px; height: 100%; padding: 0; border: 0 !important; background: transparent; text-align: center; font-weight: 700; font-size: 14px;
}
.review-items .remove-item-btn,
.review-items .remove-item-btn:hover {
    background: transparent; color: var(--cc-muted); padding: 4px 8px; font-size: 13px; border-radius: 8px;
}
.review-items .remove-item-btn:hover { color: var(--cc-danger); background: #fef2f2; }

.review-totals { width: 100%; border-collapse: collapse; margin: 0; }
.review-totals th, .review-totals td {
    padding: 11px 0; border: 0; border-bottom: 1px dashed var(--cc-border);
    font-size: 14px; background: transparent; vertical-align: top; text-align: start;
}
.review-totals th { font-weight: 500; color: var(--cc-muted); width: 38%; }
.review-totals td { text-align: end; color: var(--cc-text); font-weight: 600; }
.review-totals tr.order-total th, .review-totals tr.order-total td { border-bottom: 0; padding-top: 16px; font-size: 16px; font-weight: 800; color: var(--cc-text); }
.review-totals tr.order-total .woocommerce-Price-amount { color: var(--cc-brand); font-size: 19px; }
.review-totals ul#shipping_method { list-style: none; margin: 0; padding: 0; text-align: start; }
.review-totals ul#shipping_method li { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.review-totals ul#shipping_method input { accent-color: var(--cc-brand); width: 16px; height: 16px; margin: 0; }
.review-totals ul#shipping_method label { margin: 0; cursor: pointer; font-weight: 500; }
.review-totals tr.woocommerce-shipping-totals { display: table-row; width: auto; }
.review-totals tr.woocommerce-shipping-totals td ul#shipping_method li { position: static; }
.review-totals .woocommerce-shipping-destination { font-size: 12px; color: var(--cc-muted); font-weight: 400; margin: 6px 0 0; line-height: 1.8; }

/* پرداخت */
.checkout-summary .woocommerce-checkout-payment,
.checkout-summary #payment {
    background: transparent; padding: 0; box-shadow: none; border-radius: 0; margin-top: 20px; direction: inherit;
}
.woocommerce-checkout-payment ul.wc_payment_methods { list-style: none; padding: 0; margin: 0 0 6px; border: 0; }
.woocommerce-checkout-payment li.wc_payment_method {
    border: 1px solid var(--cc-border); border-radius: var(--cc-radius-sm); margin: 0 0 10px; padding: 14px 16px;
    background: #fff; transition: border-color .15s, background .15s;
}
.woocommerce-checkout-payment li.wc_payment_method:hover,
.woocommerce-checkout-payment li.wc_payment_method:has(input:checked) { border-color: var(--cc-brand); background: var(--cc-brand-soft); }
.woocommerce-checkout-payment li.wc_payment_method > label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 700; color: var(--cc-text); cursor: pointer; }
.woocommerce-checkout-payment input.input-radio { margin: 0; width: 18px; height: 18px; accent-color: var(--cc-brand); }
.woocommerce-checkout-payment .payment_box {
    margin: 10px 0 0; padding: 10px 14px; background: #fff; border: 0; border-inline-start: 3px solid var(--cc-brand);
    border-radius: 8px; color: var(--cc-muted); font-size: 13px; line-height: 1.9;
}
.woocommerce-checkout-payment .payment_box::before { display: none; }
.woocommerce-checkout-payment .payment_box p { margin: 0; }
.woocommerce-checkout-payment .woocommerce-privacy-policy-text { font-size: 12px; color: var(--cc-muted); line-height: 1.9; margin: 12px 0 0; }
.woocommerce-checkout-payment .place-order { padding: 0; margin: 0; }
#place_order,
.woocommerce-checkout-payment .place-order button#place_order {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; margin-top: 14px;
    padding: 12px 20px; border: 0; border-radius: var(--cc-radius-sm);
    background: var(--cc-brand); color: var(--cc-on-brand) !important; font-size: 16px; font-weight: 800;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12); cursor: pointer; transform: none;
    transition: filter .15s, transform .15s;
}
#place_order:hover, .woocommerce-checkout-payment .place-order button#place_order:hover {
    background: var(--cc-brand); filter: brightness(1.06); transform: translateY(-1px);
}

/* ==========================================================================
   تبلت و موبایل
   ========================================================================== */
@media (max-width: 1199px) {
    .woocommerce-cart .cart-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; }
    .checkout-wrapper { grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; }
}

@media (max-width: 991px) {
    .woocommerce-cart .cart-layout,
    .checkout-wrapper { grid-template-columns: minmax(0, 1fr); }
    .woocommerce-cart .cart-summary,
    .checkout-right { position: static; }
}

@media (max-width: 575px) {
    .checkout-steps { margin-bottom: 18px; }
    .checkout-steps li { font-size: 11px; }
    .checkout-steps .step-num { width: 30px; height: 30px; font-size: 13px; }
    .checkout-steps li:not(:last-child)::after { top: 15px; inset-inline-start: calc(50% + 19px); width: calc(100% - 38px); }

    .woocommerce-cart .cart-heading { font-size: 17px; }

    .woocommerce-cart .mb-cart-item { grid-template-columns: 72px minmax(0, 1fr); padding: 12px; gap: 10px 12px; align-items: start; }
    .woocommerce-cart .cart-pro-img { width: 72px; height: 72px; margin: 0; }
    .woocommerce-cart .cart-title, .woocommerce-cart .cart-title a { font-size: 14px; }
    .woocommerce-cart .cart-item-actions {
        grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between;
        padding-top: 10px; border-top: 1px dashed var(--cc-border);
    }
    .woocommerce-cart .remove-item-container { min-height: 0; }
    .woocommerce-cart .cart-summary { padding: 18px; }
    .woocommerce-cart .cart-coupon .coupon-fields { flex-direction: column; }
    .woocommerce-cart .cart-coupon .coupon-fields button { width: 100%; }

    .checkout-card { padding: 18px 16px; border-radius: 14px; }
    .checkout-card .woocommerce-billing-fields__field-wrapper,
    .checkout-card .woocommerce-shipping-fields__field-wrapper,
    .checkout-card .woocommerce-additional-fields__field-wrapper { grid-template-columns: minmax(0, 1fr); }
    .checkout-card .form-row { grid-column: 1 / -1; }

    .review-items .review-item { grid-template-columns: 56px minmax(0, 1fr); }
    .review-items .product-thumbnail { width: 56px; height: 56px; }
    .review-item-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
    .review-totals th { width: 42%; }
    #place_order { position: sticky; bottom: 10px; z-index: 5; }
}

@media (prefers-reduced-motion: reduce) {
    .woocommerce-cart .mb-cart-item, #place_order, .woocommerce-cart .checkout-button { transition: none; }
}

/* سبد خالی */
.woocommerce-cart .cart-empty-state { text-align: center; margin: 30px 0; }
.woocommerce-cart .cart-empty-icon {
    width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--cc-brand-soft); color: var(--cc-brand); font-size: 32px;
}
.woocommerce-cart .cart-empty-title { font-size: 18px; font-weight: 800; margin: 0 0 6px; text-align: center !important; }
.woocommerce-cart .cart-empty-sub { font-size: 14px; color: var(--cc-muted); margin: 0 0 20px; text-align: center !important; }
.woocommerce-cart .cart-empty-state .button { display: inline-flex; align-items: center; gap: 8px; margin: 0 6px; }
