/**
 * Single product gallery — main image + horizontal thumbs (desktop), swipe carousel (mobile).
 */

/* WooCommerce PhotoSwipe: hidden unless opened (CSS is dequeued on PDP) */
#photoswipe-fullscreen-dialog.pswp,
.pswp[aria-hidden="true"] {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Product hero: gallery + summary side by side (replaces WC float layout) */
body.store-product-page .woocommerce div.product {
	--store-pdp-gallery-max: 460px;
	--store-pdp-column-gap: 24px;
	--store-pdp-gallery-scale: 1;
	display: grid;
	grid-template-columns: minmax(0, var(--store-pdp-gallery-max)) minmax(0, 1fr);
	grid-template-areas:
		"gallery summary";
	grid-template-rows: auto;
	column-gap: var(--store-pdp-column-gap);
	row-gap: 28px;
	align-items: start;
}

@media (min-width: 1200px) {
	body.store-product-page .woocommerce div.product {
		--store-pdp-gallery-max: 500px;
		--store-pdp-column-gap: 28px;
	}
}

@media (min-width: 1400px) {
	body.store-product-page .woocommerce div.product {
		--store-pdp-gallery-max: 520px;
	}
}

body.store-product-page .woocommerce div.product::before,
body.store-product-page .woocommerce div.product::after {
	content: none;
	display: none;
}

body.store-product-page .woocommerce div.product > .woocommerce-product-gallery {
	grid-column: 1 / -1;
	width: 100%;
	min-width: 0;
}

body.store-product-page .woocommerce div.product div.images {
	grid-area: gallery;
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

body.store-product-page .woocommerce div.product div.summary {
	grid-area: summary;
	align-self: start;
}

body.store-product-page .woocommerce div.product > .onsale {
	grid-area: gallery;
	z-index: 25;
	margin: 14px 0 0 14px;
	justify-self: start;
	align-self: start;
	width: max-content;
}

body.store-product-page .woocommerce div.product div.images,
body.store-product-page .woocommerce div.product div.summary {
	float: none;
	width: 100%;
	max-width: none;
	margin: 0;
	min-width: 0;
}

body.store-product-page .woocommerce div.product div.summary {
	clear: none;
}

body.store-product-page .woocommerce-product-gallery {
	display: none !important;
}

body.store-product-page .store-product-gallery-wrap,
body.store-product-page .product-gallery-card {
	display: block;
	width: 100%;
	min-width: 0;
}

body.store-product-page .product-gallery-card {
	display: grid;
	gap: 12px;
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

@media (min-width: 901px) {
	body.store-product-page .product-gallery-card {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
	}
}

/* Mobile carousel */
.pdp-gallery-mobile {
	display: none;
}

.pdp-gallery-mobile__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border: 0;
	border-radius: 0;
	background: #f8f9fb;
}

.pdp-gallery-mobile__track {
	display: flex;
	height: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.pdp-gallery-mobile__track::-webkit-scrollbar {
	display: none;
}

.pdp-gallery-mobile__slide {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	scroll-snap-align: center;
	scroll-snap-stop: always;
	cursor: zoom-in;
}

.pdp-gallery-mobile__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	user-select: none;
	-webkit-user-drag: none;
}

.pdp-gallery-mobile__counter {
	position: absolute;
	left: 12px;
	bottom: 12px;
	z-index: 3;
	padding: 4px 10px;
	border: 1px solid #e8e8e8;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.96);
	color: #555555;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.35;
	pointer-events: none;
}

.pdp-gallery-mobile__nav {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid #e0e0e0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.96);
	color: #333333;
	transform: translateY(-50%);
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.pdp-gallery-mobile__nav:hover:not(:disabled):not(.is-disabled) {
	border-color: #cccccc;
	background: #ffffff;
}

.pdp-gallery-mobile__nav--prev {
	left: 10px;
}

.pdp-gallery-mobile__nav--next {
	right: 10px;
}

.pdp-gallery-mobile__nav:disabled,
.pdp-gallery-mobile__nav.is-disabled {
	opacity: 0.35;
	cursor: default;
}

/* Desktop: stacked main + horizontal thumbs */
.pdp-gallery-desktop {
	width: 100%;
	min-width: 0;
}

.pdp-gallery-desktop__layout {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.main-product-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border: 0;
	border-radius: 0;
	background: #f8f9fb;
}

.main-image-container {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: zoom-in;
}

.main-image-container img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
}

/* Desktop: wheel to flip — corner hint on hover (no full-screen mask) */
@media (min-width: 901px) {
	.main-image-container.is-wheel-enabled {
		cursor: ns-resize;
	}

	.main-image-container.is-wheel-enabled img {
		cursor: zoom-in;
	}

	.pdp-gallery-scroll-hint {
		position: absolute;
		left: 50%;
		bottom: 16px;
		z-index: 13;
		display: inline-flex;
		align-items: center;
		gap: 8px;
		padding: 6px 12px;
		border: 1px solid #e0e0e0;
		border-radius: 999px;
		background: rgba(255, 255, 255, 0.96);
		color: #555555;
		box-shadow: none;
		opacity: 0;
		pointer-events: none;
		transform: translateX(-50%) translateY(6px);
		transition: opacity 0.2s ease, transform 0.2s ease;
	}

	.main-image-container.is-wheel-enabled:hover .pdp-gallery-scroll-hint,
	.main-image-container.is-wheel-enabled:focus-within .pdp-gallery-scroll-hint {
		opacity: 1;
		transform: translateX(-50%) translateY(0);
	}

	.main-image-container.is-wheel-scrolling .pdp-gallery-scroll-hint {
		opacity: 0;
		transform: translateX(-50%) translateY(6px);
	}

	.pdp-gallery-scroll-hint__icon {
		display: inline-flex;
		flex-shrink: 0;
		color: #666666;
	}

	.pdp-gallery-scroll-hint__icon svg {
		display: block;
	}

	.pdp-gallery-scroll-hint__text {
		font-size: 12px;
		font-weight: 500;
		line-height: 1.35;
		white-space: nowrap;
	}
}

.main-gallery-navs {
	position: absolute;
	inset: 0;
	z-index: 14;
	pointer-events: none;
}

.main-gallery-nav {
	position: absolute;
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid #e0e0e0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.96);
	color: #333333;
	transform: translateY(-50%);
	opacity: 0;
	pointer-events: auto;
	cursor: pointer;
	transition: opacity 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.main-product-frame:hover .main-gallery-nav,
.main-product-frame:focus-within .main-gallery-nav {
	opacity: 1;
}

.main-gallery-nav:hover {
	border-color: #cccccc;
	background: #ffffff;
}

.main-gallery-nav--prev {
	left: 14px;
}

.main-gallery-nav--next {
	right: 14px;
}

.pdp-gallery-thumbs--horizontal {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) 34px;
	gap: 10px;
	align-items: center;
}

.pdp-gallery-thumbs--horizontal .thumb-nav {
	display: inline-flex;
	width: 34px;
	height: 34px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid #e8e8e8;
	border-radius: 50%;
	background: #ffffff;
	color: #555555;
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.pdp-gallery-thumbs--horizontal .thumb-nav:hover:not(:disabled):not(.is-disabled) {
	color: #111111;
	border-color: #cccccc;
	background: #fafafa;
}

.pdp-gallery-thumbs--horizontal .thumb-nav:disabled,
.pdp-gallery-thumbs--horizontal .thumb-nav.is-disabled {
	opacity: 0.35;
	cursor: default;
}

.pdp-gallery-thumbs--horizontal:not(.is-scrollable) .thumb-nav {
	visibility: hidden;
	pointer-events: none;
}

.pdp-gallery-thumbs--horizontal .thumb-list {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	gap: 12px;
	min-width: 0;
	padding: 2px 4px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.pdp-gallery-thumbs--horizontal .thumb-list::-webkit-scrollbar {
	display: none;
}

.pdp-gallery-thumbs--horizontal .thumb {
	flex: 0 0 auto;
	width: clamp(72px, 10vw, 100px);
	height: clamp(72px, 10vw, 100px);
	overflow: hidden;
	padding: 0;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #f8f9fb;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.pdp-gallery-thumbs--horizontal .thumb.active {
	border-color: var(--bs-primary, #f9730c);
	box-shadow: none;
}

.pdp-gallery-thumbs--horizontal .thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	pointer-events: none;
}

.gallery-zoom-trigger {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 16;
	display: inline-flex;
	width: 36px;
	height: 36px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid #e0e0e0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.96);
	color: #444444;
	font-size: 1rem;
	cursor: zoom-in;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.gallery-zoom-trigger:hover {
	border-color: #bbbbbb;
	color: #111111;
}

/* Lightbox */
.product-gallery-lightbox[hidden] {
	display: none;
}

.product-gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	padding: 24px;
}

.product-gallery-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 17, 17, 0.72);
}

.product-gallery-lightbox__dialog {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-rows: auto minmax(0, var(--gallery-stage-height, calc(100vh - 128px)));
	width: min(calc(100vw - 48px), 1280px, calc((100vh - 128px) * var(--gallery-image-ratio, 1.45)));
	max-height: calc(100vh - 48px);
	overflow: hidden;
	border-radius: 8px;
	background: #ffffff;
}

.product-gallery-lightbox__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 56px;
	padding: 10px 14px 10px 18px;
	border-bottom: 1px solid #e6e8ec;
	color: #344054;
	font-size: 13px;
	font-weight: 700;
}

.product-gallery-lightbox__tools {
	display: flex;
	gap: 8px;
}

.product-gallery-lightbox__tools button,
.product-gallery-lightbox__nav {
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	background: #ffffff;
	color: #344054;
	cursor: pointer;
}

.product-gallery-lightbox__tools button {
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	font-size: 14px;
	font-weight: 600;
}

.product-gallery-lightbox__figure {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	margin: 0;
	overflow: auto;
	background: #f8f9fa;
}

.product-gallery-lightbox__figure img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	transition: transform 0.15s ease;
}

