/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* Keep the review verdict and purchase action close to the title. */
.ct-product-hero > .ct-container {
	display: flex;
	flex-direction: column;
}

.ct-product-hero > .ct-container > .custom-top-image {
	order: 0;
}

.ct-product-hero > .ct-container > .hero-section {
	order: 1;
}

.ct-product-hero > .ct-container > .ct-product-description {
	order: 2;
	text-align: center;
}

.ct-product-hero > .ct-container > .ct-product-actions-group {
	order: 3;
}

.ct-product-hero > .ct-container > .ct-product-scores {
	order: 4;
	align-self: center;
	box-sizing: border-box;
	width: min(100%, 900px);
	--product-scores-width: 900px;
}

.ct-product-hero > .ct-container > .ct-product-info {
	order: 5;
}

.ct-product-hero .ct-product-info {
	align-items: start;
}

/* Give guide readers a clear purchase path after the opening explanation. */
.ttt-guide-conversion {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin: 32px 0 48px;
	padding: 24px 28px;
	border: 1px solid var(--theme-border-color);
	background: var(--theme-palette-color-7, #f7f7f7);
}

.ttt-guide-conversion__copy {
	flex: 1 1 auto;
}

.ttt-guide-conversion__eyebrow {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ttt-guide-conversion__message {
	margin: 0;
}

.ttt-guide-conversion__link {
	flex: 0 0 auto;
	white-space: nowrap;
}

@media (max-width: 767px) {
	.ttt-guide-conversion {
		align-items: stretch;
		flex-direction: column;
		gap: 16px;
		padding: 20px;
	}

	.ttt-guide-conversion__link {
		justify-content: center;
		width: 100%;
		text-align: center;
		white-space: normal;
	}
}

/* Keep the score labels and stars comfortably separated on larger screens. */
@media (min-width: 690px) {
	.ct-product-hero > .ct-container > .ct-product-info .ct-specs ul {
		display: block;
		column-count: 2;
		column-gap: 40px;
	}

	.ct-product-hero > .ct-container > .ct-product-info .ct-specs ul li {
		break-inside: avoid;
		page-break-inside: avoid;
	}
}

/* Make the new archive actions easy to find without changing existing card links. */
.entry-card .ttt-card-cta {
	display: inline-flex;
	width: fit-content;
	max-width: 100%;
	margin-top: 16px;
}

/* A persistent mobile purchase action keeps the affiliate path available after scrolling. */
.ttt-mobile-sticky-cta {
	display: none;
}

@media (max-width: 767px) {
	.entry-card .ttt-card-cta {
		justify-content: center;
	}

	.ttt-mobile-sticky-cta {
		position: fixed;
		z-index: 999;
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		left: 12px;
		padding: 8px;
		border-radius: 12px;
		background: rgba(255, 255, 255, 0.96);
		box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
	}

	.ttt-mobile-sticky-cta.is-visible {
		display: block;
	}

	.ttt-sticky-cta-link {
		justify-content: center;
		width: 100%;
		text-align: center;
	}
}
