/**
 * Cart page — Mr.Woo custom layout.
 * Figma: 213:10766 (desktop), 213:10885 (mobile/narrow).
 */

.mrwoo-cart-page {
	max-width: 1392px;
	margin: 0 auto;
	padding: 0 var(--container-pad) 0;
}

.mrwoo-cart {
	padding: var(--space-16) 0 var(--space-16);
    background: var(--color-bg);
}

.yes-js.js_active .ast-plain-container.ast-single-post #primary {
	margin: 0 !important;
}

.mrwoo-cart__container {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0;
}

/* ============ Layout ============ */

.mrwoo-cart__layout {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: var(--space-12);
	align-items: start;
}

.mrwoo-cart__main {
	display: flex;
	flex-direction: column;
	gap: var(--space-12);
	min-width: 0;
}

/* ============ Header ============ */

.mrwoo-cart__header {
	display: flex;
	flex-direction: column;
	gap: var(--space-12);
}

.mrwoo-cart__title {
	font-family: var(--font-heading);
	font-weight: var(--font-bold);
	font-size: var(--text-5xl);
	line-height: var(--leading-normal);
	letter-spacing: -0.01em;
	color: var(--color-text);
	margin: 0;
}

.mrwoo-cart__breadcrumb {
	display: flex;
	gap: var(--space-2);
	font-family: var(--font-sans);
	font-size: var(--text-sm);
	color: var(--color-text);
}

.mrwoo-cart__breadcrumb a {
	color: inherit;
	text-decoration: none;
	transition: color var(--transition-fast);
}

.mrwoo-cart__breadcrumb a:hover {
	color: var(--color-pink-middle);
}

.mrwoo-cart__breadcrumb-current {
	color: var(--color-pink-middle);
}

.mrwoo-cart__breadcrumb-sep {
	color: var(--color-text);
}

/* ============ Items list ============ */

.mrwoo-cart__items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
}

.mrwoo-cart__item {
	display: grid;
	grid-template-columns: 24px 120px 1fr auto auto;
	align-items: center;
	gap: var(--space-8);
	padding-bottom: var(--space-3);
	border-bottom: 1px solid var(--color-border);
}

.mrwoo-cart__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: var(--color-text);
	background: transparent;
	border: 0;
	cursor: pointer;
	transition: color var(--transition-fast);
}

.mrwoo-cart__remove:hover {
	color: var(--color-pink-middle);
}

.mrwoo-cart__thumb {
	width: 120px;
	height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mrwoo-cart__thumb img,
.mrwoo-cart__thumb a {
	display: block;
	width: 100%;
	height: 100%;
}

.mrwoo-cart__thumb img {
	object-fit: contain;
}

.mrwoo-cart__info {
	display: flex;
	flex-direction: column;
	gap: var(--space-8);
	min-width: 0;
	max-width: 412px;
}

.mrwoo-cart__name {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--text-base);
	line-height: 26px;
	color: var(--color-text);
	text-transform: uppercase;
}

.mrwoo-cart__name a {
	color: inherit;
	text-decoration: none;
}

.mrwoo-cart__name a:hover {
	color: var(--color-pink-middle);
}

.mrwoo-cart__unit-price {
	margin: 0;
	font-family: var(--font-heading);
	font-weight: var(--font-bold);
	font-size: 18px;
	line-height: var(--leading-normal);
	color: var(--color-text);
}

.mrwoo-cart__unit-price .woocommerce-Price-amount {
	font: inherit;
	color: inherit;
}

.mrwoo-cart__line-total {
	font-family: var(--font-heading);
	font-weight: var(--font-bold);
	font-size: 18px;
	line-height: var(--leading-normal);
	color: var(--color-text);
	white-space: nowrap;
}

.mrwoo-cart__line-total .woocommerce-Price-amount {
	font: inherit;
	color: inherit;
}

/* ============ Quantity stepper ============ */

.mrwoo-qty {
	display: inline-flex;
	align-items: center;
	gap: var(--space-6);
	padding: 8px 32px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-pill);
	background: var(--color-bg);
}

.mrwoo-qty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	background: transparent;
	border: 0;
	color: var(--color-text);
	cursor: pointer;
	transition: color var(--transition-fast);
}

.mrwoo-qty__btn:hover {
	color: var(--color-pink-middle);
}

.mrwoo-qty__btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.mrwoo-qty__input {
	width: 28px;
	min-width: 28px;
	font-family: var(--font-sans);
	font-weight: var(--font-medium);
	font-size: var(--text-base);
	line-height: 24px;
	color: var(--color-text);
	text-align: center;
	background: transparent;
	border: 0;
	padding: 0;
	-moz-appearance: textfield;
	appearance: textfield;
}

