.lwm-gift-options {
	--lwm-gift-red: #a90000;
	--lwm-gift-red-dark: #7f0000;
	--lwm-gift-border: #dedede;
	--lwm-gift-soft: #fbf7f4;
	margin: 28px 0;
	padding: 24px;
	border: 1px solid var(--lwm-gift-border);
	border-radius: 3px;
	background: #fff;
}

.lwm-gift-options[aria-busy="true"] {
	opacity: .72;
	pointer-events: none;
}

.lwm-gift-options__heading {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 22px;
}

.lwm-gift-options__heading h3 {
	margin: 0 0 5px;
	font-size: 22px;
	line-height: 1.2;
}

.lwm-gift-options__heading p {
	margin: 0;
	color: #555;
}

.lwm-gift-options__icon {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--lwm-gift-red);
	font-size: 20px;
	line-height: 1;
}

.lwm-gift-options__fieldset {
	min-width: 0;
	margin: 0 0 22px;
	padding: 0;
	border: 0;
}

.lwm-gift-options__fieldset legend {
	width: 100%;
	margin-bottom: 10px;
	font-weight: 700;
	font-size: 16px;
	color: #111;
}

.lwm-gift-options__choices {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.lwm-gift-choice {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 92px;
	margin: 0;
	padding: 10px;
	border: 1px solid var(--lwm-gift-border);
	border-radius: 3px;
	background: #fff;
	cursor: pointer;
	transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.lwm-gift-choice:hover {
	border-color: #9e9e9e;
}

.lwm-gift-choice.is-selected {
	border-color: var(--lwm-gift-red);
	box-shadow: 0 0 0 2px rgba(169, 0, 0, .12);
	background: #fffafa;
}

.lwm-gift-choice input[type="radio"] {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	border: 0;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	overflow: hidden;
	white-space: nowrap;
}

.lwm-gift-choice:has(input[type="radio"]:focus-visible) {
	outline: 2px solid var(--lwm-gift-red);
	outline-offset: 2px;
}

.lwm-gift-choice__image {
	display: grid;
	place-items: center;
	flex: 0 0 70px;
	width: 70px;
	height: 70px;
	overflow: hidden;
	background: #fff;
}

.lwm-gift-choice__image img {
	display: block;
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: 68px !important;
	object-fit: contain !important;
}

.lwm-gift-choice__body {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
}

.lwm-gift-choice__body strong {
	line-height: 1.3;
	color: #111;
}

.lwm-gift-choice__price {
	font-weight: 600;
	color: #555;
}

.lwm-gift-choice__action {
	margin-top: 4px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--lwm-gift-red);
}

.lwm-gift-choice--none {
	min-height: 92px;
	padding-left: 18px;
}

.lwm-gift-options__quantity {
	display: none;
	align-items: center;
	gap: 12px;
	margin: 14px 0 0;
	font-weight: 600;
}

.lwm-gift-options__quantity.is-visible {
	display: flex;
}

.lwm-gift-options__quantity input {
	width: 72px;
	margin: 0;
}

.lwm-gift-options__wrap-quantity {
	display: none;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	font-weight: 600;
}

.lwm-gift-options__wrap-quantity.is-visible {
	display: flex;
}

.lwm-gift-options__wrap-quantity input {
	width: 84px;
	margin-left: auto;
}

.lwm-gift-options__note {
	margin: 10px 0 0;
	font-size: 12px;
	color: #666;
}

.lwm-gift-options__card {
	padding-top: 18px;
	border-top: 1px solid var(--lwm-gift-border);
}

.lwm-gift-options__check {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 0;
	font-weight: 600;
	cursor: pointer;
}

.lwm-gift-options__check input {
	flex: 0 0 auto;
	margin-top: 3px;
}

.lwm-gift-options__message {
	display: none;
	position: relative;
	margin-top: 14px;
}

.lwm-gift-options__message.is-visible {
	display: block;
}

.lwm-gift-options__message label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.lwm-gift-options__message textarea {
	width: 100%;
	min-height: 110px;
	padding-bottom: 28px;
	resize: vertical;
}

.lwm-gift-options__counter {
	position: absolute;
	right: 10px;
	bottom: 8px;
	font-size: 12px;
	color: #777;
}

.lwm-gift-options__receipt {
	padding: 15px;
	border-radius: 3px;
	background: var(--lwm-gift-soft);
}

.lwm-gift-options__status {
	margin: 12px 0 0;
	font-size: 13px;
	color: var(--lwm-gift-red-dark);
}

@media (max-width: 767px) {
	.lwm-gift-options {
		padding: 18px;
	}

	.lwm-gift-options__choices {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lwm-gift-choice {
		transition: none;
	}
}

.lwm-gift-page {
	--lwm-gift-red: #a90000;
	--lwm-gift-border: #dedede;
	--lwm-gift-soft: #fbf7f4;
	width: min(1180px, calc(100% - 32px));
	margin: 36px auto 64px;
	color: #171717;
}

/* The gift-wrapping step is a focused Cart-to-Checkout flow, not a shop archive. */
body.lwm-gift-wrapping-page .wd-sidebar-opener,
body.lwm-gift-wrapping-page .wd-sidebar {
	display: none !important;
}

.lwm-gift-context-edit {
	display: flex;
	justify-content: flex-start;
	margin: 0 0 18px;
}

.lwm-gift-context-edit .button {
	min-height: 44px;
	padding: 11px 18px;
	border: 1px solid #a90000 !important;
	border-radius: 3px;
	background: #fff !important;
	color: #a90000 !important;
	font-weight: 800;
}

.lwm-gift-context-edit .button:hover,
.lwm-gift-context-edit .button:focus-visible {
	background: #a90000 !important;
	color: #fff !important;
}

.woocommerce-checkout .lwm-gift-checkout-edit {
	justify-content: flex-start;
	margin: 0 0 18px;
}

.lwm-gift-page__header {
	max-width: 760px;
	margin-bottom: 22px;
}

.lwm-gift-page__eyebrow {
	margin: 0 0 4px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--lwm-gift-red);
}

.lwm-gift-page__header h1 {
	margin: 0 0 8px;
	font-size: clamp(30px, 4vw, 46px);
	line-height: 1.08;
}

.lwm-gift-page__header p:last-child {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: #555;
}

.lwm-gift-page__skip-row {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	margin: 18px 0;
}

.lwm-gift-page__skip-row .button,
.lwm-gift-page__summary-actions .button {
	min-height: 46px;
	padding: 12px 20px;
	border-radius: 3px;
	font-weight: 800;
}

.lwm-gift-page__skip {
	border: 1px solid #aaa !important;
	background: #fff !important;
	color: #222 !important;
}

.lwm-gift-page__proceed {
	border-color: var(--lwm-gift-red) !important;
	background: var(--lwm-gift-red) !important;
	color: #fff !important;
}

.lwm-gift-page__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 350px);
	align-items: start;
	gap: 28px;
}

