/* Gene's Grinders – Cart Pairings
 *
 * Colours follow the site's Fast Cart styling (orange #e67e22, text #484848).
 * Several rules carry !important because the Hello Elementor child theme
 * styles every <button>/.button orange with a border. */

/* When rendered inside the cart table (wfc_cart_contents) the blocks live in
 * their own row; display:block + contain keeps the table's auto layout from
 * widening to our max-content width. */
tr.gg-block-row {
	display: block;
	width: 100%;
	contain: inline-size;
}

tr.gg-block-row > td {
	display: block;
	width: 100%;
	padding: 0 !important;
	border: 0 !important;
}

.gg-pairings-wrap {
	display: block;
	width: 100%;
	contain: inline-size;
}

/* ---- Pairings section --------------------------------------------------- */

.gg-pairs {
	margin: 10px 0 14px;
	padding-top: 18px;
	border-top: 1px solid #e9e9e9;
}

.gg-pairs__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.gg-pairs__title {
	font-size: 18px;
	font-weight: 700;
	color: #484848;
	margin: 0 !important;
	line-height: 1.3;
}

.gg-pairs__sub {
	font-size: 13px;
	color: #8a8a8a;
	margin: 2px 0 8px !important;
	line-height: 1.3;
}

.gg-pairs__nav {
	display: flex;
	gap: 4px;
	flex: 0 0 auto;
}

.gg-pairs__nav[hidden],
.gg-pairs__dots[hidden] {
	display: none;
}

.gg-pairs__arrow {
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0 !important;
	border-radius: 50%;
	background: transparent !important;
	box-shadow: none !important;
	color: #484848 !important;
	padding: 0 !important;
	cursor: pointer;
}

.gg-pairs__arrow:hover {
	background: #f2f2f2 !important;
}

.gg-pairs__arrow:disabled {
	color: #c8c8c8 !important;
	background: transparent !important;
	cursor: default;
}

.gg-pairs__arrow:focus:not(:focus-visible) {
	outline: none;
}

.gg-pairs__arrow svg {
	width: 18px;
	height: 18px;
	display: block;
}

.gg-pairs__viewport {
	overflow: hidden;
}

.gg-pairs__track {
	display: flex;
	transition: transform 0.3s ease;
}

.gg-pairs__page {
	flex: 0 0 100%;
	min-width: 0;
}

.gg-pairs__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gg-pairs__item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f0;
}

.gg-pairs__item:last-child {
	border-bottom: 0;
}

.gg-pairs__thumb-link {
	flex: 0 0 64px;
	line-height: 0;
}

.gg-pairs__thumb {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 6px;
	background: #f4f4f4;
}

.gg-pairs__info {
	flex: 1 1 auto;
	min-width: 0;
}

