/* Minicarrito (inc/mini-cart.php): panel del header y página /cart/ */

.cml-mc,
.cml-cart-page {
	--cml-mc-accent: #3c5ddf;
	--cml-mc-accent-dark: #2a45b8;
	--cml-mc-text: #1c2340;
	--cml-mc-muted: #5b6178;
	--cml-mc-line: #e6e9f2;
	--cml-mc-soft: #f4f6fb;
	font-family: 'Work Sans', sans-serif;
	color: var(--cml-mc-text);
}

html.cml-mc-lock,
html.cml-mc-lock body {
	overflow: hidden;
}

/* Panel */
.cml-mc[hidden] {
	display: none;
}

.cml-mc {
	position: fixed;
	inset: 0;
	z-index: 100000;
}

.cml-mc__overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 24, 48, 0.45);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.cml-mc__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 440px;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	background: #fff;
	box-shadow: -12px 0 40px rgba(20, 24, 48, 0.18);
	transform: translateX(100%);
	transition: transform 0.25s ease;
	outline: none;
}

.cml-mc.is-open .cml-mc__overlay {
	opacity: 1;
}

.cml-mc.is-open .cml-mc__panel {
	transform: none;
}

body.admin-bar .cml-mc__panel {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .cml-mc__panel {
		top: 46px;
	}
}

.cml-mc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 28px;
	border-bottom: 1px solid var(--cml-mc-line);
}

.cml-mc__head h2 {
	margin: 0;
	font-family: inherit;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: var(--cml-mc-text);
}

.cml-mc__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f0f2f8;
	color: var(--cml-mc-text);
	cursor: pointer;
}

.cml-mc__close:hover {
	background: #e3e7f3;
}

.cml-mc__content {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.cml-mc__loading {
	margin: 0;
	padding: 28px;
	color: var(--cml-mc-muted);
}

/* Bloque común */
.cml-mc__body {
	flex: 1 1 auto;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding: 24px 28px;
}

.is-loading .cml-mc__body,
.is-loading .cml-mc__footer {
	opacity: 0.5;
	pointer-events: none;
}

.cml-mc__item {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.cml-mc__thumb {
	flex: 0 0 84px;
}

.cml-mc__thumb img {
	display: block;
	width: 84px;
	height: 84px;
	object-fit: cover;
	border-radius: 12px;
}

.cml-mc__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.cml-mc p.cml-mc__title,
.cml-cart-page p.cml-mc__title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--cml-mc-text);
}

.cml-mc p.cml-mc__meta,
.cml-cart-page p.cml-mc__meta {
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--cml-mc-muted);
}

.cml-mc__remove,
.cml-mc__link {
	align-self: flex-start;
	margin-top: 4px;
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	color: #b4233a;
	text-decoration: underline;
	cursor: pointer;
}

.cml-mc__summary {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px;
	border-radius: 16px;
	background: var(--cml-mc-soft);
}

.cml-mc__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	font-size: 14px;
	color: var(--cml-mc-muted);
}

.cml-mc__row > :last-child {
	font-size: 16px;
	font-weight: 600;
	color: var(--cml-mc-text);
	text-align: right;
}

/* El tema da estilo propio a .amount */
.cml-mc__row .woocommerce-Price-amount,
.cml-mc__row .woocommerce-Price-amount bdi,
.cml-mc__row .woocommerce-Price-currencySymbol {
	font: inherit;
	color: inherit;
	letter-spacing: inherit;
}

.cml-mc__row--due > :first-child {
	font-size: 15px;
	font-weight: 600;
	color: var(--cml-mc-text);
}

.cml-mc__row.cml-mc__row--due > strong {
	font-size: 24px;
	font-weight: 700;
	color: var(--cml-mc-accent);
}

.cml-mc__sep {
	height: 1px;
	margin: 0;
	border: 0;
	background: #dde1ec;
}

.cml-mc__tbd {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: #fff1d6;
	color: #7a4b00;
	font-size: 13px;
	font-weight: 600;
}

.cml-mc p.cml-mc__plans,
.cml-cart-page p.cml-mc__plans {
	margin: 4px 0 0;
	padding-top: 12px;
	border-top: 1px dashed #cdd2e0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--cml-mc-text);
}

.cml-mc__applied {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	color: #1f6b3a;
}

.cml-mc__coupon {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
}

.cml-mc__coupon label {
	font-size: 13px;
	font-weight: 600;
	color: var(--cml-mc-text);
}

.cml-mc__coupon-row {
	display: flex;
	gap: 8px;
}

.cml-mc__coupon input[type="text"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #cdd2e0;
	border-radius: 10px;
	background: #fff;
	font-family: inherit;
	font-size: 14px;
	color: var(--cml-mc-text);
	box-sizing: border-box;
}

.cml-mc__coupon button {
	height: 44px;
	padding: 0 18px;
	border: 1px solid var(--cml-mc-accent);
	border-radius: 10px;
	background: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--cml-mc-accent);
	cursor: pointer;
}

.cml-mc__coupon button:hover {
	background: var(--cml-mc-soft);
}

.cml-mc p.cml-mc__msg,
.cml-cart-page p.cml-mc__msg {
	margin: 0;
	font-size: 13px;
	color: #1f6b3a;
}

.cml-mc p.cml-mc__msg.is-error,
.cml-cart-page p.cml-mc__msg.is-error {
	color: #b4233a;
}

.cml-mc__footer {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 28px 26px;
	border-top: 1px solid var(--cml-mc-line);
	background: #fff;
}

.cml-mc a.cml-mc__cta,
.cml-cart-page a.cml-mc__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 0 24px;
	border-radius: 999px;
	background: var(--cml-mc-accent);
	font-size: 17px;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.cml-mc a.cml-mc__cta:hover,
.cml-cart-page a.cml-mc__cta:hover {
	background: var(--cml-mc-accent-dark);
	color: #fff;
}

.cml-mc p.cml-mc__note,
.cml-cart-page p.cml-mc__note {
	margin: 0;
	font-size: 12px;
	text-align: center;
	color: var(--cml-mc-muted);
}

.cml-mc p.cml-mc__empty,
.cml-cart-page p.cml-mc__empty {
	margin: 0;
	font-size: 15px;
	color: var(--cml-mc-muted);
}

@media (max-width: 480px) {
	.cml-mc__head,
	.cml-mc__body,
	.cml-mc__footer {
		padding-left: 20px;
		padding-right: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cml-mc__overlay,
	.cml-mc__panel {
		transition: none;
	}
}

/* Página /cart/ */
.cml-cart-page {
	max-width: 560px;
	margin: 40px auto 80px;
	border: 1px solid var(--cml-mc-line);
	border-radius: 20px;
	background: #fff;
	overflow: hidden;
}

.cml-cart-page__head {
	padding: 24px 28px 0;
}

.cml-cart-page__head h2 {
	margin: 0;
	font-family: inherit;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--cml-mc-text);
}
