/* ─────────────────────────────────────────────────────────────
   ass-configurator: Product Archive Template Styles
   ───────────────────────────────────────────────────────────── */

:root {
	--ass-gap-col: 24px;
	--ass-gap-row: 48px;
	--ass-max-width: 1400px;
	--ass-pad-h: 40px;
	--ass-card-bg: #f5f5f5;
	--ass-name-color: #000;
	--ass-price-color: #666;
	--ass-heart-color: rgba(0, 0, 0, 0.6);
	--ass-heart-active: rgba(0, 0, 0, 1);
	--ass-transition-img: opacity 300ms ease;
	--ass-transition-heart: fill 150ms ease;
}

/* Archive Header */
.woocommerce-products-header {
	padding: 0 var(--ass-pad-h);
	margin-bottom: var(--ass-gap-row);
}

.ass-archive-header {
	max-width: var(--ass-max-width);
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 16px;
	border-bottom: 1px solid #eee;
}

.page-title {
	margin: 0;
	font-size: 18px;
	font-weight: 400;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.ass-product-count {
	font-size: 13px;
	font-weight: 400;
	color: #666;
	letter-spacing: 0.05em;
}

/* Products Grid Container */
.ass-products-grid {
	max-width: var(--ass-max-width);
	margin: 0 auto var(--ass-gap-row);
	padding: 0 var(--ass-pad-h);
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--ass-gap-col) var(--ass-gap-col);
	grid-auto-rows: max-content;
}

/* Product Card */
.ass-product-card {
	display: grid;
	grid-template-rows: auto auto;
	gap: 0;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.ass-product-card:hover {
	opacity: 0.9;
}

/* Product Image Container */
.ass-product-image {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 5;
	background-color: var(--ass-card-bg);
	overflow: hidden;
}

.ass-img-featured,
.ass-img-gallery {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: var(--ass-transition-img);
}

.ass-img-featured {
	opacity: 1;
	z-index: 1;
}

.ass-img-gallery {
	opacity: 0;
	z-index: 0;
}

.ass-img-placeholder {
	width: 100%;
	height: 100%;
	background-color: var(--ass-card-bg);
}

/* Wishlist Heart Button */
.ass-wishlist-btn {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 10;
	width: 44px;
	height: 44px;
	padding: 12px;
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ass-heart-icon {
	width: 20px;
	height: 20px;
	color: var(--ass-heart-color);
	stroke: currentColor;
	stroke-width: 0;
	fill: none;
	transition: var(--ass-transition-heart);
}

.ass-wishlist-btn.is-active .ass-heart-icon {
	fill: var(--ass-heart-active);
	color: var(--ass-heart-active);
	stroke-width: 0;
}

/* Product Info */
.ass-product-info {
	padding-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ass-product-name {
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ass-name-color);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.ass-product-price {
	font-size: 13px;
	font-weight: 400;
	color: var(--ass-price-color);
}

/* Pagination Styles */
.woocommerce-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin: var(--ass-gap-row) auto;
	list-style: none;
	padding: 0;
}

.woocommerce-pagination li {
	display: inline-block;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
	display: inline-block;
	min-width: 32px;
	min-height: 32px;
	padding: 8px;
	text-align: center;
	text-decoration: none;
	color: #000;
	font-size: 13px;
	border: 1px solid #ddd;
	line-height: 1.4;
	transition: all 150ms ease;
}

.woocommerce-pagination a:hover {
	border-color: #000;
	background-color: #f5f5f5;
}

.woocommerce-pagination .woocommerce-pagination-current {
	background-color: #000;
	color: #fff;
	border-color: #000;
}

/* Responsive: Tablet (768px–1199px) */
@media (max-width: 1199px) {
	.ass-products-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Responsive: Mobile (<768px) */
@media (max-width: 767px) {
	:root {
		--ass-pad-h: 16px;
		--ass-gap-col: 12px;
		--ass-gap-row: 32px;
	}

	.ass-products-grid {
		grid-template-columns: repeat(2, 1fr);
		margin-bottom: var(--ass-gap-row);
	}

	.ass-archive-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.ass-product-count {
		align-self: flex-start;
	}
}

/* Responsive: Small phone (≤ 400px) — keep 2 cols but tighten further */
@media (max-width: 400px) {
	:root {
		--ass-pad-h: 12px;
		--ass-gap-col: 8px;
	}
}

/* Print Stylesheet */
@media print {
	.ass-wishlist-btn {
		display: none;
	}

	.ass-products-grid {
		gap: 24px;
	}
}
