/**
 * Portafolio Tecnocon — sistema visual del frontend.
 * Todas las clases usan el prefijo "ptc-" y todos los tokens de diseño se
 * declaran dentro de .ptc-scope (no en :root) para no chocar con las
 * variables globales de temas/page builders (Astra, Elementor, etc.) ni con
 * sus propias clases.
 */

.ptc-scope {
	/* Paleta de marca Tecnocon: Azul #225398, Amarillo #fdc903, Amarillo
	   oscuro #e3b102, Blanco #fff, Negro #000. El resto de tokens (gris de
	   fondo/borde/texto secundario) son neutros funcionales, no colores de
	   marca, y se mantienen para dar profundidad/jerarquía visual. */
	--ptc-color-primary: #225398;
	--ptc-color-primary-dark: #1a3e72; /* Azul oscurecido ~25%, para hover/énfasis (no hay azul oscuro en la paleta) */
	--ptc-color-ink: #000000;
	--ptc-color-muted: #5b6472;
	--ptc-color-surface: #ffffff;
	--ptc-color-bg: #f4f7fb;
	--ptc-color-border: #e2e8f0;
	--ptc-color-accent-whatsapp: #25d366;
	--ptc-color-accent: #fdc903;
	--ptc-color-accent-dark: #e3b102;
	--ptc-color-rating: #fdc903;
	--ptc-color-rating-track: #e2e8f0;
	--ptc-radius: 14px;
	--ptc-radius-sm: 8px;
	--ptc-radius-pill: 999px;
	--ptc-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	--ptc-shadow-hover: 0 20px 40px -12px rgba(15, 23, 42, 0.18);
	--ptc-gap: 24px;
	--ptc-font-heading: inherit;
	--ptc-font-body: inherit;

	font-family: var(--ptc-font-body);
	color: var(--ptc-color-ink);
	line-height: 1.55;
}

.ptc-scope, .ptc-scope *, .ptc-scope *::before, .ptc-scope *::after {
	box-sizing: border-box;
}

.ptc-scope ul, .ptc-scope ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

/*
 * Algunos temas/page builders subrayan los enlaces dentro de su propio
 * contenedor de contenido (ej. Hello Elementor: `.page-content a`), con una
 * especificidad que le gana a nuestros selectores de un solo nivel
 * (.ptc-card, .ptc-chip, etc.). Este reset general, con !important, es la
 * frontera de aislamiento que .ptc-scope promete en la cabecera de este
 * archivo: dentro de nuestro alcance, el subrayado de enlaces lo decidimos
 * nosotros, no el tema.
 */
.ptc-scope a {
	text-decoration: none !important;
}

.ptc-scope img {
	max-width: 100%;
	display: block;
}

.ptc-scope h1, .ptc-scope h2, .ptc-scope h3, .ptc-scope h5 {
	font-family: var(--ptc-font-heading);
	font-weight: 700;
	color: var(--ptc-color-ink);
	line-height: 1.25;
	margin: 0;
}

.ptc-scope .ptc-empty {
	padding: 40px 24px;
	text-align: center;
	color: var(--ptc-color-muted);
	background: var(--ptc-color-bg);
	border-radius: var(--ptc-radius);
}

/* ---------- Archivo / encabezado de catálogo ---------- */

.ptc-scope .ptc-archive__header {
	margin-bottom: 28px;
}

.ptc-scope .ptc-archive__title {
	font-size: clamp(24px, 3vw, 34px);
}

.ptc-scope .ptc-pagination {
	margin-top: 40px;
	display: flex;
	justify-content: center;
}

.ptc-scope .ptc-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	margin: 0 4px;
	padding: 0 10px;
	border-radius: var(--ptc-radius-sm);
	border: 1px solid var(--ptc-color-border);
	color: var(--ptc-color-ink);
	text-decoration: none;
	font-size: 14px;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ptc-scope .ptc-pagination .page-numbers.current,
.ptc-scope .ptc-pagination .page-numbers:hover {
	background: var(--ptc-color-primary);
	border-color: var(--ptc-color-primary);
	color: #fff;
}

/* ---------- Controles del portafolio (filtro + selector de vista) ---------- */

.ptc-scope .ptc-portafolio-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--ptc-gap);
	margin-bottom: 24px;
}

