/* The shop header is white and transparent so it can sit on dark heroes.
   This page is light, so paint the same solid bar used after scrolling. */
.mtg-bundle-page .whb-overcontent:not(.whb-sticked) .whb-row.whb-color-light.whb-without-bg {
	background-color: #212121;
}

.mtg-bundle {
	--mtg-gold: var(--wd-primary-color, #c9a24d);
	--mtg-ink: #1c1b19;
	--mtg-muted: #6e685f;
	--mtg-line: #e3ddd3;
	--mtg-paper: #f7f4ef;
	--mtg-soft: #fbfaf7;
	color: var(--mtg-ink);
	font-family: var(--wd-text-font, "Didact Gothic", Arial, sans-serif);
	/* Header overlays the page. Keep the title below the solid bar. */
	padding: calc(var(--wd-header-h, 135px) + 28px) 0 64px;
}

@media (max-width: 1024px) {
	.mtg-bundle {
		padding-top: calc(var(--wd-header-sm-h, 60px) + 20px);
	}
}

.mtg-bundle * {
	box-sizing: border-box;
}

.mtg-hero {
	max-width: 760px;
	margin: 0 auto 36px;
	text-align: center;
}

.mtg-kicker {
	margin: 0 0 10px;
	color: var(--mtg-gold);
	font-size: 13px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.mtg-bundle h1 {
	margin: 0 0 18px;
	color: var(--mtg-ink);
	font-family: var(--wd-title-font, inherit);
	font-size: clamp(34px, 5vw, 54px);
	font-weight: 400;
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.mtg-intro {
	color: #3c3832;
	font-size: 18px;
	line-height: 1.55;
}

.mtg-intro p {
	margin: 0 0 12px;
}

.mtg-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	gap: 28px;
	align-items: start;
}

.mtg-tools {
	display: flex;
	align-items: stretch;
	margin-bottom: 14px;
	border: 1px solid var(--mtg-line);
	background: #fff;
}

.mtg-bundle input[type="search"],
.mtg-bundle input[type="number"],
.mtg-bundle select {
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--mtg-line);
	border-radius: 0;
	background: #fff;
	color: var(--mtg-ink);
	font: inherit;
	font-size: 16px;
	box-shadow: none;
}

.mtg-bundle input:focus,
.mtg-bundle select:focus {
	border-color: var(--mtg-gold);
	outline: 2px solid transparent;
	box-shadow: 0 0 0 3px rgba(201, 162, 77, 0.25);
}

/* Theme form styles give the select a shorter box and a different border.
   Draw search and category as one bar so the edges meet. */
.mtg-bundle .mtg-tools input[type="search"],
.mtg-bundle .mtg-tools select {
	height: 48px;
	min-height: 48px;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-sizing: border-box;
	box-shadow: none;
	background-color: transparent;
	color: var(--mtg-ink);
	font-family: inherit;
	font-size: 16px;
	line-height: 48px;
	appearance: none;
	-webkit-appearance: none;
}

.mtg-bundle .mtg-tools input[type="search"] {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	padding: 0 16px;
}

.mtg-bundle .mtg-tools select {
	flex: 0 0 240px;
	width: 240px;
	max-width: 42%;
	padding: 0 36px 0 16px;
	border-left: 1px solid var(--mtg-line);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%231c1b19' stroke-width='1.5' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px 8px;
	cursor: pointer;
}

.mtg-bundle .mtg-tools input[type="search"]:focus,
.mtg-bundle .mtg-tools select:focus {
	outline: none;
	box-shadow: inset 0 0 0 1px var(--mtg-gold);
}

.mtg-meta-line {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 10px;
	color: var(--mtg-muted);
	font-size: 14px;
}

.mtg-results {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--mtg-line);
}

.mtg-book {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	gap: 16px;
	align-items: center;
	padding: 16px 8px;
	border-bottom: 1px solid var(--mtg-line);
}

.mtg-book.is-selected {
	background: var(--mtg-soft);
	box-shadow: inset 3px 0 0 var(--mtg-gold);
}

.mtg-book h2 {
	margin: 0 0 4px;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.35;
}

.mtg-en {
	margin: 0 0 4px;
	color: var(--mtg-muted);
	font-size: 14px;
}

.mtg-by {
	margin: 0;
	color: var(--mtg-muted);
	font-size: 13px;
}

.mtg-price {
	min-width: 84px;
	text-align: right;
}

.mtg-price strong {
	display: block;
	font-size: 16px;
	font-weight: 400;
}

.mtg-price span {
	color: var(--mtg-muted);
	font-size: 12px;
}

.mtg-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--mtg-line);
	background: #fff;
}

.mtg-stepper button {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--mtg-ink);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.mtg-stepper button:hover {
	background: var(--mtg-paper);
}

.mtg-stepper input {
	width: 46px;
	height: 36px;
	padding: 0;
	border: 0;
	border-left: 1px solid var(--mtg-line);
	border-right: 1px solid var(--mtg-line);
	text-align: center;
	box-shadow: none;
}

.mtg-more,
.mtg-add,
.mtg-clear,
.mtg-close,
.mtg-mobile-bar button {
	font-family: inherit;
	cursor: pointer;
}

