/* =========================================================
 * Hook en página de producto
 * Se muestra dentro de `.product-additional-info`.
 * ========================================================= */
.tpc_brandspage_wrapper {
	text-align: center;
}
.product-additional-info .tpc_brandspage_wrapper {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #f0f0f0;
}
.tpc_brandspage_wrapper img {
	width: 100%;
	height: auto;
	max-width: 180px;
	display: inline-block;
}
.tpc_brandspage_logo a {
	display: inline-block;
}
.tpc_brandspage_all_lnk {
	margin-top: 8px;
}

/* =========================================================
 * Filtro A-Z por letra (displayWrapperTop + listado)
 * brands_letter_top.tpl / manufacturer-list-results.tpl
 * ========================================================= */
.man-letter-list {
	margin: 0 0 35px;
	padding: 12px;
	border: 2px solid #d9e7ff;
	border-radius: 12px;
	background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
}
.man-letter-list li {
	display: inline-block;
	vertical-align: top;
	margin: 0 2px 5px 0;
}
.man-letter-list li a {
	display: inline-block;
	vertical-align: top;
	width: 56px;
	height: 40px;
	text-align: center;
	line-height: 40px;
	font-weight: bold;
	color: #000;
	background: #eee;
	text-decoration: none;
}
.man-letter-list li a:hover {
	background: #086bd0;
	color: #fff;
}
.man-letter-list li.selected a,
.man-letter-list li.selected a:hover {
	background: #f50f36;
	color: #fff;
	cursor: default;
}

/* =========================================================
 * Grid de marcas (listado)
 * CSS Grid auto-fill: sin columnas Bootstrap, se adapta al viewport
 * y a la proporción del tipo de imagen (--tpc-man-img-w / --tpc-man-img-h)
 * ========================================================= */
.tpc-brandspage-counter {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	color: #6b7280;
}

.tpc-brandspage-list__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
	gap: 0.875rem;
	list-style: none;
	padding: 0;
	margin: 0;
	align-items: stretch;
}

.tpc-brandspage-list__item {
	min-width: 0;
}

.tpc-brandspage-list__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	height: 100%;
	padding: 0.875rem;
	border: 1px solid #e8eef5;
	border-radius: 10px;
	background: #fff;
	text-align: center;
	text-decoration: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tpc-brandspage-list__card:hover,
.tpc-brandspage-list__card:focus {
	border-color: #c5d8f8;
	box-shadow: 0 8px 22px rgba(37, 99, 235, 0.1);
	transform: translateY(-2px);
	text-decoration: none;
}

.tpc-brandspage-list__media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: var(--tpc-man-img-w, 1) / var(--tpc-man-img-h, 1);
	margin-bottom: 0.625rem;
	padding: 0.5rem;
	overflow: hidden;
	background: #f8fafc;
	border-radius: 6px;
}

.tpc-brandspage-list__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
}

.tpc-brandspage-list__name {
	display: block;
	width: 100%;
	margin-top: auto;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.35;
	color: #374151;
	word-break: break-word;
}

.tpc-brandspage-list__card:hover .tpc-brandspage-list__name,
.tpc-brandspage-list__card:focus .tpc-brandspage-list__name {
	color: #111827;
}

.tpc-brandspage-list__card--logo-only {
	justify-content: center;
}

.tpc-brandspage-list__card--logo-only .tpc-brandspage-list__media {
	margin-bottom: 0;
	flex: 1 1 auto;
}

@media (min-width: 576px) {
	.tpc-brandspage-list__grid {
		grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
		gap: 1rem;
	}
}

@media (min-width: 992px) {
	.tpc-brandspage-list__grid {
		grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
		gap: 1.125rem;
	}

	.tpc-brandspage-list__card {
		padding: 1rem;
	}
}

@media (min-width: 1200px) {
	.tpc-brandspage-list__grid {
		grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
	}
}

@media (max-width: 575.98px) {
	.tpc-brandspage-list__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tpc-brandspage-list__card {
		padding: 0.75rem;
	}
}

/* =========================================================
 * Ficha de marca (detalle)
 * views/templates/front/manufacturer.tpl
 * Clases: .tpc-brandspage-single__* / .tpc-brandspage-pagination / etc.
 * ========================================================= */
.tpc-brandspage-single__actions {
	margin: 16px 0 0;
}
.tpc-brandspage-back-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #f8f8f8;
	color: #333;
	text-decoration: none;
	font-weight: 600;
	transition: all .2s ease;
}
.tpc-brandspage-back-btn .material-icons {
	font-size: 18px;
	line-height: 1;
}
.tpc-brandspage-back-btn:hover,
.tpc-brandspage-back-btn:focus {
	background: #333;
	border-color: #333;
	color: #fff;
	text-decoration: none;
}

.tpc-brandspage-single__grid {
	margin-top: 8px;
}
.tpc-brandspage-single__grid .item {
	margin-bottom: 20px;
}
.tpc-brandspage-single__grid .lnk_name {
	display: block;
	height: 100%;
	padding: 10px;
	border: 1px solid #eee;
	border-radius: 4px;
	background: #fff;
	text-align: center;
	text-decoration: none;
}
.tpc-brandspage-single__grid .lnk_name:hover {
	border-color: #d9d9d9;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}
.tpc-brandspage-single__grid .img-man {
	display: block;
	width: 100%;
	max-width: 180px;
	height: auto;
	margin: 0 auto 10px;
}
.tpc-brandspage-single__grid .man_name {
	display: block;
	font-size: 13px;
	line-height: 1.3;
}

.tpc-brandspage-pagination {
	margin-top: 10px;
}
.tpc-brandspage-pagination .pagination {
	justify-content: center;
	flex-wrap: wrap;
}

@media (max-width: 575.98px) {
	.tpc-brandspage-single__grid .item {
		margin-bottom: 14px;
	}
}