.mrwoo-qty__input::-webkit-outer-spin-button,
.mrwoo-qty__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.mrwoo-qty__input:focus {
	outline: none;
}

/* Hidden update-cart button — JS submits the form. */
.mrwoo-cart__hidden-row {
	list-style: none;
	padding: 0;
	border: 0;
}

.mrwoo-cart__update {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	padding: 0;
	margin: -1px;
}

/* ============ Sidebar ============ */

.mrwoo-cart__sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--space-8);
	width: 320px;
}

.mrwoo-cart__coupon {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.mrwoo-cart__coupon-input {
	width: 100%;
	height: 40px;
	padding: 0 24px;
	font-family: var(--font-sans);
	font-size: var(--text-sm);
	line-height: var(--leading-normal);
	color: var(--color-text);
	background: var(--color-bg);
	border: 1px solid #EBEBEB !important;
    border-radius: var(--radius-xl) !important;
}

.mrwoo-cart__coupon-input::placeholder {
	color: var(--color-grey-light);
}

.mrwoo-cart__coupon-input:focus {
	outline: none;
	border-color: var(--color-pink-middle);
}

.mrwoo-cart__coupon-btn {
	width: 100%;
}

.mrwoo-cart__coupon-btn.btn--primary {
	border: 0;
	font: inherit;
	cursor: pointer;
	padding: 7px var(--space-8);
}

/* Applied coupons — pills under the Pritaikyti button. */
.mrwoo-cart__applied-coupons {
	list-style: none;
	margin: var(--space-4) 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.mrwoo-cart__coupon-pill {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-2) var(--space-4);
	background: var(--color-pink-light);
	border-radius: var(--radius-pill);
	font-family: var(--font-sans);
	font-size: var(--text-sm);
	color: var(--color-text);
}

.mrwoo-cart__coupon-code {
	font-weight: var(--font-semibold);
	text-transform: uppercase;
	letter-spacing: var(--tracking-wide);
}

.mrwoo-cart__coupon-amount {
	margin-left: auto;
	font-family: var(--font-heading);
	font-weight: var(--font-bold);
	color: var(--color-pink-strawberry);
	white-space: nowrap;
}

.mrwoo-cart__coupon-amount .woocommerce-Price-amount {
	font: inherit;
	color: inherit;
}

.mrwoo-cart__coupon-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	color: var(--color-text);
	background: transparent;
	border: 0;
	border-radius: var(--radius-full);
	cursor: pointer;
	transition: color var(--transition-fast), background var(--transition-fast);
	text-decoration: none;
	flex-shrink: 0;
}

.mrwoo-cart__coupon-remove:hover {
	color: var(--color-bg);
	background: var(--color-pink-strawberry);
}

/* ============ Summary ============ */

.mrwoo-cart__summary {
	display: flex;
	flex-direction: column;
	gap: var(--space-6);
	margin: 0;
}

.mrwoo-cart__summary-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--space-12);
	padding: 12px 0;
	border-bottom: 1px solid var(--color-border);
	margin: 0;
}

.mrwoo-cart__summary-row dt {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--text-base);
	font-weight: var(--font-regular);
	line-height: 26px;
	color: var(--color-text);
}

.mrwoo-cart__summary-row dd {
	margin: 0;
	font-family: var(--font-heading);
	font-weight: var(--font-bold);
	font-size: 18px;
	line-height: var(--leading-normal);
	color: var(--color-text);
	white-space: nowrap;
}

.mrwoo-cart__summary-row dd .woocommerce-Price-amount {
	font: inherit;
	color: inherit;
}

.mrwoo-cart__summary-row--total dd {
	color: var(--color-text);
}

/* ============ Free shipping nudge ============ */

.mrwoo-cart__nudge {
	padding: var(--space-6);
	border-radius: var(--radius-md);
}

.mrwoo-cart__nudge--pending {
	background: var(--color-yellow-tone);
}

.mrwoo-cart__nudge--pending .mrwoo-cart__nudge-text {
	color: var(--color-yellow-ronchi);
}

.mrwoo-cart__nudge--qualified {
	background: var(--color-turquoise-pale);
}

.mrwoo-cart__nudge--qualified .mrwoo-cart__nudge-text {
	color: var(--color-turquoise-spearfish);
	text-transform: uppercase;
}

