/* =========================================================
   threadslabin - SINGLE PRODUCT
   Body class: custom-woo-product-detail

   Save as: assets/css/product.css
   Loaded on product pages by inc/page-styles.php.
   ========================================================= */

.tlp {
	--p-accent: var(--madder, #a8402f);
	--p-accent-dark: #8c3526;
	--p-accent-soft: #faf1ef;

	--p-ink: var(--ink, #1a1d1a);
	--p-text: var(--ink-soft, #5d625c);
	--p-muted: #8a8f89;

	--p-second: var(--indigo, #27408b);
	--p-gold: #b8860b;

	--p-border: rgba(26, 29, 26, 0.12);
	--p-border-soft: rgba(26, 29, 26, 0.07);

	--p-shadow: 0 16px 40px rgba(26, 29, 26, 0.08);
	--p-shadow-sm: 0 8px 22px rgba(26, 29, 26, 0.06);

	--p-radius: 16px;
	--p-radius-sm: 10px;
}

/* Same container as the header and footer, so everything lines up. */
body.custom-woo-product-detail .site-main .wrap,
body.custom-woo-product-detail .site-main .wrap-narrow {
	width: min(100% - 2.5rem, var(--wrap, 1360px));
	max-width: none;
}

/* Bottom breathing room equal to the top. The footer adds its own margin
   site wide, which doubled the gap here. */
body.custom-woo-product-detail .site-main {
	padding-top: clamp(2rem, 4vw, 3rem);
	padding-bottom: clamp(4rem, 8vw, 6rem);
}

body.custom-woo-product-detail .site-footer { margin-top: 0; }

/* =========================================================
   1. BREADCRUMB + NOTICES
   ========================================================= */

.tlp-crumbs {
	margin: 0 0 1.5rem;
	font-size: 0.88rem;
	color: var(--p-muted);
}

.tlp-crumbs a { color: var(--p-text); text-decoration: none; }
.tlp-crumbs a:hover { color: var(--p-accent); }
.tlp-crumbs span { margin: 0 0.45rem; opacity: 0.5; }

/* The "added to your cart" bar */
.tlp .woocommerce-message,
.tlp .woocommerce-info,
.tlp .woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	margin: 0 0 1.5rem;
	padding: 1rem 1.2rem;
	list-style: none;
	background: #fff;
	border: 1px solid var(--p-border);
	border-left: 4px solid var(--p-accent);
	border-radius: var(--p-radius-sm);
	box-shadow: var(--p-shadow-sm);
	font-size: 0.96rem;
	color: var(--p-ink);
}

.tlp .woocommerce-message::before,
.tlp .woocommerce-info::before { display: none; }

.tlp .woocommerce-message .button,
.tlp .woocommerce-info .button {
	margin-left: auto;
	padding: 0.65em 1.3em;
	background: var(--p-accent);
	border: 1px solid var(--p-accent);
	border-radius: var(--p-radius-sm);
	color: #fff;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
}

.tlp .woocommerce-message .button:hover { background: var(--p-accent-dark); border-color: var(--p-accent-dark); }

/* =========================================================
   2. TOP: gallery + summary
   ========================================================= */

.tlp-top {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 40px;
	align-items: start;
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* ---------- Gallery ---------- */
.tlp-gallery {
	position: sticky;
	top: 100px;
	padding: 12px;
	background: #fff;
	border: 1px solid var(--p-border);
	border-radius: var(--p-radius);
	box-shadow: var(--p-shadow);
}

.tlp-gallery .woocommerce-product-gallery {
	position: relative;
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
}

.tlp-gallery .woocommerce-product-gallery__wrapper { margin: 0; }

/* FlexSlider locks the viewport to the tallest slide, which left an empty
   band under the picture. */
.tlp-gallery .flex-viewport { height: auto !important; }
.tlp-gallery .woocommerce-product-gallery__image { line-height: 0; }

.tlp-gallery .woocommerce-product-gallery__image img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 12px;
	display: block;
}

/* On a laptop the 4:5 picture pushed the thumbnails below the fold. The
   height is capped to the viewport instead, so image and thumbnails are
   both visible without scrolling. */
@media (min-width: 901px) {
	.tlp-gallery .woocommerce-product-gallery__image img {
		aspect-ratio: auto;
		height: clamp(380px, 56vh, 600px);
	}

	.tlp-gallery .flex-control-thumbs img { aspect-ratio: 1 / 1; }
}

/* WooCommerce ships this link with its own padding, text indent and
   background image, all of which pushed the icon off centre. */
.tlp-gallery .woocommerce-product-gallery__trigger {
	position: absolute !important;
	font-size: 0 !important;
	line-height: 0 !important;
	text-indent: 0 !important;
	text-decoration: none !important;
	background-image: none !important;
	top: 0.8rem;
	right: 0.8rem;
	left: auto !important;
	margin: 0 !important;
	z-index: 5;
	width: 44px;
	height: 44px;
	display: grid !important;
	place-items: center;
	padding: 0 !important;
	background: #fff;
	border: 1px solid var(--p-border);
	border-radius: 50%;
	box-shadow: var(--p-shadow-sm);
	color: var(--p-ink);
	font-size: 0;
	text-decoration: none;
}

.tlp-gallery .woocommerce-product-gallery__trigger > * { display: none !important; }

.tlp-gallery .woocommerce-product-gallery__trigger::after {
	content: "";
	display: block;
	margin: 0 auto;
	width: 19px;
	height: 19px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.6-3.6M11 8v6M8 11h6'/%3E%3C/svg%3E") center/contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.6-3.6M11 8v6M8 11h6'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Thumbnails: four across, the rest reachable with the arrows */
.tlp-thumbs {
	position: relative;
	margin-top: 12px;
}

.tlp-thumbs__track {
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-ms-overflow-style: none;
	scroll-snap-type: x proximity;
}

.tlp-thumbs__track::-webkit-scrollbar { display: none; }

.tlp-gallery .flex-control-thumbs {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 10px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

.tlp-gallery .flex-control-thumbs li {
	flex: 0 0 calc((100% - 30px) / 4) !important;
	width: calc((100% - 30px) / 4) !important;
	margin: 0 !important;
	float: none !important;
	scroll-snap-align: start;
}

/* Arrows only appear when there is something to scroll to */
.tlp .tlp-thumbs__nav {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: none;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	background: #fff;
	border: 1px solid var(--p-border);
	border-radius: 50%;
	color: var(--p-ink);
	box-shadow: var(--p-shadow-sm);
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.tlp-thumbs.has-nav .tlp-thumbs__nav { display: flex; }

.tlp .tlp-thumbs__nav.is-prev { left: -6px; }
.tlp .tlp-thumbs__nav.is-next { right: -6px; }

.tlp .tlp-thumbs__nav svg { width: 17px; height: 17px; }

.tlp .tlp-thumbs__nav:hover:not(:disabled) {
	background: var(--p-ink);
	border-color: var(--p-ink);
	color: #fff;
}

.tlp .tlp-thumbs__nav:disabled { opacity: 0.35; cursor: not-allowed; }

.tlp-gallery .flex-control-thumbs img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-fit: cover;
	border: 2px solid transparent;
	border-radius: 8px;
	opacity: 0.75;
	cursor: pointer;
	transition: opacity 0.18s ease, border-color 0.18s ease;
}

.tlp-gallery .flex-control-thumbs img:hover,
.tlp-gallery .flex-control-thumbs img.flex-active {
	opacity: 1;
	border-color: var(--p-accent);
}

/* Sale flash from WooCommerce, we show our own badge instead */
.tlp-gallery span.onsale { display: none !important; }

/* =========================================================
   3. SUMMARY
   ========================================================= */

.tlp-summary { min-width: 0; }

/* ---------- Badges ---------- */
.tlp-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.1rem;
}

.tlp-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.45em 0.75em;
	border-radius: 999px;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	line-height: 1;
}

.tlp-badge svg { width: 14px; height: 14px; }

.tlp-badge.is-sale { background: var(--p-accent); color: #fff; }
.tlp-badge.is-stock { background: #e7f1e8; color: #2f6b3a; }
.tlp-badge.is-out { background: #eceae6; color: var(--p-muted); }
.tlp-badge.is-featured { background: #e8ecf7; color: var(--p-second); }
.tlp-badge.is-top { background: #fbf3e0; color: var(--p-gold); }

/* ---------- Title, rating, price ---------- */
.tlp-title {
	margin: 0 0 0.6rem;
	font-family: var(--display, system-ui, sans-serif);
	font-size: clamp(1.9rem, 3.4vw, 2.9rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: var(--p-ink);
}

.tlp-rating {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 1rem;
}

.tlp-stars { display: inline-flex; gap: 2px; }

.tlp-stars svg {
	width: 16px;
	height: 16px;
	fill: var(--p-border);
}

.tlp-stars svg.is-on { fill: var(--p-gold); }

/* Plain text now, not a link: there is no reviews tab to jump to. */
.tlp-rating__count {
	font-size: 0.9rem;
	color: var(--p-text);
}

.tlp-price {
	margin-bottom: 1.1rem;
	padding-bottom: 1.1rem;
	border-bottom: 1px solid var(--p-border-soft);
	font-family: var(--display, system-ui, sans-serif);
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--p-ink);
	letter-spacing: -0.02em;
}

.tlp-price del { margin-right: 0.5rem; color: var(--p-muted); font-weight: 400; font-size: 1.2rem; }
.tlp-price ins { text-decoration: none; color: var(--p-accent); }

.tlp-short {
	margin-bottom: 1.2rem;
	color: var(--p-text);
	line-height: 1.6;
}

.tlp-short p { margin: 0 0 0.5rem; }
.tlp-short p:last-child { margin-bottom: 0; }

.tlp-short strong,
.tlp-short h3,
.tlp-short h4 {
	display: block;
	margin: 0 0 0.4rem;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 1rem;
	color: var(--p-ink);
}

.tlp-short ul { margin: 0; padding-left: 1.1rem; }
.tlp-short li { margin-bottom: 0.15rem; }

/* ---------- Add to cart ---------- */
.tlp-form { margin-bottom: 1.6rem; }

/* Size shown as one row of chips. The real select stays in the DOM,
   hidden, so WooCommerce keeps working exactly as before. */
.tlp-hidden-select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0 !important;
}

.tlp-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.tlp .tlp-chip {
	min-width: 64px;
	padding: 0.85em 1.1em;
	background: #fff;
	border: 1px solid var(--p-border);
	border-radius: var(--p-radius-sm);
	color: var(--p-ink);
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.tlp .tlp-chip { font-size: 1rem; }
.tlp .tlp-chip:hover:not(:disabled) { border-color: var(--p-ink); }

.tlp .tlp-chip.is-active {
	background: var(--p-ink);
	border-color: var(--p-ink);
	color: #fff;
}

.tlp .tlp-chip:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	text-decoration: line-through;
}

/* Quantity row: label left, stepper right */
.tlp-qty-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	margin-bottom: 0.9rem;
}

.tlp-qty-label {
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--p-ink);
}

.tlp .tlp-qty-btn {
	width: 42px;
	min-height: 46px;
	padding: 0;
	background: transparent;
	border: 0;
	color: var(--p-ink);
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tlp .tlp-qty-btn:hover { background: var(--p-accent-soft); color: var(--p-accent); }

.tlp .variations {
	width: 100%;
	margin: 0 0 0.2rem;
	border: 0;
}

.tlp .variations tbody,
.tlp .variations tr { display: block; }

.tlp .variations tr { display: grid; gap: 0.35rem; margin-bottom: 0.6rem; }
.tlp .variations tr:last-child { margin-bottom: 0; }

.tlp .variations th,
.tlp .variations td {
	display: block;
	width: auto;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: left;
}

.tlp .variations th label {
	margin: 0;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--p-muted);
}

.tlp .variations select {
	width: 100%;
	min-height: 50px;
	padding: 0.6em 2.2em 0.6em 0.9em;
	border: 1px solid var(--p-border);
	border-radius: var(--p-radius-sm);
	background-color: #fff;
	font-family: var(--body, system-ui, sans-serif);
	font-size: 0.96rem;
	color: var(--p-ink);
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1d1a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.8em center;
	background-size: 16px;
}

/* Before a size is picked this block is empty, and it was holding open a
   large gap above Quantity. */
.tlp .woocommerce-variation {
	margin: 0 !important;
	padding: 0 !important;
}

.tlp .woocommerce-variation:empty,
.tlp .woocommerce-variation-description:empty,
.tlp .woocommerce-variation-availability:empty { display: none !important; }

.tlp .woocommerce-variation.single_variation { display: block; }

.tlp .woocommerce-variation-price {
	margin: 0 0 0.9rem;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--p-ink);
}

.tlp .woocommerce-variation-price del,
.tlp .woocommerce-variation-price del .amount {
	margin-right: 0.45rem;
	color: var(--p-muted);
	font-weight: 400;
	font-size: 0.95rem;
	opacity: 0.7;
}

.tlp .woocommerce-variation-price ins { text-decoration: none; color: var(--p-ink); }

/* Clear sits right under the chips, not floating far below. */
.tlp .reset_variations {
	display: inline-block;
	margin: 0.55rem 0 0;
	font-size: 0.84rem;
	line-height: 1;
	color: var(--p-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tlp .variations + .single_variation_wrap { margin-top: 0.9rem; }

/* One column, everything full width. Laying the form out as a stack is the
   only reliable way to get a full width button, because WooCommerce nests
   it differently for simple and variable products. */
.tlp form.cart {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.7rem;
	width: 100%;
	margin: 0;
}

.tlp form.cart > * { width: 100%; }

.tlp form.cart .single_add_to_cart_button,
.tlp .woocommerce-variation-add-to-cart .single_add_to_cart_button {
	flex: 0 0 auto !important;
	width: 100% !important;
	max-width: none !important;
	align-self: stretch !important;
}

.tlp form.cart .tlp-qty-row { flex: 1 1 100%; }

/* Variable products wrap the button in this div, which was holding the
   button at its natural width. */
.tlp .woocommerce-variation-add-to-cart {
	display: flex !important;
	flex-direction: column;
	align-items: stretch;
	gap: 0.7rem;
	width: 100%;
	flex: 1 1 100%;
}

.tlp .woocommerce-variation-add-to-cart .quantity { align-self: flex-start; }

.tlp .single_add_to_cart_button.disabled,
.tlp .single_add_to_cart_button:disabled {
	background: var(--p-border) !important;
	border-color: var(--p-border) !important;
	color: var(--p-muted) !important;
	box-shadow: none;
	cursor: not-allowed;
}

.tlp form.cart .variations,
.tlp form.cart .woocommerce-variation { flex: 1 1 100%; }

.tlp .quantity {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--p-border);
	border-radius: var(--p-radius-sm);
	overflow: hidden;
	background: #fff;
}

.tlp .quantity .qty {
	width: 3.2rem;
	min-height: 46px;
	padding: 0 0.4rem;
	border: 0;
	background: transparent;
	text-align: center;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 1rem;
	font-weight: 700;
	color: var(--p-ink);
}

.tlp .single_add_to_cart_button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	flex: 1 1 100%;
	width: 100% !important;
	min-height: 58px;
	padding: 0.95em 1.6em;
	font-size: 1.02rem !important;
	background: var(--p-accent) !important;
	border: 1px solid var(--p-accent) !important;
	border-radius: var(--p-radius-sm) !important;
	color: #fff !important;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 1rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.01em;
	box-shadow: 0 10px 24px rgba(168, 64, 47, 0.2);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.tlp .single_add_to_cart_button::before {
	content: "";
	width: 19px;
	height: 19px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8h12l-1 11a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L6 8z'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E") center/contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8h12l-1 11a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L6 8z'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E") center/contain no-repeat;
	flex: 0 0 auto;
}

.tlp .single_add_to_cart_button:hover {
	background: var(--p-accent-dark) !important;
	border-color: var(--p-accent-dark) !important;
	transform: translateY(-1px);
}

.tlp .stock.out-of-stock {
	margin: 0 0 1rem;
	padding: 0.8rem 1rem;
	background: #eceae6;
	border-radius: var(--p-radius-sm);
	color: var(--p-text);
	font-weight: 600;
}

/* ---------- Meta rows ---------- */
.tlp-meta {
	display: grid;
	gap: 0.7rem;
	padding-top: 1.3rem;
	border-top: 1px solid var(--p-border-soft);
}

.tlp-meta__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.94rem;
}

.tlp-meta__label {
	flex: 0 0 92px;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--p-muted);
}

.tlp-meta__value { color: var(--p-ink); }
.tlp-meta__value a { color: var(--p-ink); text-decoration: none; border-bottom: 1px solid var(--p-border); }
.tlp-meta__value a:hover { color: var(--p-accent); border-color: var(--p-accent); }

.tlp-share__links { display: inline-flex; gap: 0.4rem; }

.tlp-share__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: var(--p-ink);
	border: 1px solid var(--p-border);
	border-radius: 8px;
	text-decoration: none;
	transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.tlp-share__link svg { width: 17px; height: 17px; }

.tlp-share__link:hover {
	background: var(--p-ink);
	border-color: var(--p-ink);
	color: #fff;
}

/* =========================================================
   4. TABS
   ========================================================= */

.tlp-tabs {
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
	scroll-margin-top: 100px;
}

.tlp-tabs__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 1.5rem;
	padding-bottom: 0;
	border-bottom: 1px solid var(--p-border);
}

.tlp .tlp-tabs__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.85em 1.3em;
	margin-bottom: -1px;
	background: transparent;
	border: 1px solid transparent;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	color: var(--p-muted);
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.98rem;
	font-weight: 700;
	cursor: pointer;
	transition: color 0.16s ease, border-color 0.16s ease;
}

.tlp .tlp-tabs__btn:hover { color: var(--p-ink); }

.tlp .tlp-tabs__btn.is-active {
	color: var(--p-ink);
	border-bottom-color: var(--p-accent);
}

.tlp-tabs__count {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 0.35rem;
	background: var(--p-accent-soft);
	color: var(--p-accent);
	border-radius: 999px;
	font-size: 0.72rem;
}

.tlp-tabs__panel { display: none; }
.tlp-tabs__panel.is-active { display: block; }

.tlp-tabs__panel[data-panel="description"] {
	max-width: 78ch;
	color: var(--p-text);
	line-height: 1.75;
}

.tlp-tabs__panel[data-panel="description"] h2,
.tlp-tabs__panel[data-panel="description"] h3 {
	margin-top: 1.6em;
	color: var(--p-ink);
}

/* Additional information: plain rows, no white slab */
.tlp .shop_attributes {
	width: 100%;
	max-width: 640px;
	background: transparent;
	border: 0;
	border-top: 1px solid var(--p-border);
	border-collapse: collapse;
}

.tlp .shop_attributes th,
.tlp .shop_attributes td {
	padding: 0.85rem 0.2rem;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--p-border-soft);
	text-align: left;
	font-style: normal;
}

