/* Drape Connect — base styles. Themes override the custom properties. */
:root {
	--drape-c-ink: #16110f;
	--drape-c-paper: #faf7f2;
	--drape-c-line: #e5dccd;
	--drape-c-accent: #b8863b;
	--drape-c-accent-soft: #f1e3c8;
	--drape-c-muted: #6b5f57;
	--drape-radius: 10px;
}

.drape-per-metre {
	font-size: 0.82em;
	font-weight: 400;
	color: var(--drape-c-muted);
	white-space: nowrap;
}

/* Try-on button */
.drape-tryon-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	cursor: pointer;
}
.drape-tryon-button__icon { flex: none; }

/* Try-on modal */
html.drape-tryon-open, html.drape-tryon-open body { overflow: hidden; }
.drape-tryon {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	background: var(--drape-c-ink);
	color: var(--drape-c-paper);
	opacity: 0;
	transition: opacity 0.2s ease;
}
.drape-tryon[hidden] { display: none; }
.drape-tryon.is-open { opacity: 1; }
.drape-tryon__bar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 12px 10px 20px;
	border-bottom: 1px solid rgba(250, 247, 242, 0.12);
	min-height: 56px;
}
.drape-tryon__title {
	margin: 0;
	flex: 1;
	font-size: 15px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.drape-tryon__newtab {
	color: var(--drape-c-accent-soft);
	font-size: 14px;
	white-space: nowrap;
}
.drape-tryon__close {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(250, 247, 242, 0.2);
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}
.drape-tryon__close:hover, .drape-tryon__close:focus-visible { background: rgba(250, 247, 242, 0.1); }
.drape-tryon__stage { position: relative; flex: 1; }
.drape-tryon__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.drape-tryon__status {
	position: absolute;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	margin: 0;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--drape-c-paper);
	color: var(--drape-c-ink);
	font-size: 14px;
	display: none;
	max-width: calc(100% - 32px);
	text-align: center;
}
.drape-tryon__status.is-visible { display: block; }

/* Boutique picker (checkout) */
.drape-boutique-picker { border: 0; margin: 0 0 2em; padding: 0; min-width: 0; }
.drape-boutique-picker__title { font-size: 1.25em; font-weight: 600; padding: 0; margin-bottom: 0.25em; }
.drape-boutique-picker__intro { margin: 0 0 1em; color: var(--drape-c-muted); }
.drape-boutique-picker__grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.drape-boutique-card { position: relative; display: block; cursor: pointer; }
.drape-boutique-card input {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--drape-c-accent);
}
.drape-boutique-card__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	height: 100%;
	padding: 16px 44px 16px 16px;
	border: 1px solid var(--drape-c-line);
	border-radius: var(--drape-radius);
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.drape-boutique-card__name { font-weight: 600; }
.drape-boutique-card__address, .drape-boutique-card__hours, .drape-boutique-card__phone { font-size: 0.9em; color: var(--drape-c-muted); }
.drape-boutique-card input:checked + .drape-boutique-card__body {
	border-color: var(--drape-c-accent);
	box-shadow: 0 0 0 1px var(--drape-c-accent);
	background: var(--drape-c-paper);
}
.drape-boutique-card input:focus-visible + .drape-boutique-card__body { outline: 2px solid var(--drape-c-accent); outline-offset: 2px; }

/* Collect-from block */
.drape-collect-from {
	margin: 0 0 2em;
	padding: 1.25em 1.5em;
	border: 1px solid var(--drape-c-line);
	border-radius: var(--drape-radius);
	background: var(--drape-c-paper);
}
.drape-collect-from__title { margin: 0 0 0.5em; font-size: 1.1em; }
.drape-collect-from p { margin: 0 0 0.25em; }

/* Look thumbnails */
.drape-look { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.drape-look__label { font-size: 0.85em; color: var(--drape-c-muted); }
.drape-look-thumb { display: block; border-radius: 6px; object-fit: cover; border: 1px solid var(--drape-c-line); }
dl.variation .drape-look-thumb { margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
	.drape-tryon { transition: none; }
}
