/* Gloom Habit 2.9.203 — single product redesign (title, size guide link,
 * matched buy buttons, card logos, 3-column trust row, clean accordions).
 * Loads after product-options-275.css on single product pages only. */

/* 1. Title and price */
body.single-product div.product .summary .product_title {
	margin: 0 0 6px !important;
	font-size: 28px !important;
	font-weight: 600 !important;
	letter-spacing: -0.01em !important;
	line-height: 1.25 !important;
	text-transform: none !important;
	text-wrap: pretty;
}

body.single-product div.product .summary > p.price,
body.single-product div.product .summary > span.price {
	margin: 0 0 18px !important;
	color: #111 !important;
	font-size: 22px !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
}

/* Grey shipping line directly under the price (2.9.225) */
body.single-product div.product .summary > p.price:has(+ .gh-price-shipping-note) {
	margin-bottom: 4px !important;
}

body.single-product div.product .summary > .gh-price-shipping-note {
	margin: 0 0 18px;
	color: #6b6b6b;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
}

body.single-product div.product .summary > p.price .amount,
body.single-product div.product .summary > span.price .amount {
	font-weight: 700 !important;
}

body.single-product div.product .summary > .ct-product-divider[data-id="divider_1"] {
	display: none !important;
}

/* 3. Size label line with the size guide link */
body.single-product form.variations_form table.variations tr th.gh-has-size-guide {
	display: flex !important;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

body.single-product form.variations_form table.variations tr th.gh-has-size-guide label {
	flex: 1 1 auto;
}

.gh-size-guide-trigger {
	flex: 0 0 auto;
	margin: 0 0 0 auto;
	padding: 2px 0;
	border: 0;
	background: none;
	color: #111;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: none;
	min-height: 0;
}

.gh-size-guide-trigger:hover {
	background: none;
	color: #000;
	text-decoration-thickness: 2px;
}

.gh-size-guide-trigger:focus-visible {
	outline: 2px solid #111;
	outline-offset: 3px;
	border-radius: 2px;
}

.gh-size-guide-trigger-row {
	display: flex;
	justify-content: flex-end;
	margin: 6px 0 0;
}

/* 4. Matched buy buttons: 52px tall, 10px corners. The PayPal button height
 * and radius are set through the plugin's SDK style data (functions.php);
 * nothing here resizes PayPal's iframe. */
body.single-product div.product .summary .woocommerce-variation-add-to-cart .quantity,
body.single-product div.product .summary form.cart .quantity,
body.single-product div.product .summary form.cart .single_add_to_cart_button {
	height: 52px !important;
	min-height: 52px !important;
	border-radius: 10px !important;
}

/* 5. Accepted cards */
.gh-product-card-logos {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 5px;
	margin: 12px 0 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.gh-product-card-logos li {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.gh-product-card-logos li::before {
	content: none !important;
}

.gh-product-card-logos img {
	display: block;
	width: 40px;
	height: 25px;
	border-radius: 3px;
}

/* 6. Three-column trust row */
.gh-product-trust {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 20px 0 0 !important;
	padding: 14px 0 !important;
	border-top: 1px solid #e8e8e8;
	border-bottom: 1px solid #e8e8e8;
	list-style: none !important;
}

.gh-product-trust li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	margin: 0 !important;
	padding: 0 6px !important;
	color: #222;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.35;
	text-align: center;
	list-style: none !important;
}

.gh-product-trust li::before {
	content: none !important;
}

.gh-product-trust li + li {
	border-left: 1px solid #e8e8e8;
}

.gh-product-trust svg {
	display: block;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	fill: none;
	stroke: #111;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* 7. Clean accordion list */
body.single-product .gh-product-accordions.gh-product-accordions--clean {
	margin-top: 0 !important;
	border-top: 0;
}

body.single-product .gh-product-accordions--clean summary {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) 24px;
	align-items: center;
	min-height: 56px !important;
	padding: 0 !important;
	color: #111;
	font-size: 14px !important;
	font-weight: 600 !important;
	letter-spacing: 0.01em !important;
	text-transform: none !important;
}

body.single-product .gh-product-accordions--clean summary::after {
	grid-column: 2;
	font-size: 20px;
	font-weight: 300;
	line-height: 1;
	text-align: right;
}

body.single-product .gh-product-accordions--clean summary:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

body.single-product .gh-product-accordions--clean details > div h3 + p {
	margin-top: 0;
}

body.single-product .gh-product-accordions--clean details > div p + h3 {
	margin-top: 18px;
}

body.single-product .gh-product-shipping-detail p {
	margin: 0 0 8px;
}

/* Size guide dialog: bottom sheet on phones, centered panel on desktop. */
html.gh-size-guide-open {
	overflow: hidden;
}

.gh-size-guide-dialog {
	box-sizing: border-box;
	width: min(640px, calc(100vw - 32px));
	max-width: none;
	max-height: min(86vh, 820px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: #fff;
	color: #222;
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
	overflow: hidden;
}

.gh-size-guide-dialog[open] {
	display: flex;
	flex-direction: column;
}

.gh-size-guide-dialog::backdrop {
	background: rgba(0, 0, 0, 0.45);
}

.gh-size-guide-dialog--fallback {
	position: fixed;
	inset: 0;
	z-index: 100000;
}

.gh-size-guide-dialog__panel {
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: inherit;
}

.gh-size-guide-dialog__bar {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px 12px 20px;
	border-bottom: 1px solid #ececec;
}

.gh-size-guide-dialog__bar h2 {
	margin: 0 !important;
	color: #111;
	font-size: 17px !important;
	font-weight: 600 !important;
	letter-spacing: 0 !important;
	line-height: 1.3 !important;
	text-transform: none !important;
}

.gh-size-guide-dialog__close {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #111;
	cursor: pointer;
	box-shadow: none;
}

.gh-size-guide-dialog__close:hover {
	background: #f2f2f2;
	color: #111;
}

.gh-size-guide-dialog__close:focus-visible {
	outline: 2px solid #111;
	outline-offset: 1px;
}

.gh-size-guide-dialog__close svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
}

.gh-size-guide-dialog__body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 16px 20px 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	color: #424242;
	font-size: 14px;
	line-height: 1.6;
}

@media (max-width: 820px) {
	body.single-product div.product .summary > .gh-price-shipping-note {
		margin-bottom: 14px;
	}

	body.single-product div.product .summary .product_title {
		font-size: 21px !important;
		line-height: 1.3 !important;
	}

	body.single-product div.product .summary > p.price,
	body.single-product div.product .summary > span.price {
		font-size: 20px !important;
	}

	body.single-product div.product .summary .woocommerce-variation-add-to-cart {
		grid-template-columns: 104px minmax(0, 1fr) !important;
	}

	body.single-product div.product .summary .woocommerce-variation-add-to-cart .quantity {
		width: 104px !important;
	}

	body.single-product form.variations_form table.variations tr th.gh-has-size-guide label {
		margin-bottom: 9px !important;
	}

	.gh-product-trust li {
		padding: 0 4px !important;
		font-size: 11.5px;
	}

	.gh-size-guide-dialog {
		width: 100%;
		max-height: 88vh;
		margin: auto 0 0;
		border-radius: 16px 16px 0 0;
		padding-bottom: env(safe-area-inset-bottom, 0);
	}

	.gh-size-guide-dialog--fallback {
		inset: auto 0 0 0;
	}

	.gh-size-guide-dialog__body {
		padding: 14px 16px 22px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.gh-size-guide-dialog[open] {
		animation: gh-size-guide-in 180ms ease-out;
	}

	@keyframes gh-size-guide-in {
		from { opacity: 0; transform: translateY(12px); }
		to { opacity: 1; transform: none; }
	}
}
