/* ===== Cart Pro v1.1: sirf cart page par load hota hai ===== */

.woocommerce-cart {
	--cp-maroon: #722a45;   /* heading / price / button */
	--cp-plum:   #653d48;   /* normal text (black nahi) */
	--cp-gold:   #c8a56a;   /* accent / border */
	--cp-cream:  #f8f3ea;   /* card background */
	--cp-line:   #e6d9c6;   /* halki border */
	--cp-field:  #fffaf2;   /* input background */
}

/* ---------- Text colors (black ki jagah brand colors) ---------- */
.woocommerce-cart :is(.woocommerce-cart-form, .cart_totals) :is(th, td, label, .quantity, .qty) {
	color: var(--cp-plum) !important;
	font-family: inherit;
}
.woocommerce-cart .cart_item .product-name a,
.woocommerce-cart .cart_item .product-name {
	color: var(--cp-maroon) !important;
	font-weight: 600;
	line-height: 1.4;
}
.woocommerce-cart .cart_item :is(.product-price, .product-subtotal, .amount, bdi) {
	color: var(--cp-maroon) !important;
	font-weight: 600;
}
.woocommerce-cart .cart_totals :is(th, .cart-subtotal th, .order-total th) {
	font-weight: 600 !important;
	font-size: 14px !important;
}

/* ---------- Notice ("Cart updated.") ---------- */
.woocommerce-cart :is(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice) {
	background: var(--cp-cream) !important;
	color: var(--cp-plum) !important;
	border: 1px solid var(--cp-line) !important;
	border-left: 3px solid var(--cp-gold) !important;
	border-radius: 12px !important;
	box-shadow: none !important;
	font-size: 14px !important;
}
.woocommerce-cart :is(.woocommerce-message, .woocommerce-info)::before {
	color: var(--cp-gold) !important;
}

/* ---------- Product card ---------- */
.woocommerce-cart .woocommerce-cart-form,
.woocommerce-cart .woocommerce-cart-form table,
.woocommerce-cart .woocommerce-cart-form tbody {
	max-width: 100% !important;
	box-sizing: border-box;
}
.woocommerce-cart .woocommerce-cart-form tr.cart_item {
	box-sizing: border-box;
	max-width: 100% !important;
	background: var(--cp-cream);
	border: 1px solid var(--cp-line);
	border-radius: 16px;
	box-shadow: 0 8px 22px rgba(114, 42, 69, .08);
}
.woocommerce-cart .woocommerce-cart-form tr.cart_item > * {
	min-width: 0;
	box-sizing: border-box;
}
.woocommerce-cart .cart_item .product-thumbnail img {
	border-radius: 10px;
	object-fit: cover;
}
.woocommerce-cart .cart_item .product-remove a,
.woocommerce-cart .cart_item .product-remove svg {
	color: var(--cp-plum) !important;
	opacity: .75;
}

/* ---------- Coupon: ek line, click par khulta hai ---------- */
.cp-coupon-toggle {
	display: flex !important;
	align-items: center;
	gap: 10px;
	width: 100% !important;
	box-sizing: border-box;
	margin: 6px 0 0 !important;
	padding: 14px 16px !important;
	background: var(--cp-cream) !important;
	color: var(--cp-maroon) !important;
	border: 1px dashed var(--cp-gold) !important;
	border-radius: 12px !important;
	box-shadow: none !important;
	font: inherit;
	font-size: 14px !important;
	font-weight: 600 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	text-align: left;
	line-height: 1.3 !important;
	cursor: pointer;
}
.cp-coupon-toggle::before {
	content: "";
	flex: 0 0 18px;
	height: 18px;
	background: var(--cp-maroon);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.4 11.6l-9-9A2 2 0 0011 2H4a2 2 0 00-2 2v7a2 2 0 00.6 1.4l9 9a2 2 0 002.8 0l7-7a2 2 0 000-2.8zM6.5 8A1.5 1.5 0 118 6.5 1.5 1.5 0 016.5 8z'/%3E%3C/svg%3E") center/contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.4 11.6l-9-9A2 2 0 0011 2H4a2 2 0 00-2 2v7a2 2 0 00.6 1.4l9 9a2 2 0 002.8 0l7-7a2 2 0 000-2.8zM6.5 8A1.5 1.5 0 118 6.5 1.5 1.5 0 016.5 8z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.cp-coupon-toggle::after {
	content: "\25BE";
	margin-left: auto;
	transition: transform .2s;
}
.cp-coupon-toggle[aria-expanded="true"] {
	border-bottom-color: transparent !important;
	border-radius: 12px 12px 0 0 !important;
}
.cp-coupon-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }

.cp-js .cp-coupon-box { display: none !important; }
.cp-js .cp-coupon-box.cp-open {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: stretch;
	gap: 8px;
	box-sizing: border-box;
	width: 100% !important;
	float: none !important;
	margin: 0 0 14px !important;
	padding: 0 14px 14px !important;
	background: var(--cp-cream);
	border: 1px dashed var(--cp-gold);
	border-top: 0;
	border-radius: 0 0 12px 12px;
}
.cp-coupon-box label {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}
.cp-coupon-box input[name="coupon_code"] {
	flex: 1 1 auto !important;
	min-width: 0 !important;
	width: auto !important;
	height: 42px !important;
	margin: 0 !important;
	padding: 0 14px !important;
	background: var(--cp-field) !important;
	color: var(--cp-plum) !important;
	border: 1px solid var(--cp-line) !important;
	border-radius: 10px !important;
	font-size: 14px !important;
	box-shadow: none !important;
}
.cp-coupon-box [name="apply_coupon"] {
	flex: 0 0 auto !important;
	width: auto !important;
	height: 42px !important;
	margin: 0 !important;
	padding: 0 20px !important;
	background: var(--cp-maroon) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 10px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	white-space: nowrap;
}

/* Update cart button chhupa do (quantity badalte hi khud update hota hai).
   Sirf tab chhupta hai jab JS chal raha ho. */
.cp-js .woocommerce-cart-form [name="update_cart"] { display: none !important; }
.woocommerce-cart .woocommerce-cart-form td.actions {
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
}

/* ---------- Cart totals: kam gap, saaf rows ---------- */
.woocommerce-cart .cart_totals table :is(th, td) {
	padding-top: 12px !important;
	padding-bottom: 12px !important;
	height: auto !important;
}
.woocommerce-cart .cart-collaterals { margin-top: 8px !important; }

/* ---------- Sale badge: chehre se hata kar neeche-left, chhota ---------- */
.woocommerce-cart .cart_item .product-thumbnail { position: relative; }
.woocommerce-cart .cart_item :is(.onsale, [class*="sale-badge"], [class*="onsale"], [class*="discount-badge"], [class*="badge"]) {
	position: absolute !important;
	top: auto !important;
	right: auto !important;
	bottom: 6px !important;
	left: 6px !important;
	transform: none !important;
	margin: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	width: auto !important;
	height: auto !important;
	padding: 2px 6px !important;
	font-size: 10px !important;
	line-height: 1.4 !important;
	border-radius: 4px !important;
	z-index: 2;
}
