/* Cart page — IMPEERCOL
   Theme html uses font-size: 62.5% (1rem ≈ 10px). Cart locks to px and uses em. */
.cart-page {
	background: #f7f7f8;
	min-height: 50vh;
	font-size: 15px;
	line-height: 1.45;
}

.cart-alert {
	padding: 0.85em 1em;
	border-radius: 10px;
	margin-bottom: 1em;
	font-size: 1em;
	font-weight: 500;
}
.cart-alert--ok {
	background: #e8f8ef;
	color: #146c43;
	border: 1px solid #b6e4c8;
}
.cart-alert--err {
	background: #fdebec;
	color: #9e0808;
	border: 1px solid #f3c4c4;
}

.cart-empty {
	background: #fff;
	border-radius: 14px;
	padding: 2.5em 1.25em;
	text-align: center;
	box-shadow: 0 8px 28px rgba(20, 20, 20, 0.05);
}
.cart-empty__icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 1em;
	border-radius: 50%;
	background: #f1f1f2;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #cd0b0b;
	font-size: 1.5em;
}
.cart-empty__title {
	font-size: 1.45em;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 0.4em;
}
.cart-empty__text {
	color: #555;
	font-size: 1em;
	margin-bottom: 1.35em;
	max-width: 28em;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.5;
}

.cart-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
	gap: 1.25em;
	align-items: start;
}
.cart-layout[hidden],
#cart-empty[hidden],
#cart-filled[hidden],
.cart-sticky-cta[hidden] {
	display: none !important;
}

.cart-main,
.cart-summary {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 28px rgba(20, 20, 20, 0.05);
}

.cart-main__head {
	padding: 1.1em 1.25em;
	border-bottom: 1px solid #ececec;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75em;
}
.cart-main__title {
	font-size: 1.35em;
	font-weight: 700;
	margin: 0;
	color: #1a1a1a;
}
.cart-main__meta {
	margin: 0;
	color: #555;
	font-size: 0.95em;
	font-weight: 500;
}

