/**
 * Products list page — Figma node 279:826.
 */

/* ========== PRODUCT LIST SECTION ========== */
.at-product-list {
	padding: 80px 0 0;
	background: var(--at-bg);
}

.at-product-list__inner {
	width: min(100% - 40px, 1502px);
	margin-inline: auto;
}

/* ========== FILTERS (reference: aurellia.holehite.in taxonomy filter) ========== */
.at-product-list__filters {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	margin: 0 0 40px;
	padding: 0 0 8px;
}

.at-product-list__search-status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px 16px;
	margin: 0 0 20px;
}

.at-product-list__search-status[hidden] {
	display: none !important;
}

.at-product-list__search-status-text {
	margin: 0;
	font-family: var(--at-font-body);
	font-size: 15px;
	color: var(--at-brown);
}

.at-product-list__search-clear {
	appearance: none;
	min-height: 34px;
	padding: 0 12px;
	border: 1px solid var(--at-border-dark);
	border-radius: 4px;
	background: var(--at-white);
	color: var(--at-brown);
	font-family: var(--at-font-body);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.at-product-list__search-clear:hover,
.at-product-list__search-clear:focus {
	border-color: var(--at-primary);
	color: var(--at-primary);
}

.at-product-list__filter-group {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	width: 100%;
}

.at-product-list__filter-label {
	margin: 0;
	font-family: var(--at-font-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--at-brown);
}

.at-product-list__filter-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 12px 20px;
	width: 100%;
}

.at-product-list__filter-row[hidden],
.at-product-list__filter-item[hidden] {
	display: none !important;
}

.at-product-list__filter-item {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 5px 14px;
	border: 1px solid var(--at-border-dark);
	border-radius: 4px;
	background: transparent;
	color: #69727d;
	font-family: var(--at-font-body);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.at-product-list__filter-item:hover:not([aria-pressed="true"]) {
	border-color: var(--at-primary);
	color: var(--at-brown);
	background: rgba(163, 90, 52, 0.06);
}

.at-product-list__filter-item:focus-visible {
	outline: 2px solid var(--at-primary);
	outline-offset: 2px;
}

.at-product-list__filter-item[aria-pressed="true"] {
	border-color: var(--at-primary);
	background: var(--at-primary);
	color: var(--at-white);
}

.at-product-list__item.is-filtered-out,
.at-product-list__item[hidden] {
	display: none !important;
}

.at-product-list__grid[hidden] {
	display: none !important;
}

.at-product-list__empty {
	margin: 0 0 80px;
}

.at-product-list__empty[hidden] {
	display: none !important;
}

.at-product-list__empty-card {
	box-sizing: border-box;
	max-width: 560px;
	margin: 24px auto 0;
	padding: 40px 32px;
	border: 1px solid var(--at-border);
	border-radius: var(--at-radius-card);
	background: var(--at-white);
	text-align: center;
}

.at-product-list__empty-title {
	margin: 0 0 10px;
	font-family: var(--at-font-heading);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--at-brown);
}

.at-product-list__empty-text {
	margin: 0 0 24px;
	font-family: var(--at-font-body);
	font-size: var(--at-fs-body);
	line-height: var(--at-lh-body);
	color: var(--at-text);
}

.at-product-list__empty-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

.at-product-list__empty-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 8px 18px;
	border: 1px solid var(--at-border-dark);
	border-radius: 4px;
	background: var(--at-white);
	color: var(--at-brown);
	font-family: var(--at-font-body);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.at-product-list__empty-btn:hover,
.at-product-list__empty-btn:focus {
	border-color: var(--at-primary);
	color: var(--at-primary);
}

.at-product-list__empty-btn:focus-visible {
	outline: 2px solid var(--at-primary);
	outline-offset: 2px;
}

.at-product-list__empty-btn--primary {
	border-color: var(--at-primary);
	background: var(--at-primary);
	color: var(--at-white);
}

.at-product-list__empty-btn--primary:hover,
.at-product-list__empty-btn--primary:focus {
	border-color: var(--at-primary-dark);
	background: var(--at-primary-dark);
	color: var(--at-white);
}

.at-product-list__grid {
	display: grid;
	grid-template-columns: repeat(4, 350px);
	gap: 30px 34px;
	justify-content: center;
	margin: 0;
	padding: 0 0 80px;
	list-style: none;
}

.at-product-list__item {
	margin: 0;
}

.page-template-page-products .at-catalogue-cta,
.tax-product_cat .at-catalogue-cta,
.post-type-archive-product .at-catalogue-cta {
	padding-top: 0;
}

