/**
 * @package ProMart
 */

.promart-home-brands {
	--promart-home-brands-gold: #d39d2b;
	--promart-home-brands-gold-dark: #b88725;
	--promart-home-brands-radius-card: var(--promart-home-radius-card, 0.875rem);
	--promart-home-brands-radius-card-sm: var(--promart-home-radius-card-sm, 0.75rem);
	--promart-home-brands-radius-control: var(--promart-home-radius-control, 0.5rem);
	--promart-home-brands-radius-media: var(--promart-home-radius-media, 0.375rem);
	--promart-home-brands-grid-size: 9.25rem;
	--promart-home-brands-grid-label-h: 2.625rem;
	--promart-home-brands-grid-card-height: calc(var(--promart-home-brands-grid-size) + var(--promart-home-brands-grid-label-h));
	position: relative;
	padding: 2rem 0 2.5rem;
	background: #ffffff;
	border-block: 1px solid #e8eaed;
	overflow: visible;
}

.promart-home-brands__inner {
	position: relative;
	z-index: 1;
}

/* ── Top row: title + tabs (full width) ── */
.promart-home-brands__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
	min-width: 0;
}

.promart-home-brands__header {
	flex-shrink: 0;
	margin: 0;
}

.promart-home-brands__section-title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 800;
	color: #0d3155;
	line-height: 1.4;
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
}

.promart-home-brands__section-title.section-title::before {
	width: 4px;
	height: 1.25rem;
	margin-left: 0.5rem;
	flex-shrink: 0;
}

.promart-home-brands__tabs-bar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 0;
	flex: 1 1 auto;
	justify-content: flex-end;
}

.promart-home-brands__tabs-scroller {
	flex: 1 1 auto;
	min-width: 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	direction: rtl;
}

.promart-home-brands__tabs-scroller::-webkit-scrollbar {
	display: none;
}

.promart-home-brands__tabs {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0.5rem;
	flex-wrap: nowrap;
	width: max-content;
	min-width: 100%;
	direction: rtl;
}

.promart-home-brands__tab {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.35;
	color: #4b5563;
	background: #ffffff;
	border: 1px solid #e8eaed;
	border-radius: var(--promart-home-brands-radius-control);
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.promart-home-brands__tab:hover {
	color: #0d3155;
	border-color: #d1d5db;
}

.promart-home-brands__tab.is-active {
	color: #ffffff;
	background: #0d3155;
	border-color: #0d3155;
	box-shadow: 0 6px 18px rgba(13, 49, 85, 0.18);
}

.promart-home-brands__tab-icon {
	font-size: 1.125rem;
	line-height: 1;
	flex-shrink: 0;
}

.promart-home-brands__tab-thumb {
	display: block;
	width: 1.375rem;
	height: 1.375rem;
	object-fit: cover;
	border-radius: var(--promart-home-brands-radius-media);
	flex-shrink: 0;
}

.promart-home-brands__tab-label {
	display: block;
	flex: 0 1 auto;
	text-align: center;
}

.promart-home-brands__tabs-nav {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	flex-shrink: 0;
}

.promart-home-brands__tabs-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: 1px solid #e8eaed;
	border-radius: 999px;
	background: #ffffff;
	color: #717171;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.promart-home-brands__tabs-arrow:hover {
	color: #0d3155;
	border-color: #d1d5db;
	background: #f9fafb;
}

.promart-home-brands__tabs-arrow .material-symbols-outlined {
	font-size: 1.125rem;
}

/* ── Body: carousel + featured card ── */
.promart-home-brands__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--promart-home-catalog-gap);
	align-items: stretch;
	min-width: 0;
	direction: ltr;
}

.promart-home-brands--has-featured .promart-home-brands__body {
	grid-template-columns: minmax(0, 1fr) var(--promart-home-brands-featured-width, var(--promart-home-catalog-card-width));
}

.promart-home-brands__grids-col {
	min-width: 0;
	direction: rtl;
}

.promart-home-brands__featured-col {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	direction: rtl;
}

.promart-home-brands__panel {
	display: none;
}

.promart-home-brands__panel.is-active {
	display: block;
}

.promart-home-brands__grid-panels {
	min-width: 0;
}

.promart-home-brands__featured-panels {
	width: 100%;
	min-width: 0;
}

.promart-home-brands__featured-col {
	flex-shrink: 0;
}

/* ── Featured card (same footprint as grid cards) ── */
.promart-home-brands__featured {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.promart-home-brands__featured-viewport {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	min-height: 0;
	height: 100%;
}

.promart-home-brands__featured-card {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	min-height: 10.5rem;
	margin: 0;
	border: 1px solid #e5e7eb;
	border-radius: var(--promart-home-brands-radius-card);
	overflow: hidden;
	background: #fff;
}

.promart-home-brands__featured-slide {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	min-height: 0;
	height: 100%;
}

.promart-home-brands__featured-slide[hidden] {
	display: none !important;
}

.promart-home-brands__featured-link {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	color: inherit;
	text-decoration: none;
}

.promart-home-brands__featured-media {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 0.875rem 0.75rem 0.625rem;
	background: #fff;
}

.promart-home-brands__featured-image {
	display: block;
	width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
}

.promart-home-brands__featured-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 5.5rem;
	font-size: 1.5rem;
	font-weight: 800;
	color: #9ca3af;
}