.mrwoo-cart__nudge-text {
	margin: 0;
	font-family: var(--font-sans);
	font-weight: var(--font-semibold);
	font-size: var(--text-base);
	line-height: 26px;
}

/* ============ Footer actions ============ */

.mrwoo-cart__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--space-4);
	margin-top: var(--space-12);
}

.mrwoo-cart__actions--mobile {
	display: none;
}

.mrwoo-cart__actions .btn--outline {
    border: 1px solid #000;
    padding: 9px var(--space-8);
}

/* ============ Empty state ============ */

.mrwoo-cart__empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-8);
	padding: var(--space-12) 0;
}

.mrwoo-cart__empty-text {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--text-lg);
	line-height: var(--leading-relaxed);
	color: var(--color-text-muted);
}

/* ============ WC notices — brand restyling ============
   Notices may render either inside .mrwoo-cart (template-side via woocommerce_before_cart hook)
   or directly inside .mrwoo-cart-page (WC shortcode prints them before the template loads).
   We target both. */

.mrwoo-cart-page .woocommerce-notices-wrapper {
	width: 100%;
	margin-bottom: var(--space-6);
}

.mrwoo-cart-page .woocommerce-notices-wrapper:empty {
	display: none;
	margin: 0;
}

.mrwoo-cart-page .woocommerce-message,
.mrwoo-cart-page .woocommerce-error,
.mrwoo-cart-page .woocommerce-info {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin: 0 0 var(--space-3);
	padding: var(--space-4) var(--space-6);
	font-family: var(--font-sans);
	font-size: var(--text-sm);
	font-weight: var(--font-medium);
	line-height: var(--leading-normal);
	color: var(--color-text);
	background: var(--color-pink-light);
	border: 0;
	border-radius: var(--radius-md);
	list-style: none;
}

.mrwoo-cart-page .woocommerce-message {
	background: var(--color-turquoise-pale);
	color: var(--color-turquoise-spearfish);
}

.mrwoo-cart-page .woocommerce-error {
	background: var(--color-pink-light);
	color: var(--color-pink-strawberry);
}

.mrwoo-cart-page .woocommerce-info {
	background: var(--color-yellow-tone);
	color: var(--color-yellow-ronchi);
}

/* Hide WC's default ::before pseudo-icons (grey/red dots). */
.mrwoo-cart-page .woocommerce-message::before,
.mrwoo-cart-page .woocommerce-error::before,
.mrwoo-cart-page .woocommerce-info::before {
	display: none;
}

/* Inline "Restore item" / undo links inherit the notice color. */
.mrwoo-cart-page .woocommerce-message a,
.mrwoo-cart-page .woocommerce-error a,
.mrwoo-cart-page .woocommerce-info a {
	color: inherit;
	text-decoration: underline;
	font-weight: var(--font-semibold);
}

