/*
 * CompV2 Competition Suite 0.19.8
 * Isolated visual corrections loaded after the base theme stylesheet.
 */

/* Home carousel starts immediately below the website header. */
body.home .fdl-main {
	padding-top: 0 !important;
}

body.home .fdl-home-layout,
body.home .fdl-home-carousel {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* Competition filters remain a compact, clearly separated tab row. */
.fdl-live-layout {
	gap: 30px !important;
}

.fdl-competition-browser {
	display: grid;
	gap: 24px;
	min-width: 0;
}

.fdl-competition-filters {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: center;
	gap: 9px !important;
	margin: 0 !important;
	padding: 0 !important;
}

.fdl-competition-filters a {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 9px 17px !important;
	border: 1px solid var(--fdl-line) !important;
	border-radius: 999px !important;
	background: var(--fdl-surface) !important;
	color: var(--fdl-muted) !important;
	font-size: 13px;
	font-weight: 850;
	line-height: 1;
	white-space: nowrap;
}

.fdl-competition-filters a:hover {
	border-color: var(--fdl-brand) !important;
	color: var(--fdl-text) !important;
}

.fdl-competition-filters a.is-active {
	border-color: var(--fdl-brand) !important;
	background: var(--fdl-brand) !important;
	color: #fff !important;
}

/* Archive image setting controls the canvas rather than scaling the image alone. */
body .fdl-product-card {
	display: flex !important;
	flex-direction: column;
	height: 100%;
	min-height: 0;
}

body .fdl-product-card .fdl-card-image {
	display: block !important;
	flex: 0 0 var(--oscs-archive-image-height-desktop, 260px);
	width: 100%;
	height: var(--oscs-archive-image-height-desktop, 260px) !important;
	min-height: var(--oscs-archive-image-height-desktop, 260px) !important;
	max-height: none !important;
	aspect-ratio: auto !important;
	overflow: hidden;
}

body .fdl-product-card .fdl-card-image img,
body .fdl-product-card img.attachment-woocommerce_thumbnail {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	max-height: none !important;
	margin: 0 !important;
	object-fit: cover !important;
	object-position: center;
}

/* Cards stretch equally and their calls to action share one baseline. */
body .fdl-product-card .fdl-card-body {
	display: flex !important;
	flex: 1 1 auto;
	flex-direction: column;
	width: 100%;
}

body .fdl-product-card .fdl-card-body > .fdl-card-button {
	align-self: stretch !important;
	width: 100% !important;
	max-width: none !important;
	margin-top: auto !important;
	text-align: center;
}

/* Compact, smooth latest-winner strip. */
.fdl-winner-ticker {
	display: flex !important;
	align-items: center;
	width: 100%;
	min-height: 62px;
	margin: 0 !important;
	border-top: 1px solid color-mix(in srgb, var(--fdl-brand) 30%, var(--fdl-line));
	border-bottom: 1px solid var(--fdl-line);
	background: var(--fdl-surface);
	overflow: hidden;
}

.fdl-winner-ticker-label {
	position: relative;
	z-index: 2;
	align-self: stretch;
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	max-width: 180px;
	padding: 0 20px;
	background: var(--fdl-brand);
	color: #fff;
	font-size: 10px;
	font-weight: 950;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: .07em;
}

.fdl-winner-ticker-window {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

.fdl-winner-ticker-track {
	display: flex;
	align-items: center;
	width: max-content;
	will-change: transform;
	animation: fdl-winner-ticker-scroll 32s linear infinite;
}

.fdl-winner-ticker:hover .fdl-winner-ticker-track {
	animation-play-state: paused;
}

.fdl-winner-ticker article {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: max-content;
	padding: 7px 24px 7px 14px;
	color: var(--fdl-text);
	font-size: 12px;
	font-weight: 800;
}

.fdl-winner-ticker article img,
.fdl-winner-image-placeholder {
	display: grid;
	place-items: center;
	flex: 0 0 42px;
	width: 42px !important;
	height: 42px !important;
	border: 2px solid color-mix(in srgb, var(--fdl-brand) 55%, #fff);
	border-radius: 50%;
	background: var(--fdl-surface-2);
	color: var(--fdl-brand);
	object-fit: cover;
}

@keyframes fdl-winner-ticker-scroll {
	to { transform: translate3d(-50%, 0, 0); }
}

/* Single competition is a true 40/60 split with a compact entry column. */
body.single-product .fdl-single-grid {
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) !important;
	gap: 22px !important;
	align-items: start !important;
}

body.single-product .fdl-gallery-panel,
body.single-product .fdl-summary-panel {
	align-self: start !important;
	padding: 15px !important;
}

body.single-product .fdl-summary-panel .fdl-eyebrow {
	margin-bottom: 4px !important;
}

body.single-product .fdl-summary-panel .product_title {
	margin-bottom: 6px !important;
	font-size: clamp(29px, 3.3vw, 47px) !important;
	line-height: .98 !important;
}

body.single-product .fdl-summary-panel .price {
	margin: 5px 0 !important;
}

body.single-product .fdl-summary-panel .fdl-countdown-wrap,
body.single-product .fdl-summary-panel .fdl-countdown,
body.single-product .fdl-summary-panel .fdl-simple-timer,
body.single-product .fdl-summary-panel .fdl-progress {
	margin-top: 8px !important;
	margin-bottom: 8px !important;
}

body.single-product .fdl-summary-panel .fdl-countdown {
	padding: 7px 9px !important;
}

body.single-product .fdl-entry-panel {
	margin-top: 10px !important;
	padding: 11px !important;
}

body.single-product .fdl-entry-tab-nav {
	margin-bottom: 10px !important;
}

body.single-product .fdl-entry-tab-nav button {
	min-height: 38px !important;
	padding: 7px 10px !important;
}

body.single-product .fdl-entry-tab-content form.cart {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto !important;
	gap: 10px 12px !important;
	align-items: center !important;
}

body.single-product .fdl-entry-tab-content form.cart > .compv2-quantity-slider {
	grid-column: 1 !important;
	grid-row: 1 !important;
	min-width: 0;
	margin: 0 !important;
}

body.single-product .fdl-entry-tab-content form.cart > .quantity {
	grid-column: 2 !important;
	grid-row: 1 !important;
	justify-self: end;
	margin: 0 !important;
}

body.single-product .fdl-entry-tab-content form.cart > :not(.compv2-quantity-slider):not(.quantity):not(.single_add_to_cart_button) {
	grid-column: 1 / -1 !important;
}

body.single-product .fdl-entry-tab-content form.cart > .finley-tier-pricing {
	grid-row: 2 !important;
	margin: 0 !important;
}

body.single-product .finley-tier-grid {
	gap: 8px !important;
}

body.single-product .finley-tier-card {
	min-height: 82px !important;
	padding: 9px !important;
}

body.single-product .fdl-entry-tab-content form.cart > .single_add_to_cart_button {
	grid-column: 1 / -1 !important;
	grid-row: 3 !important;
	width: 100% !important;
	min-height: 46px !important;
	margin: 0 !important;
}

/* Footer company and platform links. */
.fdl-footer-email {
	display: inline-flex !important;
	margin-top: 12px;
	color: var(--fdl-brand) !important;
	font-size: 13px;
	font-weight: 850;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.fdl-footer-socials {
	display: flex !important;
	gap: 9px !important;
}

.fdl-footer-socials a {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	height: 40px !important;
	padding: 0 !important;
	border-color: color-mix(in srgb, var(--fdl-brand) 38%, var(--fdl-line)) !important;
	color: var(--fdl-brand) !important;
}

.fdl-footer-socials svg {
	width: 19px !important;
	height: 19px !important;
}

.fdl-footer-bottom {
	align-items: center !important;
}

.fdl-powered-by {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 7px;
	flex: 0 0 auto;
	font-size: 10px;
	font-weight: 850;
	white-space: nowrap;
}

.fdl-powered-by img {
	display: block !important;
	width: 58px !important;
	height: 18px !important;
	max-width: 58px !important;
	max-height: 18px !important;
	object-fit: contain !important;
}

@media (max-width: 980px) {
	body.single-product .fdl-single-grid {
		grid-template-columns: 1fr !important;
	}
}

@media (max-width: 767px) {
	body .fdl-product-card .fdl-card-image {
		flex-basis: var(--oscs-archive-image-height-mobile, 220px);
		height: var(--oscs-archive-image-height-mobile, 220px) !important;
		min-height: var(--oscs-archive-image-height-mobile, 220px) !important;
	}

	.fdl-winner-ticker {
		align-items: stretch;
		flex-direction: column;
	}

	.fdl-winner-ticker-label {
		justify-content: center;
		max-width: none;
		min-height: 32px;
		padding: 7px 12px;
	}

	body.single-product .fdl-entry-tab-content form.cart {
		grid-template-columns: 1fr auto !important;
	}

	.fdl-footer-bottom {
		align-items: flex-start !important;
	}

	.fdl-powered-by {
		justify-content: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fdl-winner-ticker-track {
		animation: none;
	}
}

/* Compact entry-success popup: preserve three card slots on desktop. */
.fdl-cross-sell-dialog {
	width: min(820px, 100%);
	padding: clamp(22px, 3vw, 30px);
}

.fdl-cross-sell-dialog > header h2 {
	font-size: clamp(28px, 3.2vw, 40px);
}

.fdl-cross-sell-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-top: 20px;
}

.fdl-cross-sell-card > div {
	padding: 12px;
}

.fdl-cross-sell-card h3 {
	font-size: 16px;
}

.fdl-cross-sell-dialog > footer {
	margin-top: 18px;
	padding-top: 16px;
}

@media (max-width: 700px) {
	.fdl-cross-sell-grid {
		grid-template-columns: 1fr;
	}
}