/* ========== PRODUCT CARD ========== */
.at-product-card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: 350px;
	height: 576px;
	border: 1px solid var(--at-border);
	border-radius: var(--at-radius-card);
	background: var(--at-white);
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.at-product-card__link {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	height: 100%;
	min-height: 0;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

.at-product-card:hover,
.at-product-card:focus-within {
	border-color: var(--at-primary);
	box-shadow: 0 8px 24px rgba(61, 43, 31, 0.08);
}

.at-product-card__link:focus-visible {
	outline: 2px solid var(--at-primary);
	outline-offset: -2px;
}

.at-product-card--featured {
	border-color: var(--at-primary);
}

.at-product-card--featured .at-product-card__media {
	border-bottom-color: var(--at-primary);
}

/* ========== MEDIA AREA ========== */
.at-product-card__media {
	position: relative;
	flex-shrink: 0;
	width: 100%;
	height: 316px;
	border-bottom: 1px solid var(--at-border);
	border-radius: var(--at-radius-card) var(--at-radius-card) 0 0;
	background: var(--at-white);
	overflow: hidden;
}

.at-product-card--featured .at-product-card__media {
	border-bottom: 1px solid var(--at-primary);
}

.at-product-card__img {
	display: block;
	max-width: 100%;
	height: auto;
	object-fit: contain;
}

.at-product-card__media--single {
	display: flex;
	align-items: center;
	justify-content: center;
}

.at-product-card__img--default {
	width: auto;
	max-width: calc(100% - 48px);
	max-height: 260px;
	margin: 0 auto;
	object-fit: contain;
}

/* Single-image positioning — Figma measurements */
.at-product-card__img--trays {
	width: 302px;
	height: 201px;
	margin: 60px auto 0;
	object-fit: cover;
}

.at-product-card__img--pan {
	width: 218px;
	height: 218px;
	margin: 52px auto 0;
	object-fit: cover;
}

.at-product-card__img--paper {
	width: 295px;
	height: 202px;
	margin: 52px auto 0;
	object-fit: cover;
	object-position: center;
}

.at-product-card__img--hinged {
	width: 290px;
	height: 217px;
	margin: 52px auto 0;
	object-fit: cover;
	object-position: center top;
}

.at-product-card__img--souffle {
	width: 253px;
	height: 253px;
	margin: 34px auto 0;
	object-fit: cover;
}

.at-product-card__img--aluminum {
	width: 253px;
	height: 192px;
	margin: 62px auto 0;
	object-fit: cover;
	object-position: center top;
}

/* Clamshell dual layout — Figma 279:1028+ */
.at-product-card__media--clamshell .at-product-card__img--clamshell-lg {
	position: absolute;
	right: 35px;
	top: 39px;
	width: 212px;
	height: 212px;
	object-fit: cover;
}

.at-product-card__media--clamshell .at-product-card__img--clamshell-sm {
	position: absolute;
	left: 35px;
	top: 82px;
	width: 165px;
	height: 200px;
	object-fit: cover;
}

/* Meal tray dual layout — Figma 279:991+ */
.at-product-card__media--meal-tray .at-product-card__img--meal-tray-tilt {
	position: absolute;
	left: 50%;
	top: 34px;
	width: 208px;
	height: 160px;
	margin-left: -20px;
	object-fit: cover;
	transform: rotate(9.5deg);
	transform-origin: center center;
}

.at-product-card__media--meal-tray .at-product-card__img--meal-tray-front {
	position: absolute;
	left: 57px;
	top: 114px;
	width: 208px;
	height: 160px;
	object-fit: cover;
}

/* ========== CARD BODY ========== */
.at-product-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
	padding: 23px 29px 30px;
	box-sizing: border-box;
	overflow: hidden;
}

.at-product-card__title {
	margin: 0;
	max-width: 211px;
	font-family: var(--at-font-body);
	font-size: 14px;
	font-weight: 400;
	line-height: 26px;
	letter-spacing: 0.14px;
	text-transform: uppercase;
	color: var(--at-text-black);
}

.at-product-card__tiers {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 2px;
}

.at-product-card__tier {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	height: 24px;
	margin-top: 2px;
	padding: 0 10px;
	border-radius: 260px;
	font-family: var(--at-font-body);
	font-size: 11px;
	font-weight: 400;
	line-height: 22px;
	letter-spacing: 0.44px;
	text-transform: uppercase;
	color: var(--at-white);
	white-space: nowrap;
}

.at-product-card__tier--classic {
	min-width: 113px;
	background: #7a8c6e;
}

.at-product-card__tier--premium {
	min-width: 84px;
	background: #8b4a2a;
}

.at-product-card__tier--luxury {
	min-width: 80px;
	background: var(--at-brown);
}

.at-product-card__tier--customise {
	min-width: 80px;
	background: #5a6b7d;
}

