/**
 * Phone Case Variations — shop-side picker.
 *
 * Colours come from WoodMart's own CSS variables (primary and secondary as
 * set in Theme Settings → Colors), so the box always matches the store's
 * branding. Every value falls back gracefully on other themes.
 */

.pcv-box {
	--pcv-brand: var(--wd-primary-color, #005de1);
	--pcv-brand-2: var(--wd-alternative-color, var(--wd-primary-color, #0047b3));
	--pcv-font: var(--wd-text-font, inherit);
	--pcv-title-font: var(--wd-title-font, var(--wd-text-font, inherit));
	--pcv-ink: #16181c;
	--pcv-muted: #6b7280;
	--pcv-line: rgba(17, 19, 23, .1);

	position: relative;
	overflow: hidden;
	margin: 18px 0 24px;
	padding: 22px 22px 8px;
	background: #fff;
	border: 1px solid var(--pcv-line);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -12px rgba(16, 24, 40, .14);
	font-family: var(--pcv-font);
	color: var(--pcv-ink);
}

.pcv-box *,
.pcv-box *::before,
.pcv-box *::after {
	box-sizing: border-box;
}

/* A soft brand-tinted wash in the corner. */
.pcv-box__glow {
	position: absolute;
	top: -70px;
	right: -70px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: var(--pcv-brand);
	opacity: .07;
	pointer-events: none;
}

/* WooCommerce's own dropdowns stay in the page for its scripts, hidden. */

.variations_form.pcv-enhanced table.variations,
.variations_form.pcv-enhanced .variations {
	display: none !important;
}

/* ----------------------------------------------------------------- Head */

.pcv-box__head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
}

.pcv-box__title {
	font-family: var(--pcv-title-font);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -.01em;
}

.pcv-box__title::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 15px;
	margin-right: 9px;
	border-radius: 3px;
	background: linear-gradient(var(--pcv-brand), var(--pcv-brand-2));
	vertical-align: -2px;
}

.pcv-box__reset {
	margin-left: auto;
	padding: 4px 10px;
	border: 0;
	border-radius: 999px;
	background: rgba(17, 19, 23, .05);
	cursor: pointer;
	font: inherit;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--pcv-muted);
	transition: background .16s ease, color .16s ease;
}

.pcv-box__reset:hover {
	background: var(--pcv-brand);
	color: #fff;
}

/* ------------------------------------------------------------- Sections */

.pcv-sec {
	position: relative;
	padding-bottom: 16px;
	margin-bottom: 16px;
	border-bottom: 1px solid var(--pcv-line);
	transition: opacity .22s ease;
}

.pcv-sec:last-of-type {
	border-bottom: 0;
	margin-bottom: 0;
}

.pcv-sec.is-locked {
	opacity: .38;
	pointer-events: none;
	filter: saturate(.4);
}

.pcv-sec.is-just-opened {
	animation: pcv-wake .45s ease;
}