.promart-home-brands__featured-logo {
	position: absolute;
	top: 0.5rem;
	left: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 1.75rem;
	transform: translateX(-50%);
	pointer-events: none;
}

.promart-home-brands__featured-logo-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.promart-home-brands__featured-cta {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 2.625rem;
	padding: 0.5rem 0.625rem;
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.45;
	color: #ffffff;
	text-align: center;
	text-decoration: none;
	background: var(--promart-home-brands-gold);
	border-top: 1px solid var(--promart-home-brands-gold);
	border-end-end-radius: var(--promart-home-brands-radius-card);
	border-end-start-radius: var(--promart-home-brands-radius-card);
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.promart-home-brands__featured-cta:hover {
	color: #ffffff;
	background: var(--promart-home-brands-gold-dark);
	border-top-color: var(--promart-home-brands-gold-dark);
}

.promart-home-brands__featured-cta-label {
	display: block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.promart-home-brands__featured-footer {
	display: flex;
	flex: 0 0 auto;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 0.5rem;
	padding-top: 0.125rem;
}

.promart-home-brands__featured-dots {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	pointer-events: auto;
}

.promart-home-brands__carousel-wrap {
	position: relative;
	min-width: 0;
}

.promart-home-brands__scroller {
	overflow-x: auto;
	overflow-y: visible;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	direction: rtl;
	scroll-snap-type: x proximity;
}

.promart-home-brands__track {
	display: flex;
	align-items: stretch;
	gap: var(--promart-home-catalog-gap);
	width: max-content;
	direction: rtl;
	padding-block: 0.125rem;
}

.promart-home-brands__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 6;
	width: 2rem;
	height: 2rem;
	border: 1px solid #e2e5ea;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.96);
	color: #0d3155;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(13, 49, 85, 0.12);
	transition: border-color 0.2s, background-color 0.2s, color 0.2s, opacity 0.25s, visibility 0.25s;
}

.promart-home-brands__nav--next {
	left: 0;
	right: auto;
}

.promart-home-brands__nav--prev {
	right: 0;
	left: auto;
}

.promart-home-brands--has-featured .promart-home-brands__nav--prev {
	right: 0.75rem;
}

.promart-home-brands--has-featured .promart-home-brands__carousel-wrap {
	padding-inline-end: 0.25rem;
}

.promart-home-brands__nav:hover {
	border-color: #0d3155;
	background: #0d3155;
	color: #fff;
}

.promart-home-brands__nav.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.promart-home-brands__nav .material-symbols-outlined {
	font-size: 1.125rem;
}

.promart-home-brands__grid-card {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	flex: 0 0 auto;
	flex-shrink: 0;
	width: var(--promart-home-brands-grid-size);
	min-width: var(--promart-home-brands-grid-size);
	max-width: var(--promart-home-brands-grid-size);
	height: var(--promart-home-brands-grid-card-height);
	min-height: var(--promart-home-brands-grid-card-height);
	max-height: var(--promart-home-brands-grid-card-height);
	border: 1px solid #e5e7eb;
	border-radius: var(--promart-home-brands-radius-card);
	overflow: hidden;
	background: #fff;
	color: inherit;
	text-decoration: none;
	scroll-snap-align: start;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.promart-home-brands__grid-card:hover {
	border-color: #d1d5db;
	box-shadow: 0 4px 14px rgba(13, 49, 85, 0.08);
}

.promart-home-brands__grid-card-media {
	position: relative;
	flex: 0 0 var(--promart-home-brands-grid-size);
	width: 100%;
	height: var(--promart-home-brands-grid-size);
	min-height: var(--promart-home-brands-grid-size);
	max-height: var(--promart-home-brands-grid-size);
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #fff;
}

.promart-home-brands__grid-card-image {
	position: absolute;
	inset: 0;
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	padding: 0.75rem;
	object-fit: contain;
	object-position: center;
}

.promart-home-brands__grid-card-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	font-weight: 800;
	color: #9ca3af;
	background: #fff;
}

.promart-home-brands__grid-card-label {
	display: -webkit-box;
	flex: 0 0 var(--promart-home-brands-grid-label-h);
	align-items: center;
	justify-content: center;
	width: 100%;
	height: var(--promart-home-brands-grid-label-h);
	min-height: var(--promart-home-brands-grid-label-h);
	max-height: var(--promart-home-brands-grid-label-h);
	padding: 0.375rem 0.625rem;
	overflow: hidden;
	background: #f0f0f0;
	color: #4b5563;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.promart-home-brands__featured-dot {
	width: 0.375rem;
	height: 0.375rem;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: #d1d5db;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.promart-home-brands__featured-dot.is-active {
	background: var(--promart-home-brands-gold);
	transform: scale(1.15);
}

.promart-home-brands__featured-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	border: 1px solid #e8eaed;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.94);
	color: #717171;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease;
	pointer-events: auto;
}