.lwm-gift-page h2 {
	margin: 0 0 14px;
	font-size: 21px;
}

.lwm-gift-product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(120px, 150px) minmax(220px, 300px);
	align-items: center;
	gap: 16px;
	margin-bottom: 12px;
	padding: 14px;
	border: 1px solid var(--lwm-gift-border);
	border-radius: 4px;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.lwm-gift-product.is-selected {
	border-color: var(--lwm-gift-red);
	box-shadow: 0 0 0 2px rgba(169, 0, 0, .1);
	background: #fffafa;
}

.lwm-gift-product__select {
	display: grid;
	grid-template-columns: 22px 70px minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	min-width: 0;
	cursor: pointer;
}

.lwm-gift-product__select input {
	width: 20px;
	height: 20px;
	margin: 0;
}

.lwm-gift-product__image {
	display: grid;
	place-items: center;
	width: 70px;
	height: 86px;
	overflow: hidden;
	border: 1px solid #eee;
	background: #fff;
}

.lwm-gift-product__image img {
	display: block;
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: 84px !important;
	object-fit: contain !important;
}

.lwm-gift-product__name {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 4px;
}

.lwm-gift-product__name strong {
	line-height: 1.35;
}

.lwm-gift-product__name small {
	color: #666;
}

.lwm-gift-product__quantity,
.lwm-gift-product__type {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	font-weight: 700;
}

.lwm-gift-product__quantity select,
.lwm-gift-product__type select,
.lwm-gift-page__card input,
.lwm-gift-page__card textarea {
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	margin: 0;
}

.lwm-gift-product__quantity select:disabled,
.lwm-gift-product__type select:disabled {
	opacity: .55;
}

.lwm-gift-page__card {
	margin-top: 28px;
	padding: 20px;
	border: 1px solid var(--lwm-gift-border);
	border-radius: 4px;
	background: var(--lwm-gift-soft);
}

.lwm-gift-page__card > p {
	margin: -6px 0 16px;
	color: #555;
}

.lwm-gift-page__card label {
	display: grid;
	gap: 6px;
	margin: 0 0 16px;
	font-weight: 700;
}

.lwm-gift-page__card input[type="number"] {
	width: 110px;
}

.lwm-gift-page__summary {
	position: sticky;
	top: 24px;
	padding: 22px;
	border: 1px solid var(--lwm-gift-border);
	border-top: 4px solid var(--lwm-gift-red);
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.lwm-gift-page__summary > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 9px 0;
	border-bottom: 1px solid #eee;
}

.lwm-gift-page__summary strong {
	white-space: nowrap;
}

.lwm-gift-page__summary .lwm-gift-page__grand {
	margin-top: 5px;
	padding-top: 15px;
	border-bottom: 0;
	font-size: 17px;
}

.lwm-gift-page__summary > .lwm-gift-page__summary-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 14px;
	padding: 16px 0 0;
	border-top: 1px solid #eee;
	border-bottom: 0;
}

.lwm-gift-page__back {
	margin: 14px 0 0;
	text-align: right;
}

@media (max-width: 900px) {
	.lwm-gift-page__layout {
		grid-template-columns: 1fr;
	}

	.lwm-gift-page__summary {
		position: static;
		order: -1;
	}
}

@media (max-width: 760px) {
	.lwm-gift-product {
		grid-template-columns: minmax(0, 1fr) minmax(120px, 160px);
	}

	.lwm-gift-product__type {
		grid-column: 1 / -1;
	}
}

@media (max-width: 640px) {
	.lwm-gift-page {
		width: min(100% - 20px, 1180px);
		margin-top: 22px;
	}

	.lwm-gift-page__skip-row .button,
	.lwm-gift-page__summary-actions .button {
		width: auto;
		max-width: 100%;
		white-space: normal;
	}

	.lwm-gift-context-edit .button {
		width: 100%;
		white-space: normal;
	}

	.lwm-gift-product {
		grid-template-columns: 1fr;
		padding: 12px;
	}

	.lwm-gift-product__select {
		grid-template-columns: 22px 58px minmax(0, 1fr);
		gap: 9px;
	}

	.lwm-gift-product__image {
		width: 58px;
		height: 72px;
	}

	.lwm-gift-product__image img {
		max-height: 70px !important;
	}

	.lwm-gift-page__card,
	.lwm-gift-page__summary {
		padding: 16px;
	}
}
