/* =====================================================================
 * Shika Trends UK v2.0: polish.
 * Loaded after theme.css and woocommerce.css.
 * ===================================================================== */

/* ---------- Logos keep their real shape ---------- */
.st-brand .custom-logo,
.st-footer__brand .custom-logo {
	width: auto !important;
	height: auto;
	max-width: 100%;
	object-fit: contain;
}

.st-footer__brand .custom-logo {
	max-height: 40px;
}

/* ---------- Smoother feel ---------- */
html {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* Blur is kept for the header and menus, where the page moves behind them. Everything that
 * scrolls with the page drops it: it looked the same on the dark ground and made scrolling heavy. */
.st-glass,
.st-design,
.st-faq .elementor-toggle-item,
.st-prose,
.st-wide,
.st-card,
.st-values li,
.st-option,
.woocommerce ul.products li.product,
.woocommerce div.product div.summary,
.woocommerce div.product .st-personalise,
.st-btn,
.elementor-widget-button .elementor-button,
.woocommerce :where(a.button, button.button, input.button),
.woocommerce-page :where(a.button, button.button, input.button),
.wc-block-components-button:not(.is-link),
:where(button[type="submit"], input[type="submit"]) {
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
}

/* One quick, consistent response for every button and card. */
.st-btn,
.elementor-widget-button .elementor-button,
.woocommerce :where(a.button, button.button, input.button),
.woocommerce-page :where(a.button, button.button, input.button),
.wc-block-components-button:not(.is-link) {
	transition: transform 160ms var(--st-ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease, opacity 200ms ease !important;
}

.st-btn:active,
.elementor-widget-button .elementor-button:active,
.woocommerce :where(a.button, button.button, input.button):active,
.woocommerce-page :where(a.button, button.button, input.button):active,
.wc-block-components-button:not(.is-link):active {
	transform: scale(0.97);
}

.woocommerce ul.products li.product {
	transition: transform 280ms var(--st-ease-out), border-color 200ms ease, background-color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
	.woocommerce ul.products li.product:hover {
		transform: translateY(-4px);
	}
}

/* Scroll reveals settle faster. */
@media (prefers-reduced-motion: no-preference) {
	.st-js .st-reveal:not(.elementor-element-edit-mode) {
		transition-duration: 560ms !important;
	}
}

/* Keyboard focus is clear on the dark ground. */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--st-gold);
	outline-offset: 3px;
}

/* ---------- Single product layout ---------- */

/* On wide screens the photos stay in view while the options scroll; the order panel no
 * longer floats, so nothing slides over the details or related products below. */
@media (min-width: 861px) {
	.woocommerce div.product div.summary {
		position: relative;
		top: auto;
	}

	.woocommerce div.product div.images {
		position: sticky;
		top: calc(var(--st-header-h) + 32px);
	}
}

.woocommerce div.product.st-product-more {
	display: block;
	margin-top: clamp(64px, 8vw, 112px);
	padding: 0;
	background: none;
	border: 0;
}

.st-product-more > * + * {
	margin-top: clamp(56px, 7vw, 96px);
}

.st-product-more .related > h2,
.st-product-more .upsells > h2 {
	margin: 0 0 clamp(20px, 3vw, 32px);
}

.st-product-more ul.products {
	margin: 0;
}

/* ---------- Stole builder ---------- */
.st-builder {
	display: grid;
	gap: 22px;
	grid-template-areas: "stole" "form";
}

.st-builder__form {
	grid-area: form;
	display: grid;
	gap: 16px;
	min-width: 0;
}

.st-builder__form .st-field {
	margin: 0;
}


.st-stole {
	--st-stole-cloth: #121010;
	--st-stole-thread: #f2c45a;
	grid-area: stole;
	margin: 0;
	display: grid;
	justify-items: center;
	gap: 12px;
	padding: 22px 14px 14px;
	border-radius: 20px;
	background: radial-gradient(120% 80% at 50% 0%, rgba(255, 184, 28, 0.1), transparent 60%), rgba(255, 248, 234, 0.035);
	border: 1px solid var(--st-line);
}

.st-stole__pair {
	display: flex;
	gap: 16px;
	justify-content: center;
}

.st-stole__side {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	width: 84px;
	min-height: 340px;
	padding-bottom: 0;
	border-radius: 4px 4px 0 0;
	background:
		linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.35)),
		repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 4px),
		var(--st-stole-cloth);
	box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.8);
}

.st-stole__side--left {
	transform: rotate(-1.5deg);
	transform-origin: top center;
}

.st-stole__side--right {
	transform: rotate(1.5deg);
	transform-origin: top center;
}

.st-stole__band {
	flex: none;
	display: block;
	width: 100%;
	height: 30px;
	background: var(--st-stripes);
}

.st-stole__band--thin {
	height: 14px;
}

.st-stole__band:first-child {
	height: 36px;
}

