/* ==========================================================
   RK NUTRA — CART
   نفس نظام هوية صفحة الدفع (ذهبي/أسود، Cairo، RTL)
   ========================================================== */

body.woocommerce-cart {
	--gold: #C9A84C;
	--gold-d: #A8892A;
	--black: #111111;
	--white: #ffffff;
	--light: #F8F8F8;
	--text: #1a1a1a;
	--gray: #666666;
	--border: #e8e8e8;
	--gold-bg: #fdf8ee;
	background: var(--light);
	font-family: 'Cairo', sans-serif;
}

/* ----------------------------------------------------------
   تجربة معزولة — إخفاء هيدر/فوتر الموقع (احتياط CSS)
---------------------------------------------------------- */
body.woocommerce-cart .site-header,
body.woocommerce-cart #masthead,
body.woocommerce-cart .main-navigation,
body.woocommerce-cart .site-footer,
body.woocommerce-cart #colophon,
body.woocommerce-cart .woocommerce-breadcrumb,
body.woocommerce-cart .entry-header,
body.woocommerce-cart .page-header {
	display: none !important;
}

body.woocommerce-cart {
	overflow-x: hidden;
}

body.woocommerce-cart .site,
body.woocommerce-cart #page,
body.woocommerce-cart #content,
body.woocommerce-cart .site-content,
body.woocommerce-cart .grid-container,
body.woocommerce-cart .container,
body.woocommerce-cart main,
body.woocommerce-cart article,
body.woocommerce-cart .site-main,
body.woocommerce-cart .content-area,
body.woocommerce-cart .inside-article,
body.woocommerce-cart .entry-content,
body.woocommerce-cart [class*="gb-container"],
body.woocommerce-cart [class*="wp-block-group"] {
	max-width: 100% !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 auto !important;
	display: block !important;
	grid-template-columns: 1fr !important;
}

/* إخفاء أي سايدبار محجوز افتراضياً من GeneratePress على هذه الصفحة */
body.woocommerce-cart .sidebar,
body.woocommerce-cart #right-sidebar,
body.woocommerce-cart #left-sidebar,
body.woocommerce-cart .widget-area {
	display: none !important;
}

/* ----------------------------------------------------------
   الشريط العلوي بالبراند
---------------------------------------------------------- */
.rk-checkout-topbar {
	text-align: center;
	padding: 40px 20px 10px;
}

.rk-checkout-brand {
	font-size: 24px;
	font-weight: 900;
	letter-spacing: 3px;
	color: var(--black);
}

.rk-checkout-brand span {
	color: var(--gold-d);
}

.rk-checkout-tagline {
	margin-top: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 14px;
	color: var(--gray);
}

/* ----------------------------------------------------------
   بنية الصفحة
---------------------------------------------------------- */
.rk-cart-layout {
	box-sizing: border-box;
	width: 100vw;
	margin-inline-start: calc(50% - 50vw);
	margin-top: 20px;
	margin-bottom: 80px;
	padding-inline: max(20px, calc(50vw - 590px));
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 24px;
	align-items: start;
}

.rk-cart-left,
.rk-cart-right {
	width: 100%;
	min-width: 0;
}

.rk-cart-right {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.rk-checkout-card {
	position: relative;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 24px;
	padding: 32px;
	box-shadow: 0 18px 45px rgba(0, 0, 0, .06);
	overflow: hidden;
}

.rk-checkout-card--summary {
	position: sticky;
	top: 24px;
}

.rk-summary-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 22px;
}

.rk-section-title {
	font-size: 22px;
	font-weight: 800;
	margin: 0 0 26px;
	color: var(--black);
	position: relative;
}

.rk-summary-header .rk-section-title {
	margin: 0;
}

.rk-section-title::after {
	content: "";
	display: block;
	width: 54px;
	height: 4px;
	background: var(--gold);
	border-radius: 30px;
	margin-top: 12px;
}

.rk-summary-header .rk-section-title::after {
	display: none;
}

.rk-seal {
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--gold), var(--gold-d));
	color: #111;
	font-weight: 900;
	font-size: 12px;
	letter-spacing: .5px;
	box-shadow: 0 8px 20px rgba(201, 168, 76, .35);
}

/* ----------------------------------------------------------
   منتجات السلة — كل منتج بطاقة مستقلة
---------------------------------------------------------- */
.rk-cart-item {
	display: grid;
	grid-template-columns: 32px 74px 1fr;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.rk-cart-item-remove {
	grid-column: 1;
	justify-self: center;
}

.rk-cart-item-remove a.remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--light);
	border: 1px solid var(--border);
	color: var(--gray) !important;
	font-size: 17px;
	line-height: 1;
	text-decoration: none !important;
	transition: background .15s ease, color .15s ease;
}