.tlp .shop_attributes th {
	width: 36%;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--p-muted);
}

.tlp .shop_attributes td { color: var(--p-ink); }

.tlp .shop_attributes td p { margin: 0; }

/* =========================================================
   5. RELATED
   ========================================================= */

.tlp-related { margin-bottom: 0; }

.tlp-related__title {
	margin: 0 0 1.5rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--p-border);
	font-family: var(--display, system-ui, sans-serif);
	font-size: clamp(1.4rem, 2.6vw, 1.9rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--p-ink);
}

/*
 * Four across.
 *
 * Only the grid is set here. The card itself lives in shop.css, which now
 * loads on product pages too. It used to be duplicated in this file, and
 * the copy fell behind: it had no rule for the hover image, so the second
 * gallery photo stacked underneath the first instead of fading over it.
 */
.tlp-related .tl-products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* =========================================================
   6. RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
	.tlp-top { gap: 28px; }
}

@media (max-width: 900px) {
	.tlp-top { grid-template-columns: 1fr; }
	.tlp-gallery { position: static; }
	.tlp-related .tl-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
	.tlp-crumbs { font-size: 0.82rem; margin-bottom: 1rem; }

	.tlp-gallery { padding: 10px; border-radius: 14px; }
	.tlp-gallery .flex-control-thumbs { gap: 7px; }
	.tlp-gallery .flex-control-thumbs li {
		flex-basis: calc((100% - 21px) / 4) !important;
		width: calc((100% - 21px) / 4) !important;
	}
	.tlp .tlp-thumbs__nav { width: 30px; height: 30px; }
	.tlp .tlp-thumbs__nav.is-prev { left: -4px; }
	.tlp .tlp-thumbs__nav.is-next { right: -4px; }

	.tlp-title { font-size: 1.7rem; }
	.tlp-price { font-size: 1.45rem; }

	.tlp form.cart { gap: 0.5rem; }
	.tlp .single_add_to_cart_button { flex: 1 1 100%; }

	.tlp-meta__label { flex-basis: 78px; }

	.tlp .tlp-tabs__btn { padding: 0.7em 0.9em; font-size: 0.9rem; }

	.tlp .woocommerce-message .button { margin-left: 0; width: 100%; text-align: center; }
}

