/* VTHZ Size Guide */

/* No table for this product (hats, caps…) → hide the WoodMart demo size guide button. */
.vthz-sg-none .wd-single-size-guide-btn,
.vthz-sg-none .wd-sizeguide-btn { display: none !important; }

.vthz-sg-btn a { cursor: pointer; }

.vthz-sg {
	--vthz-bg: #0a0a0a;
	--vthz-panel: #0f0f0f;
	--vthz-text: #f4f4f2;
	--vthz-muted: #9b9b97;
	--vthz-line: rgba(255, 255, 255, .12);
	--vthz-hl: rgba(255, 255, 255, .09);
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: inherit;
	color: var(--vthz-text);
}
.vthz-sg[hidden] { display: none; }

/* Neutralise WoodMart's global button styles inside the popup. */
.vthz-sg button {
	--btn-color: inherit;
	--btn-color-hover: inherit;
	--btn-bgcolor: transparent;
	--btn-bgcolor-hover: transparent;
	--btn-brd-radius: 0;
	--btn-height: auto;
	--btn-padding: 0;
	text-transform: inherit;
	font-family: inherit;
}

.vthz-sg__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .78);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity .3s ease;
}

.vthz-sg__panel {
	position: relative;
	width: 100%;
	max-width: 860px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	display: flex;
	flex-direction: column;
	background: var(--vthz-panel);
	border: 1px solid var(--vthz-line);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .3s ease, transform .3s ease;
}

.vthz-sg.is-open .vthz-sg__overlay { opacity: 1; }
.vthz-sg.is-open .vthz-sg__panel { opacity: 1; transform: none; }

.vthz-sg .vthz-sg__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 40px;
	height: 40px;
	min-height: 0;
	padding: 0;
	display: grid;
	place-items: center;
	background: transparent;
	border: 0;
	color: var(--vthz-text);
	cursor: pointer;
	opacity: .75;
	transition: opacity .2s, transform .3s;
	box-shadow: none;
}
.vthz-sg .vthz-sg__close:hover,
.vthz-sg .vthz-sg__close:focus-visible { opacity: 1; transform: rotate(90deg); background: transparent; color: var(--vthz-text); }

.vthz-sg__head { padding: 36px 40px 0; }

.vthz-sg__eyebrow {
	margin: 0 0 10px;
	font-size: 10px;
	letter-spacing: .3em;
	text-transform: uppercase;
	color: var(--vthz-muted);
}

.vthz-sg__title {
	margin: 0;
	font-size: 22px;
	font-weight: 400;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--vthz-text);
}

.vthz-sg .vthz-sg__tabs {
	display: flex;
	gap: 32px;
	margin: 26px 40px 0;
	border-bottom: 1px solid var(--vthz-line);
}

.vthz-sg .vthz-sg__tab {
	position: relative;
	min-height: 0;
	padding: 0 0 14px;
	background: none;
	border: 0;
	box-shadow: none;
	font: inherit;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--vthz-muted);
	cursor: pointer;
	transition: color .2s;
}
.vthz-sg .vthz-sg__tab::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 1px;
	background: var(--vthz-text);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .3s ease;
}
.vthz-sg .vthz-sg__tab:hover,
.vthz-sg .vthz-sg__tab:focus-visible { color: var(--vthz-text); background: none; }
.vthz-sg .vthz-sg__tab.is-active { color: var(--vthz-text); }
.vthz-sg .vthz-sg__tab.is-active::after { transform: scaleX(1); }

.vthz-sg__body {
	overflow-y: auto;
	padding: 24px 40px 40px;
	scrollbar-color: #444 transparent;
	scrollbar-width: thin;
}

.vthz-sg__pane[hidden] { display: none; }

.vthz-sg__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.vthz-sg__note {
	margin: 0;
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--vthz-muted);
}

.vthz-sg .vthz-sg__units {
	display: inline-flex;
	border: 1px solid var(--vthz-line);
}
.vthz-sg .vthz-sg__units button {
	min-height: 0;
	padding: 7px 14px;
	background: transparent;
	border: 0;
	box-shadow: none;
	font: inherit;
	font-size: 10px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--vthz-muted);
	cursor: pointer;
	transition: background .2s, color .2s;
}
.vthz-sg .vthz-sg__units button:hover { color: var(--vthz-text); background: transparent; }
.vthz-sg .vthz-sg__units button.is-active { background: var(--vthz-text); color: #0a0a0a; }

.vthz-sg__group + .vthz-sg__group { margin-top: 32px; }

.vthz-sg__subtitle {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--vthz-text);
}

.vthz-sg__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-color: #444 transparent;
	scrollbar-width: thin;
}

.vthz-sg .vthz-sg__table {
	width: 100%;
	min-width: 420px;
	margin: 0;
	border-collapse: collapse;
	border: 0;
	background: transparent;
	font-size: 13px;
	letter-spacing: .06em;
	color: var(--vthz-text);
}

.vthz-sg .vthz-sg__table th,
.vthz-sg .vthz-sg__table td {
	padding: 13px 12px;
	border: 0;
	border-bottom: 1px solid var(--vthz-line);
	background: transparent;
	color: var(--vthz-text);
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	transition: background .2s;
}

.vthz-sg .vthz-sg__table thead th {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	border-bottom-color: rgba(255, 255, 255, .35);
}

.vthz-sg .vthz-sg__table tbody th,
.vthz-sg .vthz-sg__table thead th:first-child {
	position: sticky;
	left: 0;
	z-index: 1;
	text-align: left;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--vthz-muted);
	background: var(--vthz-panel);
	padding-left: 0;
	padding-right: 20px;
}

.vthz-sg .vthz-sg__table tbody tr:hover td { background: rgba(255, 255, 255, .035); }
.vthz-sg .vthz-sg__table .is-selected,
.vthz-sg .vthz-sg__table tbody tr:hover td.is-selected { background: var(--vthz-hl); }
.vthz-sg .vthz-sg__table thead th.is-selected { box-shadow: inset 0 -2px 0 var(--vthz-text); }

/* Units */
.vthz-sg .vthz-u-in { display: none; }
.vthz-sg[data-unit="in"] .vthz-u-cm { display: none; }
.vthz-sg[data-unit="in"] .vthz-u-in { display: inline; }

html.vthz-sg-lock,
html.vthz-sg-lock body { overflow: hidden !important; }

/* Mobile: bottom sheet */
@media (max-width: 767px) {
	.vthz-sg { padding: 0; align-items: flex-end; }
	.vthz-sg__panel {
		max-width: none;
		max-height: 92vh;
		max-height: 92dvh;
		border-left: 0;
		border-right: 0;
		border-bottom: 0;
		transform: translateY(40px);
	}
	.vthz-sg__head { padding: 28px 22px 0; }
	.vthz-sg__title { font-size: 18px; }
	.vthz-sg .vthz-sg__tabs { margin: 22px 22px 0; gap: 24px; }
	.vthz-sg__body { padding: 20px 22px 32px; }
	.vthz-sg__bar { flex-wrap: wrap; }
	.vthz-sg .vthz-sg__table { font-size: 12px; min-width: 0; }
	.vthz-sg .vthz-sg__table th,
	.vthz-sg .vthz-sg__table td { padding: 11px 9px; }
}

@media (prefers-reduced-motion: reduce) {
	.vthz-sg__overlay,
	.vthz-sg__panel,
	.vthz-sg .vthz-sg__tab::after { transition: none; }
}