.product-gallery-lightbox.is-zoomed .product-gallery-lightbox__figure {
	cursor: grab;
}

.product-gallery-lightbox__nav {
	position: absolute;
	top: 50%;
	width: 40px;
	height: 40px;
	font-size: 24px;
	line-height: 1;
	transform: translateY(-50%);
}

.product-gallery-lightbox__nav--prev {
	left: 12px;
}

.product-gallery-lightbox__nav--next {
	right: 12px;
}

.product-gallery-lightbox-open {
	overflow: hidden;
}

@media (max-width: 991px) {
	body.store-product-page .woocommerce div.product {
		grid-template-columns: 1fr;
		grid-template-areas:
			"gallery"
			"summary";
		gap: 20px;
	}
}

/* Related / upsells: keep heading + grid together (override WC ul.products clear:both) */
body.store-product-page .woocommerce .store-related-products,
body.store-product-page .woocommerce .related.products,
body.store-product-page .woocommerce .upsells.products,
body.store-product-page .woocommerce div.product > .related.products,
body.store-product-page .woocommerce div.product > .upsells.products,
body.store-product-page .woocommerce div.product ~ .related.products,
body.store-product-page .woocommerce div.product ~ .upsells.products {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	clear: both;
	min-width: 0;
}

body.store-product-page .woocommerce div.product > .related.products,
body.store-product-page .woocommerce div.product > .upsells.products {
	grid-column: 1 / -1;
	grid-row: 2;
}

