/**
 * Atrkadeh brand directory.
 *
 * This stylesheet is loaded only on /brands/ and every selector is scoped to
 * the page body class so product archives and the homepage remain untouched.
 */

body.atrkadeh-brand-directory-page {
	--ak-brand-ink: #272330;
	--ak-brand-text: #47424d;
	--ak-brand-muted: #817b87;
	--ak-brand-line: #e5e2e8;
	--ak-brand-soft: #f6f5f7;
	--ak-brand-paper: #fff;
	--ak-brand-radius: 14px;
	--ak-brand-shadow: 0 16px 34px rgba(39, 35, 48, 0.08);
}

body.atrkadeh-brand-directory-page .site-content > .ast-container {
	max-width: none;
	padding-inline: 0;
}

body.atrkadeh-brand-directory-page #primary,
body.atrkadeh-brand-directory-page .site-main,
body.atrkadeh-brand-directory-page .entry-content {
	width: 100%;
	margin: 0;
}

body.atrkadeh-brand-directory-page #primary {
	padding: 0;
}

body.atrkadeh-brand-directory-page article.ast-article-single {
	margin: 0;
	padding: 0;
	background: transparent;
}

body.atrkadeh-brand-directory-page .entry-header {
	display: none;
}

body.atrkadeh-brand-directory-page .ast-breadcrumbs-wrapper {
	width: min(1180px, calc(100% - 48px));
	margin: 6px auto 0;
	color: var(--ak-brand-muted);
	font-size: 12px;
	line-height: 1.8;
}

body.atrkadeh-brand-directory-page .ast-breadcrumbs-wrapper a {
	color: var(--ak-brand-text);
}

.atrkadeh-brand-directory,
.atrkadeh-brand-directory * {
	box-sizing: border-box;
}

.atrkadeh-brand-directory {
	width: min(1180px, calc(100% - 48px));
	margin-inline: auto;
	padding: 48px 0 96px;
	color: var(--ak-brand-text);
	font-family: Atrkadeh, Tahoma, sans-serif;
}

.atrkadeh-brand-directory [hidden] {
	display: none !important;
}

.atrkadeh-brand-directory__hero {
	max-width: 760px;
	margin: 0 auto 34px;
	text-align: center;
}

.atrkadeh-brand-directory__eyebrow {
	margin: 0 0 8px;
	color: var(--ak-brand-muted);
	font-size: 13px;
	font-weight: 700;
}

.atrkadeh-brand-directory__hero h1 {
	margin: 0;
	color: var(--ak-brand-ink);
	font-size: clamp(32px, 4vw, 46px);
	font-weight: 800;
	line-height: 1.35;
}

.atrkadeh-brand-directory__intro {
	max-width: 690px;
	margin: 14px auto 0;
	color: var(--ak-brand-text);
	font-size: 15px;
	line-height: 2;
}

.atrkadeh-brand-directory__stats {
	margin: 5px 0 0;
	color: var(--ak-brand-muted);
	font-size: 12px;
}

.atrkadeh-brand-search {
	position: relative;
	max-width: 620px;
	margin: 28px auto 0;
}