.ptc-scope .ptc-portafolio-vistas {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ptc-scope .ptc-vista-btn {
	display: inline-flex;
	align-items: center;
	height: 36px;
	padding: 0 14px;
	border-radius: 0;
	border: 1px solid var(--ptc-color-border);
	background: var(--ptc-color-surface);
	color: var(--ptc-color-ink);
	font-size: 13px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ptc-scope .ptc-vista-btn:hover {
	background: var(--ptc-color-accent-dark);
	border-color: var(--ptc-color-accent-dark);
	color: var(--ptc-color-ink);
}

.ptc-scope .ptc-vista-btn:focus-visible {
	outline: 2px solid var(--ptc-color-primary);
	outline-offset: 2px;
}

.ptc-scope .ptc-vista-btn.ptc-is-active {
	background: var(--ptc-color-primary);
	border-color: var(--ptc-color-primary);
	color: #fff;
}

.ptc-scope .ptc-vista-btn.ptc-is-active:hover {
	background: var(--ptc-color-accent-dark);
	border-color: var(--ptc-color-accent-dark);
	color: var(--ptc-color-ink);
}

/* ---------- Filtro de categorías: botón flotante + panel desplegable ---------- */

.ptc-scope .ptc-portafolio-filtro {
	position: relative;
}

.ptc-scope .ptc-portafolio-filtro__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 16px;
	border-radius: 0;
	border: 1px solid var(--ptc-color-border);
	background: var(--ptc-color-surface);
	color: var(--ptc-color-ink);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ptc-scope .ptc-portafolio-filtro__toggle:hover {
	background: var(--ptc-color-accent-dark);
	border-color: var(--ptc-color-accent-dark);
	color: var(--ptc-color-ink);
}

.ptc-scope .ptc-portafolio-filtro.ptc-is-open .ptc-portafolio-filtro__toggle {
	background: var(--ptc-color-primary);
	border-color: var(--ptc-color-primary);
	color: #fff;
}

.ptc-scope .ptc-icon-filtro {
	position: relative;
	width: 16px;
	height: 1.6px;
	flex-shrink: 0;
	background: currentColor;
	transition: background 0.15s ease;
}

.ptc-scope .ptc-icon-filtro::before,
.ptc-scope .ptc-icon-filtro::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 1.6px;
	background: currentColor;
	transition: transform 0.15s ease, top 0.15s ease;
}

.ptc-scope .ptc-icon-filtro::before {
	top: -5px;
}

.ptc-scope .ptc-icon-filtro::after {
	top: 5px;
}

.ptc-scope .ptc-portafolio-filtro.ptc-is-open .ptc-icon-filtro {
	background: transparent;
}

.ptc-scope .ptc-portafolio-filtro.ptc-is-open .ptc-icon-filtro::before {
	top: 0;
	transform: rotate(45deg);
}

.ptc-scope .ptc-portafolio-filtro.ptc-is-open .ptc-icon-filtro::after {
	top: 0;
	transform: rotate(-45deg);
}

/* El panel flota sobre la grilla en lugar de reservarle una columna fija,
   para no restarle ancho a los productos. */
.ptc-scope .ptc-acordeon {
	display: none;
	position: absolute;
	z-index: 30;
	top: calc(100% + 8px);
	left: 0;
	width: max-content;
	min-width: 260px;
	max-width: min(320px, calc(100vw - 32px));
	max-height: 70vh;
	overflow-y: auto;
	background: var(--ptc-color-surface);
	border: 1px solid var(--ptc-color-border);
	border-radius: var(--ptc-radius);
	padding: 10px;
	box-shadow: var(--ptc-shadow-hover);
}

.ptc-scope .ptc-portafolio-filtro.ptc-is-open .ptc-acordeon {
	display: block;
}

.ptc-scope .ptc-acordeon__lista {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

/* Separador entre categorías principales (no entre subcategorías). */
.ptc-scope .ptc-acordeon__lista > .ptc-acordeon__item {
	border-bottom: 1px solid var(--ptc-color-border);
	padding-bottom: 2px;
}

.ptc-scope .ptc-acordeon__lista > .ptc-acordeon__item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.ptc-scope .ptc-acordeon__link {
	display: block;
	width: 100%;
	padding: 9px 10px;
	border-radius: var(--ptc-radius-sm);
	color: #333333;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	transition: background 0.15s ease, color 0.15s ease;
}

.ptc-scope .ptc-acordeon__link:hover {
	background: var(--ptc-color-bg);
}

.ptc-scope .ptc-acordeon__link.ptc-is-active {
	background: var(--ptc-color-primary);
	color: #fff;
}

/* El <summary> reemplaza el marcador nativo del navegador por nuestro
   propio caret, y el enlace vive dentro para que el nombre de la categoría
   principal siga siendo un filtro clicable, no solo un toggle de
   expandir/colapsar. */
.ptc-scope .ptc-acordeon__resumen {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	cursor: pointer;
	border-radius: var(--ptc-radius-sm);
}

.ptc-scope .ptc-acordeon__resumen::-webkit-details-marker {
	display: none;
}

.ptc-scope .ptc-acordeon__resumen:hover {
	background: var(--ptc-color-bg);
}

.ptc-scope .ptc-acordeon__resumen:hover .ptc-acordeon__link {
	background: transparent;
}

.ptc-scope .ptc-acordeon__resumen .ptc-acordeon__link {
	flex: 1;
	min-width: 0;
}

/* Símbolo que marca las categorías con subcategorías: una insignia
   circular con un chevron, distinta de los ítems simples (sin insignia). */
.ptc-scope .ptc-acordeon__caret {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--ptc-color-bg);
	border: 1px solid var(--ptc-color-border);
	transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.ptc-scope .ptc-acordeon__caret::before {
	content: "";
	width: 6px;
	height: 6px;
	border-right: 1.6px solid var(--ptc-color-muted);
	border-bottom: 1.6px solid var(--ptc-color-muted);
	transform: rotate(45deg) translate(-1px, -1px);
}

.ptc-scope .ptc-acordeon__resumen:hover .ptc-acordeon__caret {
	border-color: var(--ptc-color-primary);
	background: var(--ptc-color-surface);
}

.ptc-scope .ptc-acordeon__grupo[open] > .ptc-acordeon__resumen .ptc-acordeon__caret {
	background: var(--ptc-color-primary);
	border-color: var(--ptc-color-primary);
	transform: rotate(180deg);
}

.ptc-scope .ptc-acordeon__grupo[open] > .ptc-acordeon__resumen .ptc-acordeon__caret::before {
	border-color: #fff;
}

.ptc-scope .ptc-acordeon__sublista {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 2px 0 4px;
	padding-left: 12px;
	border-left: 2px solid var(--ptc-color-border);
}

.ptc-scope .ptc-acordeon__link--sub {
	color: #666666;
	font-size: 13px;
	font-weight: 500;
}

/* ---------- Grilla de catálogo ---------- */

.ptc-scope .ptc-catalogo {
	display: grid;
	grid-template-columns: repeat(var(--ptc-cols, 3), minmax(0, 1fr));
	gap: var(--ptc-gap);
	margin: 0;
}

.ptc-scope .ptc-catalogo.ptc-view-grid-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ptc-scope .ptc-catalogo.ptc-view-grid-3 {
	grid-template-columns: repeat(var(--ptc-cols, 3), minmax(0, 1fr));
}

.ptc-scope .ptc-catalogo.ptc-view-lista {
	display: flex;
	flex-direction: column;
}

.ptc-scope .ptc-catalogo.ptc-view-lista .ptc-card {
	flex-direction: row;
}

.ptc-scope .ptc-catalogo.ptc-view-lista .ptc-card__media {
	width: 140px;
	aspect-ratio: 1 / 1;
	flex-shrink: 0;
}

.ptc-scope .ptc-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	background: var(--ptc-color-surface);
	border: 1px solid var(--ptc-color-border);
	border-radius: var(--ptc-radius);
	overflow: hidden;
	box-shadow: var(--ptc-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ptc-scope .ptc-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--ptc-shadow-hover);
	border-color: transparent;
}

.ptc-scope .ptc-card__media {
	position: relative;
	aspect-ratio: 1 / 1;
	background: var(--ptc-color-bg);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* max-width/max-height (no width/height:100%) para no agrandar imágenes
   más allá de su tamaño real — algunos productos tienen fotos de baja
   resolución que se pixelan si se estiran a llenar la tarjeta. */
.ptc-scope .ptc-card__media img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: transform 0.35s ease;
}

.ptc-scope .ptc-card:hover .ptc-card__media img {
	transform: scale(1.06);
}

.ptc-scope .ptc-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	background: var(--ptc-color-accent);
	border: 1px solid var(--ptc-color-accent-dark);
	color: var(--ptc-color-ink);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 4px 10px;
	border-radius: var(--ptc-radius-pill);
}