.gg-pairs__name {
	font-size: 16px;
	font-weight: 700;
	color: #555;
	line-height: 1.25;
	margin: 0 0 3px !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gg-pairs__meta,
.gg-pairs__price {
	font-size: 14px;
	color: #7a7a7a;
	margin: 0 !important;
	line-height: 1.3;
}

.gg-pairs__meta {
	display: flex;
	flex-wrap: wrap; /* at 375px the swap link drops under the price instead of clipping */
	align-items: baseline;
	gap: 2px 10px;
	min-width: 0;
}

/* ---- Rotating rows (a category the generic product expands into) ------ */

.gg-pairs__item--group {
	display: block;
}

.gg-pairs__member {
	display: flex;
	align-items: center;
	gap: 14px;
}

.gg-pairs__member[hidden] {
	display: none;
}

.gg-pairs__member.is-swapped {
	animation: gg-pairs-swap 0.22s ease;
}

@keyframes gg-pairs-swap {
	from {
		opacity: 0;
		transform: translateX(8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.gg-pairs__swap,
.gg-pairs__swap.button {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0;
	height: auto !important;
	line-height: 1.3 !important;
	font-size: 13px;
	font-weight: 600;
	color: #e67e22 !important;
	white-space: nowrap;
	cursor: pointer;
	text-decoration: none;
}

.gg-pairs__swap:hover {
	color: #d0701c !important;
	text-decoration: underline;
}

.gg-pairs__swap:focus:not(:focus-visible) {
	outline: none;
}

.gg-pairs__swap svg {
	width: 12px;
	height: 12px;
	display: block;
	flex: 0 0 auto;
}

.gg-pairs__price del {
	opacity: 0.6;
	margin-right: 4px;
}

.gg-pairs__add,
.gg-pairs__add.button {
	flex: 0 0 auto;
	display: inline-block;
	background: #e67e22 !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 3px;
	font-size: 14px;
	font-weight: 600;
	line-height: 38px !important;
	height: 38px;
	padding: 0 20px !important;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s;
}

.gg-pairs__add:hover {
	background: #d0701c !important;
}

.gg-pairs__add.loading {
	opacity: 0.7;
	pointer-events: none;
}

.gg-pairs__add.added {
	background: #3c9a5f !important;
}

/* WooCommerce appends a "View cart" link after an AJAX add; we don't want it here. */
.gg-pairs__item .added_to_cart {
	display: none;
}

.gg-pairs__dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 8px;
}

.gg-pairs__dot {
	width: 26px;
	height: 3px;
	border-radius: 2px;
	border: 0 !important;
	padding: 0 !important;
	box-shadow: none !important;
	background: #dcdcdc !important;
	cursor: pointer;
	transition: background 0.2s, width 0.2s;
}

.gg-pairs__dot.is-active {
	background: #484848 !important;
	width: 40px;
}

.gg-pairs__dot:focus:not(:focus-visible) {
	outline: none;
}

/* ---- Fast Cart reset override ------------------------------------------- */
/* Fast Cart ships `.wc-fast-cart * { width: unset; max-width: none; }` in
 * wc-fast-cart.css, which loads after this file and beats equal-specificity
 * rules (verified on staging 2026-09-10: thumbnails rendered at their 300px
 * attribute width). Geometry-critical rules are repeated id-scoped here so
 * they win regardless of stylesheet order. */

#wc-fast-cart .gg-pairs__thumb {
	width: 64px !important;
	height: 64px !important;
	max-width: 64px !important;
	object-fit: cover !important;
}

#wc-fast-cart .gg-pairs__thumb-link {
	flex: 0 0 64px !important;
	width: 64px !important;
}

#wc-fast-cart .gg-pairs__item {
	display: flex !important;
	align-items: center !important;
}

#wc-fast-cart .gg-pairs__item--group {
	display: block !important;
}

#wc-fast-cart .gg-pairs__member {
	display: flex !important;
	align-items: center !important;
}

#wc-fast-cart .gg-pairs__member[hidden] {
	display: none !important;
}

#wc-fast-cart .gg-pairs__swap {
	width: auto !important;
	padding: 0 !important;
	background: none !important;
}

#wc-fast-cart .gg-pairs__info {
	flex: 1 1 auto !important;
	min-width: 0 !important;
}

#wc-fast-cart .gg-pairs__add {
	flex: 0 0 auto !important;
	width: auto !important;
}

#wc-fast-cart .gg-pairs__track {
	display: flex !important;
}

#wc-fast-cart .gg-pairs__page {
	flex: 0 0 100% !important;
	min-width: 0 !important;
}

/* ---- Promo block -------------------------------------------------------- */

.gg-promo {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: #fbf4ec;
	border-radius: 6px;
	padding: 12px 14px;
	margin: 0 0 16px;
}

.gg-promo__icon {
	font-size: 22px;
	line-height: 1;
	flex: 0 0 auto;
	margin-top: 1px;
}

.gg-promo__title {
	font-size: 14px;
	font-weight: 700;
	color: #484848;
	margin: 0 0 2px !important;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.gg-promo__text {
	font-size: 13px;
	color: #6a6a6a;
	margin: 0 !important;
	line-height: 1.4;
}
