/* =========================================================
   AI Source Mart - Cart page  (v1.2 - compact + responsive)
   Location: wp-content/themes/aisourcemart/assets/css/cart.css
   Breakpoints: laptop (default) | <=1024 tablet | <=640 mobile
   ========================================================= */

:root {
	--asm-orange: #ff5a00;
	--asm-orange-soft: #ffe6d8;
	--asm-navy: #0f1f3d;
	--asm-text: #0f1f3d;
	--asm-muted: #6b7280;
	--asm-border: #eceef2;
	--asm-radius: 18px;
	--asm-font: 'Poppins', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- Page shell + decorative blobs ---------- */
.asm-cart-page {
	position: relative;
	overflow: hidden;
	padding: 12px 0 40px;
	font-family: var(--asm-font);
	font-size: 15px;
	color: var(--asm-text);
	background: #fff;
}
.asm-cart-page::before,
.asm-cart-page::after {
	content: "";
	position: absolute;
	z-index: 0;
	pointer-events: none;
	background: #fde6d6;
	border-radius: 50%;
}
.asm-cart-page::before { width: 380px; height: 260px; top: -150px; right: -100px; transform: rotate(-18deg); opacity: .75; }
.asm-cart-page::after  { width: 340px; height: 300px; bottom: -200px; left: -130px; opacity: .8; }
.asm-cart-page > .aisourcemart-container { position: relative; z-index: 1; }
.asm-cart-page *, .asm-cart-page *::before, .asm-cart-page *::after { box-sizing: border-box; }

/* ---------- Breadcrumb ---------- */
.asm-breadcrumb {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 8px;
}
.asm-breadcrumb a { display: inline-flex; align-items: center; gap: 6px; color: var(--asm-orange); text-decoration: none; }
.asm-breadcrumb svg { width: 14px; height: 14px; }
.asm-breadcrumb__sep { color: var(--asm-muted); }
.asm-breadcrumb__current { color: var(--asm-navy); }

/* ---------- Heading ---------- */
.asm-cart-head { display: flex; align-items: center; gap: 10px; }
.asm-cart-head__icon { color: var(--asm-orange); display: inline-flex; }
.asm-cart-head__icon svg { width: 32px; height: 32px; }
.asm-cart-head__title { margin: 0; padding: 0; border: 0; font-size: 22px; line-height: 1.15; font-weight: 700; color: var(--asm-navy); }
.asm-cart-head__sub { margin: 1px 0 0; font-size: 12.5px; color: var(--asm-muted); }
.asm-cart-line {
	height: 2px;
	margin: 10px 0 14px;
	background: linear-gradient(90deg, var(--asm-orange) 0%, rgba(255, 90, 0, .55) 55%, rgba(255, 90, 0, .08) 100%);
}

/* ---------- Layout ---------- */
.asm-cart-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 310px;
	gap: 18px;
	align-items: start;
}
.asm-card {
	background: #fff;
	border: 1px solid var(--asm-border);
	border-radius: var(--asm-radius);
	box-shadow: 0 8px 28px rgba(15, 31, 61, .07);
	overflow: hidden;
	margin: 0;
}

/* ---------- Custom checkbox ---------- */
.asm-check { position: relative; display: inline-flex; cursor: pointer; margin: 0; }
.asm-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.asm-check__box {
	width: 24px; height: 24px;
	border-radius: 6px;
	border: 2px solid #cfd4dc;
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: .15s ease;
}
.asm-check__box::after {
	content: "";
	width: 6px; height: 11px;
	border: solid #fff;
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg) scale(0);
	margin-top: -2px;
	transition: transform .15s ease;
}
.asm-check input:checked + .asm-check__box { background: var(--asm-orange); border-color: var(--asm-orange); }
.asm-check input:checked + .asm-check__box::after { transform: rotate(45deg) scale(1); }
.asm-check input:focus-visible + .asm-check__box { box-shadow: 0 0 0 3px rgba(255, 90, 0, .25); }