.st-stole__fringe {
	flex: none;
	display: block;
	width: 100%;
	height: 22px;
	margin-top: -10px;
	background: repeating-linear-gradient(90deg, var(--st-stole-thread) 0 2px, transparent 2px 4px);
	-webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
	mask-image: linear-gradient(180deg, #000 55%, transparent);
	opacity: 0.85;
}

.st-stole__badge {
	flex: none;
	display: none;
	place-items: center;
	width: 52px;
	height: 52px;
}

.st-stole[data-st-side="left"] .st-stole__badge[data-st-badge="left"],
.st-stole[data-st-side="right"] .st-stole__badge[data-st-badge="right"],
.st-stole[data-st-side="both"] .st-stole__badge {
	display: grid;
}

.st-stole__badge img {
	display: block;
	max-width: 52px;
	max-height: 52px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.st-stole__badge img[hidden] {
	display: none;
}

.st-stole__badge-empty {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border: 1.5px dashed rgba(242, 196, 90, 0.55);
	border-radius: 50%;
	font: 700 0.56rem/1 var(--st-body);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(242, 196, 90, 0.8);
}

.st-stole.has-logo .st-stole__badge-empty {
	display: none;
}

.st-stole__text {
	flex: none;
	display: grid;
	justify-items: center;
	width: 100%;
	padding: 0 7px;
	overflow: hidden;
	color: var(--st-stole-thread);
	text-align: center;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
	transition: opacity 200ms ease;
}

.st-stole__text > span {
	display: block;
	white-space: nowrap;
}

.st-stole__text.is-empty {
	opacity: 0.42;
}

.st-stole__text--script {
	font: italic 600 0.92rem/1.08 var(--st-body);
}

.st-stole__text--caps {
	font: 700 0.74rem/1.12 var(--st-display);
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.st-stole__text--name {
	font: 800 0.78rem/1.12 var(--st-display);
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.st-stole__text--small {
	font: 600 0.62rem/1.2 var(--st-body);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.st-stole__side > .st-stole__band:nth-last-of-type(2) {
	margin-top: auto;
}

.st-stole__cap {
	font-size: 0.74rem;
	color: var(--st-ink-soft);
}

/* Logo upload */
.st-field__label {
	display: block;
	font-weight: 700;
	margin-bottom: 6px;
}

.st-field__opt {
	font-weight: 400;
	opacity: 0.65;
}

.st-upload {
	display: flex;
	align-items: center;
	gap: 8px;
}

.st-upload__pick {
	position: relative;
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
	border: 1px dashed rgba(255, 248, 234, 0.28);
	border-radius: var(--st-r-input);
	cursor: pointer;
	transition: border-color 200ms ease, background-color 200ms ease;
}

.st-upload__pick:hover,
.st-upload__pick:focus-within {
	border-color: var(--st-gold);
	background: rgba(255, 184, 28, 0.06);
}

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

.st-upload__btn {
	flex: none;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--st-gold);
	color: var(--st-ink);
	font-weight: 700;
	font-size: 0.85rem;
	line-height: 1;
}

.st-upload__name {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.86rem;
	opacity: 0.8;
}

.st-upload__name.is-error {
	opacity: 1;
	color: #ff8a7a;
	white-space: normal;
}

.st-upload__clear {
	flex: none;
	padding: 8px 4px;
	border: 0;
	background: none;
	color: var(--st-on-dark);
	font-size: 0.85rem;
	text-decoration: underline;
	cursor: pointer;
	box-shadow: none !important;
}

.st-upload__side {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
	font-size: 0.88rem;
}

.st-upload__side select {
	flex: 1;
	padding: 10px 12px;
	border-radius: var(--st-r-input);
	background: rgba(255, 248, 234, 0.06);
	color: var(--st-on-dark);
	border: 1px solid rgba(255, 248, 234, 0.18);
}

.st-upload__side select option {
	color: #140f0a;
}

.st-field--logo .st-field__help {
	display: block;
	margin-top: 8px;
}

.st-cart-logo {
	display: inline-block;
	width: 32px;
	height: 32px;
	object-fit: contain;
	vertical-align: middle;
	border-radius: 6px;
	background: #121010;
}

@media (prefers-reduced-motion: reduce) {
	.st-stole__side--left,
	.st-stole__side--right {
		transform: none;
	}
}
/* ---------- v2.1: the builder never overlaps ---------- */
/* Form controls and grid items may shrink to their column; fieldsets otherwise refuse to. */
.woocommerce div.product div.summary,
.woocommerce div.product form.cart,
.woocommerce div.product form.cart > *,
.st-personalise,
.st-personalise__fields,
.st-builder,
.st-builder > *,
.st-field {
	min-width: 0;
	min-inline-size: 0;
}

.st-field :where(input, select),
.st-upload__side select {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

/* The preview always sits above the fields, centred, inside its own panel. */
.st-builder {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "stole" "form";
}

.st-stole {
	position: static;
	width: 100%;
	box-sizing: border-box;
	overflow: hidden;
	padding: 26px 14px 16px;
}

.st-stole__side--left,
.st-stole__side--right {
	transform: none;
}

/* Embroidered logo: one gold-thread silhouette, never the logo's own colours. */
.st-stole__badge {
	width: 56px;
	height: 56px;
	filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.7)) drop-shadow(0 0 1px rgba(242, 196, 90, 0.35));
}

.st-stole__emb {
	display: block;
	width: 52px;
	height: 52px;
	background:
		repeating-linear-gradient(62deg, rgba(255, 236, 170, 0.9) 0 1px, transparent 1px 2.6px),
		repeating-linear-gradient(-62deg, rgba(120, 82, 18, 0.55) 0 1px, transparent 1px 2.6px),
		linear-gradient(160deg, #f6d27a, #c9982c 60%, #e8bb52);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.st-stole__emb[hidden] {
	display: none;
}
/* ---------- Compliance Hub button: smaller ---------- */
body .chub-login {
	right: 14px;
	bottom: 14px;
	gap: 6px;
	padding: 8px 13px;
	font-size: 12.5px;
	box-shadow: 0 4px 12px rgba(210, 84, 26, 0.28);
}

body .chub-login svg {
	width: 14px;
	height: 14px;
}

@media (max-width: 600px) {
	body .chub-login {
		right: 10px;
		bottom: 10px;
		padding: 7px 11px;
		font-size: 11.5px;
	}

	body .chub-login svg {
		width: 13px;
		height: 13px;
	}
}