.ptc-scope .ptc-card__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding-bottom: 18px;
	background: linear-gradient(to top, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0) 55%);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ptc-scope .ptc-card:hover .ptc-card__overlay {
	opacity: 1;
}

.ptc-scope .ptc-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	color: var(--ptc-color-primary);
	font-size: 13px;
	font-weight: 600;
	padding: 8px 14px;
	border-radius: var(--ptc-radius-pill);
	transform: translateY(6px);
	transition: transform 0.2s ease;
}

.ptc-scope .ptc-card:hover .ptc-card__cta {
	transform: translateY(0);
}

.ptc-scope .ptc-card__body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}

.ptc-scope .ptc-card__eyebrow {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--ptc-color-primary);
}

.ptc-scope .ptc-card__title {
	font-size: 15px;
	font-weight: 600;
	margin: 0;
	line-height: 1.35;
}

.ptc-scope .ptc-icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* ---------- Calificación (estrellas) ---------- */

.ptc-scope .ptc-rating {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
}

.ptc-scope .ptc-rating__stars {
	position: relative;
	display: inline-block;
	font-size: 15px;
	line-height: 1;
	letter-spacing: 1px;
	color: var(--ptc-color-rating-track);
	white-space: nowrap;
}

.ptc-scope .ptc-rating__stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	white-space: nowrap;
	color: var(--ptc-color-rating);
}

