/**
 * TecDoc Connector — frontend styles.
 * Brand colour matches pulpoparts.com (#c82333). Scoped under .tdc-* classes
 * so it will not collide with the active theme.
 */

.tdc-brands,
.tdc-search {
	--tdc-red: #c82333;
	--tdc-red-dark: #a81f2d;
}

/* ---------- Notices ---------- */
.tdc-notice {
	padding: 12px 16px;
	border-radius: 6px;
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	font-size: 14px;
	margin: 12px 0;
}

.tdc-notice--error {
	background: #f8d7da;
	border-color: #dc3545;
	color: #721c24;
}

/* ---------- Buttons ---------- */
.tdc-btn {
	display: inline-block;
	padding: 9px 20px;
	background: var(--tdc-red);
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.2;
}

.tdc-btn:hover {
	background: var(--tdc-red-dark);
	color: #fff;
}

.tdc-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* ---------- Brand grid ---------- */
.tdc-brands__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
}

@media (max-width: 900px) {
	.tdc-brands__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 520px) {
	.tdc-brands__grid {
		grid-template-columns: 1fr;
	}
}

.tdc-brand-card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 22px 18px;
	text-align: center;
	transition: box-shadow .2s, border-color .2s;
}

.tdc-brand-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
	border-color: var(--tdc-red);
}

.tdc-brand-card__logo {
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 10px;
}

.tdc-brand-card__logo-text {
	font-size: 14px;
	font-weight: 800;
	color: var(--tdc-red);
	line-height: 1.2;
}

.tdc-brand-card__id {
	font-size: 10px;
	color: #bbb;
	margin-bottom: 3px;
}

.tdc-brand-card__name {
	font-size: 13px;
	font-weight: 600;
	color: #333;
	margin-bottom: 14px;
}

/* ---------- Search widget ---------- */
.tdc-widget {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
	margin-bottom: 20px;
}

