/* Brandix for Product Brands — frontend styles */

/* ----- Shared grid (shortcode + Elementor grid) ----- */
.brandix-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.brandix--cols-1 .brandix-grid { grid-template-columns: repeat(1, 1fr); }
.brandix--cols-2 .brandix-grid { grid-template-columns: repeat(2, 1fr); }
.brandix--cols-3 .brandix-grid { grid-template-columns: repeat(3, 1fr); }
.brandix--cols-4 .brandix-grid { grid-template-columns: repeat(4, 1fr); }
.brandix--cols-5 .brandix-grid { grid-template-columns: repeat(5, 1fr); }
.brandix--cols-6 .brandix-grid { grid-template-columns: repeat(6, 1fr); }
.brandix--cols-7 .brandix-grid { grid-template-columns: repeat(7, 1fr); }
.brandix--cols-8 .brandix-grid { grid-template-columns: repeat(8, 1fr); }

.brandix--list .brandix-grid {
	grid-template-columns: 1fr;
}

.brandix-grid__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 16px;
	text-align: center;
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 6px;
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.brandix-grid__item:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
	transform: translateY(-2px);
}

.brandix-grid__image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.brandix-grid__image img {
	width: 100%;
	object-fit: contain;
	display: block;
	height: auto;
}



.brandix-grid__name {
	font-weight: 600;
	line-height: 1.3;
}

/* Space above the name only when a logo precedes it. */
.brandix-grid__image + .brandix-grid__name {
	margin-top: 12px;
}

.brandix-grid__name a {
	color: inherit;
	text-decoration: none;
}

.brandix-grid__name a:hover {
	text-decoration: underline;
}

.brandix-grid__count {
	margin-top: 4px;
	font-size: 0.85em;
	color: #6b7280;
}

.brandix-grid__desc {
	margin-top: 8px;
	font-size: 0.9em;
	color: #4b5563;
}

.brandix-grid__desc p{
	margin: 0;
}

@media (max-width: 1024px) {
	.brandix-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
	.brandix-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----- Single product brand block ----- */
.brandix-product {
	margin: 14px 0;
	font-size: 0.95em;
}

.brandix-product__label {
	font-weight: 600;
	margin-right: 8px;
}

.brandix-product__list {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	vertical-align: middle;
}

.brandix-product__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.brandix-product__logo img {
	max-height: 40px;
	width: auto;
	display: block;
}

.brandix-product__name {
	font-weight: 500;
}

.brandix-product__name,
.brandix-product__name a {
	color: inherit;
	text-decoration: none;
}

.brandix-product__name a:hover {
	text-decoration: underline;
}

.brandix-product--tab .brandix-product__list {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 16px;
}

.brandix-product__desc-title {
	margin: 16px 0 6px;
	font-size: 1.05em;
}

/* ----- Shop loop product card brand ----- */
.brandix-loop {
	margin: 4px 16px 6px;
	font-size: 0.85em;
	line-height: 1.4;
}

.brandix-loop__label {
	font-weight: 600;
	margin-right: 5px;
	opacity: 0.75;
}

.brandix-loop__list {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	vertical-align: middle;
}

.brandix-loop__item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.brandix-loop__logo img {
	max-height: 24px;
	width: auto;
	display: block;
}

.brandix-loop__name {
	font-weight: 500;
}

.brandix-loop__name,
.brandix-loop__name a {
	color: inherit;
	text-decoration: none;
}

.brandix-loop__name a:hover,
a.brandix-loop__name:hover {
	text-decoration: underline;
}

/* ----- Sidebar widget ----- */
.brandix-widget__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.brandix-widget__item {
	margin: 0;
	padding: 6px 0;
	border-bottom: 1px solid #eee;
}

.brandix-widget__item:last-child {
	border-bottom: 0;
}

.brandix-widget__link {
	display: flex;
	align-items: center;
	gap: 10px;
	color: inherit;
	text-decoration: none;
}

.brandix-widget__link:hover .brandix-widget__name {
	text-decoration: underline;
}

.brandix-widget__logo img {
	width: 32px;
	height: 32px;
	object-fit: contain;
	display: block;
}

.brandix-widget__name {
	flex: 1;
}

.brandix-widget__count {
	color: #6b7280;
	font-size: 0.9em;
}

/* ----- Slider (Elementor) ----- */
.brandix-slider {
	position: relative;
}

.brandix-slider__viewport {
	overflow: hidden;
}

.brandix-slider__track {
	display: flex;
	transition: transform .45s cubic-bezier(.4, 0, .2, 1);
	will-change: transform;
}

.brandix-slider__slide {
	flex-shrink: 0;
	box-sizing: border-box;
	/* Fallback width before the script lays the slides out (e.g. block-editor preview).
	   On the front end the slider script sets an inline width that overrides this. */
	width: 20%;
}

.brandix-slider__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 6px;
	text-align: center;
	height: 100%;
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.brandix-slider__item:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
}

.brandix-slider__image img {
	width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
}

.brandix-slider__name {
	font-weight: 600;
}

/* Space above the name only when a logo precedes it. */
.brandix-slider__image + .brandix-slider__name {
	margin-top: 10px;
}

.brandix-slider__name a {
	color: inherit;
	text-decoration: none;
}

.brandix-slider__name a:hover {
	text-decoration: underline;
}

.brandix-slider__count {
	margin-top: 4px;
	font-size: 0.85em;
	color: #6b7280;
}

.brandix-slider__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #111;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.brandix-slider__arrow:hover {
	background: #f9fafb;
}

.brandix-slider__arrow:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.brandix-slider__arrow--prev { left: -8px; }
.brandix-slider__arrow--next { right: -8px; }

.brandix-slider__arrow.is-disabled {
	opacity: .4;
	pointer-events: none;
}

.brandix-slider__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}

.brandix-slider__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d1d5db;
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}

.brandix-slider__dot.is-active {
	background: #111;
	transform: scale(1.2);
}

/* ----- Empty / editor placeholder ----- */
.brandix-empty {
	padding: 24px;
	text-align: center;
	color: #6b7280;
	background: #f9fafb;
	border: 1px dashed #d1d5db;
	border-radius: 6px;
}

/* ----- Brand archive header ----- */
.brandix-archive-header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px 16px;
	margin: 0 0 20px;
}

.brandix-archive-header__logo img {
	display: block;
	max-width: 160px;
	height: auto;
}

.brandix-archive-header__count {
	font-size: 0.9em;
	color: #6b7280;
}

.brandix-archive-header__all {
	margin-left: auto;
	font-size: 0.9em;
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	opacity: 0.75;
	transition: opacity .2s ease;
}

.brandix-archive-header__all:hover {
	opacity: 1;
}
