/* Gone West coffee product page (Avada layout "Coffee Product Page").
   Shared section components (buttons, bands, cards...) live in mu-plugins/gonewest-site/site.css. */

/* Hero */
.gw-coffee-page .gw-hero-title h1,
.gw-coffee-page .gw-hero-title .fusion-title-heading {
	line-height: 1.05 !important;
}
.gw-coffee-page .gw-lede {
	margin: 0 0 18px;
}
.gw-coffee-page .gw-impact-callout {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin: 0 0 8px;
	padding: 14px 18px;
	border: 1px solid #e1e7b3;
	border-radius: 16px;
	background: linear-gradient(135deg, #f3f6dc, #fbfcf3);
	font-size: 16px;
	line-height: 1.5;
	color: var(--gw-ink);
}
.gw-coffee-page .gw-impact-callout i {
	margin-top: 3px;
	font-size: 20px;
	color: var(--gw-lime-dark);
}

/* Gallery: the main image framed on cream, thumbnails in one even row */
.gw-coffee-page .woocommerce-product-gallery .flex-viewport,
.gw-coffee-page .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__wrapper {
	border-radius: 26px;
	overflow: hidden;
	background: var(--gw-cream);
}
.gw-coffee-page .woocommerce-product-gallery__image img {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}
/* The slides carry the cream so the cut-out below can blend into it (the slider's
   transform isolates blending from anything further out). */
.gw-coffee-page .woocommerce-product-gallery__image,
.gw-coffee-page .woocommerce-product-gallery .flex-control-thumbs li {
	background: var(--gw-cream) !important;
}
.gw-coffee-page .woocommerce-product-gallery .flex-control-thumbs li {
	border-radius: 14px;
	overflow: hidden;
}
/* Product cut-outs (PNG on white) sit on the cream instead of a white box */
.gw-coffee-page .woocommerce-product-gallery__image img[src*=".png"] {
	padding: 8%;
	box-sizing: border-box;
	object-fit: contain;
	mix-blend-mode: multiply;
}
.gw-coffee-page .woocommerce-product-gallery .flex-control-thumbs {
	display: grid !important;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	gap: 10px;
	margin: 14px 0 0 !important;
	padding: 0 !important;
}
.gw-coffee-page .woocommerce-product-gallery .flex-control-thumbs li {
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	list-style: none;
}
.gw-coffee-page .woocommerce-product-gallery .flex-control-thumbs img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	border: 2px solid transparent;
	border-radius: 14px;
	background: var(--gw-cream);
	object-fit: cover;
	opacity: 0.7 !important;
	cursor: pointer;
	transition: opacity 0.15s, border-color 0.15s;
}
.gw-coffee-page .woocommerce-product-gallery .flex-control-thumbs img[src*=".png"] {
	padding: 6%;
	box-sizing: border-box;
	object-fit: contain;
	mix-blend-mode: multiply;
}
.gw-coffee-page .woocommerce-product-gallery .flex-control-thumbs img:hover,
.gw-coffee-page .woocommerce-product-gallery .flex-control-thumbs img.flex-active {
	border-color: var(--gw-lime-dark);
	opacity: 1 !important;
}

/* Size and grind buttons (the selects stay in the form, hidden). Scoped to
   .gw-has-buttons, which the script adds, so the dropdowns stay usable without JS. */
