/**
 * Nexio Cart Builder — structural defaults.
 * Every color/size below is overridable from the widgets' Style tabs.
 * Widgets never set page column widths — Elementor containers own the
 * two-column layout.
 */

.nexio-cart {
	max-width: 100%;
}

.nexio-cart__editor-badge {
	display: inline-block;
	margin-bottom: 14px;
	padding: 5px 12px;
	border-radius: 999px;
	background: #eef2ff;
	color: #4338ca;
	font-size: 12px;
	font-weight: 600;
}

/* ---------- Card ---------- */

.nexio-cart__card {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 14px;
	padding: 24px;
}

.nexio-cart__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 16px;
	margin-bottom: 18px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nexio-cart__heading {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.nexio-cart__count {
	font-size: 13.5px;
	opacity: 0.6;
	white-space: nowrap;
}

/* Sticky summary (desktop only — never traps a mobile viewport). */

@media (min-width: 1025px) {
	.nexio-cart-sticky-yes .nexio-cart__card {
		position: sticky;
		top: var(--nexio-cart-sticky-top, 24px);
	}
}

/* ---------- Buttons ---------- */

.nexio-cart button.nexio-cart__button,
a.nexio-cart__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.nexio-cart__button--primary {
	background: #111;
	border-color: #111;
	color: #fff;
}

.nexio-cart__button--primary:hover {
	opacity: 0.88;
	color: #fff;
}

.nexio-cart__button--secondary {
	background: transparent;
	border-color: rgba(0, 0, 0, 0.18);
	color: inherit;
}

.nexio-cart__button--secondary:hover {
	background: rgba(0, 0, 0, 0.04);
}

.nexio-cart__button:focus-visible,
a.nexio-cart__button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.nexio-cart__button:disabled,
.nexio-cart__button.is-disabled,
a.nexio-cart__checkout.is-disabled {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
}

/* ---------- Item rows ---------- */

.nexio-cart__items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.nexio-cart__item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.nexio-cart__item.is-busy {
	opacity: 0.55;
	pointer-events: none;
}

.nexio-cart__item-thumb,
.nexio-cart__item-thumb-link {
	flex-shrink: 0;
	line-height: 0;
}

.nexio-cart__item-thumb img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}

.nexio-cart__item-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.nexio-cart__item-name {
	font-size: 15px;
	font-weight: 600;
	color: inherit;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.nexio-cart__item-bundle-count {
	font-size: 12.5px;
	opacity: 0.65;
}

.nexio-cart__item-meta {
	font-size: 12.5px;
	opacity: 0.65;
}

.nexio-cart__item-meta p {
	margin: 0;
}

.nexio-cart__item-price {
	font-size: 13.5px;
	opacity: 0.75;
}

.nexio-cart__item-regular {
	opacity: 0.55;
}

.nexio-cart__item-warning {
	font-size: 12.5px;
	color: #b45309;
}

.nexio-cart__item-subtotal {
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ---------- Quantity ---------- */

.nexio-cart__item-qty {
	display: inline-flex;
	align-items: center;
	gap: 0;
	flex-shrink: 0;
}

.nexio-cart button.nexio-cart__qty-btn {
	appearance: none;
	width: 32px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(0, 0, 0, 0.18);
	background: transparent;
	color: inherit;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
}

.nexio-cart__qty-btn:first-child {
	border-radius: 8px 0 0 8px;
}

.nexio-cart__qty-btn:last-child {
	border-radius: 0 8px 8px 0;
}

.nexio-cart__qty-btn:hover {
	background: rgba(0, 0, 0, 0.04);
}

.nexio-cart__qty-input {
	width: 52px;
	height: 36px;
	box-sizing: border-box;
	padding: 0 6px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-left-width: 0;
	border-right-width: 0;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 14px;
	text-align: center;
	appearance: textfield;
	-moz-appearance: textfield;
}

.nexio-cart__qty-input::-webkit-outer-spin-button,
.nexio-cart__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Number-input mode has no adjacent buttons — restore its borders. */
.nexio-cart__item-qty > .nexio-cart__qty-input:only-child {
	border-width: 1px;
	border-radius: 8px;
}

.nexio-cart__qty-input:focus {
	outline: none;
	border-color: rgba(0, 0, 0, 0.5);
	position: relative;
	z-index: 1;
}

.nexio-cart__update-row {
	margin-top: 16px;
	display: flex;
	justify-content: flex-end;
}

/* ---------- Remove button ---------- */

.nexio-cart button.nexio-cart__item-remove {
	appearance: none;
	flex-shrink: 0;
	/* min-width, not width: the widget exposes a Padding control for
	   this button, and a fixed width meant any padding was subtracted
	   from the content box instead of added around it — 30px+34px of
	   padding inside a 34px box left zero room and the icon vanished. */
	min-width: 34px;
	min-height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: #9ca3af;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.nexio-cart__item-remove:hover {
	background: #fef2f2;
	color: #b91c1c;
}

.nexio-cart__item-remove:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.nexio-cart__remove-icon {
	/* flex-shrink: 0 — as a flex child it would otherwise be the first
	   thing squeezed when the button runs short of room, collapsing to
	   0px and leaving an apparently empty button. */
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	background-color: currentColor;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M19 6l-1 14H6L5 6'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M19 6l-1 14H6L5 6'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3C/svg%3E");
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
}

/* ---------- Empty state ---------- */

.nexio-cart__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 10px;
	padding: 44px 20px;
}

.nexio-cart__empty-icon {
	width: 64px;
	height: 64px;
	margin-bottom: 6px;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.05);
	color: #6b7280;
	position: relative;
}

