/* =========================================================================
   SpareTimeCustoms — storefront.css
   Garage pill + modal, PLP filter bar, product-card hover zoom, drop
   countdown typography. Uses theme.json custom properties only — no hard
   hex values allowed here.
   ========================================================================= */

/* ----- Garage pill (header) ----- */
.stc-garage-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-left: 1rem;
	padding: 0.4rem 0.9rem;
	background: var(--wp--preset--color--shadow);
	color: var(--wp--preset--color--mirror);
	border: 1px solid var(--wp--preset--color--steel);
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xs);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color 200ms ease, background-color 200ms ease;
}
.stc-garage-pill:hover {
	border-color: var(--wp--preset--color--running-light);
	background: var(--wp--preset--color--asphalt);
}
.stc-garage-pill__icon { font-size: 1rem; }
.stc-garage-pill__caret { opacity: 0.6; }

/* ----- Garage modal ----- */
html.stc-garage-open { overflow: hidden; }
.stc-garage-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.stc-garage-modal[hidden] { display: none; }
.stc-garage-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 6, 7, 0.78);
	backdrop-filter: blur(6px);
}
.stc-garage-modal__panel {
	position: relative;
	width: min(460px, 92vw);
	background: var(--wp--preset--color--night);
	border: 1px solid var(--wp--preset--color--shadow);
	padding: 2rem;
	color: var(--wp--preset--color--mirror);
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
}
.stc-garage-modal__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--2xl);
	text-transform: uppercase;
	letter-spacing: -0.01em;
	margin: 0 0 0.5rem;
}
.stc-garage-modal__hint {
	color: var(--wp--preset--color--chrome);
	font-size: var(--wp--preset--font-size--sm);
	margin: 0 0 1.25rem;
}
.stc-garage-modal__form {
	display: grid;
	gap: 0.75rem;
}
.stc-garage-modal__form label {
	display: grid;
	gap: 0.25rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xs);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--wp--preset--color--steel);
}
.stc-garage-modal__form input {
	background: var(--wp--preset--color--void);
	border: 1px solid var(--wp--preset--color--shadow);
	color: var(--wp--preset--color--mirror);
	padding: 0.6rem 0.8rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--base);
	letter-spacing: normal;
	text-transform: none;
}
.stc-garage-modal__form input:focus {
	outline: 1px solid var(--wp--preset--color--running-light);
	outline-offset: 0;
}
.stc-garage-modal__actions {
	display: flex;
	gap: 0.5rem;
	justify-content: flex-end;
	margin-top: 1rem;
	flex-wrap: wrap;
}
.stc-garage-modal__actions button {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--sm);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 0.7rem 1.2rem;
	border: 1px solid var(--wp--preset--color--steel);
	background: transparent;
	color: var(--wp--preset--color--mirror);
	cursor: pointer;
}
.stc-garage-modal__save {
	background: var(--wp--preset--color--running-light) !important;
	color: var(--wp--preset--color--void) !important;
	border-color: var(--wp--preset--color--running-light) !important;
}
.stc-garage-modal__clear { color: var(--wp--preset--color--brake-red); border-color: var(--wp--preset--color--brake-red); }
.stc-garage-modal__error {
	margin: 0.75rem 0 0;
	color: var(--wp--preset--color--brake-red);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xs);
}

/* ----- PLP filter bar ----- */
.stc-plp-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: end;
	padding: 1rem 0;
	border-top: 1px solid var(--wp--preset--color--shadow);
}
.stc-plp-filters__group {
	display: grid;
	gap: 0.35rem;
	min-width: 120px;
}
.stc-plp-filters__group--chips {
	flex-direction: row;
	display: flex;
	gap: 0.5rem;
	align-items: center;
}
.stc-plp-filters__label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xs);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--wp--preset--color--steel);
}
.stc-plp-filters__select {
	background: var(--wp--preset--color--asphalt);
	color: var(--wp--preset--color--mirror);
	border: 1px solid var(--wp--preset--color--shadow);
	padding: 0.55rem 0.7rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--sm);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.stc-plp-filters__submit {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--sm);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 0.7rem 1.3rem;
	background: var(--wp--preset--color--running-light);
	color: var(--wp--preset--color--void);
	border: 1px solid var(--wp--preset--color--running-light);
	cursor: pointer;
}

/* ----- Product card hover zoom ----- */
.stc-product-card {
	position: relative;
	overflow: hidden;
	transition: transform 300ms var(--stc-ease-quick, cubic-bezier(0.22, 1, 0.36, 1)),
	            border-color 300ms var(--stc-ease-quick, cubic-bezier(0.22, 1, 0.36, 1));
}
.stc-product-card:hover {
	transform: translateY(-2px);
	border-color: var(--wp--preset--color--running-light) !important;
}
.stc-product-card__media,
.stc-product-card__image-wrap {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--wp--preset--color--void);
}
.stc-product-card__image,
.stc-product-card__image-wrap img,
.stc-product-card .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 600ms var(--stc-ease-quick, cubic-bezier(0.22, 1, 0.36, 1));
	display: block;
}
.stc-product-card:hover .stc-product-card__image,
.stc-product-card:hover .stc-product-card__image-wrap img,
.stc-product-card:hover .wp-block-post-featured-image img {
	transform: scale(1.06);
}
.stc-product-card__chip {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 2;
	background: rgba(5, 6, 7, 0.75);
}
.stc-product-card__fitment .stc-chip {
	font-size: 0.65rem;
	padding: 0.25rem 0.55rem;
}

/* Product grid spacing */
.stc-product-grid {
	gap: 1.5rem !important;
}
@media (max-width: 900px) {
	.stc-product-grid.is-layout-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 560px) {
	.stc-product-grid.is-layout-grid { grid-template-columns: 1fr !important; }
}

/* ----- PDP specs table ----- */
.stc-pdp-specs {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.5rem 2rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--sm);
	border-top: 1px solid var(--wp--preset--color--shadow);
	padding-top: 1rem;
}
.stc-pdp-specs dt {
	color: var(--wp--preset--color--steel);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: var(--wp--preset--font-size--xs);
}
.stc-pdp-specs dd { margin: 0; color: var(--wp--preset--color--chrome); }

/* ----- Drop countdown ----- */
.stc-drop-countdown { position: relative; isolation: isolate; }
.stc-countdown-clock {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
	margin: 1rem 0;
	max-width: 720px;
}
.stc-countdown-cell {
	display: grid;
	justify-items: center;
	padding: 1.25rem 0.5rem;
	background: var(--wp--preset--color--asphalt);
	border: 1px solid var(--wp--preset--color--shadow);
	border-radius: 2px;
}
.stc-countdown-num {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(2.5rem, 8vw, 5.5rem);
	line-height: 0.9;
	color: var(--wp--preset--color--running-light);
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
}
.stc-countdown-label {
	margin-top: 0.35rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xs);
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--wp--preset--color--steel);
}