.gw-coffee-page form.gw-has-buttons table.variations select,
.gw-coffee-page form.gw-has-buttons table.variations .avada-select-parent {
	display: none !important;
}
.gw-coffee-page form.gw-has-buttons table.variations,
.gw-coffee-page form.gw-has-buttons table.variations tbody {
	display: flex !important;
	flex-direction: column;
	width: 100%;
}
.gw-coffee-page form.gw-has-buttons table.variations tr,
.gw-coffee-page form.gw-has-buttons table.variations td.value {
	width: 100% !important;
}
.gw-coffee-page form.gw-has-buttons table.variations th.label {
	padding-bottom: 2px;
}
.gw-coffee-page form.variations_form table.variations th.label label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gw-ink);
}
.gw-coffee-page .gw-opts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.gw-coffee-page .gw-opt {
	flex: 1 1 0;
	min-width: 92px;
	padding: 12px 10px;
	border: 2px solid #e2e2e2;
	border-radius: 14px;
	background: #fff;
	color: var(--gw-ink);
	font: inherit;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.gw-coffee-page .gw-opt strong {
	display: block;
	font-size: 17px;
}
.gw-coffee-page .gw-opt small {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	color: var(--gw-lime-dark);
}
.gw-coffee-page .gw-opt:hover {
	border-color: #cfd68b;
}
.gw-coffee-page .gw-opt[aria-pressed="true"] {
	border-color: var(--gw-lime-dark);
	background: #fbfcf1;
	box-shadow: 0 0 0 3px rgba(178, 191, 38, 0.22);
}
.gw-coffee-page .gw-opt:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.gw-coffee-page .gw-opt:focus-visible {
	outline: 3px solid var(--gw-ink);
	outline-offset: 2px;
}
.gw-coffee-page form.variations_form .reset_variations,
.gw-coffee-page form.variations_form .woocommerce-variation-price,
.gw-coffee-page form.variations_form .woocommerce-variation-availability .in-stock {
	display: none !important;
}

/* Purchase options from WPSubscription */
.gw-coffee-page .subscrpt-buybox {
	max-width: none;
	margin: 18px 0 16px;
}
.gw-coffee-page .subscrpt-buybox__term-saving {
	display: none;
}
.gw-coffee-page .subscrpt-buybox__card.is-selected {
	background: #fafbef;
}

/* Quantity and add to cart on one row (Avada wraps both in .fusion-button-wrapper) */
.gw-coffee-page form.cart .woocommerce-variation.single_variation {
	margin: 0;
}
.gw-coffee-page form.cart .fusion-button-wrapper {
	flex-direction: row !important;
	flex-wrap: wrap;
	gap: 12px;
	align-items: stretch !important;
}
.gw-coffee-page form.cart .fusion-button-wrapper > :not(.quantity):not(.single_add_to_cart_button) {
	flex-basis: 100%;
}
.gw-coffee-page form.cart .quantity {
	display: inline-flex;
	align-items: stretch;
	height: 58px;
	margin: 0 !important;
	border: 2px solid #e2e2e2 !important;
	border-radius: 14px;
	overflow: hidden;
}
.gw-coffee-page form.cart .quantity .minus,
.gw-coffee-page form.cart .quantity .plus {
	width: 42px;
	height: auto !important;
	border: 0 !important;
	background: #fff !important;
	color: var(--gw-ink);
	font-size: 18px;
}
.gw-coffee-page form.cart .quantity .qty {
	width: 46px;
	height: auto !important;
	border: 0 !important;
	text-align: center;
}
.gw-coffee-page form.cart .single_add_to_cart_button {
	flex: 1 1 200px;
	width: auto !important;
	min-height: 58px;
	margin: 0 !important;
	border-radius: 14px !important;
	font-size: 19px !important;
}

/* Tasting and origin copy columns */
.gw-coffee-page .gw-taste-copy > .fusion-column-wrapper,
.gw-coffee-page .gw-origin-copy > .fusion-column-wrapper {
	padding-left: 4% !important;
}
.gw-coffee-page .gw-faq-col .gw-section-title {
	margin-bottom: 36px;
}

/* Mobile buy bar */
.gw-buybar {
	position: fixed;
	right: 12px;
	bottom: 12px;
	left: 12px;
	z-index: 9990;
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	padding: 10px 10px 10px 16px;
	border-radius: 16px;
	background: #212934;
	color: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
	visibility: hidden;
	transform: translateY(140%);
	transition: transform 0.25s ease, visibility 0s linear 0.25s;
}
.gw-buybar.is-visible {
	visibility: visible;
	transform: none;
	transition: transform 0.25s ease;
}
.gw-buybar__text {
	font-size: 13px;
	line-height: 1.25;
}
.gw-buybar__text strong {
	display: block;
	font-size: 16px;
}
.gw-buybar__btn {
	padding: 12px 18px;
	border-radius: 12px;
	background: #b2bf26;
	color: #212934 !important;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

@media (min-width: 1025px) {
	.gw-buybar {
		display: none;
	}
}

@media (max-width: 1024px) {
	.gw-coffee-page .gw-taste-copy > .fusion-column-wrapper,
	.gw-coffee-page .gw-origin-copy > .fusion-column-wrapper {
		padding-left: 0 !important;
	}
}

@media (max-width: 640px) {
	.gw-coffee-page .gw-opt {
		min-width: 0;
		padding: 10px 6px;
	}
	.gw-coffee-page .gw-opt strong {
		font-size: 15px;
	}
	.gw-coffee-page .gw-opt small {
		font-size: 12px;
	}
	.gw-coffee-page .woocommerce-product-gallery .flex-control-thumbs {
		gap: 8px;
	}
	.gw-coffee-page .woocommerce-product-gallery .flex-control-thumbs img {
		border-radius: 10px;
	}
	/* Keep the page footer clear of the buy bar */
	.gw-coffee-page #wrapper {
		padding-bottom: 76px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gw-buybar,
	.gw-coffee-page .gw-opt {
		transition: none;
	}
}

/* Stacked hero on tablets: keep the gallery a comfortable size, centred */
@media (max-width: 900px) {
	.gw-coffee-page .gw-hero-media .woocommerce-product-gallery {
		max-width: 560px;
		margin-left: auto !important;
		margin-right: auto !important;
	}
}
