/* =========================================================================
   THEORYS — single product page.
   Tokens from style.css :root; --forest-press is declared in theorys-catalog.css.
   ========================================================================= */

/* ---------- two-column top ------------------------------------------- */

.thr-shell.single-product div.product { gap: 34px; }

/* Gallery on white with padding, matching the catalogue cards. */
.thr-shell.single-product div.product .woocommerce-product-gallery {
	background: var(--white) !important;
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 26px;
	box-sizing: border-box;
}
.thr-shell.single-product div.product .woocommerce-product-gallery img {
	background: transparent;
	object-fit: contain;
}

/* ---------- purchase panel ------------------------------------------- */

.thr-buy { display: flex; flex-direction: column; }
.thr-shell .thr-buy-title {
	font-family: var(--font-head); font-weight: 600;
	font-size: clamp(28px, 4vw, 40px); line-height: 1.05;
	letter-spacing: -0.02em; color: var(--ink);
	margin: 0 0 12px;
}
.thr-buy-desc {
	font-size: 15px; line-height: 1.68; color: #3a423d;
	margin: 0 0 22px; padding-bottom: 22px;
	border-bottom: 1px solid var(--line);
}

.thr-field { margin-bottom: 20px; }
.thr-field-label {
	display: block;
	font-family: var(--font-head); font-size: 11.5px; font-weight: 600;
	letter-spacing: 0.16em; text-transform: uppercase; color: var(--platinum-lo);
	margin-bottom: 10px;
}

/* (b) DOSAGE — the primary interaction, so the targets are big and obvious */
.thr-dosage { display: flex; flex-wrap: wrap; gap: 10px; }
.thr-dose {
	position: relative;
	min-width: 84px; min-height: 56px;
	padding: 10px 20px;
	font-family: var(--font-head); font-size: 17px; font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--ink);
	background: var(--white);
	border: 1.5px solid var(--silver);
	border-radius: 12px;
	cursor: pointer;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	transition: border-color .14s ease, background .14s ease, color .14s ease, box-shadow .14s ease;
}
.thr-dose:hover:not(:disabled):not(.is-active) { border-color: var(--forest-mid); }
.thr-dose.is-active {
	background: var(--forest-deep);
	border-color: var(--forest-deep);
	color: var(--white);
	box-shadow: 0 4px 14px rgba(27,58,47,0.22);
}
.thr-dose:focus-visible { outline: 2px solid var(--forest-mid); outline-offset: 2px; }
.thr-dose:disabled { opacity: .45; cursor: not-allowed; }
.thr-dose-size { line-height: 1.1; }
.thr-dose-oos {
	font-family: var(--font-body); font-size: 9.5px; font-weight: 500;
	letter-spacing: 0.08em; text-transform: uppercase; color: var(--platinum-lo);
}

/* (c) QUANTITY — 44px minimum touch targets */
.thr-stepper {
	display: inline-flex; align-items: stretch;
	border: 1px solid var(--line); border-radius: 12px;
	background: var(--white); overflow: hidden;
}
.thr-step {
	width: 52px; min-height: 52px;
	display: grid; place-items: center;
	background: var(--white); border: 0; cursor: pointer; color: var(--ink);
	transition: background .12s ease;
}
.thr-step:hover { background: var(--off-white); }
.thr-step:active { background: var(--line); }
.thr-step:focus-visible { outline: 2px solid var(--forest-mid); outline-offset: -2px; }
.thr-step svg { width: 19px; height: 19px; }
.thr-shell input.thr-qty-display {
	width: 62px; min-height: 52px;
	text-align: center;
	font-family: var(--font-head); font-size: 17px; font-weight: 600;
	color: var(--ink); background: var(--white);
	border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
	border-radius: 0; padding: 0; box-shadow: none;
	-moz-appearance: textfield;
}
.thr-shell input.thr-qty-display:focus { outline: none; background: var(--off-white); }

/* (d) INCENTIVE */
.thr-incentive {
	margin: -8px 0 18px;
	font-family: var(--font-head); font-size: 13.5px; font-weight: 500;
	color: var(--forest-mid);
	display: inline-flex; align-items: center; gap: 7px;
}
.thr-incentive::before {
	content: ""; width: 6px; height: 6px; border-radius: 999px;
	background: var(--forest-mid); flex: none;
}
.thr-incentive.is-unlocked { color: var(--forest-deep); }