.tdc-widget__head {
	background: var(--tdc-red);
	color: #fff;
	padding: 14px 20px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.tdc-widget__title {
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	color: #fff;
}

.tdc-badge {
	margin-left: auto;
	background: rgba(255, 255, 255, .2);
	border-radius: 3px;
	padding: 3px 8px;
	font-size: 11px;
	font-weight: 700;
}

.tdc-tabs {
	display: flex;
	border-bottom: 1px solid #eee;
}

.tdc-tab {
	padding: 11px 20px;
	font-size: 14px;
	cursor: pointer;
	border: none;
	background: none;
	border-bottom: 3px solid transparent;
	color: #666;
	font-weight: 500;
}

.tdc-tab.is-active {
	color: var(--tdc-red);
	border-bottom-color: var(--tdc-red);
}

.tdc-tabpane {
	display: none;
	padding: 18px 20px;
}

.tdc-tabpane.is-active {
	display: block;
}

.tdc-form {
	display: flex;
	gap: 12px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.tdc-field {
	flex: 1;
	min-width: 160px;
}

.tdc-field--grow {
	flex: 2;
}

.tdc-field--actions {
	flex: 0 0 auto;
	min-width: 0;
}

.tdc-field label {
	display: block;
	font-size: 12px;
	color: #666;
	margin-bottom: 4px;
	font-weight: 500;
}

.tdc-select,
.tdc-input {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	background: #fff;
}

.tdc-select:disabled {
	background: #f5f5f5;
	color: #aaa;
}

.tdc-selection {
	margin-top: 14px;
	padding: 10px 14px;
	background: #f0fff4;
	border: 1px solid #28a745;
	border-radius: 4px;
	font-size: 13px;
	color: #155724;
}

/* ---------- SelectWoo (select2) ---------- */

/* The closed select (lives inside the widget).
   Themes (Elementor etc.) override select2's height / line-height / arrow,
   so these rules use flex centering and !important to win reliably. */
.tdc-search {
	position: relative;
}

.tdc-search .select2-container {
	display: block;
	width: 100% !important;
}

.tdc-search .select2-container--default .select2-selection--single {
	display: flex !important;
	align-items: center;
	position: relative;
	box-sizing: border-box;
	height: 40px !important;
	min-height: 40px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	background: #fff !important;
	box-shadow: none !important;
}

.tdc-search .select2-container--default .select2-selection--single .select2-selection__rendered {
	display: block;
	flex: 1 1 auto;
	width: 100%;
	height: auto !important;
	margin: 0 !important;
	padding: 0 34px 0 12px !important;
	line-height: normal !important;
	color: #333 !important;
	font-size: 14px !important;
	font-weight: 400;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tdc-search .select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: #888 !important;
}

/* Arrow: drawn with ::after so theme resets of the default <b> triangle don't matter. */
.tdc-search .select2-container--default .select2-selection--single .select2-selection__arrow {
	position: absolute !important;
	top: 0 !important;
	right: 0 !important;
	bottom: auto !important;
	left: auto !important;
	width: 34px !important;
	height: 100% !important;
	margin: 0 !important;
	transform: none !important;
	/* WooCommerce sets translateY(-50%), which pushes the arrow up out of the box */
	display: flex !important;
	align-items: center;
	justify-content: center;
}

.tdc-search .select2-container--default .select2-selection--single .select2-selection__arrow b {
	display: none !important;
}

.tdc-search .select2-container--default .select2-selection--single .select2-selection__arrow::after {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 2px solid #666;
	border-bottom: 2px solid #666;
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform .15s;
}

.tdc-search .select2-container--default.select2-container--open .select2-selection__arrow::after {
	transform: rotate(-135deg) translate(-2px, -2px);
}

.tdc-search .select2-container--default.select2-container--disabled .select2-selection--single {
	background: #f5f5f5 !important;
	cursor: not-allowed;
}

.tdc-search .select2-container--default.select2-container--disabled .select2-selection__rendered {
	color: #aaa !important;
}

.tdc-search .select2-container--default.select2-container--focus .select2-selection--single,
.tdc-search .select2-container--default.select2-container--open .select2-selection--single {
	border-color: #c82333 !important;
}

/* Theme-proofing: keep the red header title and red buttons readable. */
.tdc-widget .tdc-widget__title {
	color: #fff !important;
}

.tdc-brands .tdc-btn,
.tdc-search .tdc-btn,
a.tdc-btn,
a.tdc-btn:hover,
a.tdc-btn:visited {
	color: #fff !important;
	text-decoration: none !important;
}

/* The open dropdown. It is attached to <body> (not inside .tdc-search), so it is
   scoped with the .tdc-dropdown class and uses literal colours: the
   --tdc-red variable is not available outside .tdc-search. */
.select2-dropdown.tdc-dropdown {
	border-color: #c82333;
	border-radius: 0 0 4px 4px;
	font-size: 14px;
	z-index: 100000;
}

.tdc-dropdown .select2-search--dropdown .select2-search__field {
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 7px 10px;
	font-size: 14px;
}

.tdc-dropdown .select2-results>.select2-results__options {
	max-height: 280px;
}

.tdc-dropdown .select2-results__option--highlighted[aria-selected],
.tdc-dropdown .select2-results__option--highlighted[data-selected] {
	background: #c82333;
	color: #fff;
}

.tdc-dropdown .select2-results__option[aria-selected="true"] {
	background: #f5e1e3;
	color: #333;
}

.tdc-input--mono {
	font-family: monospace;
	letter-spacing: .5px;
}

.tdc-input[aria-invalid="true"] {
	border-color: #dc3545;
}

/* Article-number / OEM toggle */
.tdc-toggle {
	display: inline-flex;
	margin-bottom: 14px;
}

.tdc-toggle__btn {
	padding: 8px 16px;
	border: 1px solid #ddd;
	background: #f5f5f5;
	color: #555;
	font-size: 13px;
	cursor: pointer;
}

.tdc-toggle__btn:first-child {
	border-radius: 4px 0 0 4px;
}

.tdc-toggle__btn:last-child {
	border-radius: 0 4px 4px 0;
	border-left: none;
}

.tdc-toggle__btn.is-active {
	background: var(--tdc-red);
	border-color: var(--tdc-red);
	color: #fff;
}

/* ---------- Results ---------- */
.tdc-results {
	margin-top: 18px;
	scroll-margin-top: 80px;
}

.tdc-results[aria-busy="true"] .tdc-notice::before {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 8px;
	vertical-align: -1px;
	border: 2px solid #ccc;
	border-top-color: var(--tdc-red);
	border-radius: 50%;
	animation: tdc-spin .8s linear infinite;
}

@keyframes tdc-spin {
	to {
		transform: rotate(360deg);
	}
}

.tdc-results__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 10px 16px;
	margin-bottom: 14px;
	font-size: 13px;
	color: #666;
}

.tdc-results__count {
	color: #333;
	font-size: 14px;
}

.tdc-results__page {
	margin-left: auto;
	color: #999;
}

/* Product grid */
.tdc-grid {
	display: grid;
	/* 4 columns on desktop, 2 on tablet, 1 on phone; min() stops overflow on tiny screens. */
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	gap: 14px;
}

.tdc-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow .2s, border-color .2s;
}

