/* Product bundle and basket extras panels */
.tw-product-bundle,
.tw-basket-extras {
	margin: 28px 0;
	padding: 25px;
	border: 1px solid #e1e4df;
	border-radius: 9px;
	background: linear-gradient(145deg, #fff 0%, #f7f6f1 100%);
	box-shadow: 0 10px 28px rgba(26, 33, 34, 0.07);
}

/* Panel headings */
.tw-bundle-heading > span,
.tw-basket-extras__heading > span {
	display: block;
	margin-bottom: 5px;
	color: #d95413;
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.tw-bundle-heading h2,
.tw-basket-extras__heading h2 {
	margin: 0;
	color: #202729;
	font-size: 23px;
	letter-spacing: -0.5px;
}

.tw-bundle-heading p,
.tw-basket-extras__heading p {
	margin: 7px 0 18px;
	color: #6c7475;
	font-size: 13px;
}

/* Product grids and cards */
.tw-bundle-items,
.tw-basket-extras__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.tw-extra-card {
	position: relative;
	display: flex;
	min-width: 0;
	flex-direction: column;
	padding: 11px;
	border: 1px solid #e0e3df;
	border-radius: 7px;
	background: #fff;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.tw-product-bundle .tw-extra-card.is-selected {
	border-color: #2b7c53;
	background: #fbfffc;
	box-shadow: 0 0 0 2px rgba(43, 124, 83, 0.12);
}

.tw-extra-image {
	display: block;
	overflow: hidden;
	border-radius: 5px;
	background: #f1f2ee;
	aspect-ratio: 1 / 1;
}

.tw-extra-image img {
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover;
}

.tw-extra-copy {
	display: flex;
	min-width: 0;
	flex: 1;
	flex-direction: column;
	padding-top: 10px;
}

.tw-extra-copy > a {
	color: #252c2e;
	text-decoration: none;
}

.tw-extra-copy > a:hover {
	color: #d95413;
}

.tw-extra-copy strong {
	font-size: 12px;
	line-height: 1.35;
}

/* Product prices */
.tw-extra-price {
	display: flex;
	flex-wrap: wrap;
	gap: 3px 8px;
	margin-top: auto;
	padding-top: 9px;
}

.tw-extra-price strong {
	font-size: 13px;
}

.tw-extra-price small {
	color: #737b7c;
	font-size: 8px;
	font-weight: 700;
	text-transform: uppercase;
}

.tw-extra-price--inc {
	color: #dd5a17;
}

body.tw-price-inc-primary .tw-extra-price--inc {
	order: -1;
	font-size: 15px;
}

body.tw-price-inc-primary .tw-extra-price--ex {
	color: #6d7576;
	font-size: 11px;
}

/* Optional product checkboxes */
.tw-extra-check {
	position: absolute;
	z-index: 2;
	top: 17px;
	right: 17px;
	cursor: pointer;
}

.tw-extra-check input {
	position: absolute;
	opacity: 0;
}

.tw-extra-check > span:not(.screen-reader-text) {
	display: grid;
	width: 29px;
	height: 29px;
	place-items: center;
	border: 2px solid #aeb6b1;
	border-radius: 5px;
	background: #fff;
	color: transparent;
	font-size: 15px;
	box-shadow: 0 2px 7px rgba(0, 0, 0, 0.1);
	transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.tw-extra-check:hover > span:not(.screen-reader-text) {
	border-color: #2b7c53;
}

.tw-extra-check input:focus-visible + span {
	outline: 3px solid rgba(232, 94, 22, 0.3);
	outline-offset: 2px;
}

.tw-extra-check input:checked + span {
	border-color: #2b7c53;
	background: #2b7c53;
	color: #fff;
	transform: scale(1.04);
}

.tw-bundle-main-label {
	position: absolute;
	z-index: 2;
	top: 17px;
	left: 17px;
	padding: 5px 7px;
	border-radius: 3px;
	background: #253033;
	color: #fff;
	font-size: 8px;
	font-weight: 900;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

/* Bundle totals and buttons */
.tw-bundle-action {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 20px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #dde1dc;
}

.tw-bundle-action > span {
	display: grid;
	text-align: right;
}

.tw-bundle-action small {
	color: #707879;
	font-size: 9px;
	font-weight: 800;
	text-transform: uppercase;
}

.tw-bundle-action strong {
	font-size: 12px;
}

.tw-bundle-action [data-bundle-total-inc] {
	color: #d95413;
}

.tw-bundle-add,
.tw-extra-add {
	min-height: 44px;
	border: 0;
	border-radius: 4px;
	background: linear-gradient(135deg, #f47b36, #e85e16 55%, #cf4c0d);
	color: #fff;
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.45px;
	text-transform: uppercase;
	text-shadow: 0 1px 1px rgba(83, 25, 0, 0.4);
	cursor: pointer;
}

.tw-bundle-add {
	min-width: 210px;
	padding: 0 20px;
}

.tw-extra-add {
	width: 100%;
	margin-top: 10px;
}

.tw-bundle-add:disabled,
.tw-extra-add:disabled {
	opacity: 0.7;
	cursor: wait;
}

/* Basket extras */
.tw-basket-extras {
	clear: both;
	width: 100%;
	max-width: 1600px;
	margin: 34px auto;
}

.tw-basket-extras__grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tw-basket-extras .tw-extra-card {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	grid-template-rows: 1fr auto;
	gap: 0 12px;
}

.tw-basket-extras .tw-extra-image {
	grid-row: 1 / 3;
	width: 72px;
	height: 72px;
}

.tw-basket-extras .tw-extra-copy {
	padding-top: 1px;
}

.tw-basket-extras .tw-extra-add {
	grid-column: 2;
	min-height: 32px;
	margin-top: 7px;
}

/* Tablet layout */
@media (max-width: 900px) {
	.tw-bundle-items,
	.tw-basket-extras__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Mobile layout */
@media (max-width: 600px) {
	.tw-product-bundle,
	.tw-basket-extras {
		margin: 22px 0;
		padding: 18px 14px;
	}

	.tw-bundle-heading h2,
	.tw-basket-extras__heading h2 {
		font-size: 20px;
	}

	.tw-bundle-items {
		display: flex;
		margin-inline: -14px;
		padding: 0 14px 5px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
	}

	.tw-bundle-items .tw-extra-card {
		min-width: 158px;
		scroll-snap-align: start;
	}

	.tw-bundle-action {
		align-items: stretch;
		flex-direction: column;
		gap: 10px;
	}

	.tw-bundle-action > span {
		text-align: left;
	}

	.tw-bundle-add {
		width: 100%;
	}

	.tw-basket-extras__grid {
		grid-template-columns: 1fr;
	}

	.tw-basket-extras .tw-extra-card {
		grid-template-columns: 64px minmax(0, 1fr);
	}

	.tw-basket-extras .tw-extra-image {
		width: 64px;
		height: 64px;
	}
}