.nexio-cart__empty-icon::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 50%;
	height: 50%;
	background-color: currentColor;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6'/%3E%3C/svg%3E");
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.nexio-cart__empty-heading {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
}

.nexio-cart__empty-desc {
	margin: 0;
	max-width: 380px;
	font-size: 14px;
	opacity: 0.65;
}

.nexio-cart__empty .nexio-cart__button {
	margin-top: 8px;
}

/* ---------- Summary ---------- */

.nexio-cart--summary.is-busy {
	opacity: 0.6;
	pointer-events: none;
}

.nexio-cart__summary-items {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.nexio-cart__summary-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nexio-cart__summary-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.nexio-cart__summary-thumb {
	flex-shrink: 0;
	line-height: 0;
}

.nexio-cart__summary-thumb img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.nexio-cart__summary-item-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.nexio-cart__summary-name {
	font-size: 13.5px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nexio-cart__summary-qty {
	font-size: 12px;
	opacity: 0.6;
}

.nexio-cart__summary-line {
	font-size: 13.5px;
	font-weight: 600;
	white-space: nowrap;
}

.nexio-cart__summary-more {
	font-size: 12.5px;
	opacity: 0.6;
}

/* ---------- Totals ---------- */

.nexio-cart__totals {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 18px 0;
}

.nexio-cart__totals-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	font-size: 14px;
}

.nexio-cart__totals-label {
	opacity: 0.7;
}

.nexio-cart__totals-value {
	font-weight: 600;
	white-space: nowrap;
}

.nexio-cart__totals-row--discount .nexio-cart__totals-value {
	color: #047857;
}

.nexio-cart__totals-row--grand {
	margin-top: 6px;
	padding-top: 14px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	font-size: 17px;
	font-weight: 700;
}

.nexio-cart__totals-row--grand .nexio-cart__totals-label {
	opacity: 1;
	font-weight: 700;
}

.nexio-cart__totals-row--grand .nexio-cart__totals-value {
	font-size: 18px;
}

/* ---------- Coupon ---------- */

.nexio-cart__coupon {
	margin-bottom: 18px;
}

.nexio-cart__coupon-form {
	display: flex;
	gap: 8px;
}

.nexio-cart-coupon-stacked .nexio-cart__coupon-form {
	flex-direction: column;
}

.nexio-cart__coupon-input {
	flex: 1;
	min-width: 0;
	height: 42px;
	box-sizing: border-box;
	padding: 0 14px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 10px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 14px;
}

.nexio-cart__coupon-input:focus {
	outline: none;
	border-color: rgba(0, 0, 0, 0.5);
}

.nexio-cart__coupon-feedback:empty {
	display: none;
}

.nexio-cart__coupon-feedback {
	margin-top: 8px;
	font-size: 13px;
}

.nexio-cart__coupon-list {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.nexio-cart__coupon-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 6px 4px 12px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.05);
	font-size: 12.5px;
	font-weight: 600;
	text-transform: uppercase;
}

.nexio-cart button.nexio-cart__coupon-remove {
	appearance: none;
	width: 20px;
	height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.08);
	color: inherit;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
}

.nexio-cart__coupon-remove:hover {
	background: #fee2e2;
	color: #b91c1c;
}

/* ---------- Checkout ---------- */

.nexio-cart__checkout {
	width: 100%;
	margin-top: 4px;
}

.nexio-cart__checkout-helper {
	margin: 10px 0 0;
	font-size: 12.5px;
	opacity: 0.6;
	text-align: center;
}

/* ---------- Notices ---------- */

.nexio-cart__notices {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nexio-cart__notices:empty {
	display: none;
}

.nexio-cart__notice {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.5;
}

.nexio-cart__notice--success {
	background: #ecfdf5;
	color: #047857;
}

.nexio-cart__notice--error {
	background: #fef2f2;
	color: #b91c1c;
}

.nexio-cart__notice--notice {
	background: #eff6ff;
	color: #1d4ed8;
}

.nexio-cart__notice a {
	color: inherit;
}

.nexio-cart button.nexio-cart__notice-close {
	appearance: none;
	flex-shrink: 0;
	border: none;
	background: transparent;
	color: inherit;
	font-size: 18px;
	line-height: 1;
	padding: 0 2px;
	cursor: pointer;
	opacity: 0.6;
}

.nexio-cart__notice-close:hover {
	opacity: 1;
}

.nexio-cart__reload {
	margin-left: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
	.nexio-cart__card {
		padding: 18px;
	}

	.nexio-cart__item {
		flex-wrap: wrap;
		gap: 12px;
	}

	.nexio-cart__item-thumb img {
		width: 56px;
		height: 56px;
	}

	.nexio-cart__item-body {
		flex-basis: calc(100% - 130px);
	}

	/* Quantity + subtotal share a row below the product on mobile. */
	.nexio-cart__item-qty {
		order: 3;
	}

	.nexio-cart__item-subtotal {
		order: 4;
		margin-left: auto;
	}

	.nexio-cart__item-remove {
		order: 2;
		margin-left: auto;
	}

	.nexio-cart__coupon-form {
		flex-direction: column;
	}

	.nexio-cart__coupon-form .nexio-cart__button {
		width: 100%;
	}

	.nexio-cart__update-row {
		justify-content: stretch;
	}

	.nexio-cart__update-row .nexio-cart__button {
		width: 100%;
	}
}

/*
 * WooCommerce wraps sale prices in <ins>, which browsers underline by
 * default. A parent's `text-decoration: none` cannot clear a child's
 * own decoration, so the element itself has to be reset. <del> keeps
 * its line-through — that one carries meaning.
 */
.nexio-cart__item-regular ins,
.nexio-cart__item-price ins,
.nexio-cart ins {
	text-decoration: none;
	background: none;
}