.tdc-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
	border-color: var(--tdc-red);
}

.tdc-card__img {
	height: 150px;
	background: #f8f8f8;
	border-bottom: 1px solid #eee;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.tdc-card__img img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.tdc-card__noimg {
	font-size: 36px;
	color: #ddd;
}

.tdc-card__body {
	padding: 11px 12px;
	flex: 1;
}

.tdc-card__cat {
	font-size: 10px;
	color: #999;
	text-transform: uppercase;
	letter-spacing: .4px;
	margin-bottom: 3px;
}

.tdc-card__brand {
	display: inline-block;
	background: var(--tdc-red);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 3px;
	margin-bottom: 6px;
}

.tdc-card__name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 3px;
	color: #333;
}

.tdc-card__ref {
	font-size: 11px;
	color: #888;
	margin-bottom: 6px;
}

.tdc-card__ref code {
	color: #555;
	font-size: 11px;
	background: none;
	padding: 0;
}

.tdc-card__specs {
	font-size: 11px;
	margin: 0 0 6px;
	line-height: 1.6;
}

.tdc-card__spec {
	display: flex;
	justify-content: space-between;
	gap: 8px;
}

.tdc-card__spec dt {
	color: #aaa;
	font-weight: normal;
	margin: 0;
}

.tdc-card__spec dd {
	color: #333;
	font-weight: 500;
	margin: 0;
	text-align: right;
}

.tdc-card__oem,
.tdc-card__match {
	font-size: 10px;
	color: #999;
	border-top: 1px solid #f0f0f0;
	padding-top: 6px;
	margin-top: 6px;
	word-break: break-word;
}

.tdc-card__oem strong,
.tdc-card__match strong {
	color: #777;
}

.tdc-card__match {
	color: #155724;
}

/* Pagination */
.tdc-pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-top: 22px;
}

.tdc-pager__btn {
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	color: #333;
	font-size: 13px;
	cursor: pointer;
}

.tdc-pager__btn:hover:not(:disabled) {
	border-color: var(--tdc-red);
	color: var(--tdc-red);
}

.tdc-pager__btn:disabled {
	color: #bbb;
	cursor: default;
}

.tdc-pager__btn.is-active,
.tdc-pager__btn.is-active:disabled {
	background: var(--tdc-red);
	border-color: var(--tdc-red);
	color: #fff;
}

.tdc-pager__gap {
	color: #999;
	padding: 0 2px;
}

@media (max-width: 520px) {
	.tdc-tabpane {
		padding: 14px;
	}

	.tdc-field {
		flex: 1 1 100%;
	}

	.tdc-field--actions .tdc-btn {
		width: 100%;
	}

	.tdc-toggle {
		display: flex;
	}

	.tdc-toggle__btn {
		flex: 1;
		padding: 8px 10px;
	}

	.tdc-results__page {
		margin-left: 0;
	}

	.tdc-pager__btn--step {
		display: none;
	}
}

/* Brand picked on the brand page */
.tdc-brandbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	padding: 10px 20px;
	background: #fdf3f4;
	border-bottom: 1px solid #f1d5d8;
	font-size: 13px;
	color: #555;
}

.tdc-brandbar[hidden] {
	display: none;
}