.cart-lines {
	list-style: none;
	margin: 0;
	padding: 0;
}
.cart-line {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr) auto auto;
	gap: 0.95em;
	padding: 1.1em 1.25em;
	border-bottom: 1px solid #f0f0f0;
	align-items: center;
}
.cart-line__body {
	min-width: 0;
}
.cart-line.is-loading {
	opacity: 0.55;
	pointer-events: none;
}
.cart-flash {
	margin-bottom: 1em;
}
.cart-line:last-child {
	border-bottom: none;
}
.cart-line__media {
	width: 80px;
	height: 80px;
	border-radius: 10px;
	overflow: hidden;
	background: #f4f4f5;
	flex-shrink: 0;
}
.cart-line__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.cart-line__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #aaa;
	font-size: 1.25em;
}
.cart-line__name {
	display: block;
	font-size: 1.05em;
	font-weight: 700;
	color: #1a1a1a;
	text-decoration: none;
	line-height: 1.3;
	margin-bottom: 0.2em;
}
.cart-line__name:hover {
	color: #cd0b0b;
}
.cart-line__variant,
.cart-line__sku,
.cart-line__unit {
	margin: 0;
	font-size: 0.9em;
	color: #555;
	line-height: 1.4;
}
.cart-line__sku {
	color: #777;
	font-size: 0.88em;
}
.cart-qty-form {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid #ddd;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}
.cart-qty-btn {
	width: 40px;
	height: 42px;
	border: none;
	background: #f7f7f8;
	font-size: 1.15em;
	cursor: pointer;
	color: #333;
}
.cart-qty-btn:hover {
	background: #eee;
}
.cart-qty-input {
	width: 48px;
	height: 42px;
	border: none;
	border-left: 1px solid #eee;
	border-right: 1px solid #eee;
	text-align: center;
	font-weight: 700;
	font-size: 1em;
	-moz-appearance: textfield;
}
.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.cart-line__total {
	text-align: right;
	min-width: 7.5em;
}
.cart-line__total span {
	display: block;
	font-weight: 700;
	font-size: 1.05em;
	color: #1a1a1a;
	margin-bottom: 0.3em;
}
.cart-line__remove {
	border: none;
	background: none;
	color: #cd0b0b;
	font-size: 0.92em;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.cart-summary {
	padding: 1.15em 1.15em 1.25em;
	position: sticky;
	top: 100px;
}
.cart-summary__title {
	font-size: 1.2em;
	font-weight: 700;
	margin: 0 0 0.75em;
	color: #1a1a1a;
	letter-spacing: -0.01em;
}
.cart-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.75em;
	margin-bottom: 0.5em;
	font-size: 0.95em;
	color: #333;
}
.cart-summary__row--muted {
	color: #666;
	font-size: 0.9em;
}
.cart-summary__hint {
	margin: -0.15em 0 0.65em;
	font-size: 0.85em;
	color: #6b7280;
	line-height: 1.35;
}
.cart-summary__row--total {
	padding-top: 0.7em;
	margin-top: 0.4em;
	margin-bottom: 0;
	border-top: 1px solid #ececec;
	font-size: 1em;
	font-weight: 600;
	color: #1a1a1a;
}
.cart-summary__row--total strong {
	color: #cd0b0b;
	font-size: 1.2em;
}

.cart-checkout {
	margin-top: 1.15em;
	padding-top: 0;
	border-top: none;
}

.cart-steps {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.35em;
	margin-bottom: 1.2em;
	padding: 0.2em 0 1em;
	border-bottom: 1px solid #ececec;
}
.cart-steps__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4em;
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 0.2em;
	min-width: 3.8em;
	color: #777;
}
.cart-steps__num {
	width: 1.9em;
	height: 1.9em;
	border-radius: 999px;
	border: 1.5px solid #ddd;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.88em;
	font-weight: 700;
	background: #fff;
}
.cart-steps__label {
	font-size: 0.88em;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.2;
}
.cart-steps__line {
	flex: 1;
	height: 2px;
	background: #e8e8e8;
	border-radius: 2px;
	margin: 0 0.2em 1.35em;
}
.cart-steps__item.is-active {
	color: #6b1218;
}
.cart-steps__item.is-active .cart-steps__num {
	background: #6b1218;
	border-color: #6b1218;
	color: #fff;
}
.cart-steps__item.is-done {
	color: #15803d;
}
.cart-steps__item.is-done .cart-steps__num {
	background: #e8f8ef;
	border-color: #15803d;
	color: #15803d;
}
.cart-steps__item.is-done + .cart-steps__line,
.cart-steps__item.is-active + .cart-steps__line {
	background: #6b1218;
}

.cart-step-error {
	background: #fdebec;
	color: #9e0808;
	border: 1px solid #f3c4c4;
	border-radius: 10px;
	padding: 0.75em 0.9em;
	font-size: 0.95em;
	font-weight: 600;
	margin: 0 0 0.95em;
}

.cart-panel {
	animation: cartPanelIn 0.22s ease;
}
.cart-panel[hidden] {
	display: none !important;
}
@keyframes cartPanelIn {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}
.cart-panel__title {
	margin: 0;
	font-size: 1.12em;
	font-weight: 700;
	color: #1a1a1a;
}
.cart-panel__sub {
	margin: 0.25em 0 0.9em;
	font-size: 0.9em;
	color: #666;
	line-height: 1.4;
}
.cart-panel__actions {
	margin-top: 0.55em;
	padding-top: 0.45em;
}
.cart-panel__actions--split {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.65em;
	align-items: center;
}

.cart-field {
	margin-bottom: 0.85em;
}
.cart-field label {
	display: block;
	font-size: 0.92em;
	font-weight: 600;
	color: #333;
	margin-bottom: 0.35em;
}
.cart-optional {
	font-weight: 500;
	color: #888;
	font-size: 0.88em;
}
.cart-field input,
.cart-field textarea {
	width: 100%;
	border: 1px solid #ddd;
	border-radius: 10px;
	padding: 0.65em 0.85em;
	font-size: 1em;
	line-height: 1.4;
	background: #fff;
	color: #1a1a1a;
}
.cart-field textarea {
	resize: vertical;
	min-height: 3.8em;
}
.cart-field input:focus,
.cart-field textarea:focus {
	outline: none;
	border-color: #cd0b0b;
	box-shadow: 0 0 0 3px rgba(205, 11, 11, 0.1);
}
.cart-field input.is-invalid,
.cart-field textarea.is-invalid {
	border-color: #cd0b0b;
}
.cart-field input::placeholder,
.cart-field textarea::placeholder {
	color: #999;
	font-size: 0.95em;
}

