/**
 * Brands listing page — parent brand cards.
 * Hero reuses Store editorial header classes from shop.css.
 *
 * @package Arabia_Essence
 */

.ae-brands-page {
	background: var(--ae-color-page, #ffffff);
	overflow-x: clip;
}

/* Sit flush under the site header like the Store catalog */
.ae-brands-page > .ae-shop-header--editorial {
	margin-bottom: 0;
}

.ae-brands-page__main {
	padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.ae-brands-page .ae-breadcrumbs {
	margin: 1.25rem 0 1.5rem;
}

.ae-brands-body {
	padding: 0;
}

.ae-brands-kicker {
	margin: 0 0 0.75rem;
	color: var(--ae-color-gold);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.ae-brands-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 1.5rem);
}

.ae-brands-grid__item {
	min-width: 0;
}

.ae-brand-card {
	--ae-card-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ae-card-radius: 14px;
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
	background: transparent;
	border: none;
	box-shadow: none;
	overflow: visible;
}

.ae-brand-card:hover,
.ae-brand-card:focus-visible,
.ae-brand-card:focus-within {
	transform: none;
	box-shadow: none;
	outline: none;
}

.ae-brand-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #ffffff;
	border-radius: var(--ae-card-radius);
	border: 1px solid rgba(0, 87, 91, 0.08);
	box-shadow: 0 0 0 transparent;
	transition:
		transform 0.7s var(--ae-card-ease),
		box-shadow 0.7s var(--ae-card-ease),
		border-color 0.7s var(--ae-card-ease);
}

.ae-brand-card:hover .ae-brand-card__media,
.ae-brand-card:focus-visible .ae-brand-card__media,
.ae-brand-card:focus-within .ae-brand-card__media {
	transform: translateY(-3px);
	border-color: rgba(0, 87, 91, 0.1);
	box-shadow: 0 16px 36px -14px rgba(0, 87, 91, 0.16);
}

.ae-brand-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transform: scale(1);
	transform-origin: center center;
	transition: transform 300ms ease-in-out;
}

.ae-brand-card:hover .ae-brand-card__image,
.ae-brand-card:focus-visible .ae-brand-card__image,
.ae-brand-card:focus-within .ae-brand-card__image {
	transform: scale(1.04);
}

.ae-brand-card__body {
	padding: 1.25rem 0.25rem 0;
	text-align: center;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

.ae-brand-card__category {
	font-family: var(--ae-font-accent, var(--ae-font-body));
	font-size: 0.625rem;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ae-color-gold);
	margin-bottom: 0.5rem;
	min-height: 1.2em;
}

.ae-brand-card__name {
	font-family: var(--ae-font-product, var(--ae-font-heading));
	font-size: 1.25rem;
	font-weight: 500;
	font-variant-numeric: lining-nums;
	font-feature-settings: "lnum" 1;
	line-height: 1.3;
	margin: 0 0 0.375rem;
	color: var(--ae-color-primary);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	min-height: calc(1.3em * 2);
	transition: color 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ae-brand-card:hover .ae-brand-card__name,
.ae-brand-card:focus-visible .ae-brand-card__name,
.ae-brand-card:focus-within .ae-brand-card__name {
	color: var(--ae-color-gold);
}

.ae-brand-card__price {
	font-family: var(--ae-font-body);
	font-size: 1.125rem;
	font-weight: 500;
	font-variant-numeric: lining-nums tabular-nums;
	font-feature-settings: "lnum" 1, "tnum" 1;
	color: var(--ae-color-primary);
	letter-spacing: 0.03em;
	margin-top: auto;
	line-height: 1.35;
}

.ae-brand-card__price .woocommerce-Price-amount,
.ae-brand-card__price .amount {
	font-weight: 500;
}

.ae-brands-empty {
	text-align: center;
	padding: 2.5rem 1.25rem;
	border: 1px solid rgba(0, 87, 91, 0.12);
	background: #fff;
}

.ae-brands-empty p {
	margin: 0 0 1.25rem;
	color: var(--ae-color-text-muted);
}

.ae-brands-cta {
	margin: clamp(2.5rem, 6vw, 3.5rem) 0 0;
	padding: clamp(2.25rem, 5vw, 3.25rem) 1.5rem;
	text-align: center;
	border: 1px solid rgba(0, 87, 91, 0.12);
	background: #fff;
	box-shadow: 0 14px 45px rgba(17, 37, 36, 0.05);
}

.ae-brands-cta h2 {
	margin: 0 0 0.75rem;
	font-family: var(--ae-font-heading);
	font-size: clamp(1.75rem, 4vw, 2.4rem);
	font-weight: 300;
	line-height: 1.1;
	color: var(--ae-color-dark);
}

.ae-brands-cta p {
	max-width: 520px;
	margin: 0 auto 1.5rem;
	color: var(--ae-color-text-muted);
	font-size: 0.95rem;
	line-height: 1.7;
}

@media (max-width: 960px) {
	.ae-brands-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.ae-brands-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.ae-brand-card__media {
		aspect-ratio: 16 / 11;
	}

	.ae-brands-cta {
		padding: 2rem 1.15rem;
	}

	.ae-brands-cta .ae-btn {
		width: min(100%, 20rem);
	}
}