@keyframes pcv-wake {
	from { opacity: .3; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

/* One brand only: no point showing a chooser. */
.pcv-sec--solo {
	display: none;
}

.pcv-sec__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.pcv-sec__num {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(17, 19, 23, .07);
	color: var(--pcv-muted);
	font-size: 11px;
	font-weight: 700;
	transition: background .2s ease, color .2s ease;
}

.pcv-sec.is-done .pcv-sec__num {
	background: var(--pcv-brand);
	color: #fff;
}

.pcv-sec__label {
	font-family: var(--pcv-title-font);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--pcv-muted);
}

.pcv-sec__value {
	margin-left: auto;
	max-width: 55%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 14px;
	font-weight: 700;
	color: var(--pcv-ink);
	text-align: right;
}

/* ---------------------------------------------------------------- Chips */

.pcv-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pcv-chips--model {
	max-height: 232px;
	overflow-y: auto;
	padding-right: 4px;
	overscroll-behavior: contain;
}

.pcv-chips--model::-webkit-scrollbar {
	width: 6px;
}

.pcv-chips--model::-webkit-scrollbar-thumb {
	background: rgba(17, 19, 23, .18);
	border-radius: 3px;
}

.pcv-box .pcv-chip {
	position: relative;
	min-width: 0;
	min-height: 0;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	padding: 10px 16px;
	border: 1px solid var(--pcv-line);
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.25;
	color: var(--pcv-ink);
	white-space: nowrap;
	transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.pcv-chip:hover {
	border-color: var(--pcv-brand);
	transform: translateY(-1px);
	box-shadow: 0 4px 14px -6px var(--pcv-brand);
}

.pcv-chip.is-selected {
	background: linear-gradient(135deg, var(--pcv-brand), var(--pcv-brand-2));
	border-color: transparent;
	color: #fff;
	font-weight: 600;
	box-shadow: 0 6px 18px -8px var(--pcv-brand);
}

.pcv-chip.is-selected:hover,
.pcv-chip.is-selected:focus {
	color: #fff;
	border-color: transparent;
	transform: translateY(-1px);
}

.pcv-chip.is-disabled {
	opacity: .4;
	cursor: not-allowed;
	background: repeating-linear-gradient(
		-45deg,
		rgba(17, 19, 23, .03) 0 6px,
		transparent 6px 12px
	);
}

.pcv-chip.is-disabled:hover {
	border-color: var(--pcv-line);
	transform: none;
	box-shadow: none;
}

.pcv-chip em {
	display: block;
	font-size: 10px;
	font-style: normal;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	opacity: .7;
}

.pcv-chips--brand .pcv-chip {
	padding: 11px 20px;
	font-weight: 600;
}

/* ------------------------------------------------------------- Swatches */

.pcv-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.pcv-box .pcv-swatch,
.pcv-box .pcv-swatch:hover,
.pcv-box .pcv-swatch:focus,
.pcv-box .pcv-swatch:active {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
	cursor: pointer;
	font: inherit;
	line-height: 1.2;
	min-width: 0;
	min-height: 0;
	text-transform: none;
	letter-spacing: normal;
}

.pcv-swatch__dot {
	position: relative;
	display: block;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(17, 19, 23, .14), 0 0 0 0 var(--pcv-brand);
	transition: box-shadow .18s ease, transform .18s ease;
}

.pcv-swatch:hover .pcv-swatch__dot {
	transform: scale(1.07);
}

.pcv-swatch.is-selected .pcv-swatch__dot {
	box-shadow: inset 0 0 0 1px rgba(17, 19, 23, .14), 0 0 0 2px #fff, 0 0 0 4px var(--pcv-brand);
}

.pcv-swatch__name {
	font-size: 11px;
	font-weight: 500;
	color: var(--pcv-muted);
	transition: color .16s ease;
}

.pcv-swatch.is-selected .pcv-swatch__name {
	color: var(--pcv-ink);
	font-weight: 700;
}

.pcv-swatch.is-disabled {
	opacity: .35;
	cursor: not-allowed;
}

.pcv-swatch.is-disabled .pcv-swatch__dot::after {
	content: "";
	position: absolute;
	top: 50%;
	left: -2px;
	right: -2px;
	height: 2px;
	background: #b3261e;
	transform: rotate(-45deg);
}

/* ----------------------------------------------------------- Responsive */

@media (max-width: 575px) {
	.pcv-box {
		padding: 18px 16px 6px;
		border-radius: 14px;
	}

	.pcv-chip {
		padding: 9px 14px;
		font-size: 13px;
	}

	.pcv-chips--model {
		max-height: 200px;
	}

	.pcv-swatch__dot {
		width: 34px;
		height: 34px;
	}

	.pcv-sec__value {
		max-width: 45%;
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pcv-box *,
	.pcv-sec.is-just-opened {
		animation: none !important;
		transition-duration: .01ms !important;
	}
}

/* ---------------------------------------------------------------------
 * Product gallery.
 *
 * The slides themselves are rebuilt in the theme's own carousel, so its
 * styling, zoom and thumbnails are untouched. Only one rule is needed:
 * a variation with a single photo has nothing to put in a thumbnail strip.
 * ------------------------------------------------------------------ */

.woocommerce-product-gallery.pcv-single-image .wd-gallery-thumb {
	display: none !important;
}

.woocommerce-product-gallery.pcv-single-image .wd-nav-arrows:not(.wd-thumb-nav) {
	display: none !important;
}
