/* ==========================================================================
   Foodbalance Core — Configurador del producto
   Usa var(--primary_color) de Avada con fallback; verde para progreso/éxito.
   ========================================================================== */
:root {
	--fb-primary: var(--primary_color, #C2185B);
	--fb-success: #1D9E75;
	--fb-border: #e2e8f0;
	--fb-bg: #f8fafc;
	--fb-text: #2d3748;
	--fb-muted: #718096;
}

.fb-section {
	background: #fff;
	border: 1px solid var(--fb-border);
	border-radius: 12px;
	padding: 24px;
	margin: 20px 0;
	box-sizing: border-box;
}

.fb-step-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 16px;
	color: var(--fb-text);
}

.fb-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--fb-primary);
	color: #fff;
	font-size: 0.85rem;
	flex: none;
}

.fb-select {
	width: 100%;
	height: 48px;
	border: 1px solid #cbd5e0;
	border-radius: 6px;
	padding: 0 12px;
	background: var(--fb-bg);
	box-sizing: border-box;
}

/* --- Progreso de platos --- */
.fb-selector-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 10px;
}
.fb-counter { color: var(--fb-muted); font-size: 0.9rem; }
.fb-counter strong { color: var(--fb-text); }

.fb-progress {
	height: 8px;
	background: #edf2f7;
	border-radius: 6px;
	overflow: hidden;
}
.fb-progress-bar {
	height: 100%;
	width: 0;
	background: var(--fb-success);
	transition: width 0.25s ease;
}
.fb-progress-hint {
	font-size: 0.8rem;
	color: var(--fb-muted);
	margin: 6px 0 0;
}

.fb-alert {
	background: #fff5f5;
	border: 1px solid #feb2b2;
	color: #c0392b;
	padding: 10px 14px;
	border-radius: 8px;
	margin: 10px 0 0;
	font-size: 0.85rem;
	font-weight: 700;
}

/* --- Popup de aviso de límite --- */
.fb-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 20px;
}
.fb-modal-box {
	background: #fff;
	border-radius: 14px;
	padding: 28px 26px;
	max-width: 360px;
	width: 100%;
	text-align: center;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.fb-modal-icon {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: #fff5f5;
	color: #c0392b;
	font-size: 28px;
	font-weight: 700;
	line-height: 52px;
	margin: 0 auto 14px;
}
.fb-modal-text {
	font-size: 1rem;
	color: var(--fb-text);
	margin: 0 0 20px;
	line-height: 1.5;
}
.fb-modal-close {
	background: var(--fb-primary);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 12px 28px;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
}

/* --- Rejilla de platos --- */
.fb-grid-platos {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin-top: 18px;
}
@media (min-width: 600px) {
	.fb-grid-platos { grid-template-columns: repeat(2, 1fr); }
}

.fb-plato {
	background: #fff;
	border: 1px solid var(--fb-border);
	border-radius: 12px;
	padding: 16px;
	text-align: center;
	display: flex;
	flex-direction: column;
	transition: border-color 0.2s, transform 0.2s;
	box-sizing: border-box;
}
.fb-plato:hover { border-color: var(--fb-primary); transform: translateY(-3px); }
.fb-plato.fb-activo { border: 2px solid var(--fb-success); }

.fb-plato-img {
	width: 100%;
	height: 120px;
	border-radius: 8px;
	background-size: cover;
	background-position: center;
	background-color: #edf2f7;
	margin-bottom: 12px;
}
.fb-plato-title { font-size: 0.95rem; font-weight: 700; margin: 0 0 4px; line-height: 1.4; }
.fb-plato-precio { font-size: 0.85rem; color: var(--fb-muted); margin-bottom: 12px; }

/* --- Control +/- --- */
.fb-qty {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--fb-bg);
	border-radius: 999px;
	padding: 5px 8px;
	margin-top: auto;
}
.fb-qty-btn {
	width: 32px;
	height: 32px;
	border-radius: 50% !important;
	border: none;
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
	line-height: 1;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.fb-plus { background: var(--fb-success); color: #fff; }
.fb-minus { background: #fff; border: 1px solid #cbd5e0; color: var(--fb-text); }
.fb-minus:disabled { opacity: 0.4; cursor: default; }
.fb-qty-input {
	width: 40px;
	text-align: center;
	border: none !important;
	background: transparent !important;
	font-weight: 700;
	font-size: 1rem;
	color: var(--fb-text);
	padding: 0 !important;
	height: auto !important;
	box-shadow: none !important;
}

/* --- Formulario nutricional --- */
.fb-form-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
}
@media (min-width: 600px) {
	.fb-form-grid { grid-template-columns: 1fr 1fr; }
}
.fb-field { display: flex; flex-direction: column; }
.fb-field label { font-size: 0.85rem; font-weight: 700; color: var(--fb-text); margin-bottom: 6px; }
.fb-field input,
.fb-field select {
	background: var(--fb-bg);
	border: 1px solid #cbd5e0;
	padding: 10px 12px;
	height: 48px;
	border-radius: 6px;
	width: 100%;
	box-sizing: border-box;
}
.fb-field input:focus,
.fb-field select:focus { border-color: var(--fb-primary); background: #fff; outline: none; }
.fb-field.fb-ok input,
.fb-field.fb-ok select { border-color: var(--fb-success); }

/* --- Resumen + ayuda del CTA --- */
.fb-resumen {
	background: #fff;
	border: 1px solid var(--fb-border);
	border-radius: 12px;
	padding: 16px 20px;
	margin: 20px 0 8px;
}
.fb-resumen-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
}
.fb-resumen-label { font-size: 0.85rem; color: var(--fb-muted); }
.fb-resumen-precio { font-size: 1.5rem; font-weight: 700; color: var(--fb-text); }

.fb-cta-help {
	text-align: center;
	font-size: 0.85rem;
	color: var(--fb-muted);
	margin: 6px 0 0;
}
.fb-cta-help.fb-ready { color: var(--fb-success); font-weight: 700; }

/* --- Botón de Woo deshabilitado --- */
.single_add_to_cart_button.fb-disabled {
	opacity: 0.5 !important;
	pointer-events: none;
	cursor: not-allowed;
}