/* ---------- Items card ---------- */
.asm-cart-thead,
.asm-cart-item {
	display: grid;
	grid-template-columns: 22px 80px minmax(0, 1fr) auto;
	column-gap: 14px;
	align-items: center;
	padding: 0 16px;
}
.asm-cart-thead {
	padding-top: 9px;
	padding-bottom: 9px;
	border-bottom: 2px solid #f1f2f5;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--asm-navy);
}
.asm-th--product { grid-column: 2 / 4; }
.asm-th--total { text-align: right; min-width: 96px; }

.asm-cart-item { padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid #f1f2f5; }
.asm-cart-item:last-of-type { border-bottom: 0; }

.asm-cart-item__thumb {
	width: 80px; height: 88px;
	border: 1px solid var(--asm-border);
	border-radius: 12px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.asm-cart-item__thumb a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.asm-cart-item__thumb img { width: 100%; height: 100%; max-width: 100%; object-fit: contain; padding: 6px; margin: 0; border-radius: 0; }

.asm-cart-item__info { min-width: 0; }
.asm-cart-item__name { margin: 0 0 2px; padding: 0; font-size: 15px; line-height: 1.3; font-weight: 700; color: var(--asm-navy); }
.asm-cart-item__name a { color: inherit; text-decoration: none; }
.asm-cart-item__name a:hover { color: var(--asm-orange); }

.asm-cart-item__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; font-size: 14.5px; font-weight: 700; }
.asm-cart-item__price del { color: #6a7280; font-weight: 500; font-size: 12.5px; text-decoration: line-through; }
.asm-cart-item__price ins { color: var(--asm-orange); text-decoration: none; background: none; }

.asm-cart-item__desc {
	margin: 3px 0 6px;
	font-size: 12px;
	line-height: 1.45;
	color: #3b4559;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.asm-cart-item .variation { margin: 4px 0 6px; font-size: 12.5px; color: var(--asm-muted); }
.asm-cart-item .variation dt, .asm-cart-item .variation dd { display: inline; margin: 0; }
.asm-cart-item .variation dd p { display: inline; margin: 0; }

.asm-cart-item__actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; flex-wrap: wrap; }

.asm-cart-item__total {
	min-width: 96px;
	text-align: right;
	font-size: 16px;
	font-weight: 700;
	color: var(--asm-navy);
	white-space: nowrap;
}

/* ---------- Quantity pill ---------- */
.asm-qty {
	display: inline-flex;
	align-items: center;
	height: 32px;
	border: 1.5px solid #d9dde4;
	border-radius: 999px;
	background: #fff;
	padding: 0 3px;
}
.asm-qty .quantity { margin: 0; display: inline-flex; }
.asm-qty input.qty {
	width: 30px;
	height: 26px;
	border: 0;
	background: transparent;
	text-align: center;
	font-family: var(--asm-font);
	font-size: 13.5px;
	font-weight: 700;
	color: var(--asm-navy);
	padding: 0;
	box-shadow: none;
	-moz-appearance: textfield;
	appearance: textfield;
}
.asm-qty input.qty::-webkit-outer-spin-button,
.asm-qty input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.asm-qty input.qty:focus { outline: none; }
.asm-qty .screen-reader-text { position: absolute; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.asm-qty__btn {
	width: 26px; height: 26px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--asm-navy);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background .15s ease, color .15s ease;
}
.asm-qty__btn svg { width: 13px; height: 13px; }
.asm-qty__btn:hover { background: var(--asm-orange-soft); color: var(--asm-orange); }
.asm-qty__single { padding: 0 16px; font-size: 15px; font-weight: 700; }

/* ---------- Remove ---------- */
a.asm-remove, a.asm-remove.remove {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	width: auto; height: auto;
	border-radius: 0;
	background: none;
	color: #5b6475 !important;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	text-indent: 0;
}
a.asm-remove svg { width: 16px; height: 16px; }
a.asm-remove:hover, a.asm-remove.remove:hover { background: none; color: #e11d48 !important; }

.asm-cart-hidden-actions { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Totals card ---------- */
.asm-cart-side { width: 100%; float: none; }
.asm-cart-side .cart_totals { width: 100%; float: none; }

.asm-totals__head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--asm-orange); color: #fff; }
.asm-totals__head svg { width: 22px; height: 22px; flex: none; }
.asm-totals__head h2 { margin: 0; padding: 0; border: 0; font-family: var(--asm-font); font-size: 16px; font-weight: 600; color: #fff; line-height: 1.2; }
.asm-totals__body { padding: 0 16px 14px; }

.asm-coupon { border-bottom: 1px solid #eef0f3; }
.asm-coupon summary {
	display: flex; align-items: center; justify-content: space-between;
	padding: 10px 2px;
	font-size: 14px; font-weight: 500; color: var(--asm-navy);
	cursor: pointer; list-style: none;
}
.asm-coupon summary::-webkit-details-marker { display: none; }
.asm-coupon summary svg { width: 16px; height: 16px; transition: transform .2s ease; }
.asm-coupon[open] summary svg { transform: rotate(180deg); }
.asm-coupon__form { display: flex; gap: 8px; padding: 0 0 10px; }
.asm-coupon__form input.input-text { flex: 1; min-width: 0; height: 36px; border: 1.5px solid #d9dde4; border-radius: 10px; padding: 0 12px; font-family: var(--asm-font); font-size: 14px; }
.asm-coupon__form input.input-text:focus { outline: none; border-color: var(--asm-orange); }
.asm-coupon__btn { height: 36px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--asm-navy); color: #fff; font-family: var(--asm-font); font-size: 14px; font-weight: 600; cursor: pointer; }
.asm-coupon__btn:hover { background: var(--asm-orange); }

.asm-row {
	display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
	padding: 9px 2px;
	border-bottom: 1px solid #eef0f3;
	font-size: 14px;
}
.asm-row__label { font-weight: 500; color: var(--asm-navy); }
.asm-row__label small { display: inline; margin: 0 0 0 6px; font-size: 12px; font-weight: 400; color: var(--asm-muted); }
.asm-row__value { font-weight: 700; color: var(--asm-navy); text-align: right; white-space: nowrap; }
.asm-row--shipping { border-bottom: 0; padding-bottom: 8px; }
.asm-row.cart-discount .asm-row__value { color: #15803d; }
.asm-row.cart-discount a.woocommerce-remove-coupon { color: #e11d48; font-size: 12px; margin-left: 4px; }

.asm-estimated {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	margin-top: 4px;
	padding: 10px 14px;
	border-radius: 12px;
	background: var(--asm-orange-soft);
}
.asm-estimated__label { font-size: 14px; font-weight: 700; color: var(--asm-navy); white-space: nowrap; }
.asm-estimated__value, .asm-estimated__value strong, .asm-estimated__value .amount,
.asm-estimated__value .woocommerce-Price-amount { font-size: 18px; font-weight: 800; color: var(--asm-orange); text-align: right; white-space: nowrap; }
.asm-estimated__value small { display: block; font-size: 11px; font-weight: 400; color: var(--asm-muted); }

.asm-totals .wc-proceed-to-checkout { padding: 0; margin: 12px 0 0; }
a.checkout-button.asm-checkout-btn,
.woocommerce a.checkout-button.asm-checkout-btn {
	display: flex; align-items: center; justify-content: center; gap: 10px;
	width: 100%; height: 44px; margin: 0; padding: 0 14px;
	border: 0; border-radius: 12px;
	background: var(--asm-navy); color: #fff;
	font-family: var(--asm-font); font-size: 14.5px; font-weight: 600; line-height: 1;
	white-space: nowrap; text-decoration: none;
	box-shadow: 0 6px 14px rgba(15, 31, 61, .2);
	transition: transform .15s ease, background .15s ease;
}
a.checkout-button.asm-checkout-btn svg:first-child { width: 22px; height: 22px; }
a.checkout-button.asm-checkout-btn svg:last-child { width: 16px; height: 16px; }
a.checkout-button.asm-checkout-btn:hover { background: var(--asm-orange); transform: translateY(-2px); color: #fff; }

/* ---------- Notices ("removed. Undo?", errors, info) ---------- */
.asm-cart-page .woocommerce-notices-wrapper:empty { display: none; }
.asm-cart-page .woocommerce-message,
.asm-cart-page .woocommerce-info,
.asm-cart-page .woocommerce-error {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 0 0 14px;
	padding: 10px 14px !important;
	list-style: none;
	background: #fff4ec;
	border: 0;
	border-left: 4px solid var(--asm-orange);
	border-radius: 10px;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--asm-navy);
	box-shadow: none;
}
.asm-cart-page .woocommerce-message::before,
.asm-cart-page .woocommerce-info::before,
.asm-cart-page .woocommerce-error::before { content: none !important; display: none !important; }
.asm-cart-page .woocommerce-message { background: #effaf3; border-left-color: #16a34a; }
.asm-cart-page .woocommerce-error   { background: #fff1f2; border-left-color: #e11d48; }
.asm-cart-page .woocommerce-error li { margin: 0; padding: 0; list-style: none; }
.asm-cart-page .woocommerce-message a,
.asm-cart-page .woocommerce-info a,
.asm-cart-page .woocommerce-error a { color: var(--asm-orange); font-weight: 600; text-decoration: none; }
.asm-cart-page .woocommerce-message a:hover { text-decoration: underline; }
.asm-cart-page .woocommerce-message a.button,
.asm-cart-page .woocommerce-message a.wc-forward {
	order: 2; margin-left: auto; float: none;
	padding: 6px 14px; border-radius: 8px; background: var(--asm-navy); color: #fff; font-size: 13px;
}

/* ---------- Empty cart ---------- */
.asm-empty { max-width: 520px; margin: 18px auto 0; padding: 34px 22px 38px; text-align: center; }
.asm-empty__icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 84px; height: 84px; border-radius: 50%;
	background: var(--asm-orange-soft); color: var(--asm-orange);
}
.asm-empty__title { margin: 14px 0 4px; padding: 0; border: 0; font-size: 20px; font-weight: 700; color: var(--asm-navy); }
.asm-empty__text { margin: 0 auto 18px; max-width: 340px; font-size: 13.5px; line-height: 1.55; color: var(--asm-muted); }
.asm-empty__btn,
.asm-cart-page .asm-empty a.asm-empty__btn {
	display: inline-flex; align-items: center; gap: 8px;
	height: 42px; padding: 0 22px;
	border-radius: 12px; background: var(--asm-navy); color: #fff;
	font-family: var(--asm-font); font-size: 14px; font-weight: 600; text-decoration: none;
	box-shadow: 0 6px 14px rgba(15, 31, 61, .2);
	transition: background .15s ease, transform .15s ease;
}
.asm-empty__btn:hover { background: var(--asm-orange); color: #fff; transform: translateY(-2px); }
.asm-cart-page .return-to-shop { display: none; }

/* =========================================================
   Override: woocommerce.css er rule gulo ke harano
   ========================================================= */
.woocommerce .cart-collaterals .asm-totals.cart_totals,
.woocommerce-page .cart-collaterals .asm-totals.cart_totals {
	background: #fff; padding: 0; border-radius: var(--asm-radius); float: none; width: 100%;
}
.asm-cart-page .woocommerce .asm-qty .quantity input.qty,
.asm-cart-page .woocommerce .asm-qty .quantity input[type="number"] {
	width: 30px; height: 26px; border: 0; border-radius: 0; padding: 0; background: transparent;
}
.asm-cart-page .woocommerce .asm-coupon__form input.input-text {
	height: 36px; border: 1.5px solid #d9dde4; border-radius: 10px; padding: 0 12px;
}
.asm-cart-page .woocommerce-cart-form,
.asm-cart-page .cart-collaterals { margin: 0; }
.asm-cart-page .woocommerce .cart-collaterals { width: 100%; float: none; }

/* =========================================================
   TABLET  (<= 1024px) : single column
   ========================================================= */
@media (max-width: 1024px) {
	.asm-cart-layout { grid-template-columns: 1fr; gap: 20px; }
	.asm-cart-side { max-width: 100%; }
}

/* =========================================================
   MOBILE  (<= 640px)
   ========================================================= */
@media (max-width: 640px) {
	.asm-cart-page { padding: 10px 0 28px; font-size: 13.5px; }
	.asm-cart-page .aisourcemart-container { padding-left: 14px; padding-right: 14px; }
	.asm-cart-page::before { width: 240px; height: 170px; top: -100px; right: -90px; }
	.asm-cart-page::after  { display: none; }

	.asm-breadcrumb { font-size: 13px; margin-bottom: 10px; }
	.asm-cart-head { gap: 10px; }
	.asm-cart-head__icon svg { width: 28px; height: 28px; }
	.asm-cart-head__title { font-size: 20px; }
	.asm-cart-head__sub { font-size: 12.5px; }
	.asm-cart-line { margin: 8px 0 12px; }

	.asm-card { border-radius: 14px; }

	.asm-cart-thead { display: none; }

	.asm-cart-item {
		grid-template-columns: 22px 68px minmax(0, 1fr);
		column-gap: 10px;
		align-items: start;
		padding: 12px 12px;
	}
	.asm-check__box { width: 22px; height: 22px; }
	.asm-cart-item .asm-check { margin-top: 22px; }
	.asm-cart-item__thumb { width: 68px; height: 76px; border-radius: 10px; }
	.asm-cart-item__thumb img { padding: 5px; }
	.asm-cart-item__name { font-size: 14px; }
	.asm-cart-item__price { font-size: 13.5px; gap: 2px 8px; }
	.asm-cart-item__price del { font-size: 12.5px; }
	.asm-cart-item__desc { font-size: 11.5px; -webkit-line-clamp: 1; margin: 3px 0 5px; }

	.asm-cart-item__actions { gap: 10px; margin-top: 6px; }
	.asm-qty { height: 30px; }
	.asm-qty input.qty,
	.asm-cart-page .woocommerce .asm-qty .quantity input.qty,
	.asm-cart-page .woocommerce .asm-qty .quantity input[type="number"] { width: 28px; height: 24px; font-size: 13px; }
	.asm-qty__btn { width: 24px; height: 24px; }
	.asm-qty__btn svg { width: 13px; height: 13px; }
	a.asm-remove { font-size: 13px; gap: 4px; }
	a.asm-remove svg { width: 16px; height: 16px; }

	.asm-cart-item__total {
		grid-column: 2 / -1;
		text-align: left;
		min-width: 0;
		font-size: 14px;
		margin-top: 6px;
		padding-top: 6px;
		border-top: 1px dashed #e5e7eb;
	}
	.asm-cart-item__total::before { content: "Total: "; font-weight: 500; color: var(--asm-muted); font-size: 13px; }

	.asm-totals__head { padding: 10px 14px; }
	.asm-totals__head svg { width: 24px; height: 24px; }
	.asm-totals__head h2 { font-size: 15px; }
	.asm-totals__body { padding: 0 14px 12px; }
	.asm-row { font-size: 13.5px; padding: 9px 2px; }
	.asm-estimated { padding: 10px 12px; }
	.asm-estimated__label { font-size: 13.5px; }
	.asm-estimated__value, .asm-estimated__value strong, .asm-estimated__value .amount,
	.asm-estimated__value .woocommerce-Price-amount { font-size: 17px; }
	a.checkout-button.asm-checkout-btn { height: 42px; font-size: 14px; }
}

@media (max-width: 640px) {
	.asm-empty { margin-top: 8px; padding: 26px 16px 30px; }
	.asm-empty__icon { width: 70px; height: 70px; }
	.asm-empty__icon svg { width: 36px; height: 36px; }
	.asm-empty__title { font-size: 18px; }
	.asm-cart-page .woocommerce-message a.button,
	.asm-cart-page .woocommerce-message a.wc-forward { margin-left: 0; }
}

/* very small phones */
@media (max-width: 380px) {
	.asm-cart-item { grid-template-columns: 20px 64px minmax(0, 1fr); column-gap: 8px; }
	.asm-cart-item__thumb { width: 64px; height: 72px; }
	.asm-cart-item__actions { gap: 8px; }
}

/* large screens */
@media (min-width: 1400px) {
	.asm-cart-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
}