.atrkadeh-brand-search input[type="search"] {
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 46px 0 48px;
	border: 1px solid #d8d4dc;
	border-radius: 10px;
	outline: none;
	color: var(--ak-brand-ink);
	background: var(--ak-brand-paper);
	box-shadow: none;
	font: inherit;
	font-size: 14px;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.atrkadeh-brand-search input[type="search"]:focus {
	border-color: var(--ak-brand-ink);
	box-shadow: 0 0 0 3px rgba(39, 35, 48, 0.09);
}

.atrkadeh-brand-search input[type="search"]::-webkit-search-cancel-button {
	display: none;
}

.atrkadeh-brand-search__icon {
	position: absolute;
	top: 50%;
	right: 18px;
	width: 15px;
	height: 15px;
	border: 1.8px solid var(--ak-brand-muted);
	border-radius: 50%;
	transform: translateY(-58%);
	pointer-events: none;
}

.atrkadeh-brand-search__icon::after {
	position: absolute;
	top: 11px;
	left: -4px;
	width: 6px;
	height: 2px;
	border-radius: 2px;
	background: var(--ak-brand-muted);
	content: "";
	transform: rotate(-45deg);
}

.atrkadeh-brand-search__clear {
	position: absolute;
	top: 50%;
	left: 10px;
	display: grid;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	place-items: center;
	color: var(--ak-brand-muted);
	background: transparent;
	font: inherit;
	font-size: 24px;
	line-height: 1;
	transform: translateY(-50%);
	cursor: pointer;
}

.atrkadeh-brand-search__clear:hover,
.atrkadeh-brand-search__clear:focus-visible {
	color: var(--ak-brand-paper);
	background: var(--ak-brand-ink);
}

.atrkadeh-brand-search__status {
	min-height: 24px;
	margin: 8px 0 0;
	color: var(--ak-brand-muted);
	font-size: 12px;
}

.atrkadeh-brand-popular {
	margin: 0 0 28px;
	padding: 22px;
	border-radius: 16px;
	background: var(--ak-brand-soft);
}

.atrkadeh-brand-popular h2 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	color: var(--ak-brand-ink);
	font-size: 18px;
	font-weight: 800;
}

.atrkadeh-brand-popular h2 span {
	color: #e7b900;
	font-size: 17px;
}

.atrkadeh-brand-directory__grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 14px;
}

.atrkadeh-brand-card {
	display: flex;
	min-width: 0;
	min-height: 190px;
	padding: 14px 12px;
	border: 1px solid var(--ak-brand-line);
	border-radius: var(--ak-brand-radius);
	align-items: center;
	flex-direction: column;
	justify-content: flex-start;
	color: var(--ak-brand-ink);
	background: var(--ak-brand-paper);
	text-align: center;
	text-decoration: none !important;
	transition: border-color 170ms ease, box-shadow 170ms ease,
		transform 170ms ease, color 170ms ease, background-color 170ms ease;
}

.atrkadeh-brand-card:hover,
.atrkadeh-brand-card:focus-visible {
	border-color: var(--ak-brand-ink);
	outline: none;
	color: var(--ak-brand-paper);
	background: var(--ak-brand-ink);
	box-shadow: var(--ak-brand-shadow);
	transform: translateY(-2px);
}

.atrkadeh-brand-card:focus-visible {
	box-shadow: 0 0 0 3px rgba(39, 35, 48, 0.2), var(--ak-brand-shadow);
}

.atrkadeh-brand-card__logo {
	display: grid;
	width: 100%;
	height: 80px;
	margin-bottom: 10px;
	border-radius: 10px;
	place-items: center;
	overflow: hidden;
	background: #fafafa;
}

.atrkadeh-brand-card:hover .atrkadeh-brand-card__logo,
.atrkadeh-brand-card:focus-visible .atrkadeh-brand-card__logo {
	background: #fff;
}

.atrkadeh-brand-card__logo img {
	display: block;
	width: 50%;
	height: 50%;
	max-width: 82px;
	max-height: 40px;
	margin: 0;
	padding: 0;
	object-fit: contain;
}

.atrkadeh-brand-card__fallback {
	color: #aaa6ae;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 34px;
	font-weight: 400;
	line-height: 1;
}

