/* Piezas propias de jueguetes: presupuesto, «¿Cuál te conviene?», historial, barras de nota, valoración de ficha. */

.jgc-bar {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	width: 100%;
	max-width: 10rem;
	vertical-align: middle;
}
.jgc-bar-track {
	flex: 1;
	height: .5rem;
	border-radius: 1rem;
	background: var(--jgc-divider, #f3ecd2);
	overflow: hidden;
}
.jgc-compare .jgc-bar-track {
	--jgc-bar-grid: repeating-linear-gradient(90deg, #000 0 8%, transparent 8% 10%);
	min-width: 0;
	height: .625rem;
	border-radius: .125rem;
	-webkit-mask-image: var(--jgc-bar-grid);
	mask-image: var(--jgc-bar-grid);
}
.jgc-bar-fill {
	display: block;
	height: 100%;
	width: var(--jgc-part, 0%);
	border-radius: inherit;
	background: var(--jgc-brand, #fd9800);
}
.jgc-bar-value {
	min-width: 2ch;
	font-weight: 700;
	font-size: .9rem;
	color: var(--jgc-ink, #0f172a);
}
.jgc-compare .jgc-bar-value {
	min-width: 3ch;
	font-variant-numeric: tabular-nums;
}


/* Presupuesto: tramos con tarjetas; en móvil, deslizables. */
.jgc-budget {
	min-width: 0;
	margin-block: 1.5rem;
	color: var(--jgc-ink);
}

.jgc-budget-tier + .jgc-budget-tier {
	margin-block-start: 1.25rem;
}

.jgc-budget-title {
	display: inline-block;
	margin: 0 0 .6rem;
	padding: .25rem .65rem;
	border-radius: 999px;
	background: var(--jgc-tint);
	color: var(--jgc-accent);
	font-size: .9rem;
	font-weight: 700;
}

.jgc-budget-cards {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(min(13rem, 100%), 1fr);
	gap: .75rem;
	overflow-x: auto;
	padding-bottom: .25rem;
	scroll-snap-type: inline mandatory;
}

.jgc-budget-card {
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: .5rem;
	min-width: 0;
	padding: .75rem;
	border: 1px solid var(--jgc-line);
	border-block-start: .25rem solid var(--jgc-brand);
	border-radius: .75rem;
	background: #fff;
	overflow-wrap: anywhere;
}

.jgc-budget .jgc-budget-link {
	display: flex;
	align-items: center;
	gap: .75rem;
	color: var(--jgc-ink);
	font-weight: 700;
	text-decoration: none;
}

.jgc-budget .jgc-budget-link:hover {
	color: var(--jgc-accent);
	text-decoration: underline;
}

.jgc-budget-thumb {
	flex: 0 0 4rem;
	border-radius: .375rem;
	background: var(--jgc-tint);
}

.jgc-budget-thumb img {
	display: block;
	width: 4rem;
	height: 4rem;
	object-fit: contain;
}

.jgc-budget-score {
	margin: 0;
	color: var(--jgc-muted);
	font-size: .9rem;
}

.jgc-budget-score strong {
	color: var(--jgc-ink);
	font-variant-numeric: tabular-nums;
}

.jgc-budget-card > ul.jgc-offers {
	margin-block-start: auto;
}

/* ¿Cuál te conviene? */
.jgc-advisor {
	box-sizing: border-box;
	max-width: 100%;
	min-width: 0;
	margin-block: 1.5rem;
	overflow-x: auto;
	border: 1px solid var(--jgc-line);
	border-radius: .875rem;
	background: #fff;
}

.jgc-advisor table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: 1rem;
}

.jgc-advisor th,
.jgc-advisor td {
	padding: .65rem .85rem;
	border: 0;
	border-block-end: 1px solid var(--jgc-line);
	text-align: start;
	vertical-align: top;
	overflow-wrap: anywhere;
}

.jgc-advisor tbody tr:last-child > * {
	border-block-end: 0;
}

.jgc-advisor thead th {
	background: var(--jgc-tint);
	color: var(--jgc-ink);
	font-size: .85rem;
	text-transform: none;
}

.jgc-advisor tbody th {
	color: var(--jgc-ink);
	font-weight: 700;
}

.jgc-advisor a {
	color: var(--jgc-accent);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: .16em;
}

@media (max-width: 620px) {
	.jgc-advisor thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.jgc-advisor tbody tr {
		display: block;
		padding: .6rem .75rem;
	}

	.jgc-advisor tbody tr + tr {
		border-block-start: 1px solid var(--jgc-line);
	}

	.jgc-advisor th,
	.jgc-advisor td {
		display: block;
		padding: .15rem 0;
		border: 0;
	}
}

/* Historial de cambios */
.jgc-changelog ol {
	margin: 0;
	padding: 0;
	border: 1px solid var(--jgc-line);
	border-radius: .875rem;
	background: #fff;
	list-style: none;
}

.jgc-changelog li {
	margin: 0;
	padding: .55rem .85rem;
	overflow-wrap: anywhere;
}

.jgc-changelog li + li {
	border-block-start: 1px solid var(--jgc-line);
}

.jgc-changelog time {
	display: inline-block;
	margin-inline-end: .35rem;
	padding: .15rem .5rem;
	border-radius: .375rem;
	background: var(--jgc-tint);
	color: var(--jgc-ink);
	font-size: .85rem;
	font-weight: 700;
}

/* Título de cada puesto: modelo en negrita, etiqueta en gris al mismo tamaño (formato Esbellsa). */
.jgc-review-box-title { margin-top: 2.5rem; scroll-margin-top: 6rem; }
.jgc-review-box-rank { margin-inline-end: .35rem; }
.jgc-review-box-label { font-weight: 400; color: var(--jgc-muted, #454f5e); }
.jgc-review-box-highlight {
	padding: .75rem 1rem;
	border: 1px solid #eadfb8;
	border-radius: .5rem;
	background: #fef9e1;
	font-style: italic;
}
.jgc-review-box-profile { margin-top: .75rem; }

/* Valoración en la ficha */
.jgc-rating { margin-block: 2rem; }
.jgc-rating .jgc-score-details { display: grid; gap: .75rem; margin: 1rem 0; }
.jgc-rating .jgc-score-details > div { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: .75rem; align-items: start; }
.jgc-rating dd { margin: 0; display: grid; gap: .25rem; }
.jgc-score-reason { color: var(--jgc-muted); font-size: .95rem; }
.jgc-editorial-score strong { font-size: 1.5rem; }
.jgc-proscons { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.jgc-proscons ul { margin: 0; padding: 0; list-style: none; }
.jgc-proscons li { padding: .25rem 0; }
.jgc-proscons-pros span { color: #1d7a3a; font-weight: 700; }
.jgc-proscons-cons span { color: #b42318; font-weight: 700; }
@media (max-width: 620px) {
	.jgc-rating .jgc-score-details > div { grid-template-columns: 1fr; }
}

.jgc-review-box-criteria { display: grid; gap: .35rem; margin: .75rem 0 0; }
.jgc-review-box-criteria > div { display: flex; justify-content: space-between; gap: .75rem; align-items: center; }
.jgc-review-box-criteria dt { font-size: .9rem; }
.jgc-review-box-criteria dd { margin: 0; flex: 0 0 8rem; }

@media (max-width: 620px) {
	.jgc-budget-cards { grid-auto-columns: 82%; }
}

/* Segunda Vida (provisional; se pasa al diseño v3 en C2) */
.jgsv-caja{margin:1rem 0;padding:1rem 1.2rem;border:2px dashed var(--jgc-brand,#fd9800);border-radius:12px;background:#fff}
.jgsv-sello{margin:0 0 .4rem;font-weight:700;color:var(--jgc-accent,#9a5200)}
.jgsv-resena a{font-weight:700}
.jgsv-datos{display:grid;gap:.3rem;margin:.6rem 0 0}.jgsv-datos div{display:flex;gap:.5rem}.jgsv-datos dt{font-weight:600}.jgsv-datos dd{margin:0}
.jgsv-rejilla{display:grid;grid-template-columns:repeat(auto-fill,minmax(12rem,1fr));gap:1rem}
.jgsv-tarjeta{display:flex;flex-direction:column;gap:.3rem;padding:.7rem;border:1px solid var(--jgc-line,#e7e2cf);border-radius:12px;background:#fff;text-decoration:none;color:inherit}
.jgsv-tarjeta img{aspect-ratio:1;object-fit:cover;border-radius:8px}
.jgsv-nombre{font-weight:700}.jgsv-estado{font-size:.85rem;color:var(--jgc-muted,#454f5e)}.jgsv-precio{font-weight:800}

/* ===== Segunda Vida: ficha (modelo Esbellsa con el diseño v3 de jueguetes) ===== */
.jgsv-precio-bloque{display:flex;flex-direction:column;gap:.15rem;border-left:4px solid var(--jgc-brand,#fd9800);padding-left:.9rem;margin:.4rem 0 .8rem}
.jgsv-precio-nuevo{font-size:.9rem;color:#454f5e}.jgsv-precio-nuevo s{color:#7a8291}
.jgsv-precio-unidad{font-size:2rem;font-weight:800;color:#0f172a;line-height:1.1}
.jgsv-ahorro{font-weight:700;color:#b42318}.jgsv-ahorro b{background:#E2483D;color:#fff;border-radius:6px;padding:.05rem .45rem;margin-left:.3rem}
.jgsv-fuente{font-size:.78rem;color:#7a8291}
.jgsv-banda{display:inline-flex;border:1.5px solid #0f172a;border-radius:8px;overflow:hidden;margin:.6rem 0 1rem;font-weight:600;color:#0f172a}
.jgsv-banda span{display:flex;align-items:center;gap:.35rem;padding:.35rem .7rem}.jgsv-banda span+span{border-left:1.5px solid #0f172a}
.jgsv-banda svg{width:18px;height:18px;color:#9a5200}
.jgsv-panel{border:1px solid #ece6cf;border-radius:16px;padding:1.2rem 1.3rem;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.06);margin:1rem 0}
.jgsv-sello{display:inline-flex;gap:.35rem;align-items:center;margin:0;padding:.25rem .75rem;border-radius:999px;background:#FEF9E1;border:1px solid #F3DFA2;font-size:.85rem;color:#9a5200}
.jgsv-sello span{font-weight:800}
.jgsv-panel h2{font-size:1.15rem;margin:.7rem 0 .2rem;color:#0f172a}
.jgsv-garantias{margin:.8rem 0 0;border:1px solid #ece6cf;border-radius:12px;padding:.9rem 1rem;background:#FFFDF4}
.jgsv-garantias-titulo{margin:0 0 .6rem;font-weight:700;color:#0f172a}
.jgsv-rejilla-g{display:grid;grid-template-columns:1fr 1fr;gap:.8rem 1.2rem}
.jgsv-rejilla-g>div{display:grid;grid-template-columns:24px 1fr;column-gap:.5rem;font-size:.88rem;line-height:1.35}
.jgsv-rejilla-g .jgsv-icono{grid-row:span 2;width:22px;height:22px;color:#2FA36B}
.jgsv-rejilla-g b{color:#0f172a}.jgsv-rejilla-g span{color:#454f5e}
@media (max-width:620px){.jgsv-rejilla-g{grid-template-columns:1fr}}
.jgsv-resena{display:inline-block;margin-top:.7rem;font-weight:700;color:#9a5200}
.jgsv-linea{margin:.6rem 0 0;font-size:.92rem;color:#454f5e}.jgsv-linea b{color:#0f172a}
.jgsv-independencia{margin:.8rem 0 0;padding:.6rem .8rem;border-left:4px solid #2FA36B;background:#F4FAF6;border-radius:6px;font-size:.88rem;color:#0f172a}
.jgsv-legal{margin:.7rem 0 0;font-size:.8rem;color:#7a8291}.jgsv-legal a{color:#9a5200}
.jgsv-panel .jgsv-pronto:disabled {
	width: 100%;
	min-height: 44px;
	margin: .8rem 0 0;
	padding: .6rem .8rem;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #f1f5f9;
	color: #334155;
	font-weight: 700;
	text-align: center;
	cursor: default;
	opacity: 1;
}
.jgsv-estado-pronto {
	display: block;
	margin: .25rem 0 .55rem;
	color: #454f5e;
	font-size: .85rem;
	font-weight: 700;
}
.jgsv-cinta{display:inline-block;margin:.4rem 0;padding:.15rem .6rem;border-radius:999px;background:#FEF9E1;border:1px solid #F3DFA2;color:#9a5200;font-size:.75rem;font-weight:700}
.jgsv-ficha .woocommerce-product-gallery img{object-fit:contain;background:#fff}
.jgsv-ficha .product_title{font-size:clamp(1.7rem,3vw,2.4rem);font-weight:800;color:#0f172a;line-height:1.15}

body.term-segunda-vida main ul.products {
	clear: both;
	width: 100%;
}

@media (max-width: 620px) {
	body.jgsv-ficha .related.products > ul.products {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: .85rem;
	}

	body.jgsv-ficha .related.products > ul.products::before,
	body.jgsv-ficha .related.products > ul.products::after {
		display: none;
	}

	body.jgsv-ficha .related.products > ul.products > li.product {
		float: none;
		width: auto;
		min-width: 0;
		margin: 0;
	}
}
