/* سبد خرید، تسویه حساب و صفحه ی «سفارش دریافت شد»: هماهنگ با بقیه ی صفحه های انجمن (بنفش #662D91)
   فقط روی این سه صفحه بارگذاری می شود و همه ی قاعده ها زیر body.woocommerce-cart / -checkout هستند. */

body.woocommerce-cart .woocommerce,
body.woocommerce-checkout .woocommerce {
	--eft-brand: #662D91; --eft-brand-d: #4f2174; --eft-soft: #f8f0fc; --eft-line: #e4dcec; --eft-text: #2b2b33; --eft-muted: #6b6b7a;
	color: var(--eft-text); line-height: 1.9;
}
body.woocommerce-cart .woocommerce *, body.woocommerce-checkout .woocommerce * { box-sizing: border-box; }

/* ---------- پیام ها (کد تخفیف، خطا، موفق) ---------- */
body.woocommerce-cart .woocommerce .woocommerce-message,
body.woocommerce-cart .woocommerce .woocommerce-info,
body.woocommerce-cart .woocommerce .woocommerce-error,
body.woocommerce-checkout .woocommerce .woocommerce-message,
body.woocommerce-checkout .woocommerce .woocommerce-info,
body.woocommerce-checkout .woocommerce .woocommerce-error {
	display: block; margin: 0 0 18px; padding: 14px 18px; list-style: none; border: 1px solid var(--eft-line); border-right: 4px solid var(--eft-brand);
	border-radius: 12px; background: var(--eft-soft); color: var(--eft-text); font-size: 14.5px; line-height: 1.9;
}
body.woocommerce-cart .woocommerce .woocommerce-message::before,
body.woocommerce-cart .woocommerce .woocommerce-info::before,
body.woocommerce-cart .woocommerce .woocommerce-error::before,
body.woocommerce-checkout .woocommerce .woocommerce-message::before,
body.woocommerce-checkout .woocommerce .woocommerce-info::before,
body.woocommerce-checkout .woocommerce .woocommerce-error::before { display: none; }
body.woocommerce-cart .woocommerce .woocommerce-message { border-right-color: #2e9e5b; background: #eef9f2; border-color: #cdebd8; }
body.woocommerce-cart .woocommerce .woocommerce-error, body.woocommerce-checkout .woocommerce .woocommerce-error { border-right-color: #c62828; background: #fdf0ef; border-color: #f3c9c5; }
body.woocommerce-cart .woocommerce .woocommerce-error li, body.woocommerce-checkout .woocommerce .woocommerce-error li { list-style: none; margin: 0; }
body.woocommerce-cart .woocommerce .woocommerce-message,
body.woocommerce-cart .woocommerce .woocommerce-info:has(> .button) { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 12px; }
body.woocommerce-cart .woocommerce .woocommerce-message .button,
body.woocommerce-cart .woocommerce .woocommerce-info .button { float: none; margin: 0; flex: 0 0 auto; }
body.woocommerce-cart .woocommerce .woocommerce-info a,
body.woocommerce-checkout .woocommerce .woocommerce-info a { color: var(--eft-brand); font-weight: 700; text-decoration: underline; }

/* ---------- دکمه ها ---------- */
body.woocommerce-cart .woocommerce a.button,
body.woocommerce-cart .woocommerce button.button,
body.woocommerce-cart .woocommerce input.button,
body.woocommerce-checkout .woocommerce a.button,
body.woocommerce-checkout .woocommerce button.button,
body.woocommerce-checkout .woocommerce input.button {
	display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 20px; border: 0; border-radius: 10px;
	background: #ece3f4; color: var(--eft-brand); font: inherit; font-size: 14.5px; font-weight: 700; line-height: 1.5; text-decoration: none;
	cursor: pointer; transition: background .15s, color .15s, box-shadow .15s;
}
body.woocommerce-cart .woocommerce a.button:hover, body.woocommerce-cart .woocommerce button.button:hover,
body.woocommerce-checkout .woocommerce a.button:hover, body.woocommerce-checkout .woocommerce button.button:hover { background: #dccbec; color: var(--eft-brand-d); }
body.woocommerce-cart .woocommerce button.button[disabled], body.woocommerce-cart .woocommerce button.button:disabled { opacity: .5; cursor: not-allowed; }
body.woocommerce-cart .woocommerce a.button.alt, body.woocommerce-cart .woocommerce a.checkout-button,
body.woocommerce-checkout .woocommerce button.button.alt, body.woocommerce-checkout .woocommerce #place_order {
	background: var(--eft-brand); color: #fff; box-shadow: 0 6px 16px rgba(102, 45, 145, .28);
}
body.woocommerce-cart .woocommerce a.button.alt:hover, body.woocommerce-cart .woocommerce a.checkout-button:hover,
body.woocommerce-checkout .woocommerce button.button.alt:hover, body.woocommerce-checkout .woocommerce #place_order:hover { background: var(--eft-brand-d); color: #fff; }

/* ---------- فرم ها ---------- */
body.woocommerce-cart .woocommerce input[type="text"], body.woocommerce-cart .woocommerce input[type="number"],
body.woocommerce-checkout .woocommerce input[type="text"], body.woocommerce-checkout .woocommerce input[type="tel"],
body.woocommerce-checkout .woocommerce input[type="email"], body.woocommerce-checkout .woocommerce input[type="password"],
body.woocommerce-checkout .woocommerce select, body.woocommerce-checkout .woocommerce textarea,
body.woocommerce-checkout .woocommerce .select2-container--default .select2-selection--single {
	width: 100%; min-height: 46px; padding: 9px 14px; border: 1px solid #d9cce6; border-radius: 10px; background: #fff; color: var(--eft-text);
	font: inherit; font-size: 15px; box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
body.woocommerce-checkout .woocommerce textarea { min-height: 96px; }
body.woocommerce-cart .woocommerce input:focus, body.woocommerce-checkout .woocommerce input:focus,
body.woocommerce-checkout .woocommerce select:focus, body.woocommerce-checkout .woocommerce textarea:focus {
	outline: 0; border-color: var(--eft-brand); box-shadow: 0 0 0 3px rgba(102, 45, 145, .15);
}
body.woocommerce-checkout .woocommerce label { display: block; margin: 0 0 6px; font-size: 13.5px; font-weight: 700; color: #4a4a58; }
body.woocommerce-checkout .woocommerce label .required { color: #c62828; text-decoration: none; }
body.woocommerce-checkout .woocommerce .form-row { margin: 0 0 16px; padding: 0; }

/* ---------- جزئیات صورتحساب ---------- */
body.woocommerce-checkout .woocommerce form.checkout { display: block; }
body.woocommerce-checkout .woocommerce #customer_details {
	width: 100%; margin: 0 0 24px; padding: 22px; border: 1px solid var(--eft-line); border-radius: 16px; background: #fff;
	box-shadow: 0 4px 14px rgba(10, 10, 10, .04);
}
body.woocommerce-checkout .woocommerce #customer_details .col-1,
body.woocommerce-checkout .woocommerce #customer_details .col-2 { float: none; width: 100%; max-width: none; padding: 0; }
body.woocommerce-checkout .woocommerce .woocommerce-billing-fields__field-wrapper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
body.woocommerce-checkout .woocommerce .woocommerce-billing-fields__field-wrapper .form-row { float: none; width: 100%; }
body.woocommerce-checkout .woocommerce .woocommerce-billing-fields__field-wrapper .form-row-wide { grid-column: 1 / -1; }
body.woocommerce-checkout .woocommerce #customer_details h3,
body.woocommerce-checkout .woocommerce #order_review_heading,
body.woocommerce-cart .woocommerce .cart_totals h2 {
	position: relative; margin: 0 0 18px; padding: 0 0 12px; font-size: 19px; font-weight: 800; line-height: 1.6; color: var(--eft-text);
}
body.woocommerce-checkout .woocommerce #customer_details h3::after,
body.woocommerce-checkout .woocommerce #order_review_heading::after,
body.woocommerce-cart .woocommerce .cart_totals h2::after {
	content: ""; position: absolute; right: 0; bottom: 0; width: 56px; height: 3px; border-radius: 3px; background: var(--eft-brand);
}

/* ---------- جدول ها (سفارش شما، سبد خرید، جمع کل) ---------- */
body.woocommerce-cart .woocommerce table.shop_table,
body.woocommerce-checkout .woocommerce table.shop_table {
	width: 100%; margin: 0 0 24px; border: 1px solid var(--eft-line); border-collapse: separate; border-spacing: 0; border-radius: 14px; overflow: hidden; background: #fff;
}
body.woocommerce-cart .woocommerce table.shop_table th, body.woocommerce-cart .woocommerce table.shop_table td,
body.woocommerce-checkout .woocommerce table.shop_table th, body.woocommerce-checkout .woocommerce table.shop_table td {
	padding: 14px 16px; border: 0; border-bottom: 1px solid #efe9f4; background: transparent; text-align: right; vertical-align: middle; font-size: 14.5px;
}
body.woocommerce-cart .woocommerce table.shop_table thead th, body.woocommerce-checkout .woocommerce table.shop_table thead th {
	background: var(--eft-soft); color: #4f2174; font-weight: 800; font-size: 13.5px;
}
body.woocommerce-cart .woocommerce table.shop_table tr:last-child > th, body.woocommerce-cart .woocommerce table.shop_table tr:last-child > td,
body.woocommerce-checkout .woocommerce table.shop_table tr:last-child > th, body.woocommerce-checkout .woocommerce table.shop_table tr:last-child > td { border-bottom: 0; }
body.woocommerce-checkout .woocommerce table.shop_table tfoot th { font-weight: 700; color: var(--eft-muted); }
body.woocommerce-checkout .woocommerce table.shop_table tfoot .order-total th,
body.woocommerce-checkout .woocommerce table.shop_table tfoot .order-total td,
body.woocommerce-cart .woocommerce .cart_totals .order-total th, body.woocommerce-cart .woocommerce .cart_totals .order-total td { background: var(--eft-soft); color: #4f2174; font-weight: 800; font-size: 16px; }

/* سبد خرید */
body.woocommerce-cart .woocommerce td.product-remove { width: 54px; text-align: center; }
body.woocommerce-cart .woocommerce a.remove {
	display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #fdeceb; color: #b3261e !important;
	font-size: 18px; font-weight: 700; line-height: 1; text-decoration: none; transition: background .15s, color .15s;
}
body.woocommerce-cart .woocommerce a.remove:hover { background: #c62828; color: #fff !important; }
body.woocommerce-cart .woocommerce td.product-thumbnail { width: 90px; }
body.woocommerce-cart .woocommerce td.product-thumbnail img { display: block; width: 64px; max-width: 100%; height: auto; border-radius: 8px; }
body.woocommerce-cart .woocommerce td.product-name a { color: var(--eft-brand); font-weight: 700; text-decoration: none; }
body.woocommerce-cart .woocommerce td.product-name a:hover { color: var(--eft-brand-d); text-decoration: underline; }
body.woocommerce-cart .woocommerce td.actions { padding: 14px 16px; background: #fcfaff; }
body.woocommerce-cart .woocommerce td.actions::after { content: ""; display: table; clear: both; }
body.woocommerce-cart .woocommerce td.actions .coupon { display: flex; flex-wrap: wrap; gap: 10px; float: right; width: auto; }
body.woocommerce-cart .woocommerce td.actions .coupon label { display: none; }
body.woocommerce-cart .woocommerce td.actions .coupon input.input-text { width: 200px; }
body.woocommerce-cart .woocommerce td.actions > button[name="update_cart"] { float: left; }
body.woocommerce-cart .woocommerce .cart-collaterals { display: block; }
body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals { float: none; width: 100%; max-width: 520px; margin: 0; }
body.woocommerce-cart .woocommerce .wc-proceed-to-checkout { padding: 0; }
body.woocommerce-cart .woocommerce .wc-proceed-to-checkout a.checkout-button { display: flex; width: 100%; min-height: 52px; margin: 0; font-size: 16px; }

/* ---------- پرداخت ---------- */
body.woocommerce-checkout .woocommerce #order_review { margin: 0; }
body.woocommerce-checkout .woocommerce #payment {
	margin: 0; padding: 0; border: 1px solid var(--eft-line); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 4px 14px rgba(10, 10, 10, .04);
}
body.woocommerce-checkout .woocommerce #payment ul.payment_methods { margin: 0; padding: 14px 18px 0; border: 0; list-style: none; }
body.woocommerce-checkout .woocommerce #payment ul.payment_methods > li { margin: 0 0 10px; padding: 0; list-style: none; }
body.woocommerce-checkout .woocommerce #payment ul.payment_methods > li > label {
	display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 4px 0; font-size: 15px; font-weight: 800; color: var(--eft-text); cursor: pointer;
}
body.woocommerce-checkout .woocommerce #payment ul.payment_methods > li > label img { max-height: 34px; width: auto; vertical-align: middle; }
body.woocommerce-checkout .woocommerce #payment input[type="radio"] { width: 18px; min-height: 0; height: 18px; accent-color: var(--eft-brand); margin: 0 0 0 10px; vertical-align: middle; }
body.woocommerce-checkout .woocommerce #payment div.payment_box {
	margin: 8px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--eft-soft); color: #4a3a5a; font-size: 14px; line-height: 1.9;
}
body.woocommerce-checkout .woocommerce #payment div.payment_box::before { display: none; }
body.woocommerce-checkout .woocommerce #payment div.payment_box p { margin: 0; }
body.woocommerce-checkout .woocommerce #payment div.form-row.place-order { margin: 0; padding: 16px 18px 18px; background: #fcfaff; border-top: 1px solid #efe9f4; }
body.woocommerce-checkout .woocommerce .woocommerce-privacy-policy-text { margin: 0 0 14px; font-size: 13px; line-height: 1.9; color: var(--eft-muted); }
body.woocommerce-checkout .woocommerce .woocommerce-privacy-policy-text a { color: var(--eft-brand); font-weight: 700; }
body.woocommerce-checkout .woocommerce #place_order { display: flex; width: 100%; min-height: 54px; margin: 0; font-size: 17px; float: none; }

/* ---------- سفارش دریافت شد ---------- */
body.woocommerce-checkout .woocommerce .woocommerce-thankyou-order-received {
	margin: 0 0 20px; padding: 16px 18px; border: 1px solid #cdebd8; border-right: 4px solid #2e9e5b; border-radius: 12px; background: #eef9f2; color: #1d6b3f; font-size: 16px; font-weight: 700;
}
body.woocommerce-checkout .woocommerce ul.woocommerce-order-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
body.woocommerce-checkout .woocommerce ul.woocommerce-order-overview li {
	margin: 0; padding: 14px 16px; border: 1px solid var(--eft-line); border-radius: 12px; background: #fff; font-size: 13px; color: var(--eft-muted); list-style: none; float: none; text-transform: none;
}
body.woocommerce-checkout .woocommerce ul.woocommerce-order-overview li strong { display: block; margin-top: 2px; font-size: 15px; color: var(--eft-text); }
body.woocommerce-checkout .woocommerce .woocommerce-order-details__title, body.woocommerce-checkout .woocommerce .woocommerce-column__title { margin: 0 0 14px; font-size: 18px; font-weight: 800; }

/* ---------- موبایل ---------- */
@media (max-width: 767px) {
	body.woocommerce-checkout .woocommerce #customer_details { padding: 16px; border-radius: 14px; }
	body.woocommerce-checkout .woocommerce .woocommerce-billing-fields__field-wrapper { grid-template-columns: 1fr; }
	body.woocommerce-checkout .woocommerce #customer_details h3, body.woocommerce-checkout .woocommerce #order_review_heading, body.woocommerce-cart .woocommerce .cart_totals h2 { font-size: 17px; }
	body.woocommerce-checkout .woocommerce table.shop_table th, body.woocommerce-checkout .woocommerce table.shop_table td { padding: 12px 12px; font-size: 14px; }
	body.woocommerce-checkout .woocommerce #payment ul.payment_methods { padding: 12px 14px 0; }
	body.woocommerce-checkout .woocommerce #payment div.form-row.place-order { padding: 14px; }

	/* سبد خرید: هر ردیف یک کارت */
	body.woocommerce-cart .woocommerce table.shop_table.cart { border: 0; background: transparent; overflow: visible; }
	body.woocommerce-cart .woocommerce table.shop_table.cart thead { display: none; }
	body.woocommerce-cart .woocommerce table.shop_table.cart, body.woocommerce-cart .woocommerce table.shop_table.cart tbody { display: block; }
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item {
		display: grid; grid-template-columns: 76px 1fr; gap: 6px 12px; margin: 0 0 14px; padding: 14px; border: 1px solid var(--eft-line); border-radius: 14px; background: #fff;
	}
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td { display: block; padding: 0; border: 0; background: transparent; text-align: right; }
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-thumbnail { grid-row: 1 / span 3; width: auto; }
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-thumbnail img { width: 76px; }
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-remove { position: absolute; width: auto; margin-top: -4px; }
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item { position: relative; }
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-remove { left: 10px; top: 14px; }
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-name { grid-column: 2; padding-left: 36px; font-weight: 700; }
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-price,
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-subtotal { grid-column: 2; font-size: 14px; color: var(--eft-muted); }
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-subtotal { color: var(--eft-brand); font-weight: 800; }
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td[data-title]::before { content: attr(data-title) ": "; font-weight: 600; color: var(--eft-muted); }
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-name::before,
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-thumbnail::before,
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-remove::before { content: none; }
	body.woocommerce-cart .woocommerce table.shop_table.cart tr.cart_item td.product-quantity { display: none; }
	body.woocommerce-cart .woocommerce table.shop_table.cart tr:not(.cart_item) { display: block; }
	body.woocommerce-cart .woocommerce table.shop_table.cart td.actions { display: block; padding: 14px; border: 1px solid var(--eft-line); border-radius: 14px; background: #fcfaff; }
	body.woocommerce-cart .woocommerce td.actions .coupon { float: none; display: flex; flex-direction: column; gap: 10px; width: 100%; margin: 0 0 12px; }
	body.woocommerce-cart .woocommerce td.actions .coupon input.input-text { width: 100%; }
	body.woocommerce-cart .woocommerce td.actions .coupon .button, body.woocommerce-cart .woocommerce td.actions > button[name="update_cart"] { float: none; width: 100%; }
	body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals { max-width: none; }
	body.woocommerce-cart .woocommerce .woocommerce-message, body.woocommerce-cart .woocommerce .woocommerce-info:has(> .button) { flex-direction: column; align-items: stretch; }
	body.woocommerce-cart .woocommerce .woocommerce-message .button { width: 100%; }
}