.rk-cart-item-remove a.remove:hover {
	background: #fdeceb;
	color: #c0392b !important;
}

.rk-cart-item-thumb {
	grid-column: 2;
	width: 74px;
	height: 74px;
}

.rk-cart-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 14px;
	background: #fafafa;
	border: 1px solid var(--border);
}

.rk-cart-item-body {
	grid-column: 3;
	min-width: 0;
}

.rk-cart-item-name {
	font-size: 15px;
	font-weight: 700;
	color: var(--text);
	margin-bottom: 8px;
}

.rk-cart-item-name a {
	color: var(--text);
	text-decoration: none;
}

.rk-cart-item-name .product-quantity {
	display: none;
}

.rk-cart-item-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	min-width: 0;
}

.rk-cart-item-price {
	font-size: 13px;
	color: var(--gray);
	white-space: nowrap;
	min-width: 0;
}

.rk-cart-item-qty-group {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	min-width: 0;
}

.rk-cart-item-subtotal {
	font-size: 16px;
	font-weight: 800;
	color: var(--gold-d);
	white-space: nowrap;
}

/* منتقي الكمية */
.rk-cart-item-qty .quantity {
	display: inline-flex;
	align-items: center;
	border: 2px solid var(--border);
	border-radius: 12px;
	overflow: hidden;
	background: var(--light);
}

.rk-cart-item-qty input.qty {
	width: 46px;
	height: 38px;
	border: none;
	background: transparent;
	text-align: center;
	font-family: 'Cairo', sans-serif;
	font-weight: 800;
	font-size: 14px;
	color: var(--text);
	-moz-appearance: textfield;
}

.rk-cart-item-qty input.qty:focus {
	outline: none;
}

.rk-cart-item-qty input.qty::-webkit-outer-spin-button,
.rk-cart-item-qty input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.rk-cart-item-qty button,
.rk-cart-item-qty .plus,
.rk-cart-item-qty .minus {
	width: 34px;
	height: 38px;
	border: none;
	background: transparent;
	font-weight: 900;
	font-size: 16px;
	color: var(--gold-d);
	cursor: pointer;
}

/* ----------------------------------------------------------
   بطاقة الكوبون (مستقلة)
---------------------------------------------------------- */
.rk-cart-coupon-card {
	margin-bottom: 16px;
}

.rk-cart-coupon-title {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 800;
	color: var(--text);
}

.rk-cart-coupon.coupon {
	display: flex;
	gap: 10px;
}

.rk-cart-coupon input#coupon_code {
	flex: 1;
	min-width: 0;
	height: 46px;
	border: 2px solid var(--border);
	border-radius: 12px;
	padding: 0 14px;
	font-family: 'Cairo', sans-serif;
	font-size: 13px;
	background: var(--light);
}

.rk-cart-coupon input#coupon_code:focus {
	outline: none;
	border-color: var(--gold);
	background: var(--white);
}

.rk-cart-coupon button[name="apply_coupon"] {
	height: 46px;
	padding: 0 18px;
	background: var(--black);
	color: var(--white);
	border: 2px solid var(--gold);
	border-radius: 12px;
	font-family: 'Cairo', sans-serif;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s ease, color .15s ease;
}

.rk-cart-coupon button[name="apply_coupon"]:hover {
	background: #ffffff;
	color: var(--black);
}

.rk-cart-update {
	display: block;
	width: 100%;
	height: 46px;
	padding: 0 20px;
	margin-top: 4px;
	background: transparent;
	color: var(--black);
	border: 2px solid var(--border);
	border-radius: 12px;
	font-family: 'Cairo', sans-serif;
	font-weight: 800;
	font-size: 13px;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease;
}

.rk-cart-update:not(:disabled) {
	border-color: var(--gold);
	color: var(--gold-d);
}

.rk-cart-update:disabled {
	opacity: .55;
	cursor: default;
}

/* ----------------------------------------------------------
   بطاقة الملخص (cart-totals.php)
---------------------------------------------------------- */
.rk-cart-totals-rows .rk-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 13px 0;
	border-bottom: 1px solid var(--border);
	font-size: 15px;
	color: var(--gray);
}

.rk-cart-totals-rows .rk-row span:last-child {
	color: var(--text);
	font-weight: 700;
}

.rk-cart-totals-rows .rk-total {
	border: none;
	padding-top: 18px;
	font-size: 20px;
	font-weight: 800;
	color: var(--black);
}

.rk-cart-totals-rows .rk-total span:last-child {
	color: var(--gold-d);
	font-size: 22px;
}

.rk-cart-checkout-cta {
	margin-top: 22px;
}

.rk-cart-checkout-btn {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: center;
	text-align: center;
}

