/* ============================================================
   Shopify Connect — Product Image / Gallery Widget Styles

   Depends on the --sc-* variables defined in cart.css.
   ============================================================ */

.sc-product-image {
	position: relative;
	aspect-ratio: 1 / 1;
	background: #f5f5f5;
	overflow: hidden;
}

.sc-product-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.sc-product-gallery-wrap {
	position: relative;
	margin-top: 10px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.sc-product-gallery {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.sc-product-gallery::-webkit-scrollbar {
	display: none;
}

.sc-product-image-block .sc-product-gallery-thumb {
	display: block;
	flex: 0 0 80px !important;
	width: 80px !important;
	height: 80px !important;
	aspect-ratio: 1 / 1;
	padding: 0;
	border: 1px solid var(--sc-border);
	border-radius: var(--sc-radius);
	overflow: hidden;
	background: none;
	cursor: pointer;
	scroll-snap-align: start;
}

.sc-product-image-block .sc-product-gallery-thumb:focus-visible {
	outline: 2px solid var(--sc-btn-bg);
	outline-offset: 2px;
}

.sc-product-gallery-thumb img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
}

.sc-product-gallery-thumb.is-active {
	border-color: var(--sc-text);
}

.sc-product-image-block .sc-gallery-nav {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1px solid var(--sc-border);
	border-radius: 50%;
	background: var(--sc-bg);
	color: var(--sc-text);
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	padding: 0;
}

.sc-product-image-block .sc-gallery-nav:hover {
	background: #f0f0f0;
}

.sc-product-image-block .sc-gallery-nav:focus-visible {
	outline: 2px solid var(--sc-btn-bg);
	outline-offset: 2px;
}

.sc-product-image-block .sc-gallery-nav:disabled {
	opacity: 0.35;
	cursor: default;
}
