/* Hand-Iced Biscuits page (0.28.0; Tom's "Hand Iced Biscuits Product Page Feedback 10.11.26"). Square corners throughout. */

/* ---------- Photo column: the page's own photo, then the biscuit last chosen; no thumbnails ---------- */

.twg-bpk-hidden {
	display: none !important;
}

.twg-bpk-hero {
	position: relative;
	margin: 0 0 22px;
	padding: 0;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: #fff;
	border-radius: 0;
}

.twg-bpk-hero img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none !important;
	object-fit: contain;
	border-radius: 0;
}

/* ---------- The theme's own choice, quantity and totals stand down: the tiles carry them ---------- */

body.twg-biscuit-page.twg-bpk-on form.variations_form table.variations,
body.twg-biscuit-page.twg-bpk-on form.variations_form .swatch-container-c,
body.twg-biscuit-page.twg-bpk-on form.variations_form .reset_variations,
body.twg-biscuit-page.twg-bpk-on form.variations_form .single_variation,
body.twg-biscuit-page.twg-bpk-on form.variations_form .quantity,
body.twg-biscuit-page.twg-bpk-on form.variations_form #wapo-total-price-table {
	display: none !important;
}

/* The same from the first paint, before the script has run (0.28.3; the class is set in the head and comes off again
   if the tiles never appear), so the old drop-down and gallery do not flash while the page loads. */
html.twg-bpk-js body.twg-biscuit-page form.variations_form table.variations,
html.twg-bpk-js body.twg-biscuit-page form.variations_form .swatch-container-c,
html.twg-bpk-js body.twg-biscuit-page form.variations_form .reset_variations,
html.twg-bpk-js body.twg-biscuit-page form.variations_form .quantity,
html.twg-bpk-js body.twg-biscuit-page form.variations_form #wapo-total-price-table,
html.twg-bpk-js body.twg-biscuit-page .product-layout-image,
html.twg-bpk-js body.twg-biscuit-page:not(.twg-bpk-ready) #yith-wapo-container {
	display: none !important;
}

/* The gift wrap block waits for a first biscuit, and its note fields for "Yes please" (as on the type pages). */
body.twg-biscuit-page.twg-bpk-on:not(.twg-bpk-ready) #yith-wapo-container {
	display: none !important;
}

body.twg-biscuit-page #yith-wapo-container:has(#yith-wapo-1-0:not(:checked)) #yith-wapo-addon-2,
body.twg-biscuit-page #yith-wapo-container:has(#yith-wapo-1-0:not(:checked)) #yith-wapo-addon-3 {
	display: none !important;
}

/* ---------- Tiles: the site's approved button style ----------
   As the type pages' option buttons (Biscuit Box, A5, Cartons, Selection Boxes): white, 1px #111, the two-layer shadow,
   50px tall, black fill with white bold text when chosen; heading as their "What Type?". The count and the minus on a
   chosen tile are the Pick and Mix samples picker's (22px boxes), and the hover is its pale Twist blue. */

.twg-bpk {
	margin: 0 0 18px;
	font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
	color: #111;
}

.twg-bpk * {
	border-radius: 0 !important;
	box-sizing: border-box;
}

.twg-bpk__label {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: #3a3a3a;
}

.twg-bpk__help {
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.45;
	color: #111;
}

.twg-bpk__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.twg-bpk__tile {
	display: flex;
	flex-direction: column;
	min-height: 50px;
	border: 1px solid #111;
	background: #fff;
	box-shadow: rgba(0, 0, 0, 0.18) 0 1px 0 0, rgba(0, 0, 0, 0.1) 0 6px 14px 0;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.twg-bpk__tile:hover {
	background: #e3f1fb;
}

.twg-bpk__tile.is-chosen,
.twg-bpk__tile.is-chosen:hover {
	background: #111;
}

/* The three original designs keep a row of their own under the Christmas designs. */
.twg-bpk__tile--row {
	grid-column-start: 1;
}

.twg-bpk .twg-bpk__pick {
	flex: 1 1 auto;
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 10px 8px;
	border: 0;
	background: transparent;
	box-shadow: none;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	text-align: center;
	color: #111;
	cursor: pointer;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-appearance: none;
	appearance: none;
}

.twg-bpk .twg-bpk__pick:hover,
.twg-bpk .twg-bpk__pick:focus {
	background: transparent;
	color: #111;
}

.twg-bpk__tile.is-chosen .twg-bpk__pick,
.twg-bpk__tile.is-chosen .twg-bpk__pick:hover,
.twg-bpk__tile.is-chosen .twg-bpk__pick:focus {
	min-height: 40px;
	padding-bottom: 4px;
	font-weight: 700;
	color: #fff;
}

.twg-bpk .twg-bpk__pick:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

.twg-bpk__tile.is-chosen .twg-bpk__pick:focus-visible,
.twg-bpk .twg-bpk__less:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -4px;
}

.twg-bpk__tools {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 0 8px 10px;
}

.twg-bpk__tools[hidden] {
	display: none !important;
}

/* Count: the samples picker's badge. */
.twg-bpk__count {
	display: inline-block;
	min-width: 22px;
	height: 22px;
	margin: 0;
	padding: 0 6px;
	border: 1px solid #111;
	background: #fff;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	color: #111;
}

/* Minus: the samples picker's. */
.twg-bpk .twg-bpk__less {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid #fff;
	background: transparent;
	box-shadow: none;
	font-family: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 20px;
	color: #fff;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.twg-bpk .twg-bpk__less:hover,
.twg-bpk .twg-bpk__less:focus {
	background: #fff;
	color: #111;
}

.twg-bpk__summary {
	min-height: 22px;
	margin: 14px 0 0;
	font-size: 15px;
	line-height: 22px;
	color: #111;
}

.twg-bpk__summary.is-warning {
	font-weight: 700;
	color: #a4281b;
}

.twg-bpk__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Add to basket and the offer beside it (as on the type pages) ---------- */

body.twg-biscuit-page form.cart .single_add_to_cart_button {
	display: inline-block !important;
	vertical-align: middle;
}

body.twg-biscuit-page.twg-bpk-on:not(.twg-bpk-ready) form.cart .single_add_to_cart_button {
	opacity: 0.45;
}

body.twg-biscuit-page .twg-offer-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	margin: 0 0 0 10px;
	padding: 0 18px;
	border: 2px solid #4dbbe6;
	border-radius: 0;
	background: #eff8fc;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.14em;
	color: #111610;
	vertical-align: middle;
	white-space: nowrap;
}

/* ---------- Description stays; Additional information, Reviews and Related Products go ---------- */

body.twg-biscuit-page .woocommerce-tabs li.additional_information_tab,
body.twg-biscuit-page .woocommerce-tabs li.reviews_tab,
body.twg-biscuit-page #tab-additional_information,
body.twg-biscuit-page #tab-reviews,
body.twg-biscuit-page .elementor-widget-porto_cp_linked,
body.twg-biscuit-page section.related,
body.twg-biscuit-page section.up-sells {
	display: none !important;
}

@media (max-width: 767px) {
	.twg-bpk__grid {
		gap: 8px;
	}

	.twg-bpk .twg-bpk__pick {
		padding: 10px 4px;
		font-size: 14px;
	}

	.twg-bpk__label {
		font-size: 18px;
	}

	body.twg-biscuit-page .twg-offer-badge {
		height: 44px;
		margin: 8px 0 0;
	}
}