/* إعادة استخدام ستايل الزر الذهبي (نفس ستايل صفحة الشكر) */
.rk-ty-btn {
	display: inline-block;
	background: var(--black);
	color: #ffffff !important;
	font-weight: 900;
	font-size: 16px;
	padding: 18px 40px;
	border: 2px solid var(--gold);
	border-radius: 16px;
	text-decoration: none !important;
	box-shadow: 0 14px 30px rgba(0, 0, 0, .2);
	transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .15s ease;
}

.rk-ty-btn:hover {
	background: #ffffff;
	color: var(--black) !important;
	border-color: var(--gold);
	transform: translateY(-2px);
	box-shadow: 0 18px 36px rgba(201, 168, 76, .35);
}

@media (prefers-reduced-motion: reduce) {
	.rk-ty-btn {
		transition: none;
	}
	.rk-ty-btn:hover {
		transform: none;
	}
}

/* ----------------------------------------------------------
   شارات الثقة
---------------------------------------------------------- */
.rk-cart-trust-card {
	padding: 24px 32px;
}

.rk-checkout-trust {
	display: flex;
	justify-content: space-between;
	gap: 10px;
}

.rk-trust-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	text-align: center;
}

.rk-trust-icon {
	font-size: 20px;
}

.rk-trust-label {
	font-size: 11px;
	font-weight: 700;
	color: var(--gray);
	line-height: 1.4;
}

/* ----------------------------------------------------------
   سلة فارغة
---------------------------------------------------------- */
.rk-cart-empty-wrap {
	box-sizing: border-box;
	width: 100vw;
	margin-inline-start: calc(50% - 50vw);
	margin-top: 20px;
	margin-bottom: 80px;
	padding-inline: max(20px, calc(50vw - 280px));
}

.rk-cart-empty {
	text-align: center;
	padding: 50px 32px;
}

.rk-cart-empty-icon {
	font-size: 42px;
	margin-bottom: 16px;
}

.rk-cart-empty h2 {
	font-size: 20px;
	font-weight: 800;
	color: var(--black);
	margin: 0 0 10px;
}

.rk-cart-empty p {
	font-size: 14px;
	color: var(--gray);
	margin: 0 0 24px;
}

/* ----------------------------------------------------------
   البيع المتقاطع (Cross-sells) — تنظيف بصري بسيط
---------------------------------------------------------- */
.cross-sells {
	margin-top: 24px;
}

.cross-sells h2 {
	font-size: 18px;
	font-weight: 800;
	color: var(--black);
	margin: 0 0 16px;
}

/* ----------------------------------------------------------
   الجوال
---------------------------------------------------------- */
@media (max-width: 991px) {

	.rk-checkout-topbar {
		padding: 28px 20px 8px;
	}

	.rk-cart-layout {
		grid-template-columns: 1fr;
		gap: 18px;
		margin-top: 12px;
	}

	.rk-checkout-card {
		padding: 22px;
		border-radius: 20px;
	}

	.rk-checkout-card--summary {
		position: static;
	}

	.rk-cart-item {
		grid-template-columns: 26px 62px 1fr;
		gap: 12px;
	}

	.rk-cart-item-thumb {
		width: 62px;
		height: 62px;
	}

	.rk-section-title {
		font-size: 19px;
		margin-bottom: 20px;
	}

	.rk-cart-update {
		width: 100%;
	}
}

/* ----------------------------------------------------------
   تبسيط عرض الشحن — إخفاء "التوصيل إلى العنوان / تغيير العنوان"
   وحاسبة الشحن الافتراضية (العنوان محجوز مسبقاً من صفحة الدفع)
---------------------------------------------------------- */
.woocommerce-shipping-destination,
.shipping-calculator-form,
a.shipping-calculator-button {
	display: none !important;
}

#shipping_method {
	list-style: none;
	margin: 0;
	padding: 0;
}

#shipping_method li {
	font-size: 14px;
	font-weight: 700;
	color: var(--text);
}

#shipping_method input[type="radio"] {
	display: none;
}

/* ----------------------------------------------------------
   شبكة أمان: أي زر WooCommerce افتراضي (.button.alt / .wc-forward)
   ما زال يفلت من الأنماط أعلاه يُجبر على نفس هوية RK Nutra
---------------------------------------------------------- */
body.woocommerce-cart .button.alt,
body.woocommerce-cart .wc-forward,
body.woocommerce-cart input.button,
body.woocommerce-cart a.checkout-button {
	background: var(--black) !important;
	color: #ffffff !important;
	border: 2px solid var(--gold) !important;
	border-radius: 16px !important;
}

body.woocommerce-cart .button.alt:hover,
body.woocommerce-cart .wc-forward:hover,
body.woocommerce-cart input.button:hover,
body.woocommerce-cart a.checkout-button:hover {
	background: #ffffff !important;
	color: var(--black) !important;
	border-color: var(--gold) !important;
}
