/* ==========================================================================
   EzFix Product UX
   1) Add-on swatches (WooCommerce Product Add-Ons) -> one horizontal row
      with left/right arrows + finger swipe
   2) Review pagination without page reload (page-number bar is styled by
      the "Review page numbers" block in the child theme style.css)
   ========================================================================== */

/* ---------- 1. Add-on swatch carousel ---------- */

/* Plugin hides this select by default; Enfold's "#top select" rule re-shows it.
   The swatches + the name shown next to the heading already cover it. */
#top .wc-pao-addon .wc-pao-addon-image-swatch-select {
	display: none;
}

/* Enfold indents the add-ons 90px to line up with the variations table.
   On phones that leaves ~190px for swatches, so drop the indent there. */
@media only screen and (max-width: 767px) {
	#top .single_variation_wrap {
		margin-left: 0;
	}
}

/* The <p> holding the swatches stays where it is in the DOM (the plugin finds
   its <label> via prevAll), so the arrows sit beside it via flex order. */
#top .ezfix-pao-carousel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

#top .ezfix-pao-carousel > * {
	order: 0;
	flex: 0 0 100%;
}

#top .ezfix-pao-carousel > .wc-pao-addon-wrap {
	order: 2;
	flex: 1 1 0;
	min-width: 0;
	width: auto;
	float: none;
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	margin: .5em 0 0;
	padding: 3px 3px 4px; /* room for the selected outline */
	scroll-padding: 0 3px; /* snap to the padding edge, not the border */
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

#top .ezfix-pao-carousel > .wc-pao-addon-wrap::-webkit-scrollbar {
	display: none;
}

#top .ezfix-pao-carousel .wc-pao-addon-image-swatch {
	flex: 0 0 auto;
	margin: 0;
	scroll-snap-align: start;
}

#top .ezfix-pao-carousel > .ezfix-pao-arrow {
	order: 1;
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	margin: .5em 4px 0 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #ddd;
	border-radius: 50%;
	background: #fff;
	color: #333;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
	cursor: pointer;
	transition: opacity .15s ease;
}

#top .ezfix-pao-carousel > .ezfix-pao-arrow--next {
	order: 3;
	margin: .5em 0 0 4px;
}

#top .ezfix-pao-carousel > .ezfix-pao-arrow:hover:not([disabled]) {
	border-color: #666;
}

#top .ezfix-pao-carousel > .ezfix-pao-arrow[disabled] {
	opacity: .3;
	cursor: default;
}

/* Everything fits -> no arrows needed */
#top .ezfix-pao-carousel.is-static > .ezfix-pao-arrow {
	display: none;
}

/* ---------- 2. Review pagination (no reload) ----------
   The page-number bar reuses WordPress's markup, so its look comes from
   the "Review page numbers" block in the child theme style.css. */

#top #reviews .commentlist > li.ezfix-review-hidden {
	display: none;
}

#top #reviews .commentlist:focus {
	outline: none;
}