/* (e) TOTAL */
.thr-total-row {
	display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
	padding: 16px 0 18px; margin-bottom: 20px;
	border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.thr-total-label {
	font-family: var(--font-head); font-size: 11.5px; font-weight: 600;
	letter-spacing: 0.16em; text-transform: uppercase; color: var(--platinum-lo);
	margin-right: auto;
}
.thr-total {
	font-family: var(--font-head); font-size: 32px; font-weight: 600;
	letter-spacing: -0.02em; color: var(--ink); line-height: 1;
}
.thr-total-was {
	font-family: var(--font-head); font-size: 17px; color: var(--platinum-lo);
	text-decoration: line-through;
}

/* (f) BUNDLE TIERS */
.thr-tiers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.thr-tier {
	text-align: left;
	padding: 13px 14px;
	background: var(--white);
	border: 1.5px solid var(--line);
	border-radius: 12px;
	cursor: pointer;
	display: flex; flex-direction: column; gap: 3px;
	transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.thr-tier:hover:not(.is-active) { border-color: var(--forest-mid); }
.thr-tier.is-active {
	border-color: var(--forest-deep);
	background: rgba(27,58,47,0.045);
	box-shadow: 0 3px 12px rgba(27,58,47,0.10);
}
.thr-tier:focus-visible { outline: 2px solid var(--forest-mid); outline-offset: 2px; }
.thr-tier-label {
	font-family: var(--font-head); font-size: 10.5px; font-weight: 600;
	letter-spacing: 0.14em; text-transform: uppercase; color: var(--platinum-lo);
}
.thr-tier.is-active .thr-tier-label { color: var(--forest-deep); }
.thr-tier-count { font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--ink); }
.thr-tier-save { font-size: 12px; color: var(--forest-mid); }
.thr-tier-total { font-family: var(--font-head); font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 2px; }

/* (g) FREE SHIPPING */
.thr-shipfree {
	display: flex; align-items: center; gap: 9px;
	margin: 18px 0 0; font-size: 13.5px; color: #3a423d;
}
.thr-shipfree svg { width: 19px; height: 19px; flex: none; color: var(--forest-mid); }

/* (h) TRUST TILES */
.thr-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0 22px; }
.thr-trust-tile {
	padding: 13px 12px;
	border: 1px solid var(--line); border-radius: 12px; background: var(--off-white);
	display: flex; flex-direction: column; gap: 4px;
}
.thr-trust-tile svg { width: 19px; height: 19px; color: var(--forest-mid); margin-bottom: 2px; }
.thr-trust-k {
	font-family: var(--font-head); font-size: 9.5px; font-weight: 600;
	letter-spacing: 0.14em; text-transform: uppercase; color: var(--platinum-lo);
}
.thr-trust-v { font-size: 12.5px; color: var(--ink); line-height: 1.35; }

/* (i) ADD TO CART */
.thr-addtocart-slot { margin-bottom: 14px; }
/* Woo's own form lives here; the variation select is driven by the dose buttons
   and must stay in the DOM (not display:none) for its script to keep working. */
.thr-shell .thr-buy form.cart { display: block; margin: 0; }
.thr-shell .thr-buy table.variations,
.thr-shell .thr-buy .woocommerce-variation-price,
.thr-shell .thr-buy .reset_variations {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%);
	white-space: nowrap; margin: 0; padding: 0; border: 0;
}
/* Woo's own quantity field is replaced by .thr-stepper, which mirrors its value.
   !important is needed, not laziness: Storefront ships
   `.woocommerce div.product form.cart div.quantity` at specificity (0,4,2),
   which outranks a 4-class selector here. */