.promart-home-brands__featured-arrow:hover {
	color: #0d3155;
	border-color: #d1d5db;
}

.promart-home-brands__featured-arrow .material-symbols-outlined {
	font-size: 1rem;
}

/* ── Shared CTA (used in blog section) ── */
.promart-home-brands__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.5rem 0.875rem;
	font-size: 0.75rem;
	font-weight: 700;
	color: #0d3155;
	background: #ffffff;
	border: 1px solid #e8eaed;
	border-radius: var(--promart-home-brands-radius-control);
	box-shadow: 0 4px 14px rgba(13, 49, 85, 0.04);
	transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.promart-home-brands__cta:hover {
	color: #b8860b;
	border-color: rgba(211, 157, 43, 0.55);
	background: #fffdf5;
	box-shadow: 0 8px 20px rgba(13, 49, 85, 0.08);
}

@media (max-width: 1023px) {
	.promart-home-brands--has-featured .promart-home-brands__body {
		grid-template-columns: 1fr;
	}

	.promart-home-brands__featured-col {
		width: 100%;
		min-width: 0;
		justify-self: stretch;
		max-width: var(--promart-home-catalog-card-width);
		margin-inline: auto;
	}
}

@media (max-width: 767px) {
	.promart-home-brands__top {
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
	}

	.promart-home-brands__header {
		width: 100%;
	}

	.promart-home-brands__section-title {
		white-space: normal;
	}

	.promart-home-brands__tabs-bar {
		width: 100%;
		justify-content: stretch;
	}

	.promart-home-brands__tabs-nav {
		display: none;
	}
}

@media (max-width: 639px) {
	.promart-home-brands {
		padding: 1.5rem 0 1.75rem;
		overflow-x: clip;
	}

	.promart-home-brands__inner {
		min-width: 0;
		max-width: 100%;
	}

	.promart-home-brands__featured-col {
		display: none;
	}

	.promart-home-brands__carousel-wrap {
		padding-inline: 0.125rem;
	}

	.promart-home-brands__scroller {
		margin-inline: -0.125rem;
		padding-inline: 0.125rem;
		scroll-padding-inline: 0.125rem;
	}
}

@media (max-width: 639px) {
	.promart-home-brands {
		--promart-home-brands-grid-size: 9.25rem;
		--promart-home-brands-grid-label-h: 2.375rem;
		--promart-home-brands-radius-card: var(--promart-home-brands-radius-card-sm);
	}

	.promart-home-brands__featured-card {
		min-height: 9.5rem;
	}

	.promart-home-brands__featured-media {
		padding: 0.625rem 0.5rem 0.5rem;
	}

	.promart-home-brands__featured-cta {
		min-height: 2.375rem;
		padding: 0.4375rem 0.5rem;
		font-size: 0.75rem;
	}

	.promart-home-brands__grid-card-image {
		padding: 0.625rem;
	}

	.promart-home-brands__grid-card-label {
		padding: 0.4375rem 0.5rem;
		font-size: 0.75rem;
	}
}

@media (min-width: 640px) {
	.promart-home-brands {
		--promart-home-brands-grid-size: 10rem;
		--promart-home-brands-grid-label-h: 2.625rem;
	}

	.promart-home-brands__nav {
		width: 2.25rem;
		height: 2.25rem;
	}
}

@media (min-width: 1024px) {
	.promart-home-brands {
		--promart-home-brands-grid-size: 11rem;
		--promart-home-brands-grid-label-h: 2.75rem;
	}

	.promart-home-brands__tab {
		font-size: 0.875rem;
		padding: 0.5625rem 1.125rem;
	}

	.promart-home-brands--has-featured .promart-home-brands__scroller {
		padding-inline-start: 1px;
		scroll-padding-inline-start: 1px;
	}

	.promart-home-brands--has-featured .promart-home-brands__body {
		align-items: stretch;
	}

	.promart-home-brands__featured-col {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		align-self: stretch;
	}

	.promart-home-brands__featured-panels,
	.promart-home-brands__featured-panels > .promart-home-brands__panel.is-active {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		width: 100%;
		min-width: 0;
		min-height: 0;
	}

	.promart-home-brands__featured-panels > .promart-home-brands__panel.is-active {
		display: flex;
	}

	.promart-home-brands__featured {
		flex: 1 1 auto;
		min-height: 0;
	}

	.promart-home-brands__featured-card {
		flex: 1 1 auto;
		min-height: 0;
	}

	.promart-home-brands__featured-cta {
		font-size: 0.75rem;
	}
}