.ptc-scope .ptc-rating__value {
	font-size: 13px;
	font-weight: 700;
	color: var(--ptc-color-ink);
}

.ptc-scope .ptc-rating__count {
	font-size: 12px;
	color: var(--ptc-color-muted);
}

/* ---------- Precio ---------- */

.ptc-scope .ptc-price {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	font-weight: 700;
	margin-top: 4px;
}

.ptc-scope .ptc-price__normal {
	color: var(--ptc-color-muted);
	font-weight: 400;
	font-size: 13px;
	text-decoration: line-through;
}

.ptc-scope .ptc-price__rebajado {
	color: var(--ptc-color-primary-dark);
	font-size: 16px;
	text-decoration: none;
}

/* ---------- Página de producto ---------- */

/* .ptc-single (ficha de producto) y .ptc-archive (catálogo/categoría) son
   plantillas de página completa (llaman get_header()/get_footer() por su
   cuenta, sin el wrapper de contenido del tema) — sin este padding lateral
   propio, el contenido llega hasta el borde de la pantalla en cualquier
   ancho menor a 1200px. */
.ptc-scope.ptc-single,
.ptc-scope.ptc-archive {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.ptc-scope .ptc-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--ptc-color-muted);
	margin-bottom: 24px;
}

.ptc-scope .ptc-breadcrumbs__link {
	color: var(--ptc-color-muted);
	text-decoration: none;
}

.ptc-scope .ptc-breadcrumbs__link:hover {
	color: var(--ptc-color-primary);
}

.ptc-scope .ptc-breadcrumbs__current {
	color: var(--ptc-color-ink);
	font-weight: 600;
}

.ptc-scope .ptc-single__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

/* ---------- Galería ---------- */

.ptc-scope .ptc-gallery__main {
	position: relative;
	aspect-ratio: 1 / 1;
	background: var(--ptc-color-bg);
	border-radius: var(--ptc-radius);
	overflow: hidden;
	border: 1px solid var(--ptc-color-border);
}

.ptc-scope .ptc-gallery__main-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	cursor: zoom-in;
}

.ptc-scope .ptc-gallery__placeholder {
	width: 100%;
	height: 100%;
}