.tdc-brandbar strong {
	color: var(--tdc-red, #c82333);
}

.tdc-brandbar__clear {
	margin-left: auto;
	background: none;
	border: none;
	color: #777;
	font-size: 12px;
	text-decoration: underline;
	cursor: pointer;
}

/* Vehicle form: search + clear buttons side by side */
.tdc-field--actions {
	display: flex;
	gap: 8px;
}

.tdc-btn--reset {
	background: #f5f5f5;
	color: #555;
	border: 1px solid #ddd;
}

.tdc-btn--reset:hover:not(:disabled) {
	background: #eee;
	color: #333;
}

.tdc-btn--reset:disabled {
	background: #fafafa;
	color: #bbb;
	border-color: #eee;
}

/* Beats the white-text rule for .tdc-search .tdc-btn above (light button needs dark text). */
.tdc-search .tdc-btn.tdc-btn--reset {
	color: #555 !important;
}

.tdc-search .tdc-btn.tdc-btn--reset:disabled {
	color: #bbb !important;
}

/* Card footer: "Ver detalle" */
.tdc-card__foot {
	padding: 9px 12px;
	border-top: 1px solid #eee;
}

.tdc-card__more {
	width: 100%;
	padding: 8px;
	font-size: 12px;
}

/* Product detail popup */
html.tdc-modal-open {
	overflow: hidden;
}

.tdc-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, .55);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 16px;
	overflow-y: auto;
}

.tdc-modal[hidden] {
	display: none;
}

.tdc-modal__box {
	position: relative;
	width: 100%;
	max-width: 960px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
	outline: none;
}

.tdc-modal__close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 36px;
	height: 36px;
	border: none;
	background: none;
	font-size: 26px;
	line-height: 1;
	color: #777;
	cursor: pointer;
}

.tdc-modal__close:hover {
	color: #333;
}

.tdc-modal__content {
	padding: 24px;
}

.tdc-detail__top {
	display: grid;
	grid-template-columns: minmax(0, 380px) 1fr;
	gap: 24px;
	margin-bottom: 8px;
}

.tdc-detail__main {
	height: 300px;
	background: #f8f8f8;
	border: 1px solid #eee;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.tdc-detail__main img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.tdc-detail__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.tdc-detail__thumb {
	width: 58px;
	height: 58px;
	padding: 2px;
	border: 2px solid #eee;
	border-radius: 4px;
	background: #f8f8f8;
	cursor: pointer;
}