.cart-map {
	margin: 0.2em 0 1.05em;
	padding: 0.85em;
	background: #fafafa;
	border: 1px solid #ececec;
	border-radius: 12px;
}
.cart-map__label {
	font-size: 0.98em;
	font-weight: 600;
	color: #333;
	margin-bottom: 0.55em;
}
.cart-map .map-pin-picker { margin-top: 0; }
.cart-map .map-pin-picker__toolbar {
	gap: 0.45em;
	margin-bottom: 0.55em;
}
.cart-map .map-pin-picker__btn {
	border: 1px solid #e2e2e2;
	background: #fff;
	color: #333;
	border-radius: 999px;
	padding: 0.45em 0.85em;
	font-size: 0.88em;
	font-weight: 600;
}
.cart-map .map-pin-picker__btn:not(.map-pin-picker__btn--ghost) {
	background: #6b1218;
	border-color: #6b1218;
	color: #fff;
}
.cart-map .map-pin-picker__status {
	font-size: 0.88em;
	width: 100%;
	margin-left: 0;
}
.cart-map .map-pin-picker__map {
	border: 1px solid #e8e8e8;
	border-radius: 10px;
}
.cart-map .map-pin-picker__hint,
.cart-map .map-pin-picker__coords {
	font-size: 0.88em;
	color: #666;
	line-height: 1.4;
}

.cart-checkout__note {
	margin: 0.75em 0 0;
	font-size: 0.95em;
	color: #666;
	text-align: center;
	line-height: 1.4;
}

.cart-trust {
	list-style: none;
	margin: 1em 0 0;
	padding: 0.85em 0.9em;
	background: #f8faf8;
	border: 1px solid #e5eee7;
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	gap: 0.55em;
}
.cart-trust__item {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	font-size: 0.88em;
	color: #374151;
	line-height: 1.35;
}
.cart-trust__item i {
	color: #15803d;
	margin-top: 0.15em;
	width: 1em;
	text-align: center;
	flex-shrink: 0;
}
.cart-trust__item .fa-whatsapp {
	color: #128c7e;
}
.cart-trust__item a {
	color: #128c7e;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.cart-trust__item a:hover {
	color: #0b6b5f;
}

.cart-recap {
	margin: 0 0 1.1em;
	padding: 0.85em 0.95em;
	background: #fafafa;
	border: 1px solid #ececec;
	border-radius: 12px;
}
.cart-recap__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.75em;
	font-size: 0.95em;
	color: #444;
	margin-bottom: 0.4em;
}
.cart-recap__row:last-child {
	margin-bottom: 0;
}
.cart-recap__row--total {
	margin-top: 0.45em;
	padding-top: 0.55em;
	border-top: 1px solid #e8e8e8;
	font-weight: 600;
	color: #1a1a1a;
}
.cart-recap__row--total strong {
	color: #cd0b0b;
	font-size: 1.15em;
}
.cart-recap__recipient {
	margin-top: 0.55em;
	padding-top: 0.55em;
	border-top: 1px dashed #e5e5e5;
}
.cart-recap__recipient[hidden] {
	display: none !important;
}

.cart-panel__actions--mobile-back {
	display: none;
}

.cart-sticky-cta {
	display: none;
}

.cart-payment-options {
	display: flex;
	flex-direction: column;
	gap: 0.6em;
}
.cart-payment-option {
	display: flex;
	align-items: center;
	gap: 0.75em;
	border: 1px solid #ddd;
	border-radius: 12px;
	padding: 0.75em 0.9em;
	cursor: pointer;
	background: #fff;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.cart-payment-option input[type="radio"] {
	width: 1.15em;
	height: 1.15em;
	accent-color: #cd0b0b;
	flex-shrink: 0;
}
.cart-payment-option__icon {
	width: 2.2em;
	height: 2.2em;
	border-radius: 50%;
	background: #f4f4f4;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6b1218;
	flex-shrink: 0;
}
.cart-payment-option strong {
	display: block;
	font-size: 0.95em;
	color: #1a1a1a;
}
.cart-payment-option small {
	display: block;
	color: #777;
	font-size: 0.82em;
}
.cart-payment-option.is-selected {
	border-color: #cd0b0b;
	background: #fdf3f3;
}

