/* Vesica Product Designer — inherits the theme's fonts. Override the variables in your theme to restyle. */
.vpd {
	--vpd-accent: #7a4a2a;
	--vpd-line: rgba(0, 0, 0, 0.14);
	--vpd-muted: rgba(0, 0, 0, 0.62);
	--vpd-soft: rgba(122, 74, 42, 0.06);
	--vpd-radius: 10px;
	--vpd-error: #a4262c;
}

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

.vpd-notice {
	padding: 12px 16px;
	background: var(--vpd-soft);
	border-radius: var(--vpd-radius);
}

/* ---------- Grid ---------- */
.vpd-grid {
	display: grid;
	grid-template-columns: repeat(var(--vpd-cols, 3), minmax(0, 1fr));
	gap: 32px 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.vpd-grid-item {
	margin: 0;
}

.vpd-tile {
	display: block;
	color: inherit;
	text-decoration: none;
}

.vpd-tile-media {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: var(--vpd-radius);
	background: var(--vpd-soft);
}

.vpd-tile-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.vpd-tile:hover .vpd-tile-media img {
	transform: scale(1.03);
}

.vpd-tile-name {
	display: block;
	margin-top: 12px;
	font-weight: 600;
}

.vpd-tile-price {
	display: block;
	color: var(--vpd-muted);
}

.vpd-tile-cta {
	display: inline-block;
	margin-top: 6px;
	color: var(--vpd-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	font-size: 0.92em;
}

.vpd-tile:focus-visible {
	outline: 2px solid var(--vpd-accent);
	outline-offset: 4px;
	border-radius: var(--vpd-radius);
}

@media (max-width: 900px) {
	.vpd-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 14px;
	}
}

/* ---------- Designer layout ---------- */
.vpd-back {
	display: inline-block;
	margin-bottom: 20px;
	color: inherit;
	text-underline-offset: 3px;
}

.vpd-back::before {
	content: "\2039\00a0";
}

.vpd-designer {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

.vpd-stage-col {
	position: sticky;
	top: 24px;
}

.vpd-stage {
	position: relative;
	overflow: hidden;
	border-radius: var(--vpd-radius);
	background: var(--vpd-soft);
}

.vpd-bg {
	display: block;
	width: 100%;
	height: auto;
}

.vpd-layer {
	position: absolute;
	top: var(--vpd-top, 30%);
	left: var(--vpd-left, 25%);
	width: var(--vpd-width, 50%);
	height: auto;
	pointer-events: none;
}

.vpd-layer[hidden] {
	display: none;
}

@media (max-width: 860px) {
	.vpd-designer {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.vpd-stage-col {
		position: static;
	}
}

/* ---------- Panel ---------- */
.vpd-title {
	margin: 0 0 4px;
}

.vpd-base {
	margin: 0 0 16px;
	color: var(--vpd-muted);
}

.vpd-short {
	margin-bottom: 8px;
}

.vpd-group {
	min-width: 0;
	margin: 0;
	padding: 12px 0;
	border: 0;
	border-top: 1px solid var(--vpd-line);
}

.vpd-group-title {
	float: left;
	width: 100%;
	margin: 0 0 12px;
	padding: 0;
	font-weight: 600;
}

.vpd-group > *:not(legend) {
	clear: both;
}

.vpd-required {
	color: var(--vpd-accent);
}

.vpd-group-desc {
	margin: 0 0 12px;
	color: var(--vpd-muted);
	font-size: 0.92em;
}

.vpd-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.vpd-choices--image {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}

.vpd-choice {
	position: relative;
	margin: 0;
	cursor: pointer;
}

.vpd-choice input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.vpd-choice-label {
	line-height: 1.3;
}

.vpd-choice-price {
	min-height: 1em;
	color: var(--vpd-muted);
	font-size: 0.88em;
}

/* Image tiles */
.vpd-choice--image {
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-align: center;
	font-size: 0.88em;
}

.vpd-choice-media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	padding: 8px;
	overflow: hidden;
	border: 1px solid var(--vpd-line);
	border-radius: 8px;
	background: #fff;
}

.vpd-choice-media img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.vpd-choice-media--none {
	background: linear-gradient(to top right, transparent calc(50% - 1px), var(--vpd-line) calc(50% - 1px), var(--vpd-line) calc(50% + 1px), transparent calc(50% + 1px)) #fff;
}

.vpd-choice--image.is-selected .vpd-choice-media {
	border-color: var(--vpd-accent);
	box-shadow: 0 0 0 1px var(--vpd-accent);
}

/* Colour swatches */
.vpd-choice--color {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 68px;
	text-align: center;
	font-size: 0.82em;
}

.vpd-swatch {
	display: block;
	width: 42px;
	height: 42px;
	border: 1px solid var(--vpd-line);
	border-radius: 50%;
	background-position: center;
	background-size: cover;
	box-shadow: inset 0 0 0 3px #fff;
}

.vpd-swatch--none {
	background: linear-gradient(to top right, transparent calc(50% - 1px), var(--vpd-line) calc(50% - 1px), var(--vpd-line) calc(50% + 1px), transparent calc(50% + 1px)) #fff;
}

.vpd-choice--color.is-selected .vpd-swatch {
	box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--vpd-accent);
}

/* Buttons */
.vpd-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border: 1px solid var(--vpd-line);
	border-radius: 999px;
	background: #fff;
}

