/* ==========================================================================
   WC Variant Cross/Upsell — Public Styles
   ========================================================================== */

.wcvcu-slider-wrapper {
	margin: 2rem 0;
	position: relative;
	padding: 0 3.5rem;
	box-sizing: border-box;
}

.wcvcu-slider-title {
	font-weight: 700;
	margin-bottom: 1rem;
}

/* Loading spinner */
.wcvcu-slider-wrapper.wcvcu-loading::after {
	content: '';
	display: block;
	width: 32px;
	height: 32px;
	border: 3px solid rgba(0,0,0,.1);
	border-top-color: #7f54b3;
	border-radius: 50%;
	animation: wcvcu-spin .7s linear infinite;
	margin: 2rem auto;
}
@keyframes wcvcu-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------
   Custom navigation arrows
   ------------------------------------------------------------------ */

.wcvcu-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	/* width/height/background/shadow set by dynamic CSS */
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-radius: 50%;
	border: none;
	z-index: 10;
	padding: 0;
	transition: background .2s, box-shadow .2s;
	flex-shrink: 0;
}
.wcvcu-arrow svg { flex-shrink: 0; transition: fill .2s; }
.wcvcu-arrow--prev { left: 0; }
.wcvcu-arrow--next { right: 0; }
.wcvcu-splide .splide__arrow { display: none !important; }

/* ------------------------------------------------------------------
   Shadow space strategy:
   - Track gets overflow:visible so shadow on ALL sides is visible,
     including left edge of first card and right edge of last card.
   - To prevent cards from visually leaking, the WRAPPER clips with
     overflow:hidden only horizontally (clip-path covers the padding
     zones used by arrows — so we use a negative margin trick instead).
   - The splide element itself is the clipping boundary via overflow:hidden.
   - We add a transparent padding-box on the splide so the track can
     overflow into it without visual clipping.
   ------------------------------------------------------------------ */

/* Shadow space strategy:
   - .wcvcu-splide uses overflow:visible so pagination (rendered AFTER the track
     inside .splide by Splide.js) is not clipped.
   - Shadow space on cards is provided by padding on each slide.
   - Horizontal card overflow is clipped by .wcvcu-slider-wrapper overflow:hidden. */
.wcvcu-splide {
	overflow: visible;
	box-sizing: border-box;
}

/* Clip card overflow only horizontally — vertical must stay visible
   so pagination dots below the slider are not cut off.
   overflow-x:clip does NOT create a new stacking context (unlike hidden),
   so absolutely-positioned arrows remain visible.                          */
.wcvcu-slider-wrapper {
	overflow-x: clip;
}

/* Slide padding gives shadow equal room on all sides */
.wcvcu-products-list > li.splide__slide {
	padding: 10px 6px;
	box-sizing: border-box;
}



/* ------------------------------------------------------------------
   Product card
   ------------------------------------------------------------------ */

.wcvcu-product-card {
	display: flex;
	flex-direction: column;
	transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
	height: 100%;
}

.wcvcu-product-card__image {
	display: block;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: #f7f7f7;
	border-radius: inherit;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}
.wcvcu-product-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}
.wcvcu-product-card:hover .wcvcu-product-card__image img { transform: scale(1.04); }

.wcvcu-product-card__body {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: .5rem;
}

.wcvcu-product-card__name {
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: color .15s;
}
.wcvcu-product-card__name:hover { text-decoration: underline; }
.wcvcu-product-card__price { font-weight: 700; }

.wcvcu-product-card__footer { padding: 0 1rem 1rem; margin-top: auto; }

.wcvcu-product-card .button.add_to_cart_button,
.wcvcu-product-card .button.product_type_simple,
.wcvcu-product-card .button.product_type_variable {
	display: block;
	width: 100%;
	text-align: center;
	padding: .6rem 1rem;
	font-size: .875rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background .2s ease, border-color .2s ease, color .2s ease;
}

/* Splide list reset */
.wcvcu-products-list { list-style: none; margin: 0; padding: 0; }
.wcvcu-products-list > li { padding: 0; }

/* ------------------------------------------------------------------
   Pagination dots
   ------------------------------------------------------------------ */

/* Pagination — Splide renders dots inside .splide with position:absolute.
   We keep that and use padding-bottom on .splide (set by dynamic CSS) to
   reserve space below the track for the dots.                             */
.wcvcu-splide .splide__pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	list-style: none;
	padding: 0;
	margin: 0;
	/* Keep Splide's default absolute positioning */
	position: absolute;
	bottom: 8px;
	left: 0;
	right: 0;
}
.wcvcu-splide .splide__pagination__page {
	display: inline-block;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	padding: 0;
	transition: background .2s, transform .2s;
}

/* When arrows are disabled — remove side padding */
.wcvcu-slider-wrapper.wcvcu-no-arrows {
	padding-left: 0;
	padding-right: 0;
}

/* Variation attributes subtitle — colors/size from dynamic CSS */
.wcvcu-product-card__attrs {
	display: block;
	font-weight: 400;
	margin-top: 2px;
}
