/**
 * WSH Variation UI - core styles.
 *
 * BEM naming, CSS custom properties for all themeable values (populated
 * server-side from plugin settings). No !important unless strictly
 * required to override a theme's default select/button styling.
 */

.wsh-vui-hidden-select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.wsh-vui-group {
	margin: 0 0 20px;
}

.wsh-vui-group__label {
	display: block;
	font-weight: 600;
	font-size: 0.95em;
	margin-bottom: 10px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: inherit;
	display: none;
}

/* ---------- Flavour pills ---------- */

.wsh-vui-pills {
	display: flex;
	/*flex-wrap: wrap;*/
	gap: 10px;
}

.wsh-vui-pill {
	appearance: none;
	cursor: pointer;
	background: #ffffff;
	border: 2px solid #e2e2e2;
	border-radius: 999px;
	padding: 8px 10px;
	font-size: 0.95em;
	line-height: 1.4;
	color: #2a2a2a;
	transition:
		background-color var(--wsh-vui-animation-speed, 250ms) ease,
		border-color var(--wsh-vui-animation-speed, 250ms) ease,
		transform var(--wsh-vui-animation-speed, 250ms) ease;
}

.wsh-vui-pill:hover:not(.wsh-vui-disabled) {
	border-color: var(--wsh-vui-primary-color, #00B8A9);
	transform: translateY(-1px);
}

.wsh-vui-pill:focus-visible {
	outline: 2px solid var(--wsh-vui-primary-color, #00B8A9);
	outline-offset: 2px;
}

.wsh-vui-pill.wsh-vui-selected {
	background: var(--wsh-vui-primary-color-light, #dff3ec);
	border: 2px solid var(--wsh-vui-primary-color, #00B8A9);
	color: #114b44;
	font-weight: 600;
}

/* ---------- Pack cards ---------- */

.wsh-vui-cards {
	display: grid;
	grid-template-columns: repeat(var(--wsh-vui-desktop-columns, 3), minmax(0, 1fr));
	gap: 14px;
}

.wsh-vui-card {
	position: relative;
	appearance: none;
	cursor: pointer;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: #ffffff;
	border: 2px solid #e6e6e6;
	border-radius: var(--wsh-vui-border-radius, 12px);
	box-shadow: var(--wsh-vui-card-shadow, 0 8px 24px rgba(0, 0, 0, 0.08));
	padding: 16px 18px;
	/*overflow: hidden;*/
	transition:
		border-color var(--wsh-vui-animation-speed, 250ms) ease,
		transform var(--wsh-vui-animation-speed, 250ms) ease,
		box-shadow var(--wsh-vui-animation-speed, 250ms) ease;
}

.wsh-vui-card:hover:not(.wsh-vui-disabled) {
	transform: translateY(-2px) scale(1.01);
	border-color: var(--wsh-vui-primary-color, #00B8A9);
}

.wsh-vui-card:focus-visible {
	outline: 2px solid var(--wsh-vui-primary-color, #00B8A9);
	outline-offset: 2px;
}

.wsh-vui-card.wsh-vui-selected {
	border-color: var(--wsh-vui-primary-color, #00B8A9);
	box-shadow: 0 0 0 3px var(--wsh-vui-primary-color-light, #dff3ec);
}

.wsh-vui-card.wsh-vui-disabled {
	cursor: not-allowed;
	opacity: 0.55;
	filter: grayscale(0.4);
	background: #f7f7f7;
}

.wsh-vui-card__name {
	font-weight: 700;
	font-size: 1.3em;
	color: #1c1c1c;
}

.wsh-vui-card__price {
	font-size: 0.95em;
	color: #4a4a4a;
	transition: opacity var(--wsh-vui-animation-speed, 250ms) ease;
}

.wsh-vui-card__price del {
	opacity: 0.6;
	margin-right: 4px;
}

.wsh-vui-card__price ins {
	text-decoration: none;
	font-weight: 700;
	color: #1c1c1c;
}

.wsh-vui-badge {
	display: inline-block;
	width: fit-content;
	font-size: 0.78em;
	font-weight: 600;
	border-radius: 6px;
	padding: 2px 8px;
}

.wsh-vui-badge--save {
	background: var(--wsh-vui-primary-color-light, #dff3ec);
	color: #0a7566;
}

.wsh-vui-badge--stock {
	background: #f3e3e3;
	color: #9b3b3b;
}

.wsh-vui-ribbon {
	position: absolute;
	top: -14px;
	left: 50%;
	transform: translateX(-50%);

	background: var(--wsh-vui-primary-color, #00B8A9);
	color: #ffffff;

	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;

	padding: 5px 18px;

	line-height: 1.4;
	white-space: nowrap;

	border-radius: 30px;

	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);

	z-index: 5;
}

/* Fade animation applied briefly by JS when price/image update. */
.wsh-vui-fade {
	animation: wsh-vui-fade-in var(--wsh-vui-animation-speed, 250ms) ease;
}

/*new css*/

.wsh-vui-card__price {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.wsh-vui-card__total-price {
	display: block;
	font-weight: 600;
	font-size: 16px;
    color: #000;
    line-height: 1;
}

.wsh-vui-card__unit-price {
	display: block;
	font-size: 0.8em;
}

.wsh-vui-card__price-label {
	margin-left: 3px;
}

@keyframes wsh-vui-fade-in {
	from {
		opacity: 0.35;
	}
	to {
		opacity: 1;
	}
}