.mrwoo-cart-page .woocommerce-message .restore-item,
.mrwoo-cart-page .woocommerce-message .button {
	margin-left: auto;
	padding: 0 var(--space-3);
	font: inherit;
	background: transparent;
	border: 0;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* WC sometimes wraps notices in <ul class="woocommerce-error">. Each <li> is a row. */
.mrwoo-cart-page ul.woocommerce-error,
.mrwoo-cart-page ul.woocommerce-message,
.mrwoo-cart-page ul.woocommerce-info {
	flex-direction: column;
	align-items: stretch;
	padding: 0;
	background: transparent;
}

.mrwoo-cart-page ul.woocommerce-error li,
.mrwoo-cart-page ul.woocommerce-message li,
.mrwoo-cart-page ul.woocommerce-info li {
	padding: var(--space-4) var(--space-6);
	border-radius: var(--radius-md);
}

.mrwoo-cart-page ul.woocommerce-error li {
	background: var(--color-pink-light);
	color: var(--color-pink-strawberry);
}

.mrwoo-cart-page ul.woocommerce-message li {
	background: var(--color-turquoise-pale);
	color: var(--color-turquoise-spearfish);
}

.mrwoo-cart-page ul.woocommerce-info li {
	background: var(--color-yellow-tone);
	color: var(--color-yellow-ronchi);
}

.mrwoo-cart-page ul.woocommerce-error li + li,
.mrwoo-cart-page ul.woocommerce-message li + li,
.mrwoo-cart-page ul.woocommerce-info li + li {
	margin-top: var(--space-2);
}

/* ====================================================================
   Responsive — tablet
   ==================================================================== */

@media (max-width: 1024px) {
	.mrwoo-cart__layout {
		grid-template-columns: 1fr 280px;
		gap: var(--space-8);
	}

	.mrwoo-cart__sidebar {
		width: 280px;
	}

	.mrwoo-cart__item {
		grid-template-columns: 24px 100px 1fr auto auto;
		gap: var(--space-4);
	}

	.mrwoo-cart__thumb {
		width: 100px;
		height: 100px;
	}

	.mrwoo-cart__title {
		font-size: var(--text-4xl);
	}
}

@media (max-width: 992px) {
.mrwoo-cart__layout {
		grid-template-columns: 1fr;
		gap: var(--space-12);
	}

	.mrwoo-cart__sidebar {
        width: 100%;
    }

	.mrwoo-cart__actions--mobile .btn {
        padding: 10px var(--space-8);
    }
}
/* ====================================================================
   Responsive — mobile (Figma node 213:10885)
   ==================================================================== */

@media (max-width: 768px) {
	.mrwoo-cart-page {
		padding: 0 16px 0;
	}
	.mrwoo-cart__header {
		gap: var(--space-6);
	}
	.mrwoo-cart {
		padding: var(--space-8) 0 var(--space-12);
	}

	.mrwoo-cart__layout {
		grid-template-columns: 1fr;
		gap: var(--space-12);
	}

	.mrwoo-cart__main {
		gap: var(--space-12);
	}

	.mrwoo-cart__sidebar {
		width: 100%;
		gap: var(--space-12);
	}

	.mrwoo-cart__title {
		font-size: var(--text-4xl);
	}

	/* Item — mobile layout:
	   col 1: [thumbnail]    col 2 row 1: [name]
	                         col 2 row 2: [qty | line-total]
	   X is positioned ABSOLUTELY at top-left of the item, overlapping/above the image.
	*/
	.mrwoo-cart__item {
		position: relative;
		grid-template-columns: 100px 1fr;
		grid-template-rows: auto auto;
		gap: var(--space-4) var(--space-6);
		align-items: start;
	}

	.mrwoo-cart__remove {
        grid-column: 1;
        grid-row: 1;
        width: 20px;
        height: 20px;
	}

	.mrwoo-cart__thumb {
		grid-column: 1;
        grid-row: 1 / span 2;
        width: 100px;
        height: auto;
        min-height: 100px;
        align-self: stretch;
        position: absolute;
        bottom: 0;
	}

	.mrwoo-cart__thumb img {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}

	.mrwoo-cart__info {
		grid-column: 2;
		grid-row: 1;
		max-width: none;
		gap: var(--space-2);
	}

	/* On mobile the unit price is intentionally hidden — per Figma 213:10885 only name + qty + line total show. */
	.mrwoo-cart__unit-price {
		display: none;
	}

	.mrwoo-cart__qty {
		grid-column: 2;
		grid-row: 2;
		justify-self: start;
		align-self: center;
	}

	.mrwoo-cart__line-total {
		grid-column: 2;
		grid-row: 2;
		justify-self: end;
		align-self: center;
	}

	/* Order summary rows lose the bottom border on mobile (matches design) — only the total line stays. */
	.mrwoo-cart__summary {
		gap: var(--space-3);
	}

	.mrwoo-cart__summary-row {
		padding: var(--space-2) 0;
	}

	/* Mobile checkout buttons live inside the sidebar; desktop ones at the bottom are hidden. */
	.mrwoo-cart__actions--desktop {
		display: none;
	}

	.mrwoo-cart__actions--mobile {
		display: flex;
		flex-direction: column-reverse;
		gap: var(--space-3);
		margin-top: 0;
	}

	.mrwoo-cart__actions--mobile .btn {
		width: 100%;
		justify-content: center;
	}

	/* Layout sidebar items in mobile order from Figma:
	   1) coupon  2) actions (mokėtina + buttons)  3) nudges */
	.mrwoo-cart__sidebar > .mrwoo-cart__actions--mobile {
		order: 2;
	}

	.mrwoo-cart__sidebar > .mrwoo-cart__nudge {
		order: 3;
	}

	.mrwoo-qty {
		padding: 8px 22px;
	}
}

@media (max-width: 480px) {
	.mrwoo-cart__item {
		grid-template-columns: 80px 1fr;
		gap: var(--space-2) var(--space-4);
	}

	.mrwoo-cart__thumb {
		width: 80px;
		height: 80px;
	}

	.mrwoo-cart__name {
		font-size: var(--text-sm);
		line-height: 22px;
	}


	.mrwoo-cart__title {
		font-size: var(--text-3xl);
	}
}

@media (max-width: 370px) {
    .mrwoo-qty {
        padding: 8px 7px;
    }
}
