/* =========================================================
   Redesigned WooCommerce Cart — matches the YCM theme.
   ========================================================= */

body.woocommerce-cart .site-main,
body.woocommerce-cart main,
body.woocommerce-cart .elementor {
	background-color: #eff3ff;
}

.ycm-cart {
	max-width: 1240px;
	margin: 0 auto;
	padding: 56px 24px 90px;
	box-sizing: border-box;
	font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
	color: #1f2937;
}

.ycm-cart__header { margin-bottom: 30px; }

.ycm-cart__title {
	font-size: 38px;
	font-weight: 800;
	color: #111827;
	margin: 0 0 8px;
}

.ycm-cart__subtitle {
	font-size: 16px;
	color: #6b7280;
	margin: 0;
}

.ycm-cart__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 28px;
	align-items: start;
}

/* --- Items card --- */
.ycm-cart__main { min-width: 0; }

.ycm-cart__table.shop_table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background-color: #fff;
	border: 1px solid #eef0f5;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
	margin: 0;
}

.ycm-cart__table thead th {
	background-color: #f5f7ff;
	color: #6b7280;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	text-align: left;
	padding: 14px 18px;
	border: none;
}

.ycm-cart__table td {
	padding: 18px;
	border-top: 1px solid #f1f3f9;
	vertical-align: middle;
	background: transparent;
}

.ycm-cart__table .product-thumbnail { width: 84px; }

.ycm-cart__table .product-thumbnail img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}

.ycm-cart__table .product-name a {
	color: #111827;
	font-weight: 600;
	text-decoration: none;
}

