/* ==========================================================================
   55TH Avenue - Skeleton loading state
   A wireframe silhouette of the page (nav, hero, grid cells, price rows)
   in the site's own monochrome palette, shown until the window has
   finished loading (plus a short enforced minimum, so it never flashes),
   then swapped for the real content. Per-template markup lives in
   template-parts/skeleton-{home|archive|product|default}.php; see
   assets/js/skeleton-loader.js for the reveal logic.
   ========================================================================== */

.fa-skeleton {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: var(--color-surface);
	overflow: hidden;
	opacity: 1;
	transition: opacity 0.4s var(--ease);
	/* Safety net: if skeleton-loader.js never runs for any reason (blocked,
	   errored), this still forces the overlay away after 6s so it can
	   never permanently cover the page. */
	animation: fa-skeleton-force-hide 0s linear 6s forwards;
}

@keyframes fa-skeleton-force-hide {
	to {
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
	}
}

.fa-skeleton.is-hidden {
	opacity: 0;
	pointer-events: none;
}

body.fa-loaded .fa-skeleton {
	display: none;
}

.fa-skeleton__scroll {
	height: 100%;
	overflow: hidden;
	padding-bottom: 40px;
}

.fa-skeleton-block {
	position: relative;
	background: var(--color-surface-container);
	overflow: hidden;
}

.fa-skeleton-block::after {
	content: '';
	position: absolute;
	inset: 0;
	transform: translateX(-100%);
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
	animation: fa-shimmer 1.5s infinite;
}

@keyframes fa-shimmer {
	100% {
		transform: translateX(100%);
	}
}

/* Nav row — every variant starts with this */
.fa-skeleton__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px var(--margin-mobile);
	border-bottom: 1px solid var(--color-outline-variant);
}

@media (min-width: 1024px) {
	.fa-skeleton__nav {
		padding: 24px var(--margin-desktop);
	}
}

.fa-skeleton__nav .fa-skeleton-block {
	height: 20px;
}

.fa-skeleton__nav-logo {
	width: 160px;
	height: 24px;
}

.fa-skeleton__nav-icons {
	display: flex;
	gap: 16px;
}

.fa-skeleton__nav-icons .fa-skeleton-block {
	width: 20px;
	height: 20px;
}

/* Home: full-bleed hero + label/headline/button silhouette (matches the
   stacked category-hero sections the real homepage renders — see
   fa_pattern_hero_markup() — not a generic hero-plus-3-cards layout). */
.fa-skeleton__hero {
	position: relative;
	width: 100%;
	height: 100vh;
	min-height: 600px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fa-skeleton__hero-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	width: 100%;
	max-width: 520px;
	padding: 0 var(--margin-mobile);
}

.fa-skeleton__hero-content .fa-skeleton-block:nth-child(1) {
	width: 80px;
	height: 12px;
}

.fa-skeleton__hero-content .fa-skeleton-block:nth-child(2) {
	width: 100%;
	height: 40px;
}

.fa-skeleton__hero-content .fa-skeleton-block:nth-child(3) {
	width: 140px;
	height: 44px;
	margin-top: 8px;
}

/* Shorter hero variants: the archive/category page's own hero (matches
   .fa-gift-hero) and the PDP's category-identity band above the gallery
   (matches the inline 60vh hero in content-single-product.php) — both
   shorter than the full-bleed 100vh homepage hero. */
.fa-skeleton__hero--archive {
	height: 70vh;
	min-height: 480px;
}

.fa-skeleton__hero--product {
	height: 60vh;
	min-height: 420px;
}

/* Archive hero content: heading first, then a narrower subtitle line —
   the reverse size order of the home hero's label/headline/button. */
.fa-skeleton__hero-content--archive .fa-skeleton-block:nth-child(1) {
	width: 220px;
	height: 40px;
}

.fa-skeleton__hero-content--archive .fa-skeleton-block:nth-child(2) {
	width: 100%;
	max-width: 420px;
	height: 16px;
	margin-top: 8px;
}

/* Archive / category / gift guide: toolbar line + evenly spaced product
   grid, each cell an image block with a name/price line underneath. */
.fa-skeleton__toolbar {
	display: flex;
	justify-content: space-between;
	padding: 24px var(--margin-mobile);
	max-width: var(--container-max);
	margin: 0 auto;
}

@media (min-width: 1024px) {
	.fa-skeleton__toolbar {
		padding: 24px var(--margin-desktop);
	}
}

.fa-skeleton__toolbar .fa-skeleton-block {
	height: 16px;
	width: 90px;
}

.fa-skeleton__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--gutter) 16px;
	padding: 0 var(--margin-mobile);
	max-width: var(--container-max);
	margin: 0 auto;
}

@media (min-width: 1024px) {
	.fa-skeleton__grid {
		grid-template-columns: repeat(4, 1fr);
		padding: 0 var(--margin-desktop);
	}
}

.fa-skeleton__card {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fa-skeleton__card-image {
	aspect-ratio: 3 / 4;
}

.fa-skeleton__card-line {
	height: 12px;
	width: 70%;
}

.fa-skeleton__card-line--price {
	width: 40%;
}

/* Product: gallery column + info column (name, price, size pills, button,
   accordion lines) — mirrors the real two-column PDP layout. */
.fa-skeleton__product {
	display: flex;
	flex-direction: column;
	gap: var(--gutter);
	padding: 40px var(--margin-mobile);
	max-width: var(--container-max);
	margin: 0 auto;
}

@media (min-width: 1024px) {
	.fa-skeleton__product {
		flex-direction: row;
		padding: 40px var(--margin-desktop);
	}
}

.fa-skeleton__product-gallery {
	flex: 1.4;
	aspect-ratio: 3 / 4;
}

.fa-skeleton__product-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.fa-skeleton__product-info .fa-skeleton-block:nth-child(1) {
	width: 40%;
	height: 12px;
}

.fa-skeleton__product-info .fa-skeleton-block:nth-child(2) {
	width: 75%;
	height: 28px;
}

.fa-skeleton__product-info .fa-skeleton-block:nth-child(3) {
	width: 30%;
	height: 16px;
	margin-bottom: 8px;
}

.fa-skeleton__product-sizes {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.fa-skeleton__product-sizes .fa-skeleton-block {
	width: 48px;
	height: 40px;
}

.fa-skeleton__product-info .fa-skeleton__product-cta {
	height: 52px;
	width: 100%;
	margin-top: 8px;
}

.fa-skeleton__product-lines {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 16px;
}

.fa-skeleton__product-lines .fa-skeleton-block {
	height: 44px;
	width: 100%;
}

/* Default (cart, checkout, account, static pages): a simple centered
   column of text lines — these stay functional/minimal per the brief,
   never editorial, so their skeleton doesn't need a bespoke shape. */
.fa-skeleton__lines {
	padding: 40px var(--margin-mobile);
	max-width: 640px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

@media (min-width: 1024px) {
	.fa-skeleton__lines {
		padding: 64px var(--margin-desktop);
	}
}

.fa-skeleton__lines .fa-skeleton-block {
	height: 16px;
	width: 100%;
}

.fa-skeleton__lines .fa-skeleton-block:first-child {
	width: 40%;
	height: 32px;
	margin-bottom: 8px;
}