.tdc-detail__thumb.is-active {
	border-color: var(--tdc-red, #c82333);
}

.tdc-detail__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.tdc-detail__title {
	font-size: 20px;
	line-height: 1.3;
	margin: 4px 0 8px;
	color: #222;
}

.tdc-detail__ref {
	font-size: 13px;
	color: #777;
	margin-bottom: 12px;
}

.tdc-detail__ref code {
	background: none;
	padding: 0;
	color: #444;
}

.tdc-fit {
	display: inline-block;
	padding: 7px 12px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 10px;
}

.tdc-fit--yes {
	background: #e8f6ec;
	color: #1e7b34;
	border: 1px solid #b7e1c1;
}

.tdc-fit--no {
	background: #fbeaea;
	color: #a12a2a;
	border: 1px solid #efc2c2;
}

.tdc-detail__note {
	font-size: 13px;
	color: #8a6d00;
	background: #fff8e1;
	padding: 7px 10px;
	border-radius: 4px;
}

.tdc-detail__section {
	margin-top: 22px;
}

.tdc-detail__h {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #444;
	margin: 0 0 8px;
	padding-bottom: 6px;
	border-bottom: 2px solid #eee;
}

.tdc-detail__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.tdc-detail__table th,
.tdc-detail__table td {
	padding: 7px 10px;
	border-bottom: 1px solid #eee;
	text-align: left;
	vertical-align: top;
}

.tdc-detail__table th {
	width: 40%;
	color: #777;
	font-weight: normal;
}

.tdc-detail__table tr:nth-child(even) {
	background: #fafafa;
}

.tdc-detail__list {
	margin: 0;
	padding-left: 18px;
	font-size: 13px;
	line-height: 1.7;
}

.tdc-detail__list code {
	background: none;
	padding: 0;
	color: var(--tdc-red, #c82333);
}

.tdc-detail__section p {
	font-size: 13px;
	line-height: 1.6;
	color: #555;
	margin: 0 0 8px;
}

@media (max-width: 700px) {
	.tdc-modal {
		padding: 0;
	}

	.tdc-modal__box {
		border-radius: 0;
		min-height: 100%;
	}

	.tdc-modal__content {
		padding: 48px 16px 20px;
	}

	.tdc-detail__top {
		grid-template-columns: 1fr;
	}

	.tdc-detail__main {
		height: 220px;
	}
}

/* Results: filter sidebar + main column */
.tdc-results__layout {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 18px;
	align-items: start;
}

.tdc-results__main {
	min-width: 0;
}

.tdc-results__main .tdc-grid {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
}

.tdc-filters__box {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 12px 14px;
	padding-right: 30px;
}

.tdc-filters__toggle {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #444;
	cursor: pointer;
	list-style: none;
}

.tdc-filters__toggle::-webkit-details-marker {
	display: none;
}

.tdc-filters__toggle::after {
	content: " ▾";
	color: #999;
}

.tdc-filters__box[open] .tdc-filters__toggle::after {
	content: " ▴";
}

.tdc-filters__section {
	margin-top: 12px;
}

.tdc-filters__h {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #888;
	margin: 0 0 6px;
	padding-bottom: 6px;
	border-bottom: 1px solid #eee;
}

.tdc-filter {
	display: flex;
	align-items: baseline;
	gap: 8px;
	width: 100%;
	padding: 5px 6px;
	border: none;
	border-radius: 4px;
	background: none;
	color: #444;
	font-size: 13px;
	text-align: left;
	cursor: pointer;
}

.tdc-filter:hover {
	background: #cccccc;
}

.tdc-filter.is-active {
	color: var(--tdc-red, #c82333);
	font-weight: 600;
	background: #fdf3f4;
}

.tdc-filter--sub {
	padding-left: 20px;
	font-size: 12px;
}

.tdc-filter__label {
	flex: 1;
}

.tdc-filter__count {
	font-size: 10px;
	color: #999;
	background: #f2f2f2;
	padding: 1px 6px;
	border-radius: 10px;
}

@media (max-width: 767px) {
	.tdc-results__layout {
		grid-template-columns: 1fr;
	}
}

/* Brand logo image (falls back to the brand name text) */
.tdc-brand-card__logo-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* Close button: undo theme/Elementor button styles (padding, min-width, colours). */
.tdc-search .tdc-modal__close {
	top: 10px;
	right: 10px;
	width: 36px !important;
	height: 36px !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent !important;
	border: none !important;
	border-radius: 50%;
	box-shadow: none !important;
	color: #777 !important;
	font-size: 26px !important;
	line-height: 1 !important;
	z-index: 2;
}

.tdc-search .tdc-modal__close:hover,
.tdc-search .tdc-modal__close:focus {
	background: #f2f2f2 !important;
	color: #333 !important;
}

/* Brand directory: search (scales to 150+ brands) */
.tdc-brands__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin-bottom: 12px;
}

.tdc-brands__search {
	flex: 1 1 260px;
	max-width: 420px;
}

.tdc-brands__count {
	font-size: 13px;
	color: #777;
}

.tdc-brand-card[hidden],
.tdc-brand-card__logo-text[hidden],
.tdc-brand-card__logo-img[hidden],
.tdc-filter[hidden] {
	display: none !important;
}

/* Sidebar: long brand lists scroll */
.tdc-filters__find {
	margin-bottom: 6px;
	padding: 6px 10px;
	font-size: 13px;
}

.tdc-filters__list {
	max-height: 320px;
	overflow-y: auto;
}

/* "Back to brands" link in the brand bar */
.tdc-brandbar__back {
	font-size: 13px;
	font-weight: 600;
	color: var(--tdc-red, #c82333) !important;
	text-decoration: none !important;
	margin-right: 6px;
	padding-right: 12px;
	border-right: 1px solid #f1d5d8;
}

.tdc-brandbar__back:hover {
	text-decoration: underline !important;
}

/* "Back to brands" button above the search widget */
.tdc-back {
	display: inline-block;
	margin-bottom: 12px;
	padding: 8px 14px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	color: #c82333 !important;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
}

.tdc-back:hover {
	border-color: #c82333;
}

/* Tabs + toggle: undo the theme's blue button hover/focus (Astra / WooCommerce). */
.tdc-search .tdc-tab,
.tdc-search .tdc-tab:focus {
	background: transparent !important;
	border-color: transparent !important;
	border-bottom: 3px solid transparent !important;
	box-shadow: none !important;
	color: #666 !important;
	border-radius: 0 !important;
}

.tdc-search .tdc-tab:hover {
	background: #fdf3f4 !important;
	color: #c82333 !important;
}

.tdc-search .tdc-tab.is-active,
.tdc-search .tdc-tab.is-active:hover,
.tdc-search .tdc-tab.is-active:focus {
	background: transparent !important;
	color: #c82333 !important;
	border-bottom-color: #c82333 !important;
}

.tdc-search .tdc-toggle__btn:hover:not(.is-active),
.tdc-search .tdc-toggle__btn:focus:not(.is-active) {
	background: #fdf3f4 !important;
	border-color: #e8b4ba !important;
	color: #c82333 !important;
}

.tdc-search .tdc-toggle__btn.is-active,
.tdc-search .tdc-toggle__btn.is-active:hover,
.tdc-search .tdc-toggle__btn.is-active:focus {
	background: #c82333 !important;
	border-color: #c82333 !important;
	color: #fff !important;
}

/* Active tab must stay red on hover/focus, whatever the theme sets for button:hover. */
.tdc-search .tdc-tabs button.tdc-tab.is-active,
.tdc-search .tdc-tabs button.tdc-tab.is-active:hover,
.tdc-search .tdc-tabs button.tdc-tab.is-active:focus,
.tdc-search .tdc-tabs button.tdc-tab.is-active:active {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	color: #c82333 !important;
	border-bottom-color: #c82333 !important;
	box-shadow: none !important;
	outline: none;
}

.tdc-search .tdc-tabs button.tdc-tab:not(.is-active):hover,
.tdc-search .tdc-tabs button.tdc-tab:not(.is-active):focus-visible {
	background: #fdf3f4 !important;
	background-color: #fdf3f4 !important;
	background-image: none !important;
	color: #c82333 !important;
}

/* Price, stock and add to cart (cards + detail popup) */
.tdc-buy {
	padding: 10px 12px;
	border-top: 1px solid #eee;
}

.tdc-buy--detail {
	padding: 14px 0 0;
	border-top: none;
}

.tdc-buy__price-row {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
}

.tdc-buy__price {
	font-size: 20px;
	font-weight: 800;
	color: #c82333;
	line-height: 1.2;
}

.tdc-buy--detail .tdc-buy__price {
	font-size: 26px;
}

.tdc-buy__vat {
	font-size: 11px;
	color: #999;
}

.tdc-buy__noprice {
	font-size: 12px;
	color: #999;
	font-style: italic;
}

.tdc-buy__stock {
	font-size: 12px;
	margin: 2px 0 8px;
	font-weight: 600;
}

.tdc-buy__stock.is-in {
	color: #1e7b34;
}

.tdc-buy__stock.is-out {
	color: #a12a2a;
}

.tdc-buy__actions {
	display: flex;
	gap: 8px;
}

.tdc-buy__qty {
	width: 64px !important;
	flex: 0 0 64px;
	text-align: center;
}

.tdc-search .tdc-btn.tdc-buy__add,
.tdc-search .tdc-btn.tdc-buy__login {
	flex: 1;
	width: 100%;
	padding: 9px 10px;
	font-size: 13px;
	text-align: center;
}

.tdc-buy__msg {
	font-size: 12px;
	margin-top: 6px;
}

.tdc-buy__msg:empty {
	display: none;
}

.tdc-buy__msg.is-ok {
	color: #1e7b34;
}

.tdc-buy__msg.is-ok a {
	color: #1e7b34;
	font-weight: 600;
	text-decoration: underline;
}

.tdc-buy__msg.is-error {
	color: #a12a2a;
}

.tdc-card__foot .tdc-card__more {
	background: #f5f5f5 !important;
	color: #555 !important;
	border: 1px solid #ddd !important;
}

.tdc-card__foot .tdc-card__more:hover {
	background: #eee !important;
	color: #333 !important;
}

/* "Marcas" menu dropdown: brand select (SelectWoo) + every brand (desktop hover) */
.tdc-brands-menu-item {
	position: relative;
}

.tdc-brands-mega {
	display: none;
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	z-index: 9999;
	width: min(900px, 94vw);
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #ddd;
	border-top: 3px solid #c82333;
	border-radius: 0 0 6px 6px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
	text-align: left;
	cursor: default;
}

.tdc-brands-menu-item:hover>.tdc-brands-mega,
.tdc-brands-menu-item:focus-within>.tdc-brands-mega {
	display: block !important;
}

/* !important beats the inline display:none that prevents a flash before this CSS loads. */
.tdc-brands-mega__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.tdc-brands-mega__picker {
	position: relative;
	flex: 0 1 340px;
	min-width: 0;
}

.tdc-brands-mega__select {
	width: 100%;
}

/* Select2 inside the menu: reset what the header menu (Elementor / SmartMenus) applies to spans, lists and links. */
.tdc-brands-mega .select2-container {
	display: block !important;
	position: relative !important;
	width: 100% !important;
	margin: 0 !important;
}

.tdc-brands-mega .select2-selection--single {
	display: block !important;
	height: 38px !important;
	padding: 0 !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	background: #fff !important;
}

.tdc-brands-mega .select2-selection__rendered {
	display: block !important;
	height: 36px !important;
	line-height: 36px !important;
	margin: 0 !important;
	padding: 0 30px 0 12px !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	color: #555 !important;
	text-align: left !important;
	text-transform: none !important;
}

.tdc-brands-mega .select2-selection__arrow {
	position: absolute !important;
	top: 1px !important;
	right: 4px !important;
	height: 36px !important;
}

/* The open dropdown: right under the box (the second .select2-container is the dropdown wrapper). */
.tdc-brands-mega__picker>.select2-container~.select2-container {
	position: absolute !important;
	top: 100% !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	z-index: 10001 !important;
}

.tdc-brands-mega .tdc-brands-mega__dropdown {
	position: static !important;
	display: block !important;
	width: 100% !important;
	border: 1px solid #c82333 !important;
	border-top: 0 !important;
	border-radius: 0 0 4px 4px !important;
	background: #fff !important;
	box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}

.tdc-brands-mega .select2-search--dropdown {
	display: block !important;
	padding: 6px !important;
}

.tdc-brands-mega .select2-search__field {
	display: block !important;
	width: 100% !important;
	height: 34px !important;
	padding: 4px 10px !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	font-size: 14px !important;
	background: #fff !important;
	color: #333 !important;
}

/* The menu hides every <ul> inside a menu item: show the results list again. */
.tdc-brands-mega ul.select2-results__options {
	display: block !important;
	position: static !important;
	visibility: visible !important;
	opacity: 1 !important;
	width: auto !important;
	max-height: 260px !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow-y: auto !important;
	background: #fff !important;
	border: 0 !important;
	box-shadow: none !important;
	transform: none !important;
}

.tdc-brands-mega .select2-results__option {
	display: block !important;
	margin: 0 !important;
	padding: 6px 12px !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	color: #333 !important;
	background: #fff !important;
	border: 0 !important;
	text-align: left !important;
	cursor: pointer;
}

.tdc-brands-mega .select2-results__option--highlighted[aria-selected],
.tdc-brands-mega .select2-results__option--highlighted[data-selected] {
	background: #c82333 !important;
	color: #fff !important;
}

.tdc-brands-mega .tdc-brands-mega__all {
	margin-left: auto;
	font-size: 13px;
	font-weight: 600;
	color: #c82333 !important;
	white-space: nowrap;
}

/* All brands: grid that scrolls down (columns + a height limit would scroll sideways). */
.tdc-brands-mega .tdc-brands-mega__list {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 0 12px;
	max-height: 60vh;
	overflow-x: hidden;
	overflow-y: auto;
	padding-right: 4px;
}

.tdc-brands-mega .tdc-brands-mega__link {
	display: block !important;
	padding: 4px 6px !important;
	margin: 0 !important;
	font-size: 13px !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	color: #333 !important;
	background: none !important;
	border: 0 !important;
	text-transform: none !important;
	text-align: left !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tdc-brands-mega .tdc-brands-mega__link:hover {
	color: #c82333 !important;
	background: #fdf3f4 !important;
	border-radius: 3px;
}

/* Phones / mobile menu: no hover — the "Marcas" link opens the brands page (with its own search). */
@media (max-width: 1024px) {

	.tdc-brands-menu-item>.tdc-brands-mega,
	.tdc-brands-menu-item:hover>.tdc-brands-mega,
	.tdc-brands-menu-item:focus-within>.tdc-brands-mega {
		display: none !important;
	}
}

/* Detail popup lists (Incluye / Accesorios): fixed gap between code and name. */
.tdc-detail__list li {
	display: list-item;
}

.tdc-detail__list li>code {
	margin-right: 10px;
}

.tdc-detail__list li>.tdc-detail__item-name,
.tdc-detail__list li>.tdc-detail__item-name font {
	padding: 0 !important;
	margin: 0 !important;
}

/* Compact vehicle bar ([tecdoc_search_bar], e.g. under the home slider) */
.tdc-bar {
	--tdc-red: #c82333;
	--tdc-red-dark: #a81f2d;
	max-width: 1000px;
	margin: 24px auto;
	padding: 0 16px;
}

.tdc-bar .tdc-bar__title {
	margin: 0 0 12px;
	text-align: center;
	font-size: 22px;
	font-weight: 700;
	color: #222;
}

.tdc-bar__row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
	gap: 12px;
	align-items: center;
	padding: 14px;
	background: #fff;
	border: 1px solid #e3e3e3;
	border-radius: 8px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
}

.tdc-bar__field {
	min-width: 0;
}

.tdc-bar .tdc-select {
	width: 100%;
}

.tdc-bar .select2-container--default .select2-selection--single {
	height: 42px;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.tdc-bar .select2-container--default .select2-selection--single .select2-selection__rendered {
	/* line-height: 40px; */
	padding-left: 12px;
	font-size: 14px;
	color: #333;
}

.tdc-bar .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 40px;
}

.tdc-bar .select2-container--default.select2-container--disabled .select2-selection--single {
	background: #f5f5f5;
}

.tdc-bar .tdc-btn.tdc-bar__go {
	/* padding: 0 26px; */
	white-space: nowrap;
	color: #fff !important;
	background: var(--tdc-red) !important;
	border: 0 !important;
	border-radius: 4px;
	font-weight: 700;
}

.tdc-bar .tdc-btn.tdc-bar__go:hover:not(:disabled) {
	background: var(--tdc-red-dark) !important;
}

.tdc-bar .tdc-btn.tdc-bar__go:disabled {
	background: #939393 !important;
	cursor: not-allowed;
}

@media (max-width: 767px) {
	.tdc-bar__row {
		grid-template-columns: 1fr;
	}

	.tdc-bar .tdc-btn.tdc-bar__go {
		width: 100%;
	}
}
/* Guests: login / register popup when they search (TecDoc B2B licence) */
.tdc-login-pop {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, .55);
}
.tdc-login-pop[hidden] { display: none; }
.tdc-login-pop__box {
	position: relative;
	width: 100%;
	max-width: 460px;
	padding: 30px 26px 26px;
	text-align: center;
	background: #fff;
	border-top: 4px solid #c82333;
	border-radius: 8px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
}
.tdc-login-pop .tdc-login-pop__close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 34px !important;
	height: 34px !important;
	min-width: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50%;
	background: transparent !important;
	color: #777 !important;
	font-size: 24px !important;
	line-height: 1 !important;
	cursor: pointer;
}
.tdc-login-pop .tdc-login-pop__close:hover { background: #f2f2f2 !important; color: #333 !important; }
.tdc-login-pop .tdc-login-pop__title { margin: 0 0 10px; font-size: 20px; font-weight: 700; color: #222; }
.tdc-login-pop__text { margin: 0 0 20px; font-size: 14px; line-height: 1.55; color: #555; }
.tdc-login-pop__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tdc-login-pop .tdc-login-pop__btn {
	flex: 1 1 160px;
	padding: 11px 18px;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
	text-decoration: none !important;
	border-radius: 4px;
	color: #c82333 !important;
	background: #fff !important;
	border: 2px solid #c82333;
}
.tdc-login-pop .tdc-login-pop__btn--main { color: #fff !important; background: #c82333 !important; }
.tdc-login-pop .tdc-login-pop__btn:hover { opacity: .9; }

/* Home bar: Buscar + Limpiar side by side */
.tdc-bar__field--action { display: flex; gap: 8px; }
.tdc-bar .tdc-btn.tdc-bar__clear { height: 42px; padding: 0 14px; white-space: nowrap; color: #555 !important; background: #f5f5f5 !important; border: 1px solid #ddd !important; border-radius: 4px; }
.tdc-bar .tdc-btn.tdc-bar__clear:hover:not(:disabled) { background: #eee !important; color: #333 !important; }
.tdc-bar .tdc-btn.tdc-bar__clear:disabled { color: #bbb !important; background: #fafafa !important; border-color: #eee !important; cursor: default; }
@media (max-width: 767px) { .tdc-bar__field--action .tdc-btn { flex: 1; } }