@media (max-width: 420px) {
	.tlp-related .tl-products { grid-template-columns: 1fr; }
}

/* =========================================================
   7. MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
	.tlp *,
	.tlp *::before,
	.tlp *::after { transition: none !important; animation: none !important; }
}

/* =================================================================
   CUSTOM PRODUCT TABS
   Append to the end of assets/css/product.css
   ================================================================= */

/* Content inside a custom tab reads like the description */
.tlp-tabs__panel--custom {
	max-width: 78ch;
	color: var(--p-text, #5d625c);
	line-height: 1.75;
}

.tlp-tabs__panel--custom h2,
.tlp-tabs__panel--custom h3,
.tlp-tabs__panel--custom h4 {
	margin: 1.6em 0 0.5em;
	font-family: var(--display, system-ui, sans-serif);
	color: var(--p-ink, #1a1d1a);
}

.tlp-tabs__panel--custom h2:first-child,
.tlp-tabs__panel--custom h3:first-child { margin-top: 0; }

.tlp-tabs__panel--custom ul,
.tlp-tabs__panel--custom ol { padding-left: 1.2rem; }

.tlp-tabs__panel--custom li { margin-bottom: 0.35em; }

.tlp-tabs__panel--custom img { max-width: 100%; height: auto; border-radius: 10px; }

.tlp-tabs__panel--custom table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}

.tlp-tabs__panel--custom th,
.tlp-tabs__panel--custom td {
	padding: 0.7rem 0.2rem;
	border-bottom: 1px solid var(--p-border-soft, rgba(26, 29, 26, 0.07));
	text-align: left;
}

/* =================================================================
   MANY TABS: the row scrolls sideways instead of wrapping into a
   stack that pushes the content down the page.
   ================================================================= */

@media (max-width: 900px) {
	.tlp-tabs__nav {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-ms-overflow-style: none;
		scroll-snap-type: x proximity;
	}

	.tlp-tabs__nav::-webkit-scrollbar { display: none; }

	.tlp .tlp-tabs__btn {
		flex: 0 0 auto;
		white-space: nowrap;
		scroll-snap-align: start;
	}
}

@media (max-width: 600px) {
	.tlp .tlp-tabs__btn { padding: 0.7em 0.8em; font-size: 0.88rem; }
	.tlp-tabs__panel--custom { line-height: 1.7; }
}

/* =================================================================
							SIZE GUIDE
   ================================================================= */

.tlp .tlsg-link,
.woocommerce div.product .tlsg-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 1.2rem;
	padding: 0;
	background: transparent;
	border: 0;
	border-bottom: 1px solid currentColor;
	border-radius: 0;
	color: var(--p-ink, #1a1d1a);
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.88rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.2;
	cursor: pointer;
	transition: color 0.16s ease;
}

.tlp .tlsg-link:hover,
.woocommerce div.product .tlsg-link:hover {
	background: transparent;
	color: var(--p-accent, #a8402f);
}

.tlsg-link svg { width: 16px; height: 16px; }

.tlsg-overlay[hidden],
.tlsg-modal[hidden] {
	display: none !important;
	pointer-events: none !important;
	visibility: hidden !important;
}

/* Second guard: nothing here reacts to the mouse until the popup is open. */
.tlsg-overlay,
.tlsg-modal { pointer-events: none; }

body.tlsg-open .tlsg-overlay,
body.tlsg-open .tlsg-modal { pointer-events: auto; }

/* ---------- Overlay ---------- */

.tlsg-overlay {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: rgb(0 0 0 / 72%);
	backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity 0.28s ease;
}

body.tlsg-open .tlsg-overlay { opacity: 1; }

/* ---------- The popup ---------- */

.tlsg-modal {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 99999;
	width: min(680px, calc(100% - 2rem));
	max-height: min(80vh, 720px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 30px 80px rgba(10, 16, 36, 0.35);
	opacity: 0;
	transform: translate(-50%, -46%) scale(0.97);
	transition: opacity 0.28s ease, transform 0.28s ease;
}

body.tlsg-open .tlsg-modal {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

body.tlsg-open { overflow: hidden; }

.tlsg-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 18px 20px;
	background: #1a1d1a;
	color: #fff;
}

.tlsg-modal__title {
	margin: 0;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: #fff;
}

.tlsg-modal__close {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	background: rgba(255, 255, 255, 0.12);
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.16s ease;
}

.tlsg-modal__close:hover { background: rgba(255, 255, 255, 0.26); }
.tlsg-modal__close svg { width: 17px; height: 17px; }

/* ---------- Tabs ---------- */

.tlsg-modal__tabs {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.3rem;
	padding: 12px 20px 0;
	overflow-x: auto;
	scrollbar-width: none;
	border-bottom: 1px solid rgba(26, 29, 26, 0.12);
}

.tlsg-modal__tabs::-webkit-scrollbar { display: none; }

.tlsg-modal__tab {
	flex: 0 0 auto;
	padding: 0.6em 1.1em;
	margin-bottom: -1px;
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	color: #8a8f89;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.92rem;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.16s ease, border-color 0.16s ease;
}

.tlsg-modal__tab:hover { background: transparent; color: #1a1d1a; }

.tlsg-modal__tab.is-active {
	color: #1a1d1a;
	border-bottom-color: var(--p-accent, #a8402f);
}

/* ---------- Body ---------- */

.tlsg-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 18px 20px 22px;
}

.tlsg-panel { display: none; }
.tlsg-panel.is-active { display: block; }

.tlsg-table-scroll { overflow-x: auto; }

.tlsg-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.94rem;
}

.tlsg-table th,
.tlsg-table td {
	padding: 0.75rem 0.8rem;
	border-bottom: 1px solid rgba(26, 29, 26, 0.09);
	text-align: left;
	white-space: nowrap;
}

.tlsg-table thead th {
	background: #f3f2ed;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #5d625c;
}

.tlsg-table thead th:first-child { border-top-left-radius: 8px; }
.tlsg-table thead th:last-child { border-top-right-radius: 8px; }

.tlsg-table tbody td { color: #1a1d1a; }

.tlsg-table tbody td:first-child {
	font-family: var(--display, system-ui, sans-serif);
	font-weight: 700;
}

.tlsg-table tbody tr:hover td { background: #faf9f6; }
.tlsg-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- Phone ---------- */

@media (max-width: 600px) {
	.tlsg-modal {
		width: calc(100% - 1.5rem);
		max-height: 86vh;
		border-radius: 16px;
	}

	.tlsg-modal__head { padding: 15px 16px; }
	.tlsg-modal__title { font-size: 0.95rem; letter-spacing: 0.12em; }
	.tlsg-modal__tabs { padding: 10px 16px 0; }
	.tlsg-modal__body { padding: 14px 16px 18px; }

	.tlsg-table { font-size: 0.88rem; }
	.tlsg-table th,
	.tlsg-table td { padding: 0.6rem 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
	.tlsg-overlay,
	.tlsg-modal { transition: none !important; }
}

/* ===== FOCUS RINGS: keyboard only ===== */

.woocommerce-notices-wrapper:focus,
.woocommerce-notices-wrapper > *:focus,
.woocommerce-message:focus,
.woocommerce-info:focus,
.woocommerce-error:focus,
.woocommerce-NoticeGroup:focus,
.wc-block-components-notice-banner:focus,
div[tabindex="-1"]:focus,
section[tabindex="-1"]:focus,
ul[tabindex="-1"]:focus,
[tabindex="-1"]:focus {
	outline: none !important;
	box-shadow: none !important;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
summary:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible),
.wp-block-button__link:focus:not(:focus-visible),
.button:focus:not(:focus-visible) {
	outline: none !important;
	box-shadow: none !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible,
.wp-block-button__link:focus-visible,
.button:focus-visible {
	outline: 2px solid var(--madder, #a8402f) !important;
	outline-offset: 2px;
	box-shadow: none !important;
}