/* ==========================================================================
   Rancheando — upsell.css
   Combo "Se llevan juntas" (FBT) + versión superior (PDP) + order bumps (carrito/checkout).
   Colores SIEMPRE vía custom properties. Encaja con product.css / cart.css / checkout.css.
   ========================================================================== */

/* ───────────────────────── FBT / combo (PDP) ───────────────────────── */
.fbt {
	border: 1px solid var(--arena-med);
	background: var(--crema);
	padding: 28px;
	margin-top: 24px;
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}
/* Escala por cantidad: sumando 1 → p1, sumando 2 → p2 (resalta el tramo alcanzado). */
.fbt-scale { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fbt-scale-label { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--camel); font-weight: 600; }
.fbt-scale-step { font-size: 12px; color: var(--texto-2); border: 1px solid var(--arena-med); background: var(--blanco); padding: 5px 11px; transition: background .2s, border-color .2s, color .2s; }
.fbt-scale-step strong { color: var(--marron); font-weight: 600; }
.fbt-scale-step.is-active { border-color: var(--verde-ok); background: var(--verde-ok); color: var(--blanco); }
.fbt-scale-step.is-active strong { color: var(--blanco); }

.fbt-items {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 12px;
}
.fbt-plus {
	align-self: center;
	font-family: var(--font-display);
	font-size: 22px;
	color: var(--camel);
	flex-shrink: 0;
}
.fbt-item {
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1 1 220px;
	min-width: 200px;
	padding: 12px;
	background: var(--blanco);
	border: 1px solid var(--arena-med);
	transition: border-color .2s;
}
.fbt-item:hover { border-color: var(--camel); }
.fbt-item.is-main { background: var(--arena); }
.fbt-pick { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.fbt-item.is-main .fbt-pick { cursor: default; }
.fbt-check { accent-color: var(--marron); width: 16px; height: 16px; flex-shrink: 0; }
.fbt-thumb { width: 56px; height: 70px; flex-shrink: 0; overflow: hidden; background: var(--arena); }
.fbt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fbt-thumb-fill { display: block; width: 100%; height: 100%; background: linear-gradient(145deg, var(--arena), var(--camel-light)); }
.fbt-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fbt-name { font-family: var(--font-display); font-size: 15px; color: var(--marron); line-height: 1.25; }
.fbt-name em { font-style: italic; color: var(--texto-2); font-size: 12px; }
.fbt-price { font-size: 13px; color: var(--texto-2); }

.fbt-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--arena-med);
}
.fbt-figures { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fbt-totals { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.fbt-strike { color: var(--texto-2); text-decoration: line-through; font-size: 15px; }
.fbt-bundle { font-family: var(--font-display); font-style: italic; font-size: 30px; color: var(--marron); line-height: 1; }
/* Descuento bien evidente: pill sólida verde. */
.fbt-pct { align-self: center; font-size: 12px; letter-spacing: .5px; font-weight: 600; color: var(--blanco); background: var(--verde-ok); padding: 4px 10px; border-radius: 2px; }
.fbt-pct[hidden] { display: none; }
.fbt-meta-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.fbt-save { font-size: 12px; color: var(--texto-2); font-weight: 500; }
.fbt-save[hidden] { display: none; }
.fbt-tf { font-size: 13px; color: var(--verde-ok); }
.fbt-tf strong { font-family: var(--font-display); font-style: italic; font-weight: 400; }
.fbt-add {
	background: var(--marron);
	color: var(--blanco);
	padding: 15px 28px;
	font-size: 11px;
	letter-spacing: 2px;
	text-transform: uppercase;
	font-weight: 500;
	transition: background .2s, opacity .2s;
	white-space: nowrap;
}
.fbt-add:hover { background: var(--marron-med); }
.fbt-add:disabled { background: var(--arena-med); color: var(--texto-2); cursor: not-allowed; }
.fbt-add.is-loading { opacity: .6; cursor: progress; }

/* ───────────────────────── Selects de variación (combo / bump) ───────────────────────── */
.rnc-varsel { display: flex; flex-wrap: wrap; gap: 8px; }
.rnc-varsel-field { display: flex; flex-direction: column; gap: 3px; flex: 1 1 120px; min-width: 0; }
.rnc-varsel-cap { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--camel); font-weight: 500; }
.rnc-varsel-input {
	font-family: var(--font-body);
	font-size: 13px;
	color: var(--marron);
	background: var(--blanco);
	border: 1px solid var(--arena-med);
	padding: 8px 10px;
	cursor: pointer;
	transition: border-color .2s;
}
.rnc-varsel-input:focus { outline: none; border-color: var(--marron); }
/* En el combo, los selects van indentados bajo la pieza, separados por una hairline. */
.fbt-item.is-variable .rnc-varsel { padding-top: 10px; border-top: 1px solid var(--arena-med); }
/* En el bump, los selects ocupan el ancho debajo del label. */
.order-bump.is-variable .rnc-varsel { padding: 0 16px 16px; }

/* ───────────────────────── Sección FBT en carrito / checkout ─────────────────────────
   (No depende de product.css, que sólo carga en el PDP.) */
.rnc-fbt-section { padding: 48px 56px; border-top: 1px solid var(--arena-med); background: var(--blanco); }
.rnc-fbt-section .section-eyebrow { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--camel); font-weight: 600; margin-bottom: 8px; }
.rnc-fbt-section .section-h2 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); font-weight: 400; color: var(--marron); line-height: 1.12; }
.rnc-fbt-section .section-h2 em { font-style: italic; }
@media (max-width: 768px) { .rnc-fbt-section { padding: 32px 20px; } }