.cart-btn--primary,
.cart-btn--next,
.cart-btn--buy {
	width: 100%;
	background: #6b1218;
	color: #fff;
	padding: 0.8em 1em;
	font-size: 1em;
	border-radius: 10px;
	border: none;
	font-weight: 700;
	cursor: pointer;
	display: inline-block;
	text-align: center;
	text-decoration: none;
}
.cart-btn--primary:hover,
.cart-btn--next:hover,
.cart-btn--buy:hover {
	background: #cd0b0b;
	color: #fff;
}
.cart-btn--ghost {
	background: #fff;
	color: #333;
	border: 1px solid #ddd;
	border-radius: 10px;
	padding: 0.8em 1em;
	font-size: 0.95em;
	font-weight: 600;
	cursor: pointer;
}
.cart-btn--ghost:hover {
	border-color: #6b1218;
	color: #6b1218;
}

@media (max-width: 991px) {
	.cart-page {
		padding-bottom: calc(5.5em + env(safe-area-inset-bottom, 0px));
	}
	body.cart-has-sticky {
		padding-bottom: 0;
	}

	.cart-layout {
		grid-template-columns: 1fr;
	}
	.cart-layout__checkout {
		order: -1;
	}
	.cart-layout__order {
		order: 1;
	}
	.cart-summary {
		position: static;
	}
	.cart-line {
		display: grid;
		grid-template-columns: 80px minmax(0, 1fr);
		grid-template-areas:
			"media body"
			"qty total";
		align-items: start;
	}
	.cart-line__media { grid-area: media; width: 80px; height: 80px; }
	.cart-line__body { grid-area: body; min-width: 0; }
	.cart-line__qty { grid-area: qty; }
	.cart-line__total { grid-area: total; align-self: end; }

	.cart-field input,
	.cart-field textarea,
	.cart-qty-input {
		font-size: 16px;
	}

	.cart-panel__actions--desktop {
		display: none !important;
	}
	.cart-panel__actions--mobile-back {
		display: block;
		margin-top: 0.75em;
	}
	.cart-panel__actions--mobile-back .cart-btn--ghost {
		width: 100%;
	}

	.cart-map .map-pin-picker__map {
		min-height: 280px !important;
		height: 280px !important;
	}
	.cart-map .map-pin-picker__btn {
		min-height: 44px;
		padding: 0.55em 0.95em;
		font-size: 0.95em;
	}

	.cart-sticky-cta {
		display: flex;
		align-items: center;
		gap: 0.75em;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1040;
		padding: 0.7em 0.9em calc(0.7em + env(safe-area-inset-bottom, 0px));
		background: #fff;
		border-top: 1px solid #e8e8e8;
		box-shadow: 0 -8px 24px rgba(20, 20, 20, 0.08);
	}
	.cart-sticky-cta[hidden] {
		display: none !important;
	}
	.cart-sticky-cta__total {
		display: flex;
		flex-direction: column;
		min-width: 5.5em;
		line-height: 1.2;
	}
	.cart-sticky-cta__total span {
		font-size: 0.75em;
		color: #666;
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: 0.03em;
	}
	.cart-sticky-cta__total strong {
		font-size: 1.1em;
		color: #cd0b0b;
		font-weight: 800;
	}
	.cart-sticky-cta .cart-btn {
		flex: 1;
		margin: 0;
		padding: 0.85em 1em;
		font-size: 0.98em;
		min-height: 46px;
	}

	.cart-steps__num {
		width: 2em;
		height: 2em;
		font-size: 0.9em;
	}
	.cart-steps__label {
		font-size: 0.9em;
	}
	.cart-summary__hint {
		font-size: 0.88em;
	}
	.cart-trust {
		margin-top: 0.85em;
		padding: 0.75em 0.8em;
	}
	.cart-trust__item {
		font-size: 0.9em;
	}
	.cart-panel__sub {
		font-size: 0.92em;
	}
	.cart-field input::placeholder,
	.cart-field textarea::placeholder {
		font-size: 0.95em;
	}
}
