.psc {
	--psc-accent: #6b2fa0;
	--psc-border: rgba(0, 0, 0, .15);
	margin: 0 0 1.5em;
	width: 100%;
}

.psc-preview {
	background: radial-gradient(ellipse at center, #26291f 0%, #111310 100%);
	border-radius: 10px;
	margin-bottom: 1em;
}

/* Click to enlarge, with a magnifier badge in the corner. */
.psc-preview {
	position: relative;
	cursor: zoom-in;
}

.psc-preview::after {
	content: "";
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / 20px no-repeat;
	pointer-events: none;
	transition: background-color .15s;
}

.psc-preview:hover::after,
.psc-preview:focus-visible::after {
	background-color: rgba(255, 255, 255, .28);
}

.psc-preview:focus-visible {
	outline: 2px solid var(--psc-accent);
	outline-offset: 3px;
}

.psc-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	padding: 3rem 1rem;
	background: radial-gradient(ellipse at center, #1e211a 0%, #0c0d0b 100%);
	cursor: zoom-out;
}

.psc-lightbox[hidden] {
	display: none;
}

.psc-lightbox-stick {
	width: min(1400px, 96vw);
}

.psc-lightbox-stick .psc-caption {
	font-size: 13px;
}

/* The whole pattern strip, as wide as the stick above it and never wider than the screen. */
.psc-lightbox-pattern {
	width: min(1400px, 96vw);
	border-radius: 6px;
	overflow: hidden;
	cursor: auto;
}

.psc-lightbox-pattern img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

.psc-lightbox-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	font-size: 28px;
	line-height: 44px;
	cursor: pointer;
}

.psc-lightbox-nav {
	position: absolute;
	top: 50%;
	width: 52px;
	height: 52px;
	margin-top: -26px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	font-size: 34px;
	line-height: 48px;
	cursor: pointer;
	z-index: 1;
}

.psc-lightbox-nav:hover,
.psc-lightbox-nav:focus-visible {
	background: rgba(255, 255, 255, .28);
}

.psc-lightbox-prev {
	left: 1rem;
}

.psc-lightbox-next {
	right: 1rem;
}

.psc-lightbox-count {
	color: #d8dcd2;
	font-size: 14px;
}

/* Base color and tassel color pickers, side by side when there's room. */
.psc-lightbox-swatches {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem 3rem;
	cursor: auto;
}

.psc-lightbox-swatches[hidden] {
	display: none;
}

.psc-lightbox-group {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .6rem;
}

.psc-lightbox-group-label {
	color: #d8dcd2;
	font-size: 14px;
}

.psc-lightbox-group-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .6rem;
}

.psc-lightbox-swatch {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, .25);
	border-radius: 50%;
	background: var(--psc-swatch);
	cursor: pointer;
}

.psc-lightbox-swatch[aria-pressed="true"] {
	box-shadow: 0 0 0 3px #0c0d0b, 0 0 0 5px #fff;
}

.psc-lightbox-swatch:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.psc-lightbox--single .psc-lightbox-nav,
.psc-lightbox--single .psc-lightbox-count {
	display: none;
}

.psc-noscroll {
	overflow: hidden;
}

.psc-svg {
	display: block;
	width: 100%;
	height: auto;
}

.psc-caption {
	font-size: 15px;
	fill: #d8dcd2;
}

.psc-caption--square {
	font-size: 26px;
}

/* Preview shown in place of the product image. */
.psc-has-preview > :not(.psc-gallery) {
	display: none !important;
}

.psc-gallery {
	position: sticky;
	top: 2rem;
}

.psc-gallery .psc-preview {
	margin: 0;
}

.psc-field {
	border: 0;
	margin: 0 0 1em;
	padding: 0;
}

.psc-field legend {
	font-weight: 600;
	margin-bottom: .4em;
	padding: 0;
}

.psc-current {
	font-weight: 400;
	opacity: .7;
}

.psc-options {
	display: flex;
	flex-wrap: wrap;
	gap: .5em;
}

.psc input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

/* Text chips (length, weight, handle) */
.psc-chip > span {
	display: inline-block;
	padding: .45em .9em;
	border: 1px solid var(--psc-border);
	border-radius: 999px;
	cursor: pointer;
	transition: border-color .15s, background-color .15s;
}

.psc-chip input:checked + span {
	border-color: var(--psc-accent);
	background: var(--psc-accent);
	color: #fff;
}

/* Tassel color swatches */
.psc-swatch > span {
	display: block;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--psc-swatch);
	border: 1px solid var(--psc-border);
	cursor: pointer;
}

.psc-swatch input:checked + span {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--psc-accent);
}

.psc-field[hidden] {
	display: none;
}

/* Pattern tiles */
.psc-tile {
	width: 96px;
	cursor: pointer;
	text-align: center;
	font-size: .85em;
}

.psc-tile-img {
	display: block;
	height: 56px;
	border-radius: 6px;
	border: 1px solid var(--psc-border);
	background-size: cover;
	background-position: center;
}

/* Transparent artwork shows the chosen base color behind it. */
.psc-tile--base .psc-tile-img {
	background: var(--psc-tile-img, none) center / cover no-repeat, var(--psc-base, #fff);
}

.psc-tile input:checked + .psc-tile-img {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--psc-accent);
}

.psc-tile-name {
	display: block;
	margin-top: .3em;
}

.psc input:focus-visible + span {
	outline: 2px solid var(--psc-accent);
	outline-offset: 2px;
}

.psc-total {
	font-size: 1.15em;
	margin: 1em 0 0;
}