.vpd-choice--pill.is-selected .vpd-pill {
	border-color: var(--vpd-accent);
	box-shadow: 0 0 0 1px var(--vpd-accent);
}

/* Keyboard focus for hidden radios */
.vpd-choice input:focus-visible ~ .vpd-choice-media,
.vpd-choice input:focus-visible ~ .vpd-swatch,
.vpd-choice input:focus-visible ~ .vpd-pill {
	outline: 2px solid var(--vpd-accent);
	outline-offset: 3px;
}

.vpd-select,
.vpd-text {
	width: 100%;
	max-width: 360px;
}

.vpd-text-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

/* ---------- Summary ---------- */
.vpd-summary {
	margin-top: 8px;
	padding: 20px;
	border-radius: var(--vpd-radius);
	background: var(--vpd-soft);
}

.vpd-breakdown {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
	font-size: 0.92em;
}

.vpd-breakdown li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	padding: 3px 0;
}

.vpd-breakdown li span:last-child {
	white-space: nowrap;
}

.vpd-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 16px;
	padding-top: 12px;
	border-top: 1px solid var(--vpd-line);
}

.vpd-total-amount {
	font-size: 1.6em;
}

/* Quantity 20% · Add to cart 80% — theme styles are overridden on purpose */
.vpd .vpd-actions {
	display: grid;
	grid-template-columns: minmax(64px, 20%) 1fr;
	gap: 10px;
	align-items: stretch;
	width: 100%;
}

.vpd .vpd-actions .vpd-qty {
	width: 100% !important;
	min-width: 0;
	height: 52px;
	margin: 0 !important;
	padding: 0 8px;
	border: 1px solid var(--vpd-line);
	border-radius: 6px;
	background: #fff;
	text-align: center;
	font-size: 1em;
	-moz-appearance: textfield;
}

.vpd .vpd-actions .vpd-qty::-webkit-outer-spin-button,
.vpd .vpd-actions .vpd-qty::-webkit-inner-spin-button {
	margin: 0;
}

.vpd .vpd-actions .vpd-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	height: 52px;
	margin: 0 !important;
	padding: 0 20px;
	border: 0;
	border-radius: 6px;
	background: var(--vpd-accent);
	color: #fff;
	font-size: 1em;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.vpd .vpd-actions .vpd-submit:hover,