.at-product-card__tier--custom {
	min-width: 80px;
	background: #5a6b7d;
}

.at-product-card__desc {
	margin: 10px 0 20px;
	max-width: 292px;
	flex: 1 1 auto;
	min-height: 0;
	font-family: var(--at-font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 26px;
	letter-spacing: 0.16px;
	color: var(--at-text-black);
	opacity: 0.6;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.at-product-card__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 291px;
	height: 50px;
	margin-top: auto;
	flex-shrink: 0;
	border: 1px solid var(--at-primary);
	border-radius: var(--at-radius-btn);
	background: var(--at-white);
	font-family: var(--at-font-body);
	font-size: 12px;
	font-weight: 600;
	line-height: normal;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--at-primary);
	transition: background var(--at-transition), color var(--at-transition), border-color var(--at-transition);
}

.at-product-card__btn:hover,
.at-product-card:hover .at-product-card__btn,
.at-product-card:focus-within .at-product-card__btn {
	background: var(--at-primary);
	color: var(--at-white);
}

.at-product-card--featured .at-product-card__btn {
	border-color: var(--at-primary);
	background: var(--at-primary);
	color: var(--at-white);
}

.at-product-card--featured .at-product-card__btn:hover,
.at-product-card--featured:hover .at-product-card__btn,
.at-product-card--featured:focus-within .at-product-card__btn {
	background: var(--at-primary-dark);
	border-color: var(--at-primary-dark);
	color: var(--at-white);
}

/* Tablet: 2 columns */
@media (max-width: 1400px) and (min-width: 768px) {
	.at-product-list__grid {
		grid-template-columns: repeat(2, minmax(0, 350px));
		gap: 28px 24px;
	}

	.at-product-card {
		width: 100%;
		max-width: 350px;
	}
}

/* Mobile: one product per row (must live here — this file loads after responsive.css) */
@media (max-width: 767px) {
	.at-product-list {
		padding-top: 40px;
		overflow-x: hidden;
	}

	.at-product-list__inner {
		width: min(100% - 32px, 1502px);
	}

	.at-product-list__grid {
		display: grid;
		grid-template-columns: 1fr;
		gap: 20px;
		padding-bottom: 48px;
		justify-content: stretch;
	}

	.at-product-list__item {
		width: 100%;
		min-width: 0;
	}

	.at-product-card {
		width: 100%;
		max-width: none;
		height: auto;
		min-height: 0;
		margin-inline: 0;
	}

	.at-product-card__media {
		height: auto;
		min-height: 220px;
		aspect-ratio: 350 / 316;
		max-height: 280px;
	}

	.at-product-card__media--single {
		padding: 16px;
	}

	.at-product-card__img,
	.at-product-card__img--default,
	.at-product-card__img--trays,
	.at-product-card__img--pan,
	.at-product-card__img--paper,
	.at-product-card__img--hinged,
	.at-product-card__img--souffle,
	.at-product-card__img--aluminum {
		position: static;
		width: auto;
		max-width: 100%;
		height: auto;
		max-height: 200px;
		margin: 0 auto;
		object-fit: contain;
	}

	.at-product-card__media--clamshell,
	.at-product-card__media--meal-tray {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		padding: 16px;
	}

	.at-product-card__media--clamshell .at-product-card__img--clamshell-lg,
	.at-product-card__media--clamshell .at-product-card__img--clamshell-sm,
	.at-product-card__media--meal-tray .at-product-card__img--meal-tray-tilt,
	.at-product-card__media--meal-tray .at-product-card__img--meal-tray-front {
		position: static;
		left: auto;
		right: auto;
		top: auto;
		width: auto;
		max-width: 48%;
		height: auto;
		max-height: 180px;
		margin: 0;
		transform: none;
		object-fit: contain;
	}

	.at-product-card__media--meal-tray .at-product-card__img--meal-tray-tilt {
		display: none;
	}

	.at-product-card__media--meal-tray .at-product-card__img--meal-tray-front {
		max-width: 85%;
	}

	.at-product-card__body {
		padding: 18px 16px 20px;
	}

	.at-product-card__title {
		max-width: none;
		font-size: 13px;
		line-height: 22px;
	}

	.at-product-card__tier,
	.at-product-card__tier--classic,
	.at-product-card__tier--premium,
	.at-product-card__tier--luxury,
	.at-product-card__tier--customise,
	.at-product-card__tier--custom {
		min-width: 0;
		height: 22px;
		padding: 0 8px;
		font-size: 10px;
		line-height: 20px;
	}

	.at-product-card__desc {
		margin: 8px 0 16px;
		max-width: none;
		font-size: 14px;
		line-height: 22px;
	}

	.at-product-card__btn {
		max-width: none;
		width: 100%;
		height: 46px;
	}
}
