/*
 * Product Slider widget - layout-only styles.
 *
 * Deliberately does NOT style the product card itself (image, title, price,
 * add-to-cart button, ratings...). That markup and its styling come straight
 * from the theme / WooCommerce, exactly as on the shop/category page - this
 * file only controls the outer grid/slider wrapper so the widget can offer
 * grid or slider layouts without ever diverging from the PLP look.
 */

.psw-heading {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-bottom: 32px;
	text-align: center;
}

.psw-heading__title {
	margin: 0;
	font-size: 28px;
	font-weight: 800;
	color: #011d3d;
}

.psw-heading__title::after {
	content: "";
	display: block;
	width: 48px;
	height: 3px;
	margin: 10px auto 0;
	background: #fec002;
	border-radius: 2px;
}

/* If a "view all" link is set, drop back to a left title / right link row
   instead of the centered hero-style heading. */
.psw-heading:has(.psw-heading__link) {
	flex-direction: row;
	align-items: baseline;
	justify-content: space-between;
	text-align: left;
}
.psw-heading:has(.psw-heading__link) .psw-heading__title::after {
	margin: 10px 0 0;
}

.psw-heading__link {
	white-space: nowrap;
	font-size: 0.9em;
}

.psw-empty {
	opacity: 0.7;
}

/* Grid mode intentionally has no extra rules - it reuses the theme's own
   ul.products.columns-X grid exactly as the shop archive renders it. */

/* ---------- Slider mode ---------- */

.psw-slider {
	position: relative;
}

.psw-slider__viewport {
	overflow: hidden;
}

.psw-slider__viewport ul.products {
	display: flex;
	flex-wrap: nowrap;
	will-change: transform;
	/* margin/columns classes from the theme are overridden intentionally
	   only at the container level - individual .product cards stay untouched. */
	margin: 0 !important;
}

.psw-slider__viewport ul.products > li.product {
	flex: 0 0 auto;
	box-sizing: border-box;
}

.psw-slider__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.1);
	background: #fff;
	color: #333;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.psw-slider__arrow:hover:not(:disabled) {
	background: #f5f5f5;
	color: #111;
}

.psw-slider__arrow--prev {
	left: -10px;
}

.psw-slider__arrow--next {
	right: -10px;
}

.psw-slider__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.psw-slider__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}

.psw-slider__dots button {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	border: none;
	padding: 0;
	background: rgba(0, 0, 0, 0.2);
	cursor: pointer;
}

.psw-slider__dots button.is-active {
	background: rgba(0, 0, 0, 0.6);
}
