/**
 * Turquoise UFO Flagship presentation — FlourishAI 2026-08-10
 * Layer on GeneratePress + GP Premium Woo (native first).
 *
 * Hynek rule: Customizer → Elements → Hooks → Woo → CSS last.
 * Do NOT parallel GP container_width, Woo columns, or archive ratings here.
 * Keep only: home merchandising HTML, light type polish, gallery discipline, trust CTAs.
 */

/* ─── Tokens (home/scoped only — not a second layout engine) ─── */
:root {
	--tq-gutter: 1.25rem;
	--tq-section-y: 3rem;
	--tq-section-y-sm: 2rem;
	--tq-card-radius: 6px;
	--tq-logo-max: 220px;
}

@media (min-width: 769px) {
	:root {
		--tq-gutter: 1.75rem;
		--tq-section-y: 3.5rem;
	}
}

/* Home article flush — block editor groups only, not global rails */
body.home .site-main .wp-block-group__inner-container,
body.home .inside-article {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Contained home sections */
.tq-section {
	padding-top: var(--tq-section-y) !important;
	padding-bottom: var(--tq-section-y) !important;
	margin: 0 !important;
}

.tq-section + .tq-section {
	padding-top: calc(var(--tq-section-y) * 0.65) !important;
}

/* Full-bleed hero (edge to edge) */
.tq-hero-band {
	width: 100%;
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.tq-hero-band .wp-block-group__inner-container {
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* ─── Logo cap (GP logo_width 280; brand prefers tighter mark) ─── */
.site-header .header-image,
.site-header .custom-logo {
	max-width: var(--tq-logo-max) !important;
	width: auto !important;
	height: auto !important;
}

/* ─── Typography hierarchy (home block classes) ─── */
.tq-display,
h1.tq-display {
	font-family: var(--tq-font-display, Georgia, serif) !important;
	font-size: clamp(1.85rem, 4vw, 2.75rem) !important;
	font-weight: 500 !important;
	letter-spacing: 0.04em !important;
	line-height: 1.15 !important;
	color: var(--tq-ink, #1a1a1a) !important;
	margin: 0 0 0.75rem !important;
}

.tq-lede {
	font-size: 1.05rem !important;
	line-height: 1.55 !important;
	color: var(--tq-muted, #6b6b6b) !important;
	max-width: 36rem;
	margin-left: auto !important;
	margin-right: auto !important;
	margin-bottom: 1.5rem !important;
}

.tq-kicker {
	font-size: 0.75rem !important;
	letter-spacing: 0.16em !important;
	text-transform: uppercase !important;
	color: var(--tq-signal, #3ecfcf) !important;
	font-weight: 600 !important;
	margin: 0 0 0.5rem !important;
}

h2.wp-block-heading {
	font-family: var(--tq-font-display, Georgia, serif) !important;
	font-size: clamp(1.4rem, 2.5vw, 1.85rem) !important;
	font-weight: 500 !important;
	letter-spacing: 0.03em !important;
	margin-bottom: 0.5rem !important;
}

/* ─── Buttons (brand pill — not GP layout) ─── */
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.single_add_to_cart_button {
	border-radius: var(--tq-radius-pill, 9999px) !important;
	font-weight: 600 !important;
	letter-spacing: 0.04em !important;
	padding: 0.75rem 1.5rem !important;
	min-height: 44px;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background: var(--tq-band, #0a0a0a) !important;
	color: var(--tq-paper, #f7f4ef) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent !important;
	color: var(--tq-ink, #1a1a1a) !important;
	border: 1.5px solid var(--tq-ink, #1a1a1a) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	border-color: var(--tq-signal, #3ecfcf) !important;
	color: var(--tq-signal, #3ecfcf) !important;
}

/* ─── Hero (home HTML slot) ───
 * P0-D: no max-height + overflow:hidden + object-fit:cover crop.
 * Image sits flush to its container rail at natural aspect ratio.
 */
.tq-photo-slot--hero {
	position: relative;
	width: 100%;
	max-height: none;
	overflow: visible;
	background: var(--tq-night-blue, #0b1a2e);
	margin: 0;
}

.tq-photo-slot--hero img {
	display: block;
	width: 100%;
	height: auto !important;
	max-height: none !important;
	object-fit: contain;
	object-position: center center;
}

@media (max-width: 768px) {
	:root {
		--tq-logo-max: 160px;
	}
}

.tq-intro {
	text-align: center;
	padding-top: var(--tq-section-y-sm) !important;
}

/* ─── Collection doors (homepage HTML — not GP Woo archive) ─── */
.tq-collection-grid.wp-block-columns {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem !important;
	flex-wrap: unset !important;
	align-items: stretch;
}

.tq-collection-grid .wp-block-column {
	flex: unset !important;
	width: auto !important;
	margin: 0 !important;
}

@media (max-width: 900px) {
	.tq-collection-grid.wp-block-columns {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 520px) {
	.tq-collection-grid.wp-block-columns {
		grid-template-columns: 1fr;
	}
}

.tq-collection-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none !important;
	color: var(--tq-ink, #1a1a1a) !important;
	background: var(--tq-surface, #fff);
	border: 1px solid var(--tq-border, rgba(26, 26, 26, 0.08));
	border-radius: var(--tq-card-radius);
	overflow: hidden;
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tq-collection-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(10, 10, 10, 0.1);
	border-color: color-mix(in srgb, var(--tq-signal, #3ecfcf) 45%, transparent);
}

.tq-collection-card .tq-photo-slot--featured {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #e8e4dc;
}

.tq-collection-card .tq-photo-slot--featured img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 280ms ease;
}

.tq-collection-card:hover .tq-photo-slot--featured img {
	transform: scale(1.04);
}

.tq-collection-card h3 {
	font-family: var(--tq-font-display, Georgia, serif) !important;
	font-size: 1.05rem !important;
	font-weight: 600 !important;
	margin: 0 !important;
	padding: 0.85rem 1rem 1rem !important;
	letter-spacing: 0.02em;
}

/* ─── Signal shelf (home merch band) ─── */
.tq-signal-shelf {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}

@media (max-width: 768px) {
	.tq-signal-shelf {
		grid-template-columns: 1fr;
	}
}

.tq-signal-card {
	display: flex;
	flex-direction: column;
	text-decoration: none !important;
	color: inherit !important;
	border: 1px solid var(--tq-border, rgba(26, 26, 26, 0.08));
	border-radius: var(--tq-card-radius);
	overflow: hidden;
	background: #fff;
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.tq-signal-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(10, 10, 10, 0.1);
}

.tq-signal-card__media {
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #e8e4dc;
}

.tq-signal-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tq-signal-card__body {
	padding: 0.85rem 1rem 1.1rem;
}

.tq-signal-card__body h3 {
	font-family: var(--tq-font-display, Georgia, serif);
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.35rem;
	line-height: 1.3;
}

.tq-signal-card__body .price {
	font-size: 0.95rem;
	color: var(--tq-muted, #6b6b6b);
	margin: 0;
}

/* ─── Story / care bands ─── */
.tq-story-band {
	background: linear-gradient(180deg, transparent 0%, rgba(11, 26, 46, 0.04) 100%);
	border-radius: 0;
}

.tq-care-line {
	font-size: 0.9rem !important;
	letter-spacing: 0.04em;
	color: var(--tq-muted, #6b6b6b) !important;
}

/* ─── Product loops: type only — columns/gap/rating = GP Woo native ─── */
/* Interim 1:1 card media until thumbnail regen completes (crop setting now 1:1) */
ul.products li.product a img,
ul.products li.product .woocommerce-loop-product__link img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	width: 100%;
	height: auto;
}

ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--tq-font-display, Georgia, serif) !important;
	font-size: 1rem !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	max-height: 2.6em;
	overflow: hidden;
}

.woocommerce-products-header__title.page-title {
	font-family: var(--tq-font-display, Georgia, serif) !important;
	font-weight: 500 !important;
	letter-spacing: 0.03em;
}

/* ─── Single product gallery (P0-B) ───
 * Root cause of ~28px thumbs: flagship forced display:grid on the ol while
 * WooCommerce still sets li { width: 25% }. 25% of a grid track ≈ 32px.
 * Restore Woo float layout; lift GP Premium max-width:100px so 25% of the
 * gallery rail (~130px+) is usable. Gallery cull stays content-side.
 */
.single-product div.product div.images {
	margin-bottom: 1.5rem;
}

/* overflow:hidden is Woo's float clearfix — do NOT set overflow:visible
 * or the ol collapses to height 0 while li still paint. */
.single-product .woocommerce-product-gallery .flex-control-thumbs {
	display: block !important;
	max-height: none !important;
	overflow: hidden !important; /* BFC / clearfix for floated li */
	zoom: 1;
	margin: 0.75rem 0 0 !important;
	padding: 0 !important;
	grid-template-columns: unset !important;
	gap: 0 !important;
	list-style: none;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs::after {
	content: "";
	display: table;
	clear: both;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li {
	width: 25% !important;
	max-width: none !important;
	float: left;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 0.35rem 0.35rem 0 0 !important;
	list-style: none;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li:nth-child(4n) {
	padding-right: 0 !important;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	max-width: 100% !important;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	cursor: pointer;
}

/* Mobile: 2-up thumbs so curated views stay recognizable (~150px on 390px) */
@media (max-width: 768px) {
	.single-product .woocommerce-product-gallery .flex-control-thumbs li {
		width: 50% !important;
	}
	.single-product .woocommerce-product-gallery .flex-control-thumbs li:nth-child(4n) {
		padding-right: 0.35rem !important;
	}
	.single-product .woocommerce-product-gallery .flex-control-thumbs li:nth-child(2n) {
		padding-right: 0 !important;
	}
}

.single-product .product_title {
	font-family: var(--tq-font-display, Georgia, serif) !important;
	font-weight: 500 !important;
	letter-spacing: 0.02em;
}

/* ─── Cart empty recovery ─── */
.wc-block-cart__empty-cart__title + * {
	margin-top: 1rem;
}

.wc-block-cart__empty-cart a.button,
.return-to-shop .button {
	display: inline-flex !important;
	margin: 1rem auto 0;
}

.tq-empty-cart-cta {
	text-align: center;
	margin: 1.25rem 0 2rem;
}

.tq-empty-cart-cta a {
	display: inline-block;
	background: var(--tq-band, #0a0a0a);
	color: var(--tq-paper, #f7f4ef) !important;
	padding: 0.75rem 1.5rem;
	border-radius: 9999px;
	text-decoration: none !important;
	font-weight: 600;
}

/* ─── Footer ─── */
.site-info {
	padding: 1.5rem var(--tq-gutter) !important;
	text-align: center;
}

.site-info .tq-footer-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35rem 1rem;
	margin-bottom: 0.75rem;
}

.site-info .tq-footer-brand {
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.85;
	margin-bottom: 0.35rem;
}

/* Account: padding only — width from GP container */
.woocommerce-account .woocommerce {
	padding: var(--tq-section-y-sm) var(--tq-gutter);
}

.tq-network-bar {
	font-size: 0.8rem;
}

/* ─── Mobile ─── */
@media (max-width: 768px) {
	.main-navigation .menu-toggle {
		min-height: 44px;
		min-width: 44px;
	}
	.wp-block-buttons {
		flex-direction: column;
		align-items: stretch !important;
	}
	.wp-block-button {
		width: 100%;
	}
	.wp-block-button .wp-block-button__link {
		width: 100%;
		text-align: center;
	}
}