.vpd .vpd-actions .vpd-submit:focus-visible {
	background: var(--vpd-accent-hover, #5e3820);
	color: #fff;
}

.vpd .vpd-actions .vpd-submit:focus-visible,
.vpd .vpd-actions .vpd-qty:focus-visible {
	outline: 2px solid var(--vpd-accent);
	outline-offset: 2px;
}

.vpd-submit.is-loading {
	opacity: 0.7;
	cursor: progress;
}

.vpd-error {
	margin: 12px 0 0;
	color: var(--vpd-error);
}

.vpd-error[hidden] {
	display: none;
}

.vpd-plain-link {
	margin: 14px 0 0;
	color: var(--vpd-muted);
	font-size: 0.9em;
}

.vpd .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	border: 0 !important;
	white-space: nowrap !important;
}

@media (prefers-reduced-motion: reduce) {
	.vpd * {
		transition: none !important;
	}
}


/* ---------- Photo markers + numbered sections ---------- */
.vpd-marker {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: -15px 0 0 -15px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--vpd-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	transition: transform 0.15s ease;
}

.vpd-marker:hover,
.vpd-marker:focus-visible {
	color: #fff;
	transform: scale(1.12);
}

.vpd-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin-right: 8px;
	border-radius: 50%;
	background: var(--vpd-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	vertical-align: 1px;
}

.vpd-current {
	margin-left: 8px;
	color: var(--vpd-muted);
	font-weight: 400;
	font-size: 0.92em;
}

.vpd-group {
	scroll-margin-top: 90px;
}

.vpd-group.is-flash {
	animation: vpd-flash 1.2s ease;
}

@keyframes vpd-flash {
	0%, 40% { background: var(--vpd-soft); }
	100% { background: transparent; }
}

/* Swatches: compact, label shown in the heading instead */
.vpd-choices--color .vpd-choice--color {
	width: auto;
}

.vpd-choices--color .vpd-choice-label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.vpd-choices--color .vpd-choice-price:empty {
	display: none;
}

a.vpd-case {
	color: inherit;
	text-decoration: none;
}

a.vpd-case.is-selected .vpd-swatch {
	box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--vpd-accent);
}

/* ---------- Plain product page: strap size ---------- */
.vpd-pp {
	margin: 0 0 18px;
	padding: 0;
	border: 0;
}

.vpd-pp-title {
	margin: 0 0 10px;
	padding: 0;
	font-weight: 600;
}

.vpd-pp-sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.vpd-pp-size {
	position: relative;
	margin: 0;
	cursor: pointer;
}

.vpd-pp-size input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.vpd-pp-size span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 52px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 6px;
	background: #fff;
	font-weight: 600;
}

.vpd-pp-size small {
	font-weight: 400;
	opacity: 0.7;
}

