/*
 * Flavor grid ([tyson_flavor_grid], inc/flavor-grid.php). Values follow the mockup's
 * .chips / .prod-grid / .prod rules; product photos are the real WooCommerce images.
 * Loaded on the front page in <head>, and by the shortcode anywhere else.
 */

.tv-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------- chips */
.tv-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 32px;
}

html body .tv-chip {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin: 0;
	padding: 10px 20px;
	border: 1.5px solid #3a3a3f;
	border-radius: 100px;
	background: transparent;
	color: var(--nav-text);
	font-family: var(--body);
	font-size: var(--fs-eyebrow);
	font-weight: var(--fw-bold);
	letter-spacing: var(--ls-nav);
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

html body .tv-chip:hover {
	border-color: var(--bone);
	background: transparent;
	color: var(--bone);
}

html body .tv-chip.is-on,
html body .tv-chip[aria-pressed="true"] {
	border-color: var(--bone);
	background: var(--bone);
	color: var(--ink);
}

/* ---------------------------------------------------------------- grid */
.tv-prod-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	transition: opacity 0.2s;
}

.tv-flavors.is-loading .tv-prod-grid {
	opacity: 0.45;
}

.tv-prod {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--panel);
	border: 1px solid var(--line);
	transition: transform 0.25s, border-color 0.25s;
}

.tv-prod:hover,
.tv-prod:focus-within {
	border-color: var(--gold);
	transform: translateY(-6px);
}

.tv-prod__img {
	position: relative;
	display: grid;
	place-items: center;
	height: 270px;
	overflow: hidden;
	background: radial-gradient(circle at 50% 38%, rgba(225, 6, 0, 0.18), transparent 62%), #0c0c0d;
}

html body .tv-prod__img img.tv-prod__photo {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	transition: transform 0.35s;
}

.tv-prod:hover .tv-prod__photo {
	transform: rotate(-3deg) scale(1.04);
}

.tv-prod__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
	padding: 5px 9px;
	background: var(--red);
	color: var(--on-red);
	font-family: var(--mono);
	font-size: var(--fs-micro);
	font-weight: var(--fw-bold);
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.tv-prod__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	padding: 20px;
}

.tv-prod__line {
	color: var(--gold);
	font-family: var(--mono);
	font-size: var(--fs-micro);
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

html body .tv-prod__name {
	margin: 0;
	font-family: var(--font-display);
	font-size: 26px;
	font-weight: var(--fw-regular);
	line-height: 1;
	letter-spacing: var(--ls-display);
	text-transform: uppercase;
}

html body .tv-prod__name a {
	color: var(--bone);
	text-decoration: none;
}

html body .tv-prod__name a:hover {
	color: var(--gold-soft);
}

.tv-prod__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 16px;
}

html body .tv-prod__price,
html body .tv-prod__price .amount {
	color: var(--bone);
	font-family: var(--font-display);
	font-size: 30px;
	line-height: 1;
}

/* Sale: old price muted and struck, sale price gold (round 3, A2). */
html body .tv-prod__price del,
html body .tv-prod__price del .amount {
	margin-right: 6px;
	color: var(--mute);
	font-size: 18px;
	opacity: 1;
}

html body .tv-prod__price ins,
html body .tv-prod__price ins .amount {
	color: var(--gold);
	text-decoration: none;
}

html body a.tv-prod__add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	margin: 0;
	padding: 11px 15px;
	border: 0;
	border-radius: 0;
	background: var(--bone);
	color: var(--ink);
	font-family: var(--body);
	font-size: var(--fs-label);
	font-weight: var(--fw-black);
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.2s, color 0.2s;
}

/* White on --red-hover is 6.86:1 (mockup used --red: 4.97:1 at 11px bold). */
html body a.tv-prod__add:hover {
	background: var(--red-hover);
	color: var(--white);
}

html body a.tv-prod__add.loading {
	opacity: 0.6;
	pointer-events: none;
}

html body a.tv-prod__add.is-added {
	background: var(--gold);
	color: var(--ink);
}

/* WooCommerce appends a "View cart" link after an AJAX add; the header count already updates. */
.tv-prod a.added_to_cart {
	display: none;
}

/* ---------------------------------------------------------------- view all */
.tv-flavors__more {
	margin: 46px 0 0;
	text-align: center;
}

html body a.tv-btn-ghost {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 17px 30px;
	border: 2px solid var(--bone);
	color: var(--bone);
	font-family: var(--body);
	font-size: var(--fs-small);
	font-weight: var(--fw-black);
	letter-spacing: var(--ls-button);
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.2s, color 0.2s;
}

html body a.tv-btn-ghost:hover {
	background: var(--bone);
	color: var(--ink);
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
	.tv-prod-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.tv-prod-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.tv-prod__img {
		height: 240px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tv-prod,
	.tv-prod__photo,
	.tv-prod-grid {
		transition: none;
	}

	.tv-prod:hover,
	.tv-prod:focus-within,
	.tv-prod:hover .tv-prod__photo {
		transform: none;
	}
}