.mtg-more {
	margin-top: 14px;
	padding: 12px 18px;
	border: 1px solid var(--mtg-ink);
	background: transparent;
	color: var(--mtg-ink);
}

.mtg-empty {
	padding: 28px 8px;
	color: var(--mtg-muted);
}

.mtg-panel {
	position: sticky;
	top: calc(var(--wd-header-h, 135px) + 16px);
	padding: 20px;
	background: var(--mtg-paper);
	border: 1px solid var(--mtg-line);
}

.mtg-panel h2 {
	margin: 0 0 12px;
	font-size: 22px;
	font-weight: 400;
}

.mtg-progress {
	height: 4px;
	margin: 10px 0;
	background: #e7e1d6;
}

.mtg-progress span {
	display: block;
	height: 100%;
	background: var(--mtg-gold);
}

.mtg-need {
	min-height: 2.6em;
	margin: 0 0 12px;
	color: var(--mtg-muted);
	font-size: 14px;
}

.mtg-picked {
	max-height: 320px;
	margin: 0 0 14px;
	padding: 0;
	overflow: auto;
	list-style: none;
}

.mtg-picked li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	gap: 8px;
	align-items: start;
	padding: 8px 0;
	border-top: 1px solid var(--mtg-line);
	font-size: 13px;
	line-height: 1.35;
}

.mtg-picked button {
	border: 0;
	background: transparent;
	color: var(--mtg-muted);
	cursor: pointer;
	text-decoration: underline;
}

.mtg-totals {
	display: grid;
	gap: 6px;
	margin: 0 0 8px;
	padding-top: 8px;
	border-top: 1px solid var(--mtg-line);
}

.mtg-totals div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.mtg-totals strong {
	font-weight: 400;
}

.mtg-ship-note {
	margin: 0 0 14px;
	color: var(--mtg-muted);
	font-size: 13px;
	line-height: 1.4;
}

.mtg-add,
.mtg-mobile-bar button {
	width: 100%;
	min-height: 48px;
	padding: 12px 16px;
	border: 0;
	background: #1c1b19;
	color: #fff;
	font-size: 15px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.mtg-add:hover:not(:disabled),
.mtg-mobile-bar button:hover {
	background: #34322d;
}

.mtg-add:disabled {
	background: #d9d3c8;
	color: #6e685f;
	cursor: not-allowed;
}

.mtg-clear {
	display: inline-block;
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--mtg-muted);
	text-decoration: underline;
}

.mtg-error {
	margin: 0 0 10px;
	color: #8a2a2a;
	font-size: 14px;
}

.mtg-bundle .mtg-mobile-bar,
.mtg-bundle .mtg-close {
	display: none;
}

.mtg-bundle-qty {
	display: none;
}

.mtg-cart-books {
	margin-top: 6px;
}

.mtg-cart-books summary {
	cursor: pointer;
}

.mtg-cart-books ul {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.mtg-cart-books li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 3px 0;
	font-size: 13px;
	line-height: 1.4;
}

@media (max-width: 900px) {
	.mtg-layout {
		grid-template-columns: 1fr;
	}

	.mtg-tools {
		flex-direction: column;
		gap: 10px;
		border: 0;
		background: transparent;
	}

	.mtg-bundle .mtg-tools input[type="search"],
	.mtg-bundle .mtg-tools select {
		width: 100%;
		max-width: none;
		flex: none;
		border: 1px solid var(--mtg-line);
		background-color: #fff;
	}

	.mtg-bundle .mtg-tools select {
		border-left: 1px solid var(--mtg-line);
	}

	.mtg-book {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas:
			"title price"
			"step step";
		gap: 12px;
		padding: 14px 0;
	}

	.mtg-book h2 {
		font-size: 16px;
	}

	.mtg-stepper button,
	.mtg-stepper input {
		height: 44px;
	}

	.mtg-book .mtg-copy { grid-area: title; }
	.mtg-book .mtg-price { grid-area: price; }
	.mtg-book .mtg-stepper { grid-area: step; justify-self: start; }

	.mtg-panel {
		display: none;
		position: fixed;
		z-index: 100001;
		right: 0;
		bottom: 0;
		left: 0;
		top: auto;
		max-height: 86vh;
		overflow: auto;
		border-width: 1px 0 0;
	}

	.mtg-panel.is-open {
		display: block;
	}

	.mtg-bundle .mtg-close {
		display: inline-block;
		float: right;
		padding: 0;
		border: 0;
		background: transparent;
		color: var(--mtg-muted);
		text-decoration: underline;
	}

	.mtg-bundle .mtg-mobile-bar {
		display: flex;
		position: fixed;
		z-index: 100000;
		right: 0;
		bottom: 0;
		left: 0;
		gap: 12px;
		align-items: center;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
		background: #fff;
		border-top: 1px solid var(--mtg-line);
		box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
	}

	.mtg-mobile-bar p {
		flex: 1;
		margin: 0;
		font-size: 14px;
	}

	.mtg-mobile-bar button {
		width: auto;
		min-width: 150px;
	}

	.mtg-bundle-page {
		padding-bottom: 84px;
	}
}
