.wc-gallery-carousel {
	--wc-gallery-gap: 16px;
	--wc-gallery-radius: 12px;
	box-sizing: border-box;
	position: relative;
	width: 100%;
}

.wc-gallery-carousel *,
.wc-gallery-carousel *::before,
.wc-gallery-carousel *::after {
	box-sizing: inherit;
}

.wc-gallery-carousel__viewport {
	cursor: grab;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.wc-gallery-carousel__viewport.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}

.wc-gallery-carousel__viewport::-webkit-scrollbar {
	display: none;
}

.wc-gallery-carousel__track {
	display: flex;
	gap: var(--wc-gallery-gap);
}

.wc-gallery-carousel__slide {
	flex: 0 0 100%;
	min-width: 0;
	scroll-snap-align: start;
}

.wc-gallery-carousel__image {
	display: block;
	width: 100%;
	height: auto;
	max-height: 80vh;
	object-fit: contain;
	border-radius: var(--wc-gallery-radius);
	user-select: none;
	-webkit-user-drag: none;
}

.wc-gallery-carousel__button {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: grid;
	width: 40px;
	height: 40px;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .68);
	color: #fff;
	cursor: pointer;
	transform: translateY(-50%);
}

.wc-gallery-carousel__button:hover,
.wc-gallery-carousel__button:focus-visible {
	background: #000;
}

.wc-gallery-carousel__button--prev { left: 12px; }
.wc-gallery-carousel__button--next { right: 12px; }

.wc-gallery-carousel__dots {
	display: flex;
	justify-content: center;
	gap: 7px;
	margin-top: 14px;
}

.wc-gallery-carousel__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #c7c7c7;
	cursor: pointer;
}

.wc-gallery-carousel__dot.is-active { background: #222; }

@media (max-width: 767px) {
	.wc-gallery-carousel {
		--wc-gallery-gap: 12px;
		--wc-gallery-side-offset: 10%;
	}

	.wc-gallery-carousel__track {
		padding-inline: var(--wc-gallery-side-offset);
	}

	.wc-gallery-carousel__slide {
		flex-basis: 95%;
		scroll-snap-align: center;
	}
	.wc-gallery-carousel__button { width: 34px; height: 34px; }
	.wc-gallery-carousel__button--prev { left: 4px; }
	.wc-gallery-carousel__button--next { right: 4px; }
}

@media (min-width: 768px) {
	.wc-gallery-carousel__viewport { overflow-x: hidden; }
}

/* Floating mobile add-to-cart shortcut. */
.wc-floating-add-to-cart {
	position: fixed;
	right: 12px;
	bottom: max(12px, env(safe-area-inset-bottom));
	left: 12px;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	min-height: 64px;
	padding: 8px 10px 8px 14px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 999px;
	background: rgba(247, 240, 247, .82);
	box-shadow: 0 8px 28px rgba(31, 19, 33, .18);
	backdrop-filter: blur(16px) saturate(125%);
	-webkit-backdrop-filter: blur(16px) saturate(125%);
	direction: rtl;
	opacity: 0;
	pointer-events: none;
	transform: translateY(120%);
	transition: opacity .2s ease;
}

.wc-floating-add-to-cart.is-visible {
	pointer-events: auto;
	animation: wc-floating-add-to-cart-in .55s cubic-bezier(.22, 1, .36, 1) both;
}

.wc-floating-add-to-cart__product {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 10px;
	direction: rtl;
}

.wc-floating-add-to-cart__image {
    display: block;
    flex: 0 0 46px;
    width: 46px;
    height: 46px !important;
    border-radius: 0 !important;
    object-fit: contain;
}

.wc-floating-add-to-cart__name {
	overflow: hidden;
	color: #111;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.15;
	text-align: right;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wc-floating-add-to-cart__button {
	display: inline-flex;
	flex: 0 0 auto;
	min-height: 42px;
	align-items: center;
	justify-content: center;
	padding: 0 18px;
	border-radius: 999px;
	background: #050505;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.wc-floating-add-to-cart__button:hover,
.wc-floating-add-to-cart__button:focus-visible {
	background: #2c2c2c;
	color: #fff;
}

@keyframes wc-floating-add-to-cart-in {
	from {
		opacity: 0;
		transform: translateY(120%);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (min-width: 768px) {
	.wc-floating-add-to-cart { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.wc-floating-add-to-cart { animation: none; }
}