.ycm-cart__table .product-name a:hover { color: #2f6bff; }

.ycm-cart__table .product-price,
.ycm-cart__table .product-subtotal {
	color: #374151;
	font-weight: 600;
	white-space: nowrap;
}

.ycm-cart__table .product-subtotal { color: #111827; }

/* Quantity stepper */
.ycm-cart__table .quantity {
	display: inline-flex;
	align-items: center;
}

.ycm-cart__table .quantity input.qty {
	width: 74px;
	height: 44px;
	text-align: center;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	font: inherit;
	font-size: 15px;
	color: #1f2937;
	background-color: #fff;
	-moz-appearance: textfield;
}

/* Remove button */
.ycm-cart__table .product-remove { width: 56px; text-align: center; }

.ycm-cart__table .product-remove .remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background-color: #fef2f2;
	color: #ef4444 !important;
	font-size: 20px;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ycm-cart__table .product-remove .remove:hover {
	background-color: #ef4444;
	color: #fff !important;
}

/* Actions row (coupon + update) */
.ycm-cart__table td.actions {
	padding: 18px;
	border-top: 1px solid #f1f3f9;
	background-color: #fbfcff;
}

.ycm-cart__table td.actions .coupon {
	display: inline-flex;
	gap: 10px;
	vertical-align: middle;
}

.ycm-cart__table td.actions #coupon_code {
	height: 46px;
	min-width: 180px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 0 14px;
	font: inherit;
	font-size: 15px;
}

.ycm-cart__table td.actions .button {
	height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: #eef3ff;
	color: #2f6bff;
	border: none;
	border-radius: 8px;
	padding: 0 20px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.ycm-cart__table td.actions .button:hover { background-color: #dfe8ff; }

.ycm-cart__table td.actions .ycm-cart__update {
	float: right;
	background-color: #2f6bff;
	color: #fff;
}

.ycm-cart__table td.actions .ycm-cart__update:hover { background-color: #1f57e6; }

.ycm-cart__continue {
	display: inline-block;
	margin-top: 20px;
	color: #2f6bff;
	font-weight: 600;
	text-decoration: none;
}

.ycm-cart__continue:hover { text-decoration: underline; }

/* --- Totals card --- */
.ycm-cart__aside { min-width: 0; }

.ycm-cart-totals {
	background-color: #fff;
	border: 1px solid #eef0f5;
	border-radius: 16px;
	padding: 28px 28px 30px;
	box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
}

.ycm-cart-totals__title {
	font-size: 22px;
	font-weight: 800;
	color: #111827;
	margin: 0 0 20px;
}

.ycm-cart-totals__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 16px;
	color: #4b5563;
	padding: 9px 0;
}

.ycm-cart-totals__row span:last-child { color: #1f2937; font-weight: 600; }

.ycm-cart-totals__row--coupon span:last-child { color: #16a34a; }

.ycm-cart-totals__total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-top: 1px solid #edf0f5;
	margin-top: 12px;
	padding-top: 20px;
	font-size: 20px;
	font-weight: 800;
	color: #111827;
}

.ycm-cart-totals__total .amount,
.ycm-cart-totals__total .woocommerce-Price-amount { color: #111827; }

.ycm-cart-totals__cta { margin-top: 24px; }

.woocommerce .ycm-cart-totals__cta a.checkout-button,
.woocommerce-cart .ycm-cart-totals__cta a.checkout-button.button.alt,
.ycm-cart-totals__cta .checkout-button,
.ycm-cart-totals__cta .button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	background-color: #2f6bff !important;
	color: #fff !important;
	border: none;
	border-radius: 10px;
	padding: 16px 24px;
	font-size: 17px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.woocommerce .ycm-cart-totals__cta a.checkout-button:hover,
.ycm-cart-totals__cta .checkout-button:hover,
.ycm-cart-totals__cta .button:hover {
	background-color: #1f57e6 !important;
	color: #fff !important;
}

/* Notices */
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .woocommerce-error {
	max-width: 1240px;
	margin: 24px auto 0;
	border-radius: 10px;
	border-top: none;
}

/* --- Empty cart state --- */
.ycm-cart-empty {
	max-width: 1240px;
	margin: 0 auto;
	padding: 70px 24px 100px;
	box-sizing: border-box;
	font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.ycm-cart-empty__card {
	max-width: 560px;
	margin: 0 auto;
	background-color: #fff;
	border: 1px solid #eef0f5;
	border-radius: 18px;
	padding: 56px 40px;
	text-align: center;
	box-shadow: 0 18px 40px rgba(17, 24, 39, 0.06);
}

.ycm-cart-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 92px;
	height: 92px;
	border-radius: 50%;
	background-color: #eef3ff;
	color: #2f6bff;
	margin-bottom: 26px;
}

.ycm-cart-empty__title {
	font-size: 30px;
	font-weight: 800;
	color: #111827;
	margin: 0 0 12px;
}

.ycm-cart-empty__text {
	font-size: 16px;
	line-height: 1.65;
	color: #6b7280;
	margin: 0 auto 30px;
	max-width: 420px;
}

.ycm-cart-empty__actions {
	display: flex;
	gap: 14px;
	justify-content: center;
	flex-wrap: wrap;
}

.ycm-cart-empty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ycm-cart-empty__btn--primary {
	background-color: #2f6bff;
	color: #fff;
}

.ycm-cart-empty__btn--primary:hover {
	background-color: #1f57e6;
	color: #fff;
}

.ycm-cart-empty__btn--ghost {
	background-color: #fff;
	color: #374151;
	border: 1px solid #e5e7eb;
}

.ycm-cart-empty__btn--ghost:hover {
	background-color: #f3f6ff;
	color: #2f6bff;
	border-color: #c7d7ff;
}

@media (max-width: 560px) {
	.ycm-cart-empty__card { padding: 40px 24px; }
	.ycm-cart-empty__title { font-size: 24px; }
	.ycm-cart-empty__actions { flex-direction: column; }
	.ycm-cart-empty__btn { width: 100%; }
}

/* --- Responsive --- */
@media (max-width: 960px) {
	.ycm-cart__grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
	.ycm-cart__title { font-size: 30px; }
	.ycm-cart__table thead { display: none; }
	.ycm-cart__table,
	.ycm-cart__table tbody,
	.ycm-cart__table tr,
	.ycm-cart__table td { display: block; width: 100%; box-sizing: border-box; }
	.ycm-cart__table tr.woocommerce-cart-form__cart-item {
		position: relative;
		padding: 10px 0;
		border-top: 1px solid #f1f3f9;
	}
	.ycm-cart__table td { border: none; padding: 6px 18px; }
	.ycm-cart__table td.product-remove { position: absolute; top: 12px; right: 8px; width: auto; }
	.ycm-cart__table td::before {
		content: attr(data-title);
		display: inline-block;
		min-width: 90px;
		font-weight: 600;
		color: #6b7280;
	}
	.ycm-cart__table td.product-thumbnail::before,
	.ycm-cart__table td.product-name::before { content: none; }
	.ycm-cart__table td.actions .ycm-cart__update { float: none; width: 100%; margin-top: 10px; }
	.ycm-cart__table td.actions .coupon { display: flex; width: 100%; }
}
