/**
 * Homepage styles — mobile-first, CWV optimized.
 */

/* Sticky header */
.site-header--sticky {
	position: sticky;
	top: 0;
	z-index: 1030;
	transition: box-shadow 0.2s ease;
}

.site-header--sticky.is-scrolled .site-header__main {
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.site-header__topbar {
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

/* Search */
.fyeen-search-bar .form-control {
	border-radius: 999px 0 0 999px;
	min-height: 44px;
}

.fyeen-search-bar .btn {
	border-radius: 0 999px 999px 0;
	min-width: 48px;
}

/* Hero slider */
.hero-slider {
	position: relative;
	overflow: hidden;
	background: var(--fyeen-primary);
}

.hero-slider__track {
	position: relative;
	min-height: 220px;
}

@media (min-width: 768px) {
	.hero-slider__track {
		min-height: 360px;
	}
}

@media (min-width: 1200px) {
	.hero-slider__track {
		min-height: 420px;
	}
}

.hero-slide {
	display: none;
	position: relative;
	min-height: inherit;
}

.hero-slide.is-active {
	display: block;
}

.hero-slide__image,
.hero-slide__gradient {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero-slide__gradient {
	background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
}

.hero-slide__content {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	min-height: inherit;
	padding: 2rem 0;
	color: #fff;
}

.hero-slide__title,
.hero-slide__text {
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.hero-slider__controls {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	z-index: 2;
}

.hero-slider__btn {
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #111;
	cursor: pointer;
}

.hero-slider__dots {
	display: flex;
	gap: 0.5rem;
}

.hero-slider__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	cursor: pointer;
}

.hero-slider__dot.is-active {
	background: #fff;
	width: 24px;
	border-radius: 999px;
}

/* Category tiles */
.category-tile__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.category-tile__icon img,
.category-tile__icon .category-tile__placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0.75rem 0.75rem 0 0;
}

.category-tile__icon-svg {
	width: 52%;
	height: 52%;
	color: var(--fyeen-primary, #0d47a1);
	opacity: 0.9;
}

.category-tile:hover .category-tile__icon-svg {
	opacity: 1;
}

.category-tile__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	background: #f1f5f9;
}

/* Flash sale */
.flash-countdown__item {
	min-width: 64px;
	padding: 0.5rem 0.75rem;
	border-radius: 0.5rem;
	background: rgba(255, 255, 255, 0.1);
}

.flash-countdown__value {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
}

.fyeen-flash-sale .product-card {
	background: #fff;
}

/* Product cards */
.product-card__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f8fafc;
}

.product-card__media .product-card__image,
.product-card__media .card-img-top {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.product-card__badge {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 1;
	min-width: 2.5rem;
	font-size: 0.75rem;
	font-weight: 700;
}

/* Brands */
.brand-tile {
	min-height: 88px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

/* Testimonials */
.testimonial-card__stars {
	color: var(--fyeen-accent);
	letter-spacing: 0.1em;
}

/* Newsletter */
.newsletter-form .form-control {
	border: 0;
}

/* Core Web Vitals — defer offscreen rendering */
.content-visibility-auto {
	content-visibility: auto;
	contain-intrinsic-size: 1px 600px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.hero-slider__dot.is-active {
		width: 10px;
	}
}