.vpd-pp-size input:checked + span {
	border-color: var(--vpd-accent, #7a4a2a);
	background: var(--vpd-accent, #7a4a2a);
	color: #fff;
}

.vpd-pp-size input:focus-visible + span {
	outline: 2px solid var(--vpd-accent, #7a4a2a);
	outline-offset: 2px;
}

.vpd-customise-wrap {
	clear: both;
}

@media (prefers-reduced-motion: reduce) {
	.vpd-group.is-flash { animation: none; }
}

.vpd-marker:hover,
.vpd-marker:focus-visible {
	background: var(--vpd-accent-hover, #5e3820);
}

a.vpd-customise-btn {
	transition: background-color 0.2s ease, color 0.2s ease;
}


/* ---------- Tighter spacing ---------- */
.vpd-group-title {
	margin-bottom: 8px;
}

.vpd-choices--image {
	gap: 8px;
}

.vpd-choices--color {
	gap: 6px;
}

.vpd-choices--color .vpd-choice--color {
	gap: 2px;
}

.vpd-pill {
	padding: 7px 14px;
}

.vpd-summary {
	margin-top: 12px;
}

/* ---------- Top bar: all cases / buy plain ---------- */
.vpd-topbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 8px 16px;
	margin-bottom: 18px;
	font-size: 0.92em;
}

.vpd-topbar .vpd-back {
	margin: 0;
}

.vpd-topbar a {
	color: inherit;
	text-underline-offset: 3px;
}

.vpd-topbar .vpd-plain {
	color: var(--vpd-accent);
	font-weight: 600;
}

.vpd-topbar .vpd-plain::after {
	content: "\00a0\203A";
}

.vpd-topbar a:hover {
	color: var(--vpd-accent-hover, var(--vpd-accent));
}

/* ---------- Colour tooltip ---------- */
.vpd [data-tip] {
	position: relative;
}

.vpd [data-tip]::before,
.vpd [data-tip]::after {
	position: absolute;
	left: 50%;
	z-index: 20;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.vpd [data-tip]::after {
	content: attr(data-tip);
	bottom: calc(100% + 10px);
	transform: translate(-50%, 4px);
	padding: 6px 11px;
	border-radius: 6px;
	background: #1f1a17;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.01em;
	white-space: nowrap;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.vpd [data-tip]::before {
	content: "";
	bottom: calc(100% + 4px);
	transform: translate(-50%, 4px);
	border: 6px solid transparent;
	border-bottom: 0;
	border-top-color: #1f1a17;
}

.vpd [data-tip]:hover::before,
.vpd [data-tip]:hover::after,
.vpd [data-tip]:focus-within::before,
.vpd [data-tip]:focus-within::after,
.vpd a[data-tip]:focus-visible::before,
.vpd a[data-tip]:focus-visible::after {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

@media (hover: none) {
	.vpd [data-tip]:not(:focus-within)::before,
	.vpd [data-tip]:not(:focus-within)::after {
		opacity: 0;
		visibility: hidden;
	}
}


/* ---------- Compact layout (v1.6.1) ---------- */
.vpd-designer {
	gap: 36px;
}

.vpd-title {
	margin-bottom: 2px;
}

.vpd-base {
	margin-bottom: 8px;
}

.vpd .vpd-group {
	padding: 8px 0;
}

.vpd .vpd-group-title {
	margin-bottom: 6px;
	font-size: 0.95em;
}

.vpd .vpd-num {
	width: 20px;
	height: 20px;
	margin-right: 6px;
	font-size: 11px;
}

.vpd .vpd-choices {
	gap: 6px;
}

.vpd .vpd-choices--image {
	grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
	gap: 6px;
}

.vpd .vpd-choice-media {
	padding: 5px;
	border-radius: 6px;
}

.vpd .vpd-choice--image {
	font-size: 0.82em;
	gap: 2px;
}

.vpd .vpd-swatch {
	width: 32px;
	height: 32px;
	box-shadow: inset 0 0 0 2px #fff;
}

.vpd .vpd-choice--color.is-selected .vpd-swatch,
.vpd a.vpd-case.is-selected .vpd-swatch {
	box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--vpd-accent);
}

.vpd .vpd-choices--color .vpd-choice--color {
	min-width: 32px;
}

.vpd .vpd-pill {
	padding: 5px 12px;
	gap: 6px;
	font-size: 0.92em;
}

.vpd .vpd-summary {
	margin-top: 10px;
	padding: 14px 16px;
}

.vpd .vpd-breakdown {
	margin-bottom: 8px;
}

.vpd .vpd-breakdown li {
	padding: 1px 0;
}

.vpd .vpd-total {
	margin-bottom: 12px;
	padding-top: 8px;
}

.vpd .vpd-total-amount {
	font-size: 1.4em;
}

.vpd .vpd-actions .vpd-qty,
.vpd .vpd-actions .vpd-submit {
	height: 48px;
}

/* "Buy this case plain" — under Add to cart */
.vpd .vpd-plain-link {
	margin: 12px 0 0;
	text-align: center;
	color: var(--vpd-muted);
	font-size: 0.9em;
}

.vpd .vpd-plain-link a {
	color: var(--vpd-accent);
	font-weight: 600;
	text-underline-offset: 3px;
}

.vpd .vpd-plain-link a:hover {
	color: var(--vpd-accent-hover, var(--vpd-accent));
}

.vpd-topbar {
	margin-bottom: 12px;
}