.ptc-scope .ptc-gallery__zoom {
	position: absolute;
	right: 14px;
	bottom: 14px;
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: none;
	border-radius: 50%;
	box-shadow: var(--ptc-shadow-hover);
	color: var(--ptc-color-ink);
	cursor: pointer;
}

.ptc-scope .ptc-gallery__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}

.ptc-scope .ptc-gallery__thumb {
	width: 68px;
	height: 68px;
	padding: 0;
	background: var(--ptc-color-bg);
	border: 2px solid var(--ptc-color-border);
	border-radius: var(--ptc-radius-sm);
	overflow: hidden;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.ptc-scope .ptc-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ptc-scope .ptc-gallery__thumb.ptc-is-active,
.ptc-scope .ptc-gallery__thumb:hover {
	border-color: var(--ptc-color-primary);
}

/* ---------- Panel de información ---------- */

.ptc-scope .ptc-single__category {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--ptc-color-primary);
	text-decoration: none;
	margin-bottom: 8px;
}

.ptc-scope .ptc-single__category:hover {
	color: var(--ptc-color-primary-dark);
}

.ptc-scope .ptc-single__title {
	font-size: clamp(24px, 3vw, 32px);
	margin-bottom: 14px;
}

.ptc-scope .ptc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.ptc-scope .ptc-chip {
	display: inline-flex;
	align-items: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--ptc-color-ink);
	background: var(--ptc-color-bg);
	border: 1px solid var(--ptc-color-border);
	border-radius: var(--ptc-radius-pill);
	padding: 5px 12px;
	text-decoration: none;
}

.ptc-scope .ptc-chip--brand {
	background: var(--ptc-color-primary);
	border-color: var(--ptc-color-primary);
	color: #fff;
}

.ptc-scope .ptc-chip--categoria:hover,
.ptc-scope .ptc-chip--etiqueta:hover {
	border-color: var(--ptc-color-primary);
	color: var(--ptc-color-primary);
}

.ptc-scope .ptc-chip--etiqueta {
	background: transparent;
}

.ptc-scope .ptc-single__price {
	margin-bottom: 18px;
}

.ptc-scope .ptc-single__price .ptc-price__rebajado {
	font-size: 26px;
}

.ptc-scope .ptc-callout {
	background: var(--ptc-color-bg);
	border-left: 3px solid var(--ptc-color-primary);
	border-radius: 0 var(--ptc-radius-sm) var(--ptc-radius-sm) 0;
	padding: 16px 18px;
	margin-bottom: 20px;
	color: var(--ptc-color-ink);
	font-size: 14px;
}

.ptc-scope .ptc-callout p:first-child {
	margin-top: 0;
}

.ptc-scope .ptc-callout p:last-child {
	margin-bottom: 0;
}

.ptc-scope .ptc-single__heading {
	font-size: 18px;
	margin: 28px 0 12px;
	padding-top: 20px;
	border-top: 1px solid var(--ptc-color-border);
}

.ptc-scope .ptc-descripcion {
	color: var(--ptc-color-ink);
	font-size: 15px;
}

.ptc-scope .ptc-descripcion p {
	margin: 0 0 1em;
}

.ptc-scope .ptc-descripcion ul, .ptc-scope .ptc-descripcion ol {
	margin: 0 0 1em 1.25em;
	list-style: revert;
}

.ptc-scope .ptc-descripcion img {
	border-radius: var(--ptc-radius-sm);
}

.ptc-scope .ptc-descripcion a img[src*="whatsapp-button"] {
	margin: 12px 0;
	transition: transform 0.15s ease;
}

.ptc-scope .ptc-descripcion a:hover img[src*="whatsapp-button"] {
	transform: translateY(-2px);
}

/* Restos de <div></div> vacíos que trae el HTML original (separadores sin
   contenido) — se ocultan sin riesgo, solo afecta divs genuinamente vacíos. */
.ptc-scope .ptc-descripcion div:empty {
	display: none;
}

/* Tabla real embebida en la descripción (poco común: solo un par de
   productos la traen completa, ej. cuadros de repuestos/opcionales). */
.ptc-scope .ptc-descripcion table {
	width: 100%;
	margin: 0 0 1em;
	border-collapse: collapse;
	font-size: 14px;
}