.atrkadeh-brand-card__name {
	display: block;
	max-width: 100%;
	overflow: hidden;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.6;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.atrkadeh-brand-card__english {
	display: block;
	max-width: 100%;
	margin-top: 1px;
	overflow: hidden;
	color: var(--ak-brand-muted);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10px;
	line-height: 1.45;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.atrkadeh-brand-card:hover .atrkadeh-brand-card__english,
.atrkadeh-brand-card:focus-visible .atrkadeh-brand-card__english,
.atrkadeh-brand-card:hover .atrkadeh-brand-card__count,
.atrkadeh-brand-card:focus-visible .atrkadeh-brand-card__count {
	color: #d9d6de;
}

.atrkadeh-brand-card__count {
	display: block;
	margin-top: auto;
	padding-top: 7px;
	color: var(--ak-brand-muted);
	font-size: 11px;
	line-height: 1.4;
}

.atrkadeh-brand-directory__grid--popular .atrkadeh-brand-card {
	min-height: 178px;
}

.atrkadeh-brand-alphabet {
	margin: 30px 0 8px;
	padding: 10px 0 14px;
	border-bottom: 1px solid var(--ak-brand-line);
}

.atrkadeh-brand-alphabet__track {
	display: flex;
	gap: 5px;
	align-items: center;
	justify-content: center;
}

.atrkadeh-brand-alphabet a {
	display: grid;
	width: 32px;
	height: 32px;
	border: 1px solid transparent;
	border-radius: 7px;
	place-items: center;
	color: var(--ak-brand-text);
	background: transparent;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none !important;
}

.atrkadeh-brand-alphabet a:hover,
.atrkadeh-brand-alphabet a:focus-visible {
	border-color: var(--ak-brand-ink);
	outline: none;
	color: var(--ak-brand-paper);
	background: var(--ak-brand-ink);
}

.atrkadeh-brand-groups {
	padding-top: 4px;
}

.atrkadeh-brand-group {
	padding: 28px 0 30px;
	border-bottom: 1px solid var(--ak-brand-line);
	scroll-margin-top: 24px;
}

.atrkadeh-brand-group:last-child {
	border-bottom: 0;
}

.atrkadeh-brand-group > h2 {
	margin: 0 0 14px;
	color: var(--ak-brand-ink);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-align: left;
}

.atrkadeh-brand-directory__empty {
	margin: 28px 0 0;
	padding: 30px;
	border: 1px solid var(--ak-brand-line);
	border-radius: var(--ak-brand-radius);
	color: var(--ak-brand-muted);
	background: var(--ak-brand-soft);
	text-align: center;
}

@media (max-width: 1024px) {
	.atrkadeh-brand-directory__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	body.atrkadeh-brand-directory-page .ast-breadcrumbs-wrapper {
		width: calc(100% - 32px);
		margin-top: 4px;
		font-size: 11px;
	}

	.atrkadeh-brand-directory {
		width: calc(100% - 32px);
		padding: 32px 0 64px;
	}

	.atrkadeh-brand-directory__hero {
		margin-bottom: 24px;
	}

	.atrkadeh-brand-directory__hero h1 {
		font-size: 30px;
	}

	.atrkadeh-brand-directory__intro {
		font-size: 14px;
		line-height: 1.9;
	}

	.atrkadeh-brand-search {
		margin-top: 22px;
	}

	.atrkadeh-brand-popular {
		padding: 16px;
	}

	.atrkadeh-brand-directory__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.atrkadeh-brand-card,
	.atrkadeh-brand-directory__grid--popular .atrkadeh-brand-card {
		min-height: 176px;
		padding: 11px 9px;
	}

	.atrkadeh-brand-card__logo {
		height: 76px;
	}

	.atrkadeh-brand-card__name {
		font-size: 13px;
	}

	.atrkadeh-brand-alphabet {
		margin-top: 24px;
		overflow: hidden;
	}

	.atrkadeh-brand-alphabet__track {
		padding-bottom: 5px;
		overflow-x: auto;
		justify-content: flex-start;
		scrollbar-width: thin;
		-webkit-overflow-scrolling: touch;
	}

	.atrkadeh-brand-alphabet a {
		flex: 0 0 32px;
	}

	.atrkadeh-brand-group {
		padding: 24px 0;
	}
}

@media (max-width: 380px) {
	.atrkadeh-brand-directory,
	body.atrkadeh-brand-directory-page .ast-breadcrumbs-wrapper {
		width: calc(100% - 24px);
	}

	.atrkadeh-brand-popular {
		padding: 12px;
	}

	.atrkadeh-brand-card__english {
		font-size: 9px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.atrkadeh-brand-card,
	.atrkadeh-brand-search input[type="search"] {
		transition: none;
	}

	.atrkadeh-brand-card:hover,
	.atrkadeh-brand-card:focus-visible {
		transform: none;
	}
}