body.store-product-page .woocommerce .store-related-products__title,
body.store-product-page .woocommerce .related.products > h2,
body.store-product-page .store-related-products__title,
body.store-product-page .related.products > h2,
body.store-product-page .woocommerce .upsells.products > h2 {
	width: 100%;
	max-width: 100%;
	float: none;
	clear: none;
	position: static;
	writing-mode: horizontal-tb;
	white-space: normal;
	margin: 0 0 clamp(18px, 2.4vw, 26px);
	color: #111827;
	font-size: clamp(20px, 2.2vw, 28px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-align: left;
}

body.store-product-page .woocommerce .store-related-products__title::after,
body.store-product-page .woocommerce .related.products > h2::after,
body.store-product-page .store-related-products__title::after,
body.store-product-page .related.products > h2::after,
body.store-product-page .woocommerce .upsells.products > h2::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin: 10px 0 0;
	border-radius: 999px;
	background: var(--bs-primary, #f9730c);
}

body.store-product-page .woocommerce .store-related-products > ul.products,
body.store-product-page .woocommerce .related.products > ul.products,
body.store-product-page .woocommerce .upsells.products > ul.products {
	clear: none !important;
	float: none !important;
	width: 100%;
	margin: 0;
}

/* Tabs live inside .summary (right purchase column) */
body.store-product-page .woocommerce div.product .summary .store-product-tabs,
body.store-product-page .woocommerce div.product .summary .woocommerce-tabs,
body.store-product-page .woocommerce div.product .summary .wc-tabs-wrapper {
	clear: none !important;
	float: none !important;
	width: 100%;
	max-width: 100%;
	margin: 1.25rem 0 0;
	padding: 0;
}

body.store-product-page .woocommerce div.product .summary .store-product-tabs .woocommerce-tabs {
	margin-top: 0;
}

body.store-product-page .woocommerce div.product .summary div.woocommerce-tabs ul.tabs {
	justify-content: flex-start;
	gap: 20px;
	margin: 0 0 14px;
}

body.store-product-page .woocommerce div.product .summary .woocommerce-tabs .panel {
	padding: 0;
}

@media (max-width: 900px) {
	body.store-product-page .pdp-gallery-mobile {
		display: block;
	}

	body.store-product-page .pdp-gallery-desktop {
		display: none !important;
	}

	body.store-product-page .product-gallery-card {
		gap: 0;
	}

	body.store-product-page .store-product-gallery-wrap {
		margin-left: calc(-1 * var(--store-pdp-gutter, 12px));
		margin-right: calc(-1 * var(--store-pdp-gutter, 12px));
		width: calc(100% + 2 * var(--store-pdp-gutter, 12px));
		max-width: none;
	}

	body.store-product-page .pdp-gallery-mobile__frame {
		border-left: 0;
		border-right: 0;
		border-radius: 0;
	}
}

@media (min-width: 901px) {
	/* Sticky on inner card only; column stretches to match summary height so release is correct */
	body.store-product-page .woocommerce div.product div.images.store-product-gallery-wrap {
		position: relative;
		z-index: 2;
	}

	body.store-product-page .product-gallery-card {
		position: sticky;
		top: var(--store-pdp-sticky-top, 96px);
		align-self: flex-start;
		justify-self: stretch;
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
		z-index: 2;
	}
}

/* PDP trust badges — flex row (fallback if summary.css cache stale) */
body.store-product-page .woocommerce div.product .summary ul.pdp-trust-badges {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
}

body.store-product-page .woocommerce div.product .summary ul.pdp-trust-badges .pdp-trust-badges__item {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: center;
	min-width: 0;
}

body.store-product-page .woocommerce div.product .summary .pdp-trust-badges__title,
body.store-product-page .woocommerce div.product .summary .pdp-trust-badges__desc {
	display: block;
	width: 100%;
}

/* Sticky gallery boundary: support WooCommerce class on body and stop before related products. */
body.store-product-page.woocommerce #main > div.product,
body.store-product-page #main > div.product {
	display: grid;
	grid-template-columns: minmax(0, 48%) minmax(0, 1fr);
	grid-template-areas: "gallery summary";
	grid-template-rows: auto;
	column-gap: clamp(32px, 3.25vw, 64px);
	row-gap: 28px;
	align-items: stretch;
	overflow: visible;
	width: 100%;
	max-width: 100%;
}

