/* 0.42.0 · Fase B — estructura visual común de fichas (Samsung y Mercado Libre/tiendas).
   Mismo orden: volver · imagen · tienda · título · caja de precio · botón de tienda · cómo conseguirlo · legal · más ofertas.
   Solo presentación. Cada ficha conserva sus funciones (rutas, variantes, cupones, gráfica, historial). */
.ctc-fc-volver { margin: 0 0 12px; font: 600 14px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.ctc-fc-volver a { color: #1428a0; text-decoration: none; }
.ctc-fc-volver a:hover { text-decoration: underline; }

/* ---------- Samsung (ficha v2) ---------- */
.ctc-ficha--v2 { --ctc-bg: transparent; background: transparent; border-radius: 0; margin: 16px auto 24px; padding: 0 16px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.ctc-ficha--v2 .ctc-tarjeta:where(:not(.ctc-tarjeta--grafica-historial)) { background: #fff; border: 1px solid #e4e7ee; border-radius: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); padding: 16px; }
.ctc-ficha--v2 .ctc-breadcrumb { font-size: 12px; }
/* Móvil/tablet (0.44.1): la ESTRUCTURA (columnas y filas de la cuadrícula) es la original de ctc-front.css:
   título arriba, imagen a la izquierda + opciones de compra a la derecha, variantes, botón y bloques a todo el ancho.
   Aquí solo van ajustes visuales; NO se redefinen columnas ni filas (hacerlo dejaba una columna implícita y la ficha a medio ancho). */
@media (max-width: 859px) {
	.ctc-ficha--v2 .ctc-titulo { margin: 4px 0 8px; font-size: 22px; line-height: 1.25; font-weight: 700; }
	.ctc-ficha--v2 .ctc-imagen { background: #f0f1f3; }
	.ctc-ficha--v2 .ctc-cta-fila { margin: 6px 0 12px; }
}
.ctc-ficha--v2 .ctc-selector-chip.is-active { border-radius: 14px; }
.ctc-ficha--v2 .ctc-cta { min-height: 48px; border-radius: 12px; font-size: 16px; font-weight: 700; }
.ctc-ficha--v2 .ctc-acordeon { background: #fff; border-radius: 14px; padding: 4px 14px 12px; }
.ctc-ficha--v2 .ctc-acordeon summary { font-size: 16px; font-weight: 700; color: #1428a0; }
.ctc-ficha--v2 .ctc-aviso-v2 { font-size: 12px; line-height: 1.4; color: #6b7280; }

/* ---------- Tiendas (ML y futuras): mismos tamaños de letra y botón ---------- */
.ctc-ofm { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.ctc-ofm .ctc-oc-btn--primario { min-height: 48px; border-radius: 12px; font-size: 16px; font-weight: 700; }
.ctc-ofm-card { border-radius: 14px; }
.ctc-ofm-card h2 { font-size: 16px; font-weight: 700; }
.ctc-ofm-afiliados { font-size: 12px; line-height: 1.4; }


/* =====================================================================
   0.45.0 · Revisión estética de la ficha Samsung (compacta, minimalista).
   ESTRUCTURA móvil en UN solo lugar (este bloque): columnas y filas de la cuadrícula.
   Orden de filas (≤859 px): 1 título · 2-3 imagen (col 1) + etiqueta/rutas (col 2) · 4 aclaración · 5 etiqueta variantes
   · 6 variantes · 7 regalo · 8 botones · 9 actualizado · 10 «¿Cómo conseguir?» · 11 «Puedes ahorrar» · 12 cierre · 13 aviso.
   ===================================================================== */
/* Franja «promociones aprovechadas por la comunidad»: no aporta en una ficha individual. */
body.single-producto_oferta .ctc-barra-actividad, body.single-ctc_oferta_tienda .ctc-barra-actividad { display: none !important; }

@media (max-width: 859px) {
	/* --- Encabezado: «← Todas las ofertas» y la ruta (sin «Inicio») en UNA sola línea --- */
	.ctc-ficha.ctc-ficha--v2 { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; margin: 6px auto 16px; padding: 0 12px; }
	.ctc-ficha.ctc-ficha--v2 > * { grid-column: 1 / -1; }
	.ctc-ficha.ctc-ficha--v2 > .ctc-fc-volver { grid-column: 1; grid-row: 1; margin: 0 0 6px; font-size: 13px; align-self: center; white-space: nowrap; }
	.ctc-ficha.ctc-ficha--v2 > .ctc-breadcrumb--fuera { grid-column: 2; grid-row: 1; margin: 0 0 6px; text-align: right; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: center; }
	.ctc-ficha.ctc-ficha--v2 > .ctc-breadcrumb--fuera > a:first-child,
	.ctc-ficha.ctc-ficha--v2 > .ctc-breadcrumb--fuera > a:first-child + .ctc-breadcrumb-sep { display: none; }
	.ctc-ficha.ctc-ficha--v2 > .ctc-tarjeta { grid-row: 2; }

	/* --- Tarjeta principal: dos columnas (imagen 38 % / opciones), sin huecos --- */
	.ctc-ficha.ctc-ficha--v2 .ctc-tarjeta:where(:not(.ctc-tarjeta--grafica-historial)) { grid-template-columns: 38% minmax(0, 1fr); column-gap: 12px; row-gap: 0; padding: 12px; }
	.ctc-ficha.ctc-ficha--v2 .ctc-tarjeta > .ctc-titulo { grid-column: 1 / -1; grid-row: 1; margin: 0 0 8px; font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
	.ctc-ficha.ctc-ficha--v2 .ctc-tarjeta > .ctc-imagen-envoltura { grid-column: 1; grid-row: 2 / span 2; margin: 0; align-self: stretch; display: flex; }
	.ctc-ficha.ctc-ficha--v2 .ctc-imagen { aspect-ratio: auto; max-height: none; height: auto; margin: 0; flex: 1; min-height: 128px; background: #f3f4f7; border-radius: 12px; }
	.ctc-ficha.ctc-ficha--v2 .ctc-imagen img { object-fit: contain; padding: 6px; }
	.ctc-ficha.ctc-ficha--v2 .ctc-tarjeta > .ctc-selector-label { grid-column: 2; grid-row: 2; margin: 0 0 4px; font-size: 12px; line-height: 1.2; }
	.ctc-ficha.ctc-ficha--v2 .ctc-tarjeta > .ctc-selector { grid-column: 2; grid-row: 3; align-self: start; grid-template-columns: 1fr !important; gap: 6px; margin: 0; }
	.ctc-ficha.ctc-ficha--v2 .ctc-tarjeta > .ctc-selector-nota { grid-column: 1 / -1; grid-row: 4; margin: 6px 0 0; font-size: 12px; line-height: 1.35; }
	.ctc-ficha.ctc-ficha--v2 .ctc-tarjeta > .ctc-selector-label:has(+ .ctc-selector-variantes) { grid-column: 1 / -1; grid-row: 5; margin: 10px 0 4px; }
	.ctc-ficha.ctc-ficha--v2 .ctc-tarjeta > .ctc-selector-variantes { grid-column: 1 / -1; grid-row: 6; margin: 10px 0 0; }
	.ctc-ficha.ctc-ficha--v2 .ctc-regalo { grid-column: 1 / -1; grid-row: 7; margin: 8px 0 0; }
	.ctc-ficha.ctc-ficha--v2 .ctc-cta-fila { grid-column: 1 / -1; grid-row: 8; margin: 10px 0 0; }
	.ctc-ficha.ctc-ficha--v2 .ctc-fecha-actualizado-ruta { grid-column: 1 / -1; grid-row: 9; margin: 6px 0 8px; font-size: 12px; line-height: 1.3; }
	.ctc-ficha.ctc-ficha--v2 .ctc-acordeon { grid-column: 1 / -1; grid-row: 10; }
	.ctc-ficha.ctc-ficha--v2 .ctc-ahorra-v2 { grid-column: 1 / -1; grid-row: 11; margin: 10px 0 0; }
	.ctc-ficha.ctc-ficha--v2 .ctc-cierre-v2 { grid-column: 1 / -1; grid-row: 12; margin: 10px 0 0; }
	.ctc-ficha.ctc-ficha--v2 .ctc-aviso-v2 { grid-column: 1 / -1; grid-row: 13; margin: 8px 0 0; }
	.ctc-ficha.ctc-ficha--v2 .ctc-guia-rapida { display: none; }
	.ctc-ficha.ctc-ficha--v2 .ctc-tarjeta > .ctc-ruta-panel:not([hidden]) { display: contents; }
}

/* --- Chips de ruta: Estudiantes en UNA línea (canal · precio); Normal con precio protagonista y descuento a la vista --- */
.ctc-ficha.ctc-ficha--v2 .ctc-selector-chip { min-height: 40px; padding: 7px 10px; gap: 1px; }
.ctc-ficha.ctc-ficha--v2 .ctc-selector-chip:not(.is-active) .ctc-selector-chip-texto { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; gap: 8px; }
.ctc-ficha.ctc-ficha--v2 .ctc-selector-chip:not(.is-active) .ctc-selector-chip-precio { font-size: 15px; font-weight: 700; }
.ctc-ficha.ctc-ficha--v2 .ctc-selector-chip:not(.is-active) .ctc-selector-chip-detalle { display: none; }
.ctc-ficha.ctc-ficha--v2 .ctc-selector-chip.is-active { padding: 9px 11px 10px; }
.ctc-ficha.ctc-ficha--v2 .ctc-selector-chip.is-active .ctc-selector-chip-precio { font-size: 24px; line-height: 1.1; }
.ctc-ficha.ctc-ficha--v2 .ctc-selector-chip.is-active .ctc-selector-chip-detalle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 2px; }
.ctc-ficha.ctc-ficha--v2 .ctc-selector-chip-ahorro { font-size: 11px; padding: 2px 8px; }
.ctc-ficha.ctc-ficha--v2 .ctc-variante-chip { min-height: 38px; font-size: 14px; }
.ctc-ficha.ctc-ficha--v2 .ctc-regalo--v2 summary { min-height: 38px; padding: 6px 10px; font-size: 13px; }

/* --- Botones: «Ver en {tienda}» protagonista; Favoritos y Compartir discretos (42 px, sin borde) --- */
.ctc-ficha.ctc-ficha--v2 .ctc-cta-fila { display: flex; align-items: center; gap: 8px; }
.ctc-ficha.ctc-ficha--v2 .ctc-cta-fila .ctc-cta { order: 3; flex: 1 1 auto; min-height: 52px; font-size: 17px; border-radius: 12px; }
.ctc-ficha.ctc-ficha--v2 .ctc-cta-fila .ctc-fav-toggle--junto-cta,
.ctc-ficha.ctc-ficha--v2 .ctc-cta-fila .ctc-share-btn { order: 1; flex: 0 0 42px; width: 42px !important; max-width: 42px !important; min-width: 42px !important; height: 42px; min-height: 42px !important; border: 0; border-radius: 12px; background: #f3f4f7; }
.ctc-ficha.ctc-ficha--v2 .ctc-cta-fila .ctc-share-btn { order: 2; }
.ctc-ficha.ctc-ficha--v2 .ctc-cta-fila .ctc-share-btn svg { width: 20px !important; height: 20px !important; }

/* --- «¿Cómo conseguir este precio?»: pasos más cerrados, cupones de 38 px, ayuda una sola vez --- */
.ctc-ficha.ctc-ficha--v2 .ctc-acordeon { padding: 2px 12px 8px; margin: 0; }
.ctc-ficha.ctc-ficha--v2 .ctc-acordeon summary { padding: 10px 0; font-size: 15px; }
.ctc-ficha.ctc-ficha--v2 .ctc-paso { padding: 4px 0; gap: 10px; }
.ctc-ficha.ctc-ficha--v2 .ctc-paso-num { flex-basis: 22px; width: 22px; height: 22px; font-size: 11.5px; }
.ctc-ficha.ctc-ficha--v2 .ctc-paso:not(:last-child)::before { left: 10px; top: 24px; }
.ctc-ficha.ctc-ficha--v2 .ctc-paso-texto { margin: 0; font-size: 14.5px; line-height: 1.3; }
.ctc-ficha.ctc-ficha--v2 .ctc-paso-subtexto { margin: 1px 0 0; font-size: 12px; }
.ctc-ficha.ctc-ficha--v2 .ctc-cupon-fila .ctc-cupon-chip--ficha { height: 38px; min-height: 38px; }
.ctc-ficha.ctc-ficha--v2 .ctc-cupon-ico-ext { flex-basis: 30px; width: 30px; height: 30px; border-radius: 9px; }
.ctc-ficha.ctc-ficha--v2 .ctc-cupones-ayuda { margin: 3px 0 0; font-size: 11.5px; }
.ctc-ficha.ctc-ficha--v2 .ctc-pasos .ctc-paso:has(.ctc-cupones-ayuda) ~ .ctc-paso .ctc-cupones-ayuda { display: none; }
.ctc-ficha.ctc-ficha--v2 .ctc-nota-extra { margin: 6px 0 0; padding: 7px 10px; font-size: 12.5px; }

/* --- «Puedes ahorrar todavía más»: tarjeta sólida y compacta --- */
.ctc-ficha.ctc-ficha--v2 .ctc-ahorra-v2 { padding: 10px 12px; border-style: solid; border-color: #e4e7ee; border-radius: 14px; background: #fafbfd; }
.ctc-ficha.ctc-ficha--v2 .ctc-ahorra-mas-titulo { margin: 0; font-size: 15px; }
.ctc-ficha.ctc-ficha--v2 .ctc-ahorra-v2-sub { margin: 1px 0 6px; font-size: 12px; }
.ctc-ficha.ctc-ficha--v2 .ctc-ahorra-item { gap: 10px; padding: 6px 0; }
.ctc-ficha.ctc-ficha--v2 .ctc-ahorra-v2 .ctc-ahorra-icono { width: 30px; height: 30px; border-radius: 9px; }
.ctc-ficha.ctc-ficha--v2 .ctc-ahorra-item-titulo { margin: 0; font-size: 14px; }
.ctc-ficha.ctc-ficha--v2 .ctc-ahorra-item-desc { margin: 1px 0 0; font-size: 12.5px; line-height: 1.35; }
.ctc-ficha.ctc-ficha--v2 .ctc-cierre-v2 .ctc-cta, .ctc-ficha.ctc-ficha--v2 .ctc-cierre-sec { min-height: 46px; font-size: 15px; }
.ctc-ficha.ctc-ficha--v2 .ctc-aviso-v2 { font-size: 11.5px; }

/* --- Gráfica e historial: cápsula compacta, resumen en una fila, tarjetas de 64 px --- */
.ctc-ficha.ctc-ficha--v2 .ctc-tarjeta--grafica-historial { margin: 12px 0 12px; padding: 12px 12px 10px; }
.ctc-ficha.ctc-ficha--v2 .ctc-grafica-historial-cabecera { margin: 0 0 6px; }
.ctc-ficha.ctc-ficha--v2 .ctc-grafica-historial-titulo-linea { font-size: 15px; }
.ctc-ficha.ctc-ficha--v2 .ctc-grafica-historial-semana { font-size: 12.5px; }
.ctc-ficha.ctc-ficha--v2 .ctc-grafica-historial-metadatos { font-size: 12px; }
.ctc-ficha.ctc-ficha--v2 .ctc-g-leyenda { margin: 0 0 4px; font-size: 12px; }
.ctc-ficha.ctc-ficha--v2 .ctc-grafica-historial { min-height: 0; }
.ctc-ficha.ctc-ficha--v2 .ctc-grafica-historial-control { height: 36px; margin: 0 0 2px; }
.ctc-ficha.ctc-ficha--v2 .ctc-grafica-historial-svg .ctc-g-eje-texto,
.ctc-ficha.ctc-ficha--v2 .ctc-grafica-historial-svg .ctc-g-etq,
.ctc-ficha.ctc-ficha--v2 .ctc-grafica-historial-svg .ctc-g-etq-enc { font-size: 11px; }
.ctc-ficha.ctc-ficha--v2 .ctc-grafica-historial-tarjeta { padding: 7px 8px 7px 10px; }
.ctc-ficha.ctc-ficha--v2 .ctc-historial-ofertas-seccion { margin-top: 10px; padding-top: 10px; }
.ctc-ficha.ctc-ficha--v2 .ctc-historial-ofertas-titulo { margin: 0 0 2px; font-size: 15px; }
.ctc-ficha.ctc-ficha--v2 .ctc-historial-total { margin: 0 0 6px; font-size: 12px; }
.ctc-ficha.ctc-ficha--v2 .ctc-historial-semana-nav { margin: 0 0 8px; }
.ctc-ficha.ctc-ficha--v2 .ctc-historial-semana-boton { width: 40px; height: 40px; font-size: 18px; }
.ctc-ficha.ctc-ficha--v2 .ctc-historial-semana-info { min-width: 0; }
.ctc-ficha.ctc-ficha--v2 .ctc-tarjeta-oferta--historica { padding: 8px; gap: 10px; min-height: 0; }
.ctc-ficha.ctc-ficha--v2 .ctc-tarjeta-oferta--historica .ctc-tarjeta-oferta-imagen { flex: 0 0 64px; width: 64px; height: 64px; aspect-ratio: auto; }

/* 0.44.1 · pantallas muy angostas: la etiqueta de ahorro del chip activo puede partirse en dos líneas en vez de cortarse. */
@media (max-width: 359px) {
	.ctc-ficha--v2 .ctc-selector-chip-ahorro { flex-wrap: wrap; max-width: 100%; }
}

/* --- Elementos flotantes: WhatsApp reducido a un botón circular sobre el menú inferior, a la derecha, en fichas --- */
@media (max-width: 1023px) {
	body.single-producto_oferta .ctc-whatsapp-flotante, body.single-ctc_oferta_tienda .ctc-whatsapp-flotante {
		left: auto; right: 12px; bottom: calc(var(--ctc-bnav-h, 58px) + 12px); padding: 6px; max-width: none;
	}
	body.single-producto_oferta .ctc-whatsapp-flotante .ctc-whatsapp-flotante-cerrar,
	body.single-ctc_oferta_tienda .ctc-whatsapp-flotante .ctc-whatsapp-flotante-cerrar { position: absolute; top: -7px; left: -7px; margin: 0; }
	body.single-producto_oferta .ctc-whatsapp-flotante .ctc-whatsapp-flotante-texto,
	body.single-ctc_oferta_tienda .ctc-whatsapp-flotante .ctc-whatsapp-flotante-texto { display: none; }
}

/* 0.45.0 · ajustes finos de ritmo vertical */
.ctc-ficha.ctc-ficha--v2 .ctc-acordeon-contenido { padding-top: 0; }
.ctc-ficha.ctc-ficha--v2 .ctc-pasos { gap: 2px; }
.ctc-ficha.ctc-ficha--v2 .ctc-ahorra-mas-lista { gap: 0; }
.ctc-ficha.ctc-ficha--v2 .ctc-ahorra-item + .ctc-ahorra-item { border-top: 1px solid #eceef3; }
.ctc-ficha.ctc-ficha--v2 .ctc-ahorra-v2 .ctc-ahorra-item + * { margin-top: 0; }
.ctc-ficha.ctc-ficha--v2 .ctc-acordeon summary { min-height: 40px; padding: 4px 0; display: flex; align-items: center; }
.ctc-ficha.ctc-ficha--v2 .ctc-acordeon-contenido { margin-top: 0; }
.ctc-ficha.ctc-ficha--v2 .ctc-selector-chip.is-active .ctc-selector-chip-detalle { justify-content: flex-start; text-align: left; }
.ctc-ficha.ctc-ficha--v2 .ctc-selector-chip-antes { text-align: left; align-self: flex-start; }

/* 0.45.0 · Mercado Libre / tiendas: mismo criterio de encabezado en móvil — «← Todas las ofertas» ya cubre «Inicio › Ofertas»,
   así que la ruta larga (con el título completo del producto) se oculta visualmente; sigue en el HTML y en los datos estructurados. */
@media (max-width: 859px) {
	.ctc-ofm > .ctc-fc-volver { margin: 0 0 8px; font-size: 13px; }
	.ctc-ofm > .ctc-migas-nav { display: none; }
}
@media (max-width: 359px) {
	.ctc-ficha.ctc-ficha--v2 .ctc-selector-chip:not(.is-active) .ctc-selector-chip-texto { flex-direction: column; align-items: flex-start; gap: 0; }
}

.ctc-ficha.ctc-ficha--v2 > .ctc-breadcrumb--fuera { padding: 0; line-height: 1.3; }

.ctc-ficha.ctc-ficha--v2 .ctc-cta-fila .ctc-fav-toggle--junto-cta,
.ctc-ficha.ctc-ficha--v2 .ctc-cta-fila .ctc-share-btn { height: 42px !important; min-height: 42px !important; width: 42px !important; min-width: 42px !important; max-width: 42px !important; flex: 0 0 42px !important; }
.ctc-ficha.ctc-ficha--v2 > .ctc-breadcrumb--fuera a { display: inline; min-height: 0; padding: 0; }