.thr-shell .thr-buy form.cart div.quantity,
.thr-shell .thr-buy form.cart .quantity { display: none !important; }
.thr-shell .thr-buy .single_add_to_cart_button,
.thr-shell .thr-buy .thr-addtocart-gate {
	display: flex !important; width: 100%;
	justify-content: center; align-items: center;
	min-height: 58px; padding: 0 26px;
	font-family: var(--font-head); font-size: 16.5px; font-weight: 600;
	letter-spacing: 0.01em;
	background: var(--forest-deep) !important;
	border: 1.5px solid var(--forest-deep) !important;
	color: var(--white) !important;
	border-radius: 12px;
	box-shadow: 0 6px 18px rgba(27,58,47,0.20);
	transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.thr-shell .thr-buy .single_add_to_cart_button:hover,
.thr-shell .thr-buy .thr-addtocart-gate:hover {
	background: var(--forest-press) !important;
	border-color: var(--forest-press) !important;
	box-shadow: 0 8px 22px rgba(18,39,31,0.28);
	transform: none;
}
.thr-shell .thr-buy .single_add_to_cart_button.disabled,
.thr-shell .thr-buy .single_add_to_cart_button:disabled { opacity: .45; box-shadow: none; }
.thr-shell .thr-buy .woocommerce-variation-add-to-cart { display: block; }

/* (j) RUO + SKU */
.thr-ruo-line { margin: 0 0 6px; font-size: 11.5px; line-height: 1.6; color: var(--platinum-lo); }
.thr-sku-line {
	margin: 0; font-family: var(--font-head); font-size: 11px;
	letter-spacing: 0.1em; text-transform: uppercase; color: var(--platinum-lo);
}

/* ---------- below the fold ------------------------------------------- */

.thr-shell .thr-sec-title {
	font-family: var(--font-head); font-weight: 600;
	font-size: clamp(21px, 3vw, 28px); letter-spacing: -0.02em;
	color: var(--ink); margin: 0 0 20px;
}

.thr-specs, .thr-faq-sec {
	grid-column: 1 / -1;
	margin-top: 52px; padding-top: 34px;
	border-top: 1px solid var(--line);
}
.thr-specs-table {
	width: 100%; max-width: 640px;
	border: 1px solid var(--line); border-radius: 14px;
	border-collapse: separate; border-spacing: 0; overflow: hidden;
}
.thr-specs-table th, .thr-specs-table td {
	padding: 13px 16px; font-size: 14px; text-align: left;
	border-bottom: 1px solid var(--line); background: none;
}
.thr-specs-table tr:last-child th, .thr-specs-table tr:last-child td { border-bottom: 0; }
.thr-specs-table th {
	font-family: var(--font-head); font-weight: 500; color: #5b6660;
	width: 46%; background: var(--off-white);
}
.thr-specs-table td { color: var(--ink); font-variant-numeric: tabular-nums; }
.thr-specs-table td.is-empty { color: var(--platinum-lo); }
.thr-specs-note { margin: 14px 0 0; font-size: 12.5px; color: var(--platinum-lo); }

/* FAQ accordion — same <details> pattern as the lander */
.thr-faq { max-width: 820px; display: grid; gap: 10px; }
.thr-faq-item {
	background: var(--white); border: 1px solid var(--line);
	border-radius: 14px; padding: 2px 18px;
}
.thr-faq-item summary {
	list-style: none; cursor: pointer;
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding: 15px 0;
	font-family: var(--font-head); font-size: 15.5px; font-weight: 500; color: var(--ink);
}
.thr-faq-item summary::-webkit-details-marker { display: none; }
.thr-faq-item summary::after {
	content: "+"; font-family: var(--font-head); font-size: 20px;
	color: var(--platinum-lo); flex: none; line-height: 1;
}
.thr-faq-item[open] summary::after { content: "\2212"; }
.thr-faq-item summary:focus-visible { outline: 2px solid var(--forest-mid); outline-offset: 2px; border-radius: 6px; }
.thr-faq-a { padding: 0 0 16px; }
.thr-faq-a p { margin: 0; font-size: 14.5px; line-height: 1.7; color: #3a423d; }

/* cart savings row */
.thr-shell tr.thr-cart-savings th,
.thr-shell tr.thr-cart-savings td { color: var(--forest-mid); }

/* ---------- responsive ----------------------------------------------- */

@media (max-width: 767px) {
	.thr-trust { grid-template-columns: 1fr; }
	.thr-tiers { grid-template-columns: 1fr; }
	.thr-dose { flex: 1 1 calc(50% - 5px); }
	.thr-total { font-size: 28px; }
}

@media (min-width: 1024px) {
	.thr-tiers { grid-template-columns: repeat(4, 1fr); }
	.thr-shell.single-product div.product { gap: 52px; }
	/* The purchase panel is much taller than the square gallery, which left a
	   large void in the left column. Sticking the gallery keeps the product in
	   view while the panel is scrolled. Offset clears the sticky header. */
	.thr-shell.single-product div.product .woocommerce-product-gallery {
		position: sticky;
		top: 92px;
	}
}