body.store-product-page.woocommerce #main > div.product::before,
body.store-product-page.woocommerce #main > div.product::after,
body.store-product-page #main > div.product::before,
body.store-product-page #main > div.product::after {
	content: none;
	display: none;
}

body.store-product-page.woocommerce #main > div.product > div.images.store-product-gallery-wrap,
body.store-product-page #main > div.product > div.images.store-product-gallery-wrap {
	grid-area: gallery;
	float: none;
	width: 100%;
	max-width: none;
	margin: 0;
}

body.store-product-page.woocommerce #main > div.product > div.summary,
body.store-product-page #main > div.product > div.summary {
	grid-area: summary;
	float: none;
	width: 100%;
	max-width: none;
	margin: 0;
	clear: none;
}

body.store-product-page.woocommerce .store-related-products,
body.store-product-page.woocommerce .related.products,
body.store-product-page.woocommerce .upsells.products,
body.store-product-page .store-related-products,
body.store-product-page .related.products,
body.store-product-page .upsells.products {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	clear: both;
	min-width: 0;
}

body.store-product-page.woocommerce .store-related-products > ul.products,
body.store-product-page.woocommerce .related.products > ul.products,
body.store-product-page.woocommerce .upsells.products > ul.products,
body.store-product-page .store-related-products > ul.products,
body.store-product-page .related.products > ul.products,
body.store-product-page .upsells.products > ul.products {
	clear: none !important;
	float: none !important;
	width: 100%;
	margin: 0;
}

