/* =========================================================
   Product Hero
   ========================================================= */
.product-hero {
	background: var(--color-surface);
	color: var(--color-text-inv);
	padding-block: clamp(3rem, 6vw, 4.5rem);
	animation: fadeInDown 0.8s ease-out;
}

.product-hero__title {
	color: var(--color-text-inv);
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.product-hero__subtitle {
	color: rgba(255, 255, 255, 0.75);
	font-size: 1.125rem;
	margin-top: 0;
	animation: fadeIn 0.6s ease-out 0.25s both;
}

/* =========================================================
   Product Gallery
   ========================================================= */
.section-product-gallery {
	padding-block: clamp(3rem, 6vw, 5rem);
	background: #f9f8f7;
}

.product-gallery {
	animation: fadeInUp 0.8s ease-out 0.2s both;
}

.product-gallery__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 1.5rem;
}

@media (min-width: 768px) {
	.product-gallery__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.product-gallery__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.gallery-item {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius-lg);
	aspect-ratio: 1;
	background: #fff;
	animation: scaleIn 0.6s ease-out;
}

.gallery-item:nth-child(1) { animation-delay: 0s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.2s; }
.gallery-item:nth-child(4) { animation-delay: 0.3s; }
.gallery-item:nth-child(5) { animation-delay: 0.4s; }
.gallery-item:nth-child(6) { animation-delay: 0.5s; }

.gallery-item__link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
	position: relative;
	overflow: hidden;
}

.gallery-item__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-item__link:hover .gallery-item__img {
	transform: scale(1.08);
}

/* =========================================================
   Product Content
   ========================================================= */
.product-content {
	animation: fadeInUp 0.8s ease-out 0.3s both;
}

.product-content h2 {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	margin-top: 2rem;
	margin-bottom: 1rem;
	color: var(--color-text);
}

.product-content h3 {
	font-size: 1.25rem;
	font-weight: 600;
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
	color: var(--color-text);
}

.product-content p {
	color: var(--color-text);
	line-height: 1.8;
	margin-bottom: 1rem;
}

.product-content ul,
.product-content ol {
	margin-left: 1.5rem;
	margin-bottom: 1rem;
}

.product-content li {
	margin-bottom: 0.5rem;
	color: var(--color-text);
	line-height: 1.8;
}

/* =========================================================
   Product Archive
   ========================================================= */
.products-archive-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 2rem;
	margin-bottom: 3rem;
}

@media (min-width: 768px) {
	.products-archive-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.products-archive-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* =========================================================
   Product Card
   ========================================================= */
.product-card {
	animation: scaleIn 0.6s ease-out;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:nth-child(1) { animation-delay: 0s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.3s; }
.product-card:nth-child(5) { animation-delay: 0.4s; }
.product-card:nth-child(6) { animation-delay: 0.5s; }

.product-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.product-card__image-wrapper {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	background: #f0f0f0;
}

.product-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-card__image-link:hover .product-card__image {
	transform: scale(1.08);
}

.product-card__content {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.product-card__title {
	margin: 0 0 0.5rem 0;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--color-text);
}

.product-card__title a {
	color: var(--color-text);
	text-decoration: none;
	transition: color 0.3s ease;
}

.product-card__title a:hover {
	color: var(--color-primary);
}

.product-card__subheading {
	margin: 0 0 0.75rem 0;
	font-size: 0.9375rem;
	color: var(--color-secondary);
	font-weight: 500;
}

.product-card__description {
	margin: 0 0 1rem 0;
	font-size: 0.9375rem;
	color: #666;
	line-height: 1.6;
	flex-grow: 1;
}

.product-card__cta {
	align-self: flex-start;
	margin-top: auto;
}

/* =========================================================
   No Products
   ========================================================= */
.no-products {
	text-align: center;
	padding: 4rem 2rem;
}

.no-products__content h2 {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 1rem;
}

.no-products__content p {
	font-size: 1rem;
	color: #666;
	margin-bottom: 2rem;
}

/* =========================================================
   Pagination
   ========================================================= */
.pagination-container {
	display: flex;
	justify-content: center;
	margin-top: 3rem;
}

.pagination,
.page-numbers {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	flex-wrap: wrap;
}

.page-numbers li {
	list-style: none;
}

.page-numbers a,
.page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 0.5rem;
	border-radius: 4px;
	border: 1px solid #ddd;
	color: var(--color-text);
	text-decoration: none;
	font-weight: 500;
	transition: all 0.3s ease;
}

.page-numbers a:hover {
	background: var(--color-primary);
	color: white;
	border-color: var(--color-primary);
}

.page-numbers .current {
	background: var(--color-primary);
	color: white;
	border-color: var(--color-primary);
}

.page-numbers .prev,
.page-numbers .next {
	min-width: auto;
	padding: 0 1rem;
}

@media (max-width: 640px) {
	.product-gallery__grid {
		grid-template-columns: 1fr;
	}

	.products-archive-grid {
		grid-template-columns: 1fr;
	}

	.page-numbers a,
	.page-numbers span {
		min-width: 36px;
		height: 36px;
		font-size: 0.875rem;
	}
}