/* ───────────────────────── Versión superior (upsell PDP) ───────────────────────── */
.pdp-upsell {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 18px;
	padding: 14px;
	background: var(--crema);
	border: 1px solid var(--arena-med);
	border-left: 3px solid var(--camel);
	color: inherit;
	transition: border-color .2s, background .2s;
}
.pdp-upsell:hover { border-color: var(--camel); background: var(--blanco); }
.pup-thumb { width: 54px; height: 66px; flex-shrink: 0; overflow: hidden; background: var(--arena); }
.pup-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pup-thumb-fill { display: block; width: 100%; height: 100%; background: linear-gradient(145deg, var(--camel-light), var(--camel)); }
.pup-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.pup-eyebrow { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--camel); font-weight: 500; }
.pup-name { font-family: var(--font-display); font-style: italic; font-size: 17px; color: var(--marron); }
.pup-note { font-size: 12px; color: var(--texto-2); }
.pup-cta { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--marron); font-weight: 600; flex-shrink: 0; }

/* ───────────────────────── Order bump (carrito/checkout) ───────────────────────── */
.order-bump {
	border: 1px dashed var(--camel);
	background: var(--crema);
	margin: 18px 0;
	transition: border-color .2s, background .2s;
}
.order-bump.is-active { border-style: solid; border-color: var(--verde-ok); background: var(--blanco); }
.order-bump.is-loading { opacity: .6; pointer-events: none; }
.ob-label {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px;
	cursor: pointer;
}
.ob-check { position: absolute; opacity: 0; width: 0; height: 0; }
.ob-check-box {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	border: 1.5px solid var(--camel);
	background: var(--blanco);
	border-radius: 3px;
	position: relative;
	transition: background .2s, border-color .2s;
}
.ob-check:checked + .ob-check-box { background: var(--verde-ok); border-color: var(--verde-ok); }
.ob-check:checked + .ob-check-box::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 3px;
	width: 5px;
	height: 10px;
	border: solid var(--blanco);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.ob-check:focus-visible + .ob-check-box { outline: 2px solid var(--marron); outline-offset: 2px; }
.ob-thumb { width: 52px; height: 64px; flex-shrink: 0; overflow: hidden; background: var(--arena); }
.ob-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ob-thumb-fill { display: block; width: 100%; height: 100%; background: linear-gradient(145deg, var(--arena), var(--camel-light)); }
.ob-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ob-eyebrow { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--camel); font-weight: 600; }
.ob-text { font-family: var(--font-display); font-style: italic; font-size: 16px; color: var(--marron); line-height: 1.3; }
.ob-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.ob-strike { color: var(--texto-2); text-decoration: line-through; font-size: 12px; }
.ob-final { font-size: 15px; font-weight: 600; color: var(--verde-ok); }
.ob-badge { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; color: var(--blanco); background: var(--verde-ok); padding: 2px 7px; }

/* Línea de descuento (fee) en el resumen del carrito. */
.cs-line-fee .cs-label { color: var(--verde-ok); }
.cs-line-fee .cs-val { color: var(--verde-ok); font-weight: 500; }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 768px) {
	.fbt { padding: 20px; }
	.fbt-item { flex: 1 1 100%; }
	.fbt-plus { display: none; }
	.fbt-summary { flex-direction: column; align-items: stretch; }
	.fbt-add { width: 100%; }
	.pdp-upsell { flex-wrap: wrap; }
	.pup-cta { width: 100%; text-align: right; }
}