@media (max-width: 991px) {
	body.store-product-page.woocommerce #main > div.product,
	body.store-product-page #main > div.product {
		grid-template-columns: 1fr;
		grid-template-areas:
			"gallery"
			"summary";
		gap: 20px;
	}
}

@media (min-width: 901px) {
	body.store-product-page.woocommerce div.product,
	body.store-product-page div.product {
		align-items: stretch;
		overflow: visible;
	}

	body.store-product-page.woocommerce div.product div.images.store-product-gallery-wrap,
	body.store-product-page div.product div.images.store-product-gallery-wrap {
		position: sticky;
		top: var(--store-pdp-sticky-top, 96px);
		z-index: 2;
		align-self: flex-start;
		overflow: visible;
	}

	body.store-product-page.woocommerce div.product div.images.store-product-gallery-wrap .product-gallery-card,
	body.store-product-page div.product div.images.store-product-gallery-wrap .product-gallery-card {
		position: relative;
		top: auto;
		justify-self: stretch;
		width: 100%;
		max-width: 100%;
		z-index: 2;
	}

	body.store-product-page.woocommerce .related.products,
	body.store-product-page.woocommerce .upsells.products,
	body.store-product-page.woocommerce .store-related-products,
	body.store-product-page .related.products,
	body.store-product-page .upsells.products,
	body.store-product-page .store-related-products {
		position: relative;
		z-index: 3;
		background: var(--bs-body-bg, #fff);
	}
}

/* First pass to lighten PDP gallery weight: narrower media column, capped hero image, smaller thumbs. */
@media (min-width: 992px) {
	body.store-product-page.woocommerce #main > div.product,
	body.store-product-page #main > div.product {
		grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
		column-gap: clamp(38px, 3.6vw, 72px);
	}

	body.store-product-page .product-gallery-card {
		gap: 10px;
	}

	body.store-product-page .pdp-gallery-desktop__layout {
		gap: 10px;
	}

	body.store-product-page .main-product-frame {
		aspect-ratio: auto;
		height: clamp(520px, 42vw, 680px);
		max-height: calc(100vh - 190px);
	}

	body.store-product-page .main-image-container img {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}

	body.store-product-page .pdp-gallery-thumbs--horizontal {
		grid-template-columns: 30px minmax(0, 1fr) 30px;
		gap: 8px;
	}

	body.store-product-page .pdp-gallery-thumbs--horizontal .thumb-nav {
		width: 30px;
		height: 30px;
	}

	body.store-product-page .pdp-gallery-thumbs--horizontal .thumb-list {
		gap: 10px;
		padding: 1px 4px;
	}

	body.store-product-page .pdp-gallery-thumbs--horizontal .thumb {
		width: clamp(58px, 4.8vw, 72px);
		height: clamp(58px, 4.8vw, 72px);
		border-radius: 8px;
	}
}

/* PDP related products: two desktop rows, responsive columns. */
body.store-product-page .store-related-products {
	margin-top: clamp(48px, 5vw, 84px);
}

body.store-product-page .store-related-products > ul.products,
body.store-product-page .related.products > ul.products,
body.store-product-page .upsells.products > ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	align-items: stretch;
	clear: none !important;
	float: none !important;
	width: 100%;
	margin: 0;
	padding: 0;
}

body.store-product-page .store-related-products > ul.products::before,
body.store-product-page .store-related-products > ul.products::after,
body.store-product-page .related.products > ul.products::before,
body.store-product-page .related.products > ul.products::after,
body.store-product-page .upsells.products > ul.products::before,
body.store-product-page .upsells.products > ul.products::after {
	content: none !important;
	display: none !important;
}

body.store-product-page .store-related-products > ul.products > li,
body.store-product-page .related.products > ul.products > li,
body.store-product-page .upsells.products > ul.products > li {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	min-width: 0;
}

@media (min-width: 768px) {
	body.store-product-page .store-related-products > ul.products,
	body.store-product-page .related.products > ul.products,
	body.store-product-page .upsells.products > ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
	}
}

@media (min-width: 1200px) {
	body.store-product-page .store-related-products > ul.products,
	body.store-product-page .related.products > ul.products,
	body.store-product-page .upsells.products > ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 18px;
	}
}