.ptc-scope .ptc-descripcion table td,
.ptc-scope .ptc-descripcion table th {
	padding: 8px 12px;
	border: 1px solid var(--ptc-color-border);
	text-align: left;
}

.ptc-scope .ptc-descripcion table tr:nth-child(odd) td {
	background: var(--ptc-color-bg);
}

/* Mini-tabla de Categoría/Modelo reconstruida (ver
   ptc_render_legacy_info_table()) — deliberadamente más chica que la tabla
   genérica de arriba: no ocupa todo el ancho, fuente y padding reducidos. */
.ptc-scope .ptc-descripcion .ptc-legacy-info-table {
	width: auto;
	max-width: 320px;
	margin: 0 0 16px;
	font-size: 12px;
}

.ptc-scope .ptc-descripcion .ptc-legacy-info-table th,
.ptc-scope .ptc-descripcion .ptc-legacy-info-table td {
	padding: 4px 10px;
}

.ptc-scope .ptc-descripcion .ptc-legacy-info-table th {
	background: var(--ptc-color-bg);
	font-weight: 600;
	color: #333333;
	white-space: nowrap;
}

/* Fila de especificación (etiqueta + valor), reemplaza visualmente los
   "puntos de relleno" del texto de origen — ver ptc_format_spec_list(). */
.ptc-scope .ptc-spec-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 4px 0;
}

.ptc-scope .ptc-spec-label {
	color: #333333;
	font-weight: 600;
}

.ptc-scope .ptc-spec-value {
	color: var(--ptc-color-primary-dark);
	font-weight: 600;
	text-align: right;
}

/* Botón de ficha técnica — reemplaza el link crudo a la URL del PDF, ver
   ptc_format_ficha_link(). Mismo lenguaje visual que los demás botones del
   sitio (esquinas cuadradas, hover en amarillo oscuro). */
.ptc-scope .ptc-ficha-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 8px 0;
	padding: 10px 18px;
	border-radius: 0;
	background: var(--ptc-color-primary);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.15s ease, color 0.15s ease;
}

.ptc-scope .ptc-ficha-btn:hover {
	background: var(--ptc-color-accent-dark);
	color: var(--ptc-color-ink);
}

.ptc-scope .ptc-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--ptc-color-border);
}

/* ---------- Lightbox ---------- */

.ptc-scope .ptc-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 23, 42, 0.92);
	padding: 40px;
}

.ptc-scope .ptc-lightbox[hidden] {
	display: none;
}

.ptc-scope .ptc-lightbox__image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: var(--ptc-radius-sm);
}

.ptc-scope .ptc-lightbox__close,
.ptc-scope .ptc-lightbox__nav {
	position: absolute;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
}

.ptc-scope .ptc-lightbox__close:hover,
.ptc-scope .ptc-lightbox__nav:hover {
	background: rgba(255, 255, 255, 0.24);
}

.ptc-scope .ptc-lightbox__close {
	top: 20px;
	right: 20px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
}

.ptc-scope .ptc-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	font-size: 28px;
}

.ptc-scope .ptc-lightbox__nav--prev {
	left: 20px;
}

.ptc-scope .ptc-lightbox__nav--next {
	right: 20px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
	.ptc-scope .ptc-catalogo,
	.ptc-scope .ptc-catalogo.ptc-view-grid-2,
	.ptc-scope .ptc-catalogo.ptc-view-grid-3 {
		grid-template-columns: repeat(min(3, var(--ptc-cols, 3)), minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.ptc-scope .ptc-catalogo,
	.ptc-scope .ptc-catalogo.ptc-view-grid-2,
	.ptc-scope .ptc-catalogo.ptc-view-grid-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ptc-scope .ptc-single__layout {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

@media (max-width: 560px) {
	.ptc-scope .ptc-catalogo,
	.ptc-scope .ptc-catalogo.ptc-view-grid-2,
	.ptc-scope .ptc-catalogo.ptc-view-grid-3 {
		grid-template-columns: 1fr;
	}

	.ptc-scope.ptc-single,
	.ptc-scope.ptc-archive {
		padding: 0 16px;
	}

	.ptc-scope .ptc-lightbox {
		padding: 16px;
	}

	.ptc-scope .ptc-lightbox__nav {
		width: 40px;
		height: 40px;
		font-size: 22px;
	}
}